Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 3, 2024 208 Research on the Correction Model for Measuring the Rheology of Oil‐Based Drilling Fluids in Straight Pipes Under Pulsating Flow Hai Yang, Zeqiang Wei School of Southwest Petroleum University, Chengdu 610500, China Abstract: The currently common method for the automated real-time accurate measurement of drilling fluid rheology is the straight pipe measurement. However, the pulsating flow generated by the pumping equipment often leads to significant data errors in pressure difference and flow measurement, resulting in low accuracy of the calculated rheological parameters. To address the issue of data errors caused by pulsating flow, this paper proposes a correction model for straight pipe drilling fluid rheology measurement under pulsating conditions. Through research and theoretical analysis of the pulsating flow produced by diaphragm pumps, we derived the variation laws of outlet fluid flow rate, pressure, and diaphragm pump operating frequency, resulting in an expression for outlet flow velocity, which provides initial parameters for subsequent simulations. We then conducted 3D modeling and simulations of the measurement pipe in the actual experimental setup, obtaining a correction model for fluid rheology measurement under the influence of pulsating flow based on numerous simulation results. Finally, comparative experiments were conducted on a constructed experimental platform, comparing the results at different flow rates, viscosities, and temperatures against a rotating viscometer as the standard. The average deviations for the corrected rheological parameters were found to be 2.69% for apparent viscosity (AV), 2.362% for plastic viscosity (PV), and 3.056% for yield point (YP), effectively reducing the data errors in pressure difference and flow measurement caused by pulsating flow. Keywords: Drilling fluid rheology; straight pipe measurement; fluid pulsation; simulation analysis; rheological measurement model. 1. Introduction During the drilling completion process, drilling fluid acts as the "blood" of drilling operations, and its performance is one of the decisive factors for the successful extraction of resources.[1]In drilling and completion engineering operations, drilling fluid serves multiple functions, such as cleaning the wellbore, carrying cuttings, cooling and lubricating the drill bit and drill string, transmitting hydraulic power, and controlling bottom hole pressure. [2]Therefore, real-time and accurate measurement of drilling fluid rheological parameters is an essential process to ensure the smooth success of drilling operations. The real-time determination of these parameters is the most effective guarantee for increasing drilling speed, maintaining downhole safety, protecting oil and gas reservoirs, and reducing drilling fluid costs, making timely and accurate online measurement crucial.[3-4] In the automation of drilling, there is widespread attention from researchers on the real-time detection and control of drilling fluid rheological properties. Current measurement methods primarily rely on manual sampling, transport, processing, and analysis of measurement data, which ultimately leads to results.[5]This method has the drawback of failing to analyze issues and impacts during the drilling process in real-time. The strict on-site environment imposes rigorous standards for monitoring drilling fluid rheology, as the fluid must accomplish tasks like suspension, pressure control, stability of exposed formations, buoyancy, lubrication, and cooling. [6-7]Rheological properties are key indicators of drilling fluid performance, typically described using parameters like apparent viscosity, plastic viscosity, and yield point.[8]The tubular measurement method for drilling fluid rheology has been developed due to its structural characteristics, which facilitate the automated and precise real-time measurement of drilling fluid rheology.[9] However, during application, the reciprocating action of pumping equipment like diaphragm pumps leads to fluid pulsation in the straight pipe, causing fluctuations in pressure difference and flow rate measurements, thus significantly reducing overall measurement accuracy. Some researchers have studied the pulsation caused by diaphragm pumps; for instance, Xiao Junjian and Yang Zhaobin conducted theoretical analyses and proposed a parallel pump approach using optimal phase angle dispersion technology to mitigate pulsation effects. [10]However, this method has notable limitations, being suitable only for high flow rates and requiring significant space and equipment costs. Li Fei and colleagues focused on single-acting diaphragm pumps, calculating theoretical parameters like flow rate and pulsation coefficient, and improving inlet design. [11]Ning Yuansong developed two pressure pulse dampening devices to study fluid pulsation in drilling fluids, validating their effectiveness through simulations, but both schemes lacked adaptive control and easily caused static pressure losses, affecting other parameters in the pipeline system.[12]Previous researchers primarily focused on actively controlling or eliminating pulsating flow, which increases equipment costs and introduces other interference effects. To reduce equipment costs without introducing additional interference, some scholars have conducted extensive research. For example, Pinnington in the UK designed a non- invasive magnetostrictive actuator capable of controlling fluid pulsation, operating similarly to a magnetorheological damper. It magnetizes to move a piston, applying force to the pipeline to generate secondary pulsation waves; however, this method also increases pipeline vibration with reduced fluid 209 pulsation, and the coupling between the actuator and fluid pressure diminishes effective pulsation control at certain frequencies.[13]Smoada and colleagues designed an active energy storage device consisting of a stacked piezoelectric ceramic piston and a passive accumulator, which uses the piston’s reciprocating motion to generate secondary pulsation waves, though the stacked piezoelectric ceramics are not independently driven and fail to achieve higher modal control.[14] To address the significant data errors in pressure difference and flow measurements caused by pulsating flow, a correction model for measuring fluid rheology in straight pipes under pulsating flow has been proposed. Through research and theoretical analysis of pulsating flow generated by diaphragm pumps, the variations of outlet flow rate, pressure, and pump operating frequency were derived, leading to an expression for outlet flow velocity that provides initial parameters for subsequent simulations. A 3D model and simulations of the measurement pipe were conducted based on the actual experimental setup, yielding a correction model for fluid rheology measurement under pulsating flow influence. Finally, experiments were performed on the constructed platform, showing significant improvements in the accuracy of rheological parameter measurements compared to results obtained without the correction model. 2. Design of an Online Measurement Scheme for the Rheological Properties of Straight Pipe Systems The principle of measuring the rheological properties of drilling fluid in a straight pipe involves measuring the pressure difference at various flow rates within a pipe of known dimensions, along with the corresponding flow rates. This data is used to calculate the wall shear rate and stress, allowing for the construction of a rheological curve. Ultimately, specific rheological parameter values are obtained from this curve.[15] As shown in Figure 1, drilling fluid samples are pumped from the mud pit into the measuring straight pipe using pumping equipment, and then returned to the mud tank after measurement. A mass flow meter measures the flow rate, while two pressure difference sensors are installed at both ends of the measuring pipe to record the pressure difference across the segment. By adjusting the working voltage of the pumping equipment in a gradient manner, different flow rates and corresponding pressure measurements are obtained. Finally, these measurement data are used to calculate and plot the rheological curve of the drilling fluid, enabling online measurement of the rheological parameters for oil-based drilling fluids. Figure 1. Schematic Diagram of the Straight Pipe Measurement Principle In the process of measuring the rheological properties in a straight pipe, pressure difference and flow rate are the data used to calculate the rheological parameters of the drilling fluid. To obtain the rheological parameters, a rheological curve is plotted with wall shear rate𝛾 on one axis and wall shear stress𝜏 on the other. (1) When the fluid is in steady-state motion inside the straight pipe According to the principle of force balance within the straight pipe[16], One force is the force 𝐹 acting on the pipe walls at both ends,and the other is the viscous resistance 𝐹 when the fluid flows along the wall.Let rbe the distance from the center of the pipe to any point on the wall, and R be the radius of the pipe. Thus, in laminar flow, the formula for wall shear stress can be obtained as follows: 𝜋𝑟 ⋅ 𝛥𝑃 2𝜋𝑟𝐿𝜏 0 1 𝜏 𝛥𝑃 2𝐿 2 In the equation,𝜏——represents the wall shear stress on the straight pipe (Pa); At r=R, 𝜏 is at its maximum, the fluid resistance is greatest, and the flow velocity is zero. At the center of the pipe, r=0, 𝜏 is at its minimum, the resistance is lowest, and the flow velocity is at its maximum. Finally, we can obtain: 𝜏 𝜏 𝑟 𝑅 3 The above two formulas apply to any time-independent fluid in steady-state flow. (2) The characteristics of Newtonian fluid flow can be organized using the Hagen equation. 𝑄 𝛥𝑃 ⋅ 𝜋𝑅 8𝜇𝐿 4 𝑄 𝜋𝐷 /4, It can be obtained that: 𝜏 𝜇 8𝑣 𝐷 5 According to Newton's equation, due to this 𝜏 𝜇 , therefore, it follows that: . (3) Characteristics of non-Newtonian fluid flow To derive the rheological curve of a non-Newtonian fluid 𝜏 and determine its rheological properties , it is 210 necessary to know the shear stress and shear rate during pipe flow. Assuming y=v, then dy=dv; 𝑧 𝜋𝑟 ; 𝑑𝑧 2𝜋𝑟𝑑𝑟 ; integrating and organizing gives: 𝑦𝑑𝑧 𝑦𝑧| 𝑧𝑑𝑦 6 When r=R, flow velocity v=0, Organized as follows: 𝑄 𝜋𝑟 𝑑𝑣 𝑑𝑟 𝑑𝑟 7 According to reference[17], by introducing the generalized flow index / 𝑁, it can be obtained that: 4 𝑑𝑣 𝑑𝑟 3 8𝑣 𝐷 𝑑 𝑙𝑛 8𝑣 𝐷 𝑑 𝑙𝑛 𝜏 ⋅ 8𝑣 𝐷 8 Therefore, substituting / into equation (8) gives the wall shear rate as: 𝑑𝑣 𝑑𝑟 𝛾 8𝑣 𝐷 3𝑁 1 4𝑁 9 The equation (9) represents the calculation model for wall shear rate of time-independent non-Newtonian fluids (including Newtonian fluids) at the pipe wall. From the flow velocity and pressure difference data obtained at each uniformly spaced driving frequency, the corresponding wall shear stress and wall shear rate can be determined. These uniform data points can then be used to plot the rheological curve. Different fitted rheological models can yield various rheological parameters defined under those models.[18]Apparent viscosity is a common rheological parameter across all models. Its calculation method involves taking the shear rate value of 1022𝑠 and substituting it into the model to compute the corresponding shear stress. The ratio of shear stress to shear rate at this point yields the apparent viscosity.[19] 3. Research on Error Analysis of Straight Pipe Measurement under Pulsating Flow The types and models of diaphragm pumps can generally be categorized by drive power into electric, pneumatic, or hydraulic; and by structure into single-cylinder, double- cylinder, and triple-cylinder[20].The instantaneous volumetric flow rate at the outlet of a single-cylinder pump can be expressed as: 𝑑𝑉 𝑑𝑡 𝜋 𝐻 8𝑇 ⋅ 𝐷 𝑠𝑖𝑛 2𝜋𝑡 𝑇 𝐻 𝑐𝑜𝑠 2𝜋𝑡 𝑇 𝑠𝑖𝑛 2𝜋𝑡 𝑇 10 In the equation, T——represents the time for the diaphragm pump's drive eccentric wheel to complete one rotation (s); D——the maximum length of the diaphragm (mm); H——the maximum height of the diaphragm (mm) Thus, the outlet flow rate curve for a single side chamber of the diaphragm pump resembles a half-wave rectified sine wave. For a double-acting diaphragm pump, the two working chambers operate alternately, so the instantaneous theoretical outlet flow rate can be obtained by superimposing the outlet flow rates of the single side chambers. The instantaneous theoretical outlet flow rate of the double-acting diaphragm pump is shown in Figure 2: Figure 2. Instantaneous theoretical outlet flow rate of the double-acting diaphragm pump In addition, in straight pipe measurement, the measuring pipe generally has a small diameter, and the required flow rate during measurement does not need to be very high. Therefore, only a small output power from the diaphragm pump is needed. In the absence of strong external factors, the frequency of fluid pulsation in the pipeline is determined by the driving power of the diaphragm pump during operation. Thus, it can be assumed that the expression for the flow rate 𝑣出口 at the outlet of the diaphragm pump is: 𝑣出口 𝐴|𝑠𝑖𝑛 2𝜋𝑓 ∗ 𝑡 | 11 In the equation, A represents the amplitude of the pulsation driven by the diaphragm pump (this amplitude is determined by the flow rate at the outlet and the pipe diameter); f is the driving frequency of the diaphragm pump (in Hz). From the analysis of the working principle of the diaphragm pump, it is known that the outlet flow rate is a sinusoidal pulsation. The expression for the initial velocity at the inlet is set as: 𝑖𝑛𝑙𝑒𝑡 𝑣∗𝑙 𝑚 𝑠 ∗ 𝑎𝑏𝑠 sin 2∗𝑃𝐼∗𝑓∗𝑡 𝑙 𝑠 12 The measurement tube model is made of 316L stainless steel, with a length of 1300 mm and an internal diameter of 211 25 mm. The schematic diagram of the pipeline model is shown below: Figure 3. Schematic Diagram of the Pipeline Model In analyzing the flow field of drilling fluid in the pipeline, boundary conditions must be provided, as they determine the accuracy and convergence of the computational model. The main boundary conditions include inlet and outlet conditions. (1) Inlet Boundary Conditions Since the simulation calculates the pressure difference under different flow rates, the inlet boundary conditions for the drilling fluid mainly include inlet flow velocity, density, and inlet diameter. The inlet flow velocity is obtained through the flow rate and the pipe diameter. The flow behavior of the drilling fluid is assumed to be laminar. (2) Outlet Boundary Conditions The outlet boundary conditions primarily include the outlet diameter, with a pressure outlet set to 0 MPa. Subsequently, other initial parameters are set as follows: Elastic modulus E=208GPa.Gravitational acceleration set to y axis=-9.8m/s².Flow velocity =0.8m/s.Fluid density set to 1100kg/m³. The simulation pressure difference data is shown in Table 1. Table 1. Simulation Pressure Difference Data Viscosity (mPa·s) 40 80 120 measured point pressure difference (Pa) 1833.8 3475.3 5172.5 The simulation pressure curve is shown in Figure 4: Figure 4. Simulation Pressure Curve From the simulation pressure curve shown in the figure, it can be observed that the static pressure distribution within the pipeline gradually decreases with increasing distance from the inlet. Additionally, a higher viscosity corresponds to a greater pressure within the pipeline for the simulated fluid. Similarly, the effects of different densities and flow velocities on the measured pressure difference are studied. For varying densities, gravitational acceleration is set to - 9.8m/s², with a flow velocity of 0.8m/sand a kinematic viscosity of 0.05kg/(m·s). Table 2. Simulation Pressure Difference Data Density (g/m³) 1.2 1.6 2.1 measured point pressure difference (Pa) 1835.8 2032.2 2247.9 The simulation pressure curve is shown in Figure 5: 212 Figure 5. Simulation Pressure Curve The static pressure distribution within the pipeline still shows a trend of decreasing pressure as the distance from the inlet increases. The variation in density has a relatively small impact on the measured pressure difference; however, it remains a necessary factor for high-precision measurements. Similarly, for different flow velocities, For varying densities, gravitational acceleration is set to -9.8m/s², Fluid density set to 1100kg/m³ and a kinematic viscosity of 0.05kg/(m·s). The simulation pressure difference data is presented in Table 3: Table 3. Simulation Pressure Difference Data Density (g/m³) 1.2 1.6 2.1 measured point pressure difference (Pa) 1835.8 2032.2 2247.9 The simulation pressure curve is shown in Figure 6: Figure 6. Simulation Pressure Curve From the charts, it can be concluded that under different velocity gradients, the pressure distribution within the pipeline remains consistent, but the pressure differences vary significantly. This indicates that the inlet velocity has a substantial impact on pressure measurements in the measuring tube. As the flow velocity increases, the pressure difference notably rises. The pipeline viscometer measures the pressure difference at different flow rates to determine the rheological properties of the drilling fluid. This trend is fundamental to the measurements and serves as an effective guarantee of measurement accuracy. The following figure shows the curve of inlet fluid flow velocity over time within 2 seconds after setting up the pulsation: Figure 7. Inlet Flow Velocity Curve within 2 Seconds of Simulation 213 As the inlet fluid flow velocity increases, the outlet pressure gradually rises, while the pressure from the inlet to the outlet gradually decreases. Additionally, a higher initial flow velocity at the inlet leads to a greater flow velocity at the same position within the pipeline. Under ideal constant flow conditions, the flow velocity and pressure cloud diagrams align with those observed under pulsating conditions, where the flow velocity is minimal near the wall and maximal at the center of the pipeline. a) 0.4m/s b) 0.8m/s c) 1.2m/s Figure 8. Average Inlet Pressure vs. Time Line Chart As shown in Figure 8, when the pulsation frequency is set to 4.8 Hz, the inlet flow velocities are set to 0.4, 0.8, and 1.2 m/s, and the curve illustrates how the inlet pressure changes over time. From the pressure-time variation graph, it can be observed that the inlet pressure under pulsating flow conditions undergoes periodic changes in accordance with the pulsation. 214 Figure 9. Pressure Difference Variation in the Pipeline at Different Flow Velocities From the simulation analysis results depicted in the above figure, it can be seen that, at a specific point in time, the pressure difference distribution in the pipeline is relatively uniform for both pulsating and non-pulsating inlet velocities. However, a pressure inflection point appears between 0 and 0.2 m. This inflection point indicates that, during pulsation, the rate of pressure distribution varies with distance. If a measurement falls within the transitional velocity range, the corresponding pressure for that segment reflects the static pressure at the previous velocity, which may lead to the observed pressure inflection point. Nevertheless, the pressure variation trends before and after the inflection point remain linear. 4. Pulsating Flow in Straight Pipe Measurement Simulation and Model Calibration Study In designing the dynamic testing, the voltage-controlled variable frequency drive is first set to control the driving voltage of the electric diaphragm pump, thereby regulating the pulsation frequency generated by the pump. After setting the stepped driving voltages, measurements are taken to collect data on pressure differences, instantaneous volumetric flow rates, and other parameters. The rheological parameters measured by the six-speed rotational viscometer are used as reference theoretical values (samples are manually extracted from the mud tank and quickly measured and recorded) and serve as a benchmark for measuring accuracy or error comparison. The following table presents the parameters set during the experiments with different voltage-driven diaphragm pumps, as shown in Table 4: Table 4. Parameter Values Under Different Voltage Drives Voltage(V) Instantaneous Volumetric Flow Rate (m3/h) Uniform Flow Velocity (m/s) Density (g/cm3) Temperature (℃) Diaphragm Pump Pumping Frequency (Hz) 2.0 0.247 0.140 1.13 17.99 1.2 2.5 0.401 0.227 1.13 17.97 1.5 3.0 0.511 0.289 1.13 17.95 1.8 3.5 0.604 0.342 1.13 17.99 2.1 4.0 0.703 0.398 1.13 17.97 2.4 4.5 0.814 0.461 1.13 17.95 2.7 5.0 0.896 0.507 1.13 17.99 3.0 5.5 1.018 0.576 1.13 17.97 3.3 6.0 1.096 0.620 1.13 17.95 3.6 6.5 1.210 0.685 1.13 17.99 3.9 7.0 1.304 0.738 1.13 17.97 4.2 7.5 1.399 0.792 1.13 17.95 4.5 8.0 1.521 0.861 1.13 17.94 4.8 The oil-based drilling fluid sample is pumped through a diaphragm pump into the real-time measurement device for testing the rheological properties of the drilling fluid. During the testing period, to minimize transient effects, data recording only begins after the pressure difference stabilizes at each set voltage. The pressure difference and flow measurement value variation curves for the drilling fluid sample are shown in the figure. 215 Figure 10. Relationship Between Flow Rate and Pressure Difference From Figure 10, it can be observed that the measured pressure difference values exhibit fluctuations, particularly after a change in the pumping power of the diaphragm pump, where the fluctuations are more pronounced. During normal operation, both flow and pressure measurement data also show variability. As previously analyzed, this is attributed to the pulsating flow caused by the diaphragm pump. Based on the theoretical analysis of the characteristics of the pulsating flow generated by the diaphragm pump and the 2D model simulation of the measuring tube, it can be concluded that the main factor affecting the online measurement of the rheological properties in straight pipe flow under pulsating conditions is the impact on pressure difference measurement. In contrast, the flow measurement is conducted using a Coriolis mass flow meter, which is less affected, as the average flow rate over a certain period is used for calculating rheological parameters. Therefore, the influence of pulsating flow on flow measurement data can generally be neglected. Additionally, based on the uniform flow velocity derived from the instantaneous volumetric flow rate in Table 4, the amplitude A of the pulsating flow velocity at the outlet of the diaphragm pump can be calculated using the following equation: �̄� ∗ 𝑇 2 𝐴 𝑠𝑖𝑛 2𝜋𝑓 ∗ 𝑡 𝑑𝑡 13 The simplified calculation yields: 𝐴 𝜋 2 �̄� 14 In the equation, �̄� ——represents the flow velocity calculated from the instantaneous volumetric flow rate after determining the dimensions; T——the period of the reciprocating motion of the diaphragm pump; f——the frequency of the diaphragm pump's reciprocating motion . Based on the calculated amplitude, the actual pulsating flow velocity at the outlet corresponding to different voltage settings of the diaphragm pump is determined, which will be used as the initial velocity at the inlet. First, it is necessary to assess the flow regime of the fluid in different sections of the pipeline. According to hydraulic principles and extensive research, it is known that when the Reynolds number Re is approximately less than 2100, the flow of the drilling fluid is generally considered laminar; when its value exceeds 4000, the flow is generally regarded as turbulent. In practice, there is also a transitional regime between laminar and turbulent flow, characterized by Reynolds numbers in the range of [2000-4000]. This state is referred to as the critical Reynolds number REC. Additionally, the viscosity of drilling fluid is typically not very low, meaning that interlayer movement between molecules is more pronounced. Measurements typically start at a certain viscosity, so situations in the transitional regime are unavoidable. However, the model described below can also be used for computational analysis.Under the straight pipe measurement principle, when performing calculations with the model, the wall shear rate and shear stress calculations require the drilling fluid to be in a laminar state. Therefore, the flow regime of the drilling fluid in the measuring tube needs to be assessed, based on the Reynolds number, which is calculated using the formula: 𝑅𝑒 𝜌𝐷 𝑣 𝜇 15 In the equation, 𝐷 —the internal diameter of the pipe (m); v— the fluid flow velocity (m/s); 𝜇—the fluid viscosity(mPa·s); 𝜌—the fluid density (kg/m3). Using the rheological parameters of the initially configured oil-based drilling fluid sample, simulation initialization parameters are set. The flow velocity in the pipeline is first analyzed through simulation. One advantage of this simulation approach is the ability to independently adjust parameters such as fluid viscosity and density, which can be time-consuming and labor-intensive to change in practice. In this simulation analysis, the minimum viscosity is set to 20 mPa·s, and the maximum density is set to 2500 kg/m3. From actual measurements, it is known that the maximum flow velocity occurs when the voltage is set to 8V, with the maximum uniform inlet velocity at 0.861 m/s. The maximum pulsating flow velocity is 1.35 m/s, which can serve as a representative for conditions at lower speeds. This maximum 216 flow velocity is then used as the inlet flow velocity for the simulation, allowing for an analysis of the flow velocity variation throughout the entire measuring device. Figure 11. Flow Velocity Line Chart from Inlet to Outlet in the Pipeline Based on Figure 11, it can be observed that the fluid begins to stabilize after reaching a pipeline length of 4.5 m from the inlet. Determining the flow regime within the pipe is essential; calculating the Reynolds number requires several parameters, including density, viscosity, flow velocity, and pipe diameter. The designed experimental apparatus has a uniform internal diameter of 25 mm, with the maximum flow velocity remaining constant. Therefore, by conducting simulation analyses across different ranges of actual density and viscosity, the flow regime of the fluid within the measuring segment of the experimental apparatus can be determined. a) 1000kg/m3 b) 1500kg/m3 c) 2500kg/m3 Figure 12. Reynolds Number at Different Pipe Lengths Under Varying Densities 217 From Figure 12, it can be observed that at a viscosity of 20mPa·s, only with a density of 2500 kg/m3 does the Reynolds number exceed 2100 within the measuring segment of the pipe from 1 to 4.5 m. However, since the pressure difference sensor probe is installed in the measuring segment from 4.5m to 6m, the flow regime of the fluid within this segment remains laminar under the given fluid parameters. Therefore, this aligns with the flow regime required for calculating wall shear rates. As a result, measurement errors due to turbulence do not need to be considered in this experimental setup. Since this device uses a capacitive pressure difference sensor, the pressure values extracted during simulation represent static pressure, meaning they correspond to the pressure acting on the walls and are most reflective of the actual measured pressure difference. The following table presents the pressure difference data under different voltage gradients: Table 5. Pressure Difference Data Under Different Voltage Gradients The pressure difference value at 2V (Pa) The pressure difference value at 4V (Pa) The pressure difference value at 6V (Pa) The pressure difference value at 8V (Pa) The pressure difference value at 2V (Pa) The pressure difference value at 4V (Pa) 2630.56 16400 33100 60726.2 2630.56 16400 2550 15500 31100 56700 2550 15500 2184.6 13100 25800 46800 2184.6 13100 1600 9230 17900 32200 1600 9230 850 4460 8220 14300 850 4460 9.9 -790 -2390 -5170 9.9 -790 -839 -6010 -12800 -24200 -839 -6010 -1610 -10700 -22100 -40900 -1610 -10700 -2220 -14300 -29100 -53700 -2220 -14300 -2620 -16500 -33300 -61100 -2620 -16500 2500 15700 32000 58900 2500 15700 2460 15100 30400 55600 2460 15100 2130 12800 25300 46000 2130 12800 Calculate the wall pressure difference vs. time curve for the measuring tube from the inlet to the outlet (1.3 m long) during one cycle at each diaphragm pump driving frequency. a) 2V b) 4V c) 6V d) 8V Figure 13. Pressure Difference vs. Time at the Wall of the Measuring Tube Under Different Diaphragm Pump Driving Voltages 218 From Figure 13, it can be observed that, regardless of the diaphragm pump's driving voltage, the trend of pressure difference between the inlet and outlet over time remains generally consistent within a single pumping cycle. However, as the frequency increases, the amplitude of the inlet pulsating flow velocity becomes larger, resulting in greater fluctuations in the pressure difference between the measuring tubes. Based on the pulsating velocity and pressure difference within one cycle, the earlier figures demonstrate that the change in pressure difference is proportional to the acceleration of the pulsating velocity; that is, as the pulsating acceleration increases, the pressure difference also increases. Additionally, when the pulsating velocity decreases, a siphoning effect occurs within the tube, leading to a negative pressure difference in that section. Below are the simulation results for the pulsating flow under the same driving voltage of the diaphragm pump, with different viscosities set at 20 mPa·s, 50 mPa·s, and 80 mPa·s. The comparative curve for the maximum and minimum driving voltages is shown below: a) 8V b) 2V Figure 14. Pressure Difference vs. Time Curve in the Measuring Tube Under Different Driving Frequencies and Viscosities From Figure 14, it can be observed that as the viscosity increases, the pressure difference between the measuring tubes also increases, although the magnitude of this increase is relatively small. Additionally, by selecting 20 evenly spaced points within a single pumping cycle of the diaphragm pump, and varying the viscosity from 20 mPa·s to 80 mPa·s at driving voltages of 8V and 2V, the corresponding increase in the pressure difference in the measuring tube can be calculated. This is illustrated in Figure 15: Figure 15. Pressure Difference Increment Comparison Between 2V and 8V at 20 mPa·s and 80 mPa·s From the simulation results in Figure 15, it can be observed that the average pressure difference increases by 11.515% when the viscosity changes from 20 mPa·s to 80 mPa·s at 8V. The curve shows two peak values, indicating points where the pressure difference transitions from positive to negative. At 2V, the average pressure difference increases by 37.53% over the same viscosity range. This suggests that when the flow velocity amplitude is relatively low, changes in viscosity have a more significant impact on the pressure difference in the measuring tube compared to conditions with higher amplitude pulsating flow. In the actual setup, the pressure difference sensor probes are spaced 1.3 m apart, allowing for calculations of fluid pressure loss as it flows through the pipe. In the simulation, based on the flow rate gradients from Table 4-2 and the relationship between driving voltage and diaphragm pump frequency, the initial pulsating flow velocity at the inlet was set. Extensive simulations were conducted under varying viscosities and densities to determine the pressure difference at the measuring tube, with the fluid temperature set to 25°C. 219 The pressure difference values represent the average absolute pressure difference within one operating cycle of the diaphragm pump. It is evident that as both driving voltage and viscosity increase, the average pressure difference in the measuring tube segment also rises. The driving voltage is plotted on the x-axis, viscosity on the y-axis, and pressure difference on the z-axis. The fitted surface data leads to the following formula: 𝑃 1 612.786𝑥 21.491𝑥 0.353𝑦 25.581𝑦 16 The surface plot of the average absolute pressure difference values in the measuring tube segment under pulsating flow and the pressure difference values under steady flow shows that the trends of both are generally consistent. The following formula represents the data fitting for the steady flow conditions: 𝑃 1 600𝑥 28.545𝑥 0.357𝑦 25.745𝑦 17 Using the pressure difference values from the steady flow in the measuring tube segment as the standard reference, and the average pressure difference values over one cycle under pulsating flow as the values for fitting at various pulsating gradients, a calibration model for the pressure difference measurements in the pulsating flow under straight tube conditions can be derived: Δ𝑃补 12.786𝑥 7.054𝑥 0.004𝑦 0.164𝑦 18 The final calibration model for measuring rheological properties in the actual setup is derived from the fitting formula. Since the fitting was based on data collected over just one pumping cycle of the diaphragm pump, the data collection period in the actual experimental setup should be set to integer multiples of each driving voltage's pumping cycle. By averaging the pressure difference values obtained during this time, significant reductions in errors due to data collection can be achieved. 5. Pulsating Flow in Straight Pipe Measurement Simulation and Model Calibration Study The experimental verification involves researching and selecting the necessary hardware for the experimental platform. The hardware components were then installed and secured onto a fabricated external framework, followed by circuit connections and debugging to complete the setup of the hardware platform. Finally, the effectiveness of the proposed model in terms of accuracy and its ability to reduce interference from the diaphragm pump's vibrations was assessed through the rheological parameters of the drilling fluid. 5.1. Experimental Platform Construction As the power source for the entire measuring device and the source of the pulsating flow, the electric double-cylinder single-acting diaphragm pump used in this study is the model DBY3S-25AP316FFF. A physical representation of the diaphragm pump is shown in Figure 17. It has an outlet diameter of 25 mm, an inlet diameter of 25 mm, and a power rating of 2.2 kW. The pump is equipped with a variable frequency motor for stepless speed adjustment, and it features a built-in pressure sensor at the outlet with a measurement range of 0-10 MPa and an accuracy of ±1% FS. Figure 16. Electric Double-Cylinder Single-Acting Diaphragm Pump This figure illustrates the actual setup of the experimental platform. Figure 17. Physical Image of the Experimental Platform 220 5.2. Experimental Results and Analysis Using the constructed experimental platform, experiments were designed to investigate the factors that may affect the online measurement of the rheological properties of straight pipe oil-based drilling fluids. By analyzing the data obtained from the experiments, the impact of various factors on the measurement of the rheological properties under pulsating flow conditions was evaluated. Unless otherwise specified, the experimental subject was the initial formulation of oil- based drilling fluid, measured at a temperature of 20℃ and under normal pressure conditions without additional pressure. From the design of the experimental platform, it is evident that the flow rate within the measurement pipe is controlled by the power of the electric diaphragm pump via a variable frequency drive. The flow rate of the fluid in the measurement pipe is calculated based on the dimensions of the measurement pipe and the flow rate measured by a mass flow meter. A comparison of the rheological measurements of the straight pipe oil-based drilling fluid at the same rheological properties and the values obtained from the rotational viscometer reveals the influence of flow rate on the measurement of the rheological properties. Multiple groups of experiments were conducted to compare the rheological curves at voltage settings of 2-4V and 4-8V. a) First Experiment b) Second Experiment c) Third Experiment d) Fourth Experiment Figure 18. Comparison of Rheological Characteristic Curves from Four Experiments From the comparison of the rheological characteristic curves in Figure 19, it can be observed that at low flow rates (2-4V), the flow curve from the diaphragm pump deviates significantly from the curve measured by the rotational viscometer, indicating that the calculated plastic viscosity (AV) is overestimated and the yield stress is underestimated. In contrast, at higher flow rates (4-8V), the rheological characteristic curve closely matches that of the rotational viscometer, suggesting better measurement accuracy for the straight pipe oil-based drilling fluid at higher flow rates. 221 6.5 6.6 6.7 6.8 6.9 7.0 3.25 3.30 3.35 3.40 3.45 3.50 3.55 3.60 3.65 l n  ln 5.6 5.8 6.0 6.2 6.4 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 ln ln  a) Flow Curve at High Flow Rate b) Flow Curve at Low Flow Rate Figure 19. Flow Curves at Different Flow Rates From the flow curve comparison in Figure 20, it is evident that the measurement at a diaphragm pump voltage of 4-8V provides a more stable flow curve trend at higher flow rates, while the flow curve obtained at lower flow rates (2-4V) is unstable and exhibits poorer measurement performance. Subsequently, white oil or polymer additives were mixed uniformly into drilling fluid samples prepared under the same conditions to obtain oil-based drilling fluids of varying viscosities. The measured plastic viscosities, as determined by the rotational viscometer, were 20, 24, 38.5, 46, 52, 62, 71, and 78 mPa·s. The effect of viscosity on the measurement of the rheological properties of straight pipe oil-based drilling fluid was evaluated through experiments conducted with these varying viscosities. The rheological curves reflect the characteristics of non- Newtonian fluids across a wide shear rate range, from low to high shear rates. The flow curves are essential for the real- time measurement and calculation of the rheological properties of drilling fluids, with results as shown: a) 20mPa·s b) 24mPa·s c) 38.5mPa·s d)46mPa·s Figure 20. Rheological Characteristic Curves at Lower Viscosities 222 It can be observed that at viscosities of 20, 24, and 38.5 mPa·s, the experimental output of the rheological characteristic curves closely aligns with the curves measured by the rotational viscometer. However, at 46 mPa·s, some deviation in the flow curve trend appears at high shear rates, which may indicate random systematic environmental errors. Figure 21. Flow Curves for AV20-46 mPa·s Figure 23 shows the natural logarithm curves of shear rate versus shear stress for the four viscosity gradients mentioned above. a) 52mPa·s b) 62mPa·s c) 71mPa·s d) 78mPa·s Figure 22. Rheological Characteristic Curves at Higher Viscosities 223 It can be observed that at viscosities of 52, 62, 71, and 78 mPa·s, the rheological characteristic curves obtained from the experimental measurements closely align with those measured by the rotational viscometer, showing a similar trend. This indicates that the measurement results from the designed experimental setup are in good agreement with those from the rotational viscometer. However, at 78 mPa·s, there is a notable deviation in the dynamic shear stress values, which may be attributed to the continuous addition of thickening agent polymers, leading to a situation where the sampled drilling fluid is not uniformly mixed. Figure 23. Flow Curves for AV52-78 mPa·s It can be observed that at viscosities of 52, 62, 71, and 78 mPa·s, the rheological characteristic curves output by the experimental measurements are almost identical to those measured by the rotary viscometer, indicating that viscosity variations do not affect the measurement accuracy of the experimental setup. To compare whether the measurement accuracy of the designed experimental setup for oil-based drilling fluid rheological parameters is influenced by different temperatures, an analysis will be conducted to determine the nature of any observed effects. a) 20℃ b) 50℃ Figure 24. Comparison of Rheological Curves from the Measuring Device and Rotational Viscometer at Different Temperatures From the comparison of the three rheological curves, it can be observed that as the temperature increases, the deviation between the parameters measured by the experimental setup and those obtained from the six-speed rotary viscometer becomes larger. At 20°C, both trends and measurement curves are very close, showing minimal deviation. However, at 50°C, the trends diverge, and the rheological curves only align closely at low shear rates. Five different viscosity samples of field oil-based drilling fluids were taken for comparison between measurements from the experimental setup and manual measurements using the rotary viscometer. The flow rate, pressure difference, and density data collected by the experimental setup were input into the rheological model and correction model for calculations. Since the field generally focuses on parameters such as plastic viscosity, apparent viscosity, and yield point, 224 the experimental results primarily analyze and compare these three parameters. Below is the rheological curve derived from the measurement data, as shown in Figure 5-21. a) Before Calibration b) After Calibration Figure 25. Comparison of Rheological Fitting Curves Before and After Calibration It can be seen that the fitted rheological curve after correction closely overlaps with the fitted curve obtained from the data measured by the rotary viscometer. Below is a comparison of the rheological parameters—apparent viscosity (AV), plastic viscosity (PV), and yield point (YP)— calculated using the corrected model and the data measured by the rotary viscometer: Table 6. Rheological Parameters and Deviation Data Experimental setup Rotary viscometer Deviation AV PV YP AV PV YP AV PV YP 38.21 28.74 10.29 40 29.5 10.5 -1.79 -0.76 -0.21 43.78 32.54 13.12 45.5 32 13.5 -1.72 0.54 -0.38 53.3 40.46 13.06 52 39 13 1.3 1.46 0.06 72.02 59.63 12.94 72 59 13 0.02 0.63 -0.06 89.36 70.73 19.22 92 72 20 -2.64 -1.27 -0.78 From the data in Table 6, a bar chart can be generated to illustrate the deviations of the rheological parameters measured by the experimental setup compared to those measured by the rotary viscometer: Figure 26. Deviation of Rheological Parameters Between the Experimental Setup and Rotational Viscometer The final experimental results show that the average deviation of the apparent viscosity (AV) is 2.69%, the average deviation of the plastic viscosity (PV) is 2.362%, and the average deviation of the yield point (YP) is 3.056%. The measurement errors in pressure difference and flow rate caused by pulsating flow have been effectively reduced. 6. Conclusion Currently, the commonly used method for automated real- time accurate measurement of drilling fluid rheology is the straight pipe measurement. However, the pulsating flow generated by the pumping equipment during the extraction of 225 drilling fluid often leads to significant measurement errors in pressure difference and flow rate, resulting in low accuracy for the final calculated rheological parameters. To address the issue of substantial measurement errors caused by pulsating flow in pressure difference and flow rate, this paper proposes a correction model for measuring the rheological properties of fluids in a straight pipe under the influence of pulsation. To verify the correctness and effectiveness of the proposed method, the principles of pulsation caused by diaphragm pumps and the characteristics of outlet flow velocity are first analyzed theoretically. This information is then used as the initial inlet flow velocity for simulations, analyzing the pressure distribution and flow velocity variations of pulsating flow within the measurement pipe segment, and examining the errors in pressure difference and flow rate measurements under pulsating flow conditions.To understand the influence of pulsating flow on rheological measurements, a practical experimental platform is constructed to measure the outlet flow velocity and pulsation frequency of the diaphragm pump under different power settings. A 3D model of the measurement pipe is established based on this setup, and the actual measurement environment is used as initialization parameters for the simulations. Extensive simulations are conducted to generate results, leading to the development of a correction model for measuring oil-based drilling fluids under the influence of pulsation.Finally, through experimental data comparison, it is verified that this model can improve measurement accuracy. Experimental comparisons using the constructed platform reveal that, at different flow rates, viscosities, and temperatures, the average deviation of the apparent viscosity (AV) calculated by the corrected model is 2.69%, the average deviation of plastic viscosity (PV) is 2.362%, and the average deviation of yield point (YP) is 3.056%. The measurement errors in pressure difference and flow rate caused by pulsating flow are effectively reduced. References [1] R. L. Anderson, I. Ratcliffe, H. C. Greenwell, P. A. Williams, S. Cliffe, and P. V. Coveney, ‘‘Clay swelling—A challenge in the oilfield,’’ Earth- Sci. Rev., vol. 98, nos. 3–4, pp. 201–216, Feb. 2010. [2] J. A. Andaverde, J. A. Wong-Loya, Y. Vargas-Tabares, and M. Robles, ‘‘A practical method for determining the rheology of drilling fluid,’’ J. Petroleum Sci. Eng., vol. 180, pp. 150–158, Sep. 2019. [3] M. Gray and M. Miles. (2016). Field Device To Measure Viscosity Density and Other Slurry Properties in Drilled Shafts: Final Report. [Online]. Available: https://rosap.ntl.bts.gov/view/dot/31051 [4] J. Yin, J. Li, and Y. Xiao, ‘‘A new methodology of nonlinear parameter approximation used for rheological model of drilling fluids,’’ in Proc. 7th Int. Conf. Natural Comput., vol. 4, 2011, pp. 1919–1922. [5] Y. Zhang, M. Huang, Y. Kan, L. Liu, X. Dai, G. Zheng, and Z. Zhang, ‘‘Influencing factors of viscosity measurement by rotational method,’’ Polym. Test., vol. 70, pp. 144–150, Sep. 2018. [6] A. Saasen, T. H. Omland, S. Ekrene, J. Brévière, E. Villard, N. Kaageson-Loe, A. Tehrani, J. Cameron, M. Freeman, F. Growcock, A. Patrick, T. Stock, T. Jørgensen, F. Reinholt, H. E. F. Amundsen, A. Steele, and G. Meeten, ‘‘Automatic measurement of drilling fluid and drill-cuttings properties,’’ SPE Drilling Completion, vol. 24, no. 4, pp. 611–625, Dec. 2009. O’Brien, J. (2005). "Rheology of Drilling Fluids." SPE Annual Technical Conference and Exhibition. [7] N. Liu, H. Gao, Y. Xu, X. Chai, Y. Hu, and L. Duan, ‘‘Design and use of an online drilling fluid pipe viscometer,’’ Flow Meas. Instrum., vol. 87, Oct. 2022, Art. no. 102224. [8] K.-I. Funakoshi and A. Nozawa, ‘‘Development of a method for measuring the density of liquid sulfur at high pressures using the falling-sphere technique,’’ Rev. Sci. Instrum., vol. 83, no. 10, Oct. 2012, Art. no. 103908. [9] M. P. McIntyre,G. van Schoor, K. R. Uren, and C. P. Kloppers, ‘‘Modelling the pulsatile flow rate and pressure response of a roller-type peristaltic pump,’’ Sens. Actuators A, Phys., vol. 325, Jul. 2021, Art. no. 112708. [10] O. E. Agwu,J. U. Akpabio,M. E. Ekpenyong,U. G. Inyang,D. E. Asuquo, I. J. Eyoh, andO. S. Adeoye, ‘‘A critical review of drilling mud rheological models,’’ J. Petroleum Sci. Eng., vol. 203, Aug. 2021, Art. no. 108659. [11] R. Wiśniowski, K. Skrzypaszek, and T. Małachowski, ‘‘Selection of a suit- ablerheological model for drilling fluid using applied numerical methods,’’ Energies, vol. 13, no. 12, p. 3192, Jun. 2020. [12] Brennan M J,Ellott S J,Pinnington R J. A non-intrusive fluid-wave actuator and sensor pair for the active control of fluid-borne vibrations in a pipe [J]. Smart Materials & Structures, 1996(5(3): 281). [13] Yokata Somada,Yamaguchi H.Study on an active accumulator: Active control of high-frequency pulsation of flow rate in hydraulic systems[J]. Bulletin of the JSME, 1996, 39(1): 119- 124. [14] S. D. C. Magalhães Filho, M. Folsta, E. V. N. Noronha, C. M. Scheid, and L. A. Calçada, ‘‘Study of continuous rheological measurements in drilling fluids,’’ Brazilian J. Chem. Eng., vol. 34, no. 3, pp. 775–788, Jul. 2017. [15] B. S. Lee and E. I. Rivin, ‘‘Finite element analysis of load- deflection and creep characteristics of compressed rubber components for vibration control devices,’’ J. Mech. Des., vol. 118, no. 3, pp. 328–336, Sep. 1996. [16] F. Lyu, S. Ye, J. Zhang,B. Xu,W. Huang,H. Xu, and X. Huang, ‘‘Theoret- ical and simulation investigations on flow ripple reduction of axial piston pumps using nonuniform distribution of pistons,’’ J. Dyn. Syst., Meas., Control, vol. 143, no.4, Apr. 2021, Art. no. 041008. [17] M. G. Rabie, ‘‘On the application of oleo-pneumatic accumulators for the protection of hydraulic transmission lines against water hammer—A theoretical study,’’ Int. J. Fluid Power, vol. 8, no. 1, pp. 39–49, Jan. 2007. [18] P. Li,H.-A. Qiu,C. Wang,Y. Wu, and F. Miao, ‘‘Research on reverberation cancellation algorithm based on empirical mode decomposition,’’ in Proc. IEEE Int. Conf. Inf. Technol., Big Data Artif. Intell. (ICIBA), vol. 1, Nov. 2020, pp. 941–945. [19] E. J. Garcia and J. F. Steffe, ‘‘Comparison of friction factor equations for non-newtonian fluids in pipe flow,’’ J. Food Process Eng., vol. 9, no. 2, pp. 93–120, Apr. 1986. [20] J. K. Zhang, G. S. Li, and Y. J. Guo, ‘‘Optimization and evaluation on drilling fluid rheological model,’’ Sci. Technol. Eng., vol. 13, no. 26, pp. 7619–7623, Sep. 2013.