Water Content of Oil-Water Mixtures by the Speed of Sound Measurement

*Alcir de Faro Orlando*

### **Abstract**

Ultrasonic meters are calibrated for flow rate measurement of pure oil flows. However, the indicated oil flow rate is greater than its true value when water is mixed with oil in the flow, as usual in pipeline flows. A methodology was developed to continuously measure the water content of oil–water mixtures, using the already measured speed of sound by installed intrusive or non-intrusive (clamp on type) ultrasonic meters for flow rate measurement, together with the previously determined speed of sound and density of pure water and oil as a function of temperature, thus avoiding the traditional method of laboratory analysis of samples. This chapter shows a reduction of the uncertainty of measurement when the meter indicated speed of sound in the oil–water mixture is directly correlated to the traceable measurements of water content and temperature of previously prepared oil–water mixtures, what turns out to be the meter calibration for water content measurement. Water content uncertainty value of 0.0025 is obtained when fitting a curve to the experimental data by the least square method in the 0–0.025 range that covers the fiscal measurement range (<0.01).

**Keywords:** water content, oil–water mixtures, speed of sound, fiscal flow rate measurement, ultrasonic flow measurement

### **1. Introduction**

The most common method of measuring the amount of water in an oil–water mixture in commercial use is the measurement of the dielectric constant by a capacitance probe. However, capacitance probes are subject to coating by paraffin and other substances, which render them inaccurate in a short period of time. Another scheme involves the laboratory analysis of samples, but this method is labor intensive, requires much time to complete, and does not lend itself to continuous monitoring of fluid, such as crude oil flowing in a pipeline [1].

Oil is customarily metered as it flows from a producing line to a customer, either by a pipeline company or a refiner. Since oil is an expensive commodity, it is important that it is accurately measured, and if it is mixed with water, the customer pays for the water. If the ratio of oil and water is known, the water content can be deducted [1].

When installed in pipelines, some ultrasonic meters of the spool type can accurately measure the liquid flow rate to within 0.2%, as required for fiscal measurement. Furthermore, they also measure the speed of sound in the flowing liquid, which can be used to estimate its water content. Ultrasonic meters of the clamp on type, with two acoustic paths, are less accurate for flow rate measurement. However, they can accurately measure the speed of sound in any position along the pipeline, as a non-intrusive meter, what makes then convenient for inspecting the fluid flow. They are calibrated for flow rate measurement of pure oil flows. However, the indicated oil flow rate is larger than its true value when water is mixed with oil in the flow. A maximum of 1% water content of the fluid, for example, is required for fiscal measurement operations. They indicate at the same time both flow rate and speed of sound values, thus making easy to estimate the pure oil flow rate from water content measurement.

The US patents [1–3] show that the water content of the oil–water mixture is a function of the speed of sound. In this chapter, an expression was theoretically developed, using the previously measured speed of sound and density values for pure water and pure oil, for calculating the water content of the oil–water mixture, without sampling the fluid and taking it to a laboratory for analysis. The methodology was experimentally verified with the measured speed of sound by two types of flow meters, namely (a) Eight (8) acoustic path intrusive ultrasonic flow meter and (b) Two (2) acoustic path non-intrusive clamp on type ultrasonic flow meter. A methodology was also developed to correlate directly the water content to the measured fluid speed of sound for several previously prepared diesel fuel-water mixtures, thus reducing the propagation of the uncertainty of measurement from pure fluid measured properties. The methodology is detailed in Ref. [4].

### **2. Measurement of fluid properties**

#### **2.1 Water content**

An expression has been developed in this chapter to relate directly the oil–water mixture water content to the product of density (ρ) and speed of sound (c), measured for the mixture and previously determined for pure oil and pure water, as a function of temperature and pressure.

The water content of an oil–water mixture (*f*) is defined as the ratio between the mass of water (*m*water) and the total mass of the mixture (*m*), which can be calculated as the sum of the mass of water (*m*water) and the mass of oil (*m*oil), Eq. (1). The specific volume of either water (*v*water) or oil (*v*oil) can be calculated as the ratio between the volume (V) and the mass (*m*), respectively, for water (*v*water = Vwater/*m*water) and oil (*v*oil = Voil/*m*oil). Density is calculated as the inverse of the specific volume, for either water (ρwater) or oil (ρoil). Thus, the following equations can be written for the water content (*f*) and specific volume of the mixture (*v*)

$$f = \frac{m\_{water}}{m} = \frac{m\_{water}}{m\_{water} + m\_{oil}} \tag{1}$$

$$
\upsilon = \upsilon\_{oil} - f \left( \upsilon\_{oil} - \upsilon\_{water} \right) \tag{2}
$$

The speed of sound in a fluid (*c*) can be defined in terms of the partial derivative of the pressure (*P*) with respect to its specific volume (*v)*, at constant entropy (*s*)

$$\mathcal{L} = \sqrt{\frac{\partial P}{\partial \rho} \Big|\_{s}} = \frac{1}{\rho} \sqrt{-\frac{\partial P}{\partial v} \Big|\_{s}} \tag{3}$$

From Maxwell relation and using Eq. (3),

$$\left. \frac{\partial \boldsymbol{v}}{\partial \boldsymbol{P}} \right|\_{\boldsymbol{s}} = \mathbf{1} / \frac{\partial \boldsymbol{P}}{\partial \boldsymbol{v}} \bigg|\_{\boldsymbol{s}} = -\mathbf{1} / \left(\boldsymbol{\rho} \, \boldsymbol{c}\right)^{2} \tag{4}$$

Substituting *v*, ρ, and *c* for, respectively, *v*water, ρwater, and cwater, Eq. (4) is valid for water. Likewise, substituting *v*, ρ, and *c* for, respectively, *v*oil, ρoil, and coil, Eq. (4) is valid for oil.

Taking the partial derivative of Eq. (2) with respect to P, at constant entropy (s),

$$f = \frac{\left[\frac{1}{\left(\rho \cdot \boldsymbol{\varepsilon}\right)\_{\text{ol}}^{2}} - \frac{1}{\left(\rho \cdot \boldsymbol{\varepsilon}\right)^{2}}\right]}{\left[\frac{1}{\left(\rho \cdot \boldsymbol{\varepsilon}\right)\_{\text{ol}}^{2}} - \frac{1}{\left(\rho \cdot \boldsymbol{\varepsilon}\right)\_{\text{water}}^{2}}\right]}\tag{5}$$

Eq. (5) shows that the water content (*f*) of the fluid mixture can be calculated from the measured speed of sound (*c*) if both density and speed of sound have been determined for pure water and pure oil before measurement. The mixture density can be calculated by substituting, in Eq. (2), the specific volumes of the mixture (*v*), pure oil (*v*oil), and pure water (*v*water) for their inverse, which are, respectively, the densities of the mixture (ρ), pure oil (*ρoil*Þ, and pure water (*ρwater*), resulting in Eq. (6),

$$\rho = \frac{\rho\_{\rm oil}}{1 - f\left(1 - \frac{\rho\_{\rm oil}}{\rho\_{\rm water}}\right)}\tag{6}$$

#### **2.2 Water density**

The water density (*ρwater*), in kg/m3 , as a function of temperature (T), in °C, was modeled [5] by Eq. (7) in the 0–40°C range, with an uncertainty interval in the 0.00084 to 0.00088 kg/m3 range, for a 95.45% level of confidence, using the coefficients of **Table 2**.

$$\rho\_{water} = A\_5.\left[\mathbf{1} - \frac{\left(T + A\_1\right)^2 . (T + A\_2)}{A\_3 . (T + A\_4)}\right] \tag{7}$$

#### **2.3 Speed of sound in water**

The speed of sound in distilled water (*cwater*), in m/s, was measured by NIST [6] at nearly atmospheric pressures, with an uncertainty (95.45%) of 0.05 m/s, and modeled as a function of temperature (T), in °C, by the Eq. (8) using the coefficients of **Table 1**.

$$\mathcal{L}\_{water} = \sum\_{i=0}^{5} A\_i \, T^i \tag{8}$$

The speed of sound (*cwater*) in salt water has been measured and correlated by different authors to temperature (0–40°C), salinity (0 to 4.2%), and pressure or water depth (0 to 1000 bar). The available equations are classified as (a) Simple, Mackenzie [7] and Coppens [8] and (b) Refined, UNESCO [9], Del Grosso [10] and NPL [11]. The speed of sound was calculated by those equations, reduced to the polynomial representation by Eq. (8) for zero salinity and atmospheric pressure, and compared to those obtained for distilled water, NIST [6] and for tap water, measured in this research with a root mean square dispersion of 1.58 m/s (95.45% level of confidence). Due to a restricted range of validity of some equations for salinity, only two equations were chosen for comparison, UNESCO [9] and NPL [11]. **Table 1** shows the coefficients to be used in Eq. (8).

**Figure 1** shows the variation of the speed of sound in water with temperature for different equations, using in Eq. (8) the coefficients of **Table 1**. The 20–30°C temperature range was chosen because it represents the temperature conditions of the experiments. It can be seen that the NIST equation [6], for distilled water, calculates the largest values. The smallest values are calculated for tap water (this research), resulting in a systematic error in the 2.3 to 4.3 m/s range (0.16 to 0.29% range). The UNESCO equation [9] and NPL equation [11] calculate similar values, which lie in between the two first ones. Considering that the standard deviation of the speed of sound measurement during the experiments is in the 0.16 to 0.21 m/s, it can be concluded that the difference is not due to meter repeatability, but possibly to the fact that the tap water does not have the same properties of the distilled water, or there is a systematic error.

The speed of sound in water was measured by a two acoustic path non-intrusive type (clamp on) ultrasonic meter and by an eight acoustic path intrusive type (spool) ultrasonic meter. The measurement reliability was verified by varying the flow rate, the acoustic path inclination angle, and the velocity profile development. As expected, the difference was within the uncertainty of measurement, because of the fact that the speed of sound is a fluid property and is not influenced by the flow pattern.

During the tests for the clamp on type meter, the temperature varied in the (23.3 1.1)°C range. The average speed of sound was 1487.3 m/s. According to the calculated values by Eq. (8) and **Table 1**, the speed of sound would be 1492.0 m/s for the UNESCO and NPL equations, 1490.3 m/s for tap water, and 1493.2 m/s for the NIST equation. All values were inside the interval about the calculated value for tap water (1490.3 3.0) m/s.

During the tests for the spool type meter, the temperature varied in the (23.3 1.5)°C range. The average speed of sound was 1490.8 m/s range. According to the calculated values by Eq. (8) and **Table 1**, the speed of sound would be 1492.0 m/s


#### **Table 1.**

*Coefficients for calculating the speed of sound in water by Eq. (8).*

*Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*

#### **Figure 1.**

*Speed of sound in water for different equations in the 20–30°C range.*


#### **Table 2.**

*Coefficients for calculating water density by Eq. (7).*

for the UNESCO and NPL equations, 1490.3 m/s for tap water, and 1493.2 m/s for the NIST equation. All values were inside the interval about the calculated value for tap water (1490.3 2.9) m/s.

Due to the fact that no information was available for the tap water composition used in the experiments of this research, the interval (1490.3 3.0) m/s, about the mean measured value by the clamp on type meter, obtained by curve fitting the experimental data of this research with temperature, Eq. (8), is considered to be the upper limit of the uncertainty interval, that is, 0.20% of the measured speed of sound by the clamp on type ultrasonic meter (**Table 1**).


#### **Table 3.**

*Coefficients for calculating α*<sup>60</sup> *by Eq. (9).*

### **2.4 Oil density**

The API methodology [12] calculates the oil density at temperature (T) and pressure (P) from a measured value at other conditions, to within 0.25%, up to 200°F (93.33°C). The following parameters are used in Eqs. (9)–(13), **Tables 3** and **4**.


The API methodology was utilized to produce, iteratively, diesel fuel density values in the 5–35°C range, every 1°C, from a initially measured value of 856.12 kg/m<sup>3</sup> at 23.31°C, which was used to calculate *α*60. The density values were curve fitted, resulting in Eq. (14) and **Table 5**, with a curve fitting error smaller than 0.001 kg/m<sup>3</sup> .

$$a\_{60} = \frac{K\_0}{\rho\_{60}^2} + \frac{K\_1}{\rho\_{60}} + K\_2 \tag{9}$$

$$\text{CTL} = \text{EXP} \{-a\_{60}.(T - \text{60}).[1 + \text{0.8}.a\_{60}.(T - \text{60})] \}\tag{10}$$

$$F\_p = \text{EXP}\left\{ A + B.T + \frac{C + D.T}{\rho\_{60}^2} \right\} \tag{11}$$

$$\text{CPL} = \frac{1}{1 - F\_{p.}(P - PE)/1000000} \tag{12}$$

$$
\rho\_{\rm oil} = \text{CTL.CPL.} \rho\_{60} \tag{13}
$$


### **Table 4.**

*Coefficients for calculating Fp by Eq. (11).*


#### **Table 5.**

*Coefficients for calculating oil density by Eq. (14).*

*Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*

$$\rho\_{oil} = \sum\_{i=0}^{2} A\_i \, T^i \tag{14}$$

#### **2.5 Speed of sound in oil**

The speed of sound in oil can be calculated by the ARCO formula [13], which is a function of the oil density (kg/m<sup>3</sup> ), calculated by Eq. (15) in API units (**Table 6**),

$$API = \frac{141.5}{\rho\_{oil} / 999.016} - 131.5 \tag{15}$$

$$\mathcal{L} = \left(\mathcal{K}\_a.\textbf{6894.757/}\rho\_{oil}\right)^{\prime\natural} \tag{16}$$

$$K\_a = A + B.P - C.(T + 459.67)^{\circ \circ} - D.API - E.API^2 + F.(T + 459.67).API \tag{17}$$

where


Diesel fuel was used as fluid for the experiments in this research for being readily available and having its properties well studied. In this research, the speed of sound velocity in diesel fuel was measured as a function of the temperature between 0 and 35°C. The speed of sound was measured by the clamp on type ultrasonic meter, resulting in the curve fitted Eq. (18) with the coefficients specified by **Table 7**, with a root mean square dispersion of 2.29 m/s (95.45% level of confidence).


$$\epsilon\_{diesel} = \sum\_{i=0}^{2} A\_i \ T^i \tag{18}$$

#### **Table 6.**

*Coefficients for calculating the compressibility modulus by Eq. (17).*


**Table 7.**

*Coefficients for calculating the speed of sound in diesel fuel by Eq. (18).*

#### **Figure 2.**

*Comparisons between the speed of sound measured values and model.*

The speed of sound measurement values in diesel fuel, Eq. (18) and **Table 7**, was compared with those obtained by the ARCO methodology [13] utilizing the API procedure [12] for calculating the diesel fuel density values as a function of temperature, which is shown in **Figure 2**. The difference is much larger than the stated uncertainty of measurement for water (0.2%).

It is assumed that the uncertainty of measurement of the speed of sound in diesel fuel is the same as in water, considering that the repeatability of the meter for speed of sound measurement is the same for both fluids.

### **2.6 Temperature**

Water and diesel fuel temperatures were measured by two 100 Ω platinum resistance thermometers (Pt100), calibrated with a 25.5 Ω standard platinum resistance thermometer (SPTR) in a constant temperature calibration water bath. The Callendar-Van Dusen equation [14] was utilized to relate the ratio between the measured thermometer resistances at the bath temperature (*R*) and at 0°C (*Ro*), and the bath temperature (*T*), measured by the standard platinum resistance thermometer with an overall uncertainty smaller than 0.05°C. The coefficients of Eq. (19) are shown in **Table 8**.

$$R = R\_o \left[ \mathbf{1} + A \; T + B \; T^2 + C \; T^3 \; (\mathbf{1} - T) \right] \tag{19}$$

During the calibration, the resistances of the standard platinum resistance (SPTR) and the two platinum resistance (Pt100) thermometers were measured at T and 0°C.


**Table 8.**

*Coefficients for calculating temperature by Eq. (19) [14].*

*Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*


#### **Table 9.**

*Comparison between the temperature values indicated by the thermometers.*

The temperature was calculated, respectively, by the SPTR and by the Callendar-Van Dusen equations. The average measured results are shown in **Table 9**. The difference between the temperature values is smaller than 0.05°C, which gives an uncertainty of 0.1°C (95.45%), when combining the repeatability of the platinum resistance thermometer (Pt100) with the measurement uncertainty of the standard platinum resistance thermometer (SPTR).

### **3. Experimental methods and data processing**

#### **3.1 Experimental facility**

Although less accurate, the proposed method can replace the traditional Karl Fisher titration method [15], used in commercially available testing instruments, that requires sampling for laboratory analysis and much time to complete, besides being labor intensive.

The accurate flow rate measurement by the clamp on type meter requires that the user inputs data on the wall material and thickness, besides pipeline diameter. The meter processing software then outputs a value for the speed of sound, based on the measured propagation transit time and calculated acoustic path length, using a proprietary algorithm. The experimental facility, **Figure 3**, consists of a 3″ diameter acrylic tube, with two pairs of piezoelectric sensors mounted on its outer surface to measure the speed of sound in oil–water mixtures, flowing inside by gravity. Both internal and external pipe diameters were measured at five positions along each of the three pipe cross sections, located in a 100-mm-long test section where the sensors were mounted. All measurements were inside the (80.93 0.18) mm range for the internal diameter (87.45 0.18) mm range for the external diameter, and (3.26 0.18) mm range for the wall thickness, which was calculated subtracting the internal diameter from the external diameter.

A previously measured oil–water mixture, starting from pure diesel fuel condition, is stored in RESERVOIR 1, being homogenized by a mixer. After the gravity flow achieves the steady state condition, a clamp on type ultrasonic meter, installed outside a 3″ diameter acrylic tube, measures the speed of sound, registered by a data acquisition system every 6 s. The average value and its standard deviation, which includes both meter measurement characteristics and flow stability, are calculated. The fluid

**Figure 3.** *Experimental facility for measuring speed of sound in oil–water mixtures.*

that leaves the test section is stored in RESERVOIR 2, to be used in a next run by adding a measured amount of water to it, thus increasing the water content of the mixture. For large water content values, diesel fuel is gradually added to the mixture, which is initially pure water, thus decreasing its water content.

At the beginning of each run, the amount of oil is weighed and stored in RESER-VOIR 1, where the fluid is completely mixed and homogenized for the speed of sound measurement in a steady state gravity flow from the same reservoir. At the end of the run, a weighed amount of water is added to RESERVOIR 2, and the whole amount of fluid is transferred to RESERVOIR 1 for starting a new run. The water content was calculated by Eq. (1), with a smaller than 3 m/s uncertainty of measurement, or 0.20%, which is larger than the uncertainty of curve fitting the measured speed of sound data for diesel fuel (2.29 m/s) and water (1.58 m/s), as a function of temperature.

### **3.2 Water content estimated from speed of sound measurement**

In every run, the speed of sound in the oil–water mixture was measured, together with its temperature, used to calculate the diesel fuel density, Eq. (14), and the water density, Eq. (7). The mixture density then was calculated by Eq. (6). The speed of sound in diesel fuel was calculated by Eq. (18). The speed of sound in water was calculated by Eq. (8).

The water content was estimated from speed of sound measurement by Eq. (5) and compared to the directly measured value in the following water content ranges, (a) 0 to 2.5% (0 to 0.025), (b) 5–20% (0.05 to 0.20), and (c) 80–100% (0.80 to 1.00).

#### **3.3 Water content estimated by the curve fitted measured values**

An attempt was made to reduce the uncertainty propagation of oil and water properties for estimating the water content. The measured speed of sound in the oil– water mixture was curve fitted directly as a function of measured temperature and water content values, by Eq. (20).

$$\mathcal{L} = \left(\mathbf{A}\_1 + \mathbf{A}\_2, T + \mathbf{A}\_3, T^2\right) + \left(\mathbf{B}\_1 + \mathbf{B}\_2, T + \mathbf{B}\_3, T^2\right) \mathbf{f} \tag{20}$$

$$A\_i = A\_1 + A\_2.T\_i + A\_3.T\_i^2 \tag{21}$$

$$B\_i = B\_1 + B\_2.T\_i + B\_3.T\_i^2 \tag{22}$$

$$s = \sqrt{\frac{1}{n - \mathbf{6}} \sum\_{i=1}^{n} \left[ c\_i - \left( A\_i + B\_i f\_i \right) \right]^2} \tag{23}$$

The coefficients are calculated by minimizing the root mean square deviation of the speed of sound (*s*), Eq. (23), from the curve fitted Eq. (20),

$$\frac{\partial \mathbf{s}}{\partial A\_1} = \frac{\partial \mathbf{s}}{\partial A\_2} = \frac{\partial \mathbf{s}}{\partial A\_3} = \mathbf{0} \tag{24}$$

$$\frac{\partial \mathbf{s}}{\partial B\_1} = \frac{\partial \mathbf{s}}{\partial B\_2} = \frac{\partial \mathbf{s}}{\partial B\_3} = \mathbf{0} \tag{25}$$

Which results in the following system of linear equations to be solved.

$$A\_1X\_{11} + A\_2X\_{12} + A\_3X\_{13} + B\_1X\_{14} + B\_2X\_{15} + B\_3X\_{16} = Y\_1 \tag{26}$$

$$A\_1 X\_{21} + A\_2 X\_{22} + A\_3 X\_{23} + B\_1 X\_{24} + B\_2 X\_{25} + B\_3 X\_{26} = Y\_2 \tag{27}$$

$$A\_1 X\_{31} + A\_2 X\_{32} + A\_3 X\_{33} + B\_1 X\_{34} + B\_2 X\_{35} + B\_3 X\_{36} = Y\_3 \tag{28}$$

$$A\_1 X\_{41} + A\_2 X\_{42} + A\_3 X\_{43} + B\_1 X\_{44} + B\_2 X\_{45} + B\_3 X\_{46} = Y\_4 \tag{29}$$

$$A\_1 X\_{51} + A\_2 X\_{52} + A\_3 X\_{53} + B\_1 X\_{54} + B\_2 X\_{55} + B\_3 X\_{56} = Y\_5 \tag{30}$$

$$A\_1 X\_{61} + A\_2 X\_{62} + A\_3 X\_{63} + B\_1 X\_{64} + B\_2 X\_{65} + B\_3 X\_{66} = Y\_6 \tag{31}$$

Where *p* stands for matrix line number, and *q* stands for matrix column number.

$$X\_{pq} = \sum\_{i=1}^{n} f\_i^w \cdot T\_i^x \tag{32}$$

$$Y\_p = \sum\_{i=1}^n c\_i f\_i. T\_i^r \tag{33}$$

And the exponents are specified in **Table 10**.

#### **3.4 Uncertainty of estimating the water content**

#### *3.4.1 Measuring mass of diesel fuel and water*

In the beginning of each run, a weighed amount of diesel fuel (*Mdiesel* � *Udiesel* Þ is stored in RESERVOIR 1 for speed of sound measurement. Then, the amounts of water


**Table 10.**

*Exponents of the variables in Eqs. (32) and (33).*

are gradually added to the fluid (*mwater*,*<sup>i</sup>* � *Uwater*,*i*), thus increasing the water content of the oil–water mixture (*f <sup>m</sup>*) in run *m,* with its uncertainty of measurement (*Uf <sup>m</sup>* ) given by Eq. (39),

$$M\_{water,m} = \sum\_{i=2}^{m} m\_{water,i} \tag{34}$$

$$\mathbf{M}\_m = \mathbf{M}\_{diesl} + \mathbf{M}\_{water,m} \tag{35}$$

$$f\_m = \frac{M\_{water,m}}{M\_m} \tag{36}$$

$$U\_{water,m} = \sqrt{\sum\_{i=2}^{m} (m\_{water,i})^2} \tag{37}$$

$$\mathcal{U}\_{\mathfrak{m}} = \sqrt{\left(\mathcal{U}\_{\text{diesel}}\right)^2 + \left(\mathcal{U}\_{\text{water},\mathfrak{m}}\right)^2} \tag{38}$$

$$U\_{f\_m} = f\_m \sqrt{\left(\frac{U\_{water,m}}{M\_{water,m}}\right)^2 + \left(\frac{U\_m}{M\_m}\right)^2} \tag{39}$$

For large water content values, a weighed amount of water (*Mwater* � *Uwater*Þ is stored, in the beginning of each run, in RESERVOIR 1 for speed of sound measurement. Then, the amounts of diesel fuel are gradually added to the fluid (*mdiesel*,*<sup>i</sup>* � *Udiesel*,*<sup>i</sup>*), thus decreasing the water content of the oil–water mixture (*Fm*) in run *m,* with its uncertainty of measurement (*UFm* ) given, likewise, by Eq. (40),

$$U\_{f\_m} = f\_m \sqrt{\left(\frac{U\_{diesl,m}}{M\_{dicel,m}}\right)^2 + \left(\frac{U\_m}{M\_m}\right)^2} \tag{40}$$

#### *3.4.2 Curve fitting equation for speed of sound with temperature and water content*

Eq. (20) is used to calculate the speed of sound as a function of temperature and water content, which is physically more plausible. However, the objective of this research is to estimate the water content from temperature and speed of sound measurement. The water content in Eq. (20) can be rewritten as a function of (*c*) and (*T*).

$$f = \frac{c - A}{B} \tag{41}$$

#### *Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*

According to Ref. [16], the uncertainty of estimating the water content (*s*) by Eq. (41), considering the propagation of the speed of sound uncertainty (*uc*) and the temperature uncertainty (*uT*), can be expressed by Eq. (42)

$$\mathcal{L} = \sqrt{\left(\frac{\partial \mathcal{f}}{\partial \mathcal{c}} \,\,\boldsymbol{u}\_{\boldsymbol{\epsilon}}\right)^{2} + \left(\frac{\partial \mathcal{f}}{\partial T} \,\,\boldsymbol{u}\_{T}\right)^{2}}\tag{42}$$

However, additive corrections [16] must be applied to Eq. (41) to take into account the uncertainty of the water content measurement (*uf* ), Eq. (39), and the root mean square deviation of the measured data from the curve fitted equation (*ufit*), Eq. (44), that does not represent precisely the physical phenomenon. Thus, the overall uncertainty of estimating the water content (*u*) becomes

$$u = \sqrt{u\_f^2 + u\_{fit}^2 + \left(\frac{\partial f}{\partial c} \, u\_c\right)^2 + \left(\frac{\partial f}{\partial T} \, u\_T\right)^2} \tag{43}$$

$$u\_{\hat{f}\hat{t}} = \sqrt{\frac{1}{n-1} \sum\_{i=1}^{n} \left[ f\_i - \left( \frac{c\_i - A\_i}{B\_i} \right) \right]^2} \tag{44}$$

where *Ai* and *Bi* are calculated by Eqs. (21) and (22), respectively. The sensitivity coefficients are calculated by Eqs. (45) and (46), obtained by differentiating Eq. (41),

$$\frac{\partial f}{\partial T} = -\frac{1}{B} \left( \frac{dA}{dT} + \frac{dB}{dT} f \right) = -\frac{(A\_2 + 2A\_3T) + (B\_2 + 2B\_3T)f}{\left(B\_1 + B\_2.T + B\_3.T^2\right)}\tag{45}$$

$$\frac{\partial \mathbf{f}^{\uparrow}}{\partial \mathbf{c}} = \frac{1}{B} = \frac{1}{\left(B\_1 + B\_2.T + B\_3.T^2\right)}\tag{46}$$

Finally, the uncertainty of measurement of the water content (*U*) from the speed of sound and temperature measurements is given by Eq. (47), with a specified level of confidence for (*n*�1) degrees of freedom,

$$U = t\,\,\omega\tag{47}$$

### **4. Results and discussion**

#### **4.1 Water content from measuring mass of diesel fuel and water**

The uncertainty of measuring the water content in the (0.80 to 1) range, **Table 11**, is the smallest one, followed by the (0 to 0.025) range, **Table 12**, and finally the (0.05 to 0.20) range, **Table 13**. However, the maximum uncertainty is smaller than 0.0025.



#### **Table 11.**

*Water content from measured mass of diesel fuel and water, (0.80 to 1)* range.


**Table 12.** *Water content from measured mass of diesel fuel and water, (0 to 0.025) range.* *Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*


**Table 13.**

*Water content from measured mass of diesel fuel and water, (0.05 to 0.20) range.*

#### **4.2 Procedure for estimating the water content of diesel fuel-water mixtures**

For each of the previously prepared diesel fuel-water mixtures, the measured water content is indicated by **Tables 11**–**13**, together with its uncertainty of measurement.

A data acquisition system was used to register both temperature and speed of sound of the diesel fuel-water mixture every 6 s for a time interval between 10 and 20 min. The average value and the standard deviation of the registered data were calculated.

The standard deviations of the mean temperature and speed of sound values were calculated as the ratio between the standard deviation of the registered data and the square root of the number of measurements. The uncertainty of the average value was calculated by multiplying its standard deviation by the coverage factor.

Two methodologies were used to estimate the water content of the diesel fuelwater mixture, from the mean speed of sound and temperature measured values in the mixture.


The water content values calculated by the two methodologies were compared with the calculated value by mass measurement and indicated by **Tables 11**–**13**. The prediction error can be defined as the difference between the estimated value by each methodology and the calculated value by mass measurement, which is, in principle, the more accurate value.

At this point, it is important to observe that the calibration results are valid for estimating the measure and if both calibration and measurement conditions are similar. In principle, if the standard deviation of the water content is determined from calibration, the number of measurements will determine the uncertainty of estimating its average value.

In this calibration, a large number of measurements, registered by the data acquisition system, were made to minimize the influence of the meter repeatability on the results. This procedure can be considered a calibration of a meter for estimating the water content by the speed of sound and temperature measurements, in comparison with a known value of the water content, as determined from mass measurement with very low uncertainty. That is why the systematic error of the speed of sound measurement was not taken into account. Low uncertainties of measurement require individual meter calibration.

### **4.3 Curve fit methodology**

An equation relating water content with speed of sound and temperature can be obtained by curve fitting the measured values of speed of sound and temperature with the water content value calculated from mass measurement. The coefficients of Eq. (20) are shown in **Table 14** for each water content range.

### **4.4 Comparison between theory and curve fit methodologies**

**Figures 4**–**6** show that the utilization of the theory, Eq. (5), for estimating the water content, leads to a large prediction error (< 0.014) in comparison with the value obtained by mass measurement, because of the propagation of the uncertainties of density and speed of sound values in diesel fuel and water. The advantage of using the curve fit methodology, relating directly the water content to the measured temperature and speed of sound of the mixture, is to avoid this propagation, thus reducing the uncertainty. **Figures 4** and **5** show that the prediction error is smaller than 0.002. This procedure can be interpreted as the calibration of the measuring system for water content measurement.


#### **Table 14.**

*Coefficients of Eq. (20) for each water content range.*

*Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*

**Figure 4.**

*Water content prediction errors for two methodologies, (0 to 0.025) range.*

**Figure 5.** *Water content prediction errors for two methodologies, (0.05 to 0.20) range.*

### **4.5 Uncertainty of measuring the water content by the curve fit methodology**

Eq. (43) was used to estimate the uncertainty of water content measurement in different ranges.

**Figure 6.**

*Water content prediction errors for two methodologies, (0.80 to 1) range.*

**Table 15** shows that the uncertainty of water content measurement, in the (0 to 0.025) range, is less 0.0025 (0.25%), well inside the accepted limit for fiscal measurement (< 1%).


**Table 15.** *Uncertainty of water content measurement, (0 to 0.025) range.* *Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*


#### **Table 16.**

*Uncertainty of water content measurement, (0.05 to 0.20) range.*

**Table 16** shows that the uncertainty of water content measurement, in the (0.05 to 0.20) range, is less than 0.005 (0.50%).

**Table 17** shows that the uncertainty of water content measurement, in the (0.80 to 1) range, is less than 0.020 (2%). It can be seen that the curve fit in this range is much worse than in other ranges. The probable reason is that the experimental data were taken in a forced flow loop, less stable than the gravity flow loop used for other ranges.


#### **Table 17.**

*Uncertainty of water content measurement, (0.80 to 1) range.*

**Tables 15**–**17** show that the root mean square deviation of the measured data from the curve fitted equation (*ufit*), Eq. (44), is the largest contribution to the uncertainty of estimating the water content of oil–water mixtures, which can be reduced by utilizing other curve fit equations. Also, a reduction of the uncertainty value by a factor of ffiffiffi *n* p can be obtained by replicating the number *n* of measurement sets.

### **5. Critical analysis of the methodology**

An 8-acoustic path spool type ultrasonic flow meter measures directly the flow rate with an uncertainty that is compatible to what is required for fiscal measurement. Replacing a section of the pipeline by the dimensionally controlled spool, flow rate and speed of sound values can be measured with good repeatability. The meter piezoelectric sensors are in direct contact with the flowing fluid in the pipeline, and the meter is kept fixed during operation, thus preserving its measuring performance for a long time after the initial calibration.

The clamp on type ultrasonic flow meter is mounted on the outer surface of the pipeline and can be placed anywhere along it, thus being a convenient flow control tool. However, its uncertainty of measurement is worse, mainly due the fact that it is difficult to repeat the same mounting conditions, which suggests that it must remain fixed after an *in situ* calibration, for its preservation. The piezoelectric sensors are not in direct contact with the fluid, and the acoustic wave is propagated through the pipe wall before reaching the fluid. Its propagation velocity depends on the wall material. Furthermore, the propagation velocity through the air gap between the sensors and the pipe wall must be considered to reduce the uncertainty of speed of sound measurement in the flowing fluid inside the pipe.

The error of the speed of sound measurement of the flowing fluid inside the pipeline was estimated by calculating the acoustic wave propagation transit times (T) through the air gap, pipe wall, and fluid. The clamp on type meter was operated in the reflection mode, which means that the sound wave emitted by one sensor is reflected by the pipe wall in the opposite side, reaching its pair mounted on the same side. As a consequence, the path length (*L*) is doubled, thus reducing the uncertainty of speed of sound measurement. Considering a θ = 45° inclination angle of the acoustic wave, the path length can be calculated by Eq. (48). The transit time (*T*) is calculated by Eq. (49), from the speed of sound (c)

$$L = 2 \,\mathrm{x} / \cos(\theta) \tag{48}$$

$$T = \mathcal{L}/\mathfrak{c} \tag{49}$$

**Table 18** shows the average values of the speed of sound in pipe wall materials (acrylic and steel), two flowing fluids (water and diesel), and air (gap), used to estimate the transit time of the acoustic wave propagation.


**Table 18.**

*Speed of sound in materials for flow rate measurement.*


#### **Table 19.**

*Dimensions and acoustic path length.*


#### **Table 20.**

*Transit time (μs) for different wall materials and flowing fluids.*

**Table 19** shows the pipe dimensions, estimated air gap thickness, and the acoustic path length through flowing fluids, pipe wall, and air gap, calculated by Eq. (48).

**Table 20** shows the transit time, calculated by Eq. (49), for the acoustic wave propagation through the flowing fluid, pipe wall, and air gap. Due to the fact that the average flowing fluid speed of sound is calculated as the ratio between the total path length and the total transit time, and the contribution to its error is a function of the transit time through the pipe wall and air gap, unless it is taken into account, as the meter manufacturer usually does. It can be observed that for steel pipelines, the measurement error for measuring the fluid speed of sound is much smaller than for the acrylic pipe of these experiments. That is why the material properties do not need to be known precisely for correction by the meter software. However, the sensor mounting on the outer surface of the pipe needs to be done with care, to improve the repeatability of the speed of sound measurement, because the software does not make any correction.

The mounting repeatability conditions of the clamp on type meter on the pipe wall are probably responsible for the largest spread of the speed of sound measurements, suggesting that the meter calibration must be verified *in situ* with a fluid with known properties and remained fixed there on.

It has been theoretically shown that the water content of oil–water mixtures can be calculated from temperature and speed of sound measurements. However, the uncertainty propagation of both density and speed of sound for both pure oil and water as a function of temperature results in higher uncertainty values for estimating the water content of the mixture. This problem can be solved by curve fitting directly the water content as a function of the temperature and speed of sound. Another problem to be solved is the traceability of the speed of sound measurement, which is not provided by the ultrasonic meter manufacturers and can be expensive for the user. It was shown in this research that this curve fitting procedure can in fact be considered as a meter calibration, comparing its indicated speed of sound with a traceable water content and temperature, even if the speed of sound value is not known precisely. The problem of this approach is that each meter must be individually calibrated, like fiscal measurement flow meters. The objective of this research is to use the measured speed of sound by the already installed ultrasonic flow meter to continuously estimate and monitor the water content of the mixture. When a spool-type intrusive flow meter is used, the installation effects remain fixed. The meter needs calibration for water content measurement only when the flowing oil is changed in the pipeline. It is suggested that a methodology is developed to use fluids with known properties for *in situ* calibration. For example, the existing facilities for proving fiscal flow meters in the field could be used to sample the oil–water mixture and measure its speed of sound in a range covered by adding water to it. For a clamp on type non-intrusive flow meter, the mounting effects may vary according to its position and mounting conditions. It is suggested that they can minimized by keeping it fixed in a chosen position, with frequent *in situ* verifications, after its calibration in a laboratory, under controlled measurement conditions, which is needed whenever the flowing fluid changes. The advantage of this procedure is that it compensates for meter input inaccuracies of dimensions and material properties. In this research, the speed of sound was measured under different flow conditions, including flow rate values and velocity profiles, showing, as the theory indicates, that they have small influence on the accuracy of its measurement. Therefore, the speed of sound can be measured at both static conditions and at any flow velocity, whichever is more convenient. The fluctuation of the speed of sound measurement by the flow meter is due to meter characteristics and to the fluctuating fluid properties. If the flow meter operates under allowable transient conditions, the spread of measurement can be minimized by considering its average value by a data acquisition system, thus minimizing the uncertainty of water content determination. A larger number of measurements may be necessary when the fluctuation increases.

### **6. Conclusions**

A methodology has been developed to calculate the water content of an oil–water mixture from temperature and speed of sound measurements, using previously measured pure water and pure oil properties as a function of temperature. The propagation of the uncertainties in the determination of the properties is reduced by curve fitting directly the measured values of water–oil mixture speed of sound as a function of temperature and water content. An uncertainty value smaller than 0.0025 (95.45%) was obtained in the range of interest to fiscal measurement (< 0.01). The measurement system is calibrated by relating the meter indicated speed of sound to traceable values of temperature and water content of previously prepared mixtures. The system is able to continuously measure and monitor the water content of an oil–water mixture. For increasing the reliability of the results, it is suggested that a methodology be developed to calibrate *in situ* the meter when the flowing oil changes and to verify the meter calibration frequently.

### **Acknowledgements**

To Petrobras (the Brazilian Oil Company), through R&D Projects, for the financial support that made possible the construction and metrological validation of the laboratory facility for flow measurements at Pontifical Catholic University of Rio de

### *Water Content of Oil-Water Mixtures by the Speed of Sound Measurement DOI: http://dx.doi.org/10.5772/intechopen.109232*

Janeiro. Also, for having provided measurement data from its operational units, so that they could be analyzed and contribute to the recommended procedure for flow rate measurement. To Evemero Callegario de Mendonça for having planned and taken all the experimental data required for this research. To Flaviomar Soares de Souza for having examined carefully the experimental procedure and organizing the data to be processed.

## **Author details**

Alcir de Faro Orlando Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil

\*Address all correspondence to: afo@puc-rio.br

© 2023 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## **References**

[1] Zacharias EM. Method of measuring the amount of water flowing in a crude oil pipeline. US Patent 4.656.869. 1987

[2] Alexander JD, Reed PW. Sonic measurement of flow rate and water content of oil-water streams*.* US Patent 4.080.837. 1978

[3] Reed PW, Alexander JD. Method and apparatus for sonic velocity type water cut measurement. US Patent 4.236.406. 1980

[4] Orlando AF, Mendonça EC Ferreira MO, Souza FS, Mesquita R. Development of experimental techniques for technical-economical optimization of liquid volume measurement process in tanks and pipelines. Technical Report 5. Petrobras. 2020

[5] Tanaka M, Girard G, Davis R, Peuto A, Bignell N. Recommended table for the density of water between 0<sup>o</sup> C and 40<sup>o</sup> C based on recent experimental reports. Metrologia. 2001;**38**:301-309

[6] Greenspan M, Tschiegg CE. Speed of sound in water by a direct method. Research Paper 2795. Journal of Research of the National Bureau of Standards. 1957;**59**(4):249-254

[7] Mackenzie KV. Nine term equation for the sound speed in the oceans. The Journal of the Acoustical Society of America. 1981;**70**(3):807-812

[8] Coppens AB. Simple equation for the speed of sound in Neptunian waters. The Journal of the Acoustical Society of America. 1981;**69**(3):862-863

[9] Chen CT, Millero FJ. Speed of sound in seawater at high pressures. The Journal of the Acoustical Society of America. 1977;**62**(5):1129-1135

[10] Del Grosso VA. New equation for the speed of sound in natural waters (with comparison to other equations). The Journal of the Acoustical Society of America. 1974;**56**(4):1084-1091

[11] Leroy CC, Robinson SP, Goldsmith MJ. A new equation for the accurate calculation of sound speed in all ocean applications. The Journal of the Acoustical Society of America. 2008; **124**(5):2774-2783. Erratum in the Journal of the Acoustical Society of America. 2009;**126**(4):2117

[12] API. Temperature and pressure volume correction for generalized crude oils. refined products and lubricating oils. manual of petroleum measurement standards Chapter 11 – physical properties data. Section 1. 2004

[13] Menon ES. Transmission Pipeline Calculations and Simulations Manual. London, UK: Elsevier Science; 2015 ISBN: 9781856178310 e-Book

[14] IEC 60751. Industrial Platinum Resistance Thermometers and Platinum Temperature Sensors. 2.0 ed. International Electrotechnical Commission International Standard. Geneva, Switzerland. 2008. ISBN: 2831898498

[15] ASTM E203-16. Standard test method for water using volumetric Karl Fischer titration

[16] JCGM 100-2008. Evaluation of measurement data – Guide to the expression of uncertainty in measurement (GUM). Joint Committee on Guides for Metrology (JCGM). 2008

### **Chapter 5**
