Metrological Evaluation of the Compatibility of Two Different Digital Density Meter Adjustment Methods

: Brazilian regulation requires the test methods for analysing the shrinkage factor, and the solubility ratio in crude oils must be estimated under the measurement conditions for appropriation. Since these physicochemical parameters depend upon the density, a Brazilian oil company proposed an adapted and more user-friendly methodology for adjusting the digital density meter under high pressure and temperature conditions. This study aimed to evaluate the metrological compatibility of this proposal by comparing it with the ﬁt model presented by a manufacturer of a digital den-simeter and with the tabulated reference values of ﬂuid density. Since the density data behaviour presented non-normal distributions, the Wilcoxon signed-rank test showed metrological compatibility between the approaches studied in the pressure range from 0 psi to 1200 psi (8.273709 MPa) and the temperature range from 5 ◦ C to 70 ◦ C.


Introduction
In 2000, after the end of the monopoly for oil and natural gas exploration in Brazil, the Brazilian National Agency of Petroleum, Natural Gas and Biofuels (ANP) and the Brazilian National Institute of Metrology Standardization and Industrial Quality (INMETRO) published Joint Resolution No. 1, establishing the Technical Regulation for Measurement of Oil and Natural Gas (RTM) [1].
With the enactment of this regulation, in recent decades, oil and natural gas exploration and production activities in Brazil underwent an accelerated organisational restructuring and adaptation of measurement facilities to meet the RTM [2].
In 2013, this RTM was revised [3], including more detail when specifying minimum constructive and metrological requirements-concepts that were not included in the previous RTM. Like the revolution introduced by the 2000 RTM, its re-edition indeed imposed new challenges and responsibilities on the different actors operating in the sector. Among other changes, this version of the RTM established new periodicities for the analysis of the solubility ratio (SR) and shrinkage factor (SF) in Brazilian territory crude oil.
In 2022, a new revision of this joint ANP/INMETRO Resolution No. 1 [4] was sent for public consultation. Item 7.2.6.2. of this RTM requires that sample collections for determination of oil properties, such as SR and SF, be carried out at least once every month. Item 12.1.12. explains the need for all measurement results expressed in the reports to have uncertainties declared [5].
In measurements of non-stabilised oil, for each measurement point, the SF due to the release of vapours after the measurement when the oil is stabilised must be considered [6]. Since each stream has its own SF, its application is essential to correct the volume of contributing flows and guarantee fairness and equity. These vapours must be added to compute the gas production, estimated based on the volume of oil and the SR of the oil under the measurement conditions for appropriation, even though SR is softly affected by temperature compared to pressure [7].
Both the SF, the volume of oil stabilised under standard measurement conditions divided by the volume of oil not stabilised under the pressure and temperature conditions of the process, and the SR, the ratio between the volumes measured under standard conditions of measurement of natural gas and oil in which the natural gas is dissolved, are functions of the density of the fluid and must be applied to the flow computer under line conditions to obtain the volumetric oil flow under standard conditions [8].
In oil production in small accumulation fields, natural gas measurement systems may have natural gas production computed based on oil volume and oil SR under measurement conditions, provided there is no measurement technology available for these conditions and that is authorised by the ANP. Within this context, the density used in SF and SR calculations must be measured at high temperatures and pressures instead of the usual conditions described in the test methods scope for the density of oils by a digital density meter: 15 • C or 20 • C and 101.325 kPa.
In recent years, including in the oil and gas industry, interest in studies of measurements of density at elevated temperatures and pressures has increased in the various production chains related to fluids [9][10][11][12][13][14]. More specifically to Anton Paar densimeters, a DMA60/DMA602 density meter system has been used to measure the density of sulfolane in binary mixtures with six aromatic hydrocarbons at 298.15 K [15]; a DMA 4200 M densimeter was calibrated with water and toluene as standard liquids at pressures from 0.1 to 50 MPa and temperatures from 293.15 to 453.15 K [16]; and a DMA 512 density meter has been used to measure the density of dimethyl ether (RE170) at high pressure [17].
Therefore, the objective of this study was to validate an adapted methodology that is faster and more user-friendly for adjusting the digital density meter under variable conditions of pressure and temperature, which are inputs for the SF and SR tests proposed by a Brazilian oil company. The metrological compatibility of this proposal was evaluated by comparing it with the fit model presented by a manufacturer of a digital densimeter and with the tabulated reference values of fluid density.

Materials and Methods
Two different approaches for calculating fluid densities at varying pressure and temperature conditions were detailed. Then, the metrological compatibility between these approaches and the tabulated values from the National Institute of Standards and Technology (NIST) [18] could be evaluated by nonparametric statistical methods since the data behaviour departs from the Gaussian distribution.
For high pressure and/or high temperature conditions, Anton Paar supplies the DMA™ 4200 M laboratory density meter. The DMA™ 4200 M measures density at sample pressures up to 500 bar (7250 psi, 50,000 kPa) and temperatures up to 200 • C (392 • F), Figure 1.
The DMA™ 4200 M achieves highly repeatable results with any homogeneous sample in its liquid or gas phase. To withstand a wide pressure and temperature range, the system is equipped with an oscillating U-tube made of Hastelloy C-276, which makes the instrument particularly robust.
The DMA™ 4200 M is equipped with a so-called Temperfect™ feature. This is a factory setting that allows immediate density measurements at any temperature between 0 • C and 150 • C (32 • F and 302 • F) at ambient pressure. Advanced measurement of the cell oscillation pattern combined with Temperfect™ eliminates the influence of viscosity. Due to this fast and reliable viscosity correction, density results accurate to 0.0002 g cm −3 are guaranteed. Air bubbles can be detected visually during the measurement.
A special adjustment must be made if measurements are carried out at constant pressure and temperature. As the metrological reliability of an instrument greatly depends on the substances used for the adjustment and the samples to be measured later, the choice of suitable adjustment substances is of utmost importance.
For special adjustments, two substances with exactly known densities are sufficient to determine the unknown constants of apparatuses A and B. Ideally, the densities of these two substances should differ by at least ∆ρ = 0.0030 g cm −3 .
A fit with two substances with different densities leads to less biased measurement results than a fit performed with two substances with similar densities. The adjustment must cover the entire density range of subsequent sample measurements. The DMA™ 4200 M achieves highly repeatable results with any homogeneous sample in its liquid or gas phase. To withstand a wide pressure and temperature range, the system is equipped with an oscillating U-tube made of Hastelloy C-276, which makes the instrument particularly robust.
The DMA™ 4200 M is equipped with a so-called Temperfect™ feature. This is a factory setting that allows immediate density measurements at any temperature between 0 °C and 150 °C (32 °F and 302 °F) at ambient pressure. Advanced measurement of the cell oscillation pattern combined with Temperfect™ eliminates the influence of viscosity. Due to this fast and reliable viscosity correction, density results accurate to 0.0002 g cm −3 are guaranteed. Air bubbles can be detected visually during the measurement.
A special adjustment must be made if measurements are carried out at constant pressure and temperature. As the metrological reliability of an instrument greatly depends on the substances used for the adjustment and the samples to be measured later, the choice of suitable adjustment substances is of utmost importance.
For special adjustments, two substances with exactly known densities are sufficient to determine the unknown constants of apparatuses A and B. Ideally, the densities of these two substances should differ by at least Δ = 0.0030 g cm −3 .
A fit with two substances with different densities leads to less biased measurement results than a fit performed with two substances with similar densities. The adjustment must cover the entire density range of subsequent sample measurements.

HP DMA™ 4200 M Cell Approach, Recommended by the Anton Paar Factory
The HP DMA cell operations manual defines how to adjust the cell for a wide range of pressures and temperatures [19].
In such situations, if a fit is to cover a wide range of temperature and/or pressure, the quality of the fit is mainly limited by the quality of the known reference values (setpoints). For these reasons, certified reference materials plus their equations of state are required for wide-ranging adjustment of the DMA™ 4200 M. Equations of state for reference materials are rigorously described (using parameters such as temperature and pressure) and available on the page from NIST.
In this adjustment procedure, several measurement points are required for at least two standard substances of known density at various pressure and temperature conditions with similar properties to the subsequently measured samples. This procedure is

HP DMA™ 4200 M Cell Approach, Recommended by the Anton Paar Factory
The HP DMA cell operations manual defines how to adjust the cell for a wide range of pressures and temperatures [19].
In such situations, if a fit is to cover a wide range of temperature and/or pressure, the quality of the fit is mainly limited by the quality of the known reference values (setpoints). For these reasons, certified reference materials plus their equations of state are required for wide-ranging adjustment of the DMA™ 4200 M. Equations of state for reference materials are rigorously described (using parameters such as temperature and pressure) and available on the page from NIST.
In this adjustment procedure, several measurement points are required for at least two standard substances of known density at various pressure and temperature conditions with similar properties to the subsequently measured samples. This procedure is very time-consuming and expensive, in addition to not being fully transparent to the operator.
The adjustment's measurement points must cover the samples' entire measurement range concerning density, pressure, and temperature. The measurement results give rise to a polynomial function, Equation (1) [19]: where dt is the temperature, dd is the pressure, dp is the period of oscillation, and AA-AK are polynomial coefficients. At least 11 measurement results are required for the function's polynomial coefficients to be calculated.

Approach to the Adapted DMA 512 Cell by a Brazilian Oil Company
According to the instruction manual of the Anton Paar DMA 512 external highpressure cell, if samples of a standard are available, the adjustment can be made by measuring in air or vacuum and then with the standard sample. For the range from −30 • C to +150 • C, mercury is a suitable substance with sufficiently accurate density tables.
For adjustments outside this temperature range, it is necessary to extrapolate from values measured at room temperature. The density of the unknown sample, ρ x , at temperature t can be calculated by Equation (2), [20]: where: α is the coefficient of linear thermal expansion of the U-tube material of the DMA HP cell (Hastelloy C-276), which is 1.12 × 10 −5 / • C; however, the original DMA 512 apparatus had a stainless steel U-tube, whose α is 1.6 × 10 −5 / • C; t o is the standard temperature at 100 • F (37.78 • C); T ρ is the period of oscillation for water at working pressure P; Periods of vacuum oscillation at the standard temperature (37.78 • C) and the sample measurement temperature (t) are, respectively, T o and − T o ; When measuring the sample of unknown density, the period of vibration − T ρx of the sample at pressure P and at the measurement temperature are measured.
The density of water at 100 • F as a function of pressure is calculated from Equation (3): where: ρ = water density in lb/ft 3 , and P is the gauge pressure in kgf/cm 2 . Finally, the water density in g/cm 3 is calculated by multiplying the result of Equation (3) by a factor of 0.01601846.

Wilcoxon t-Test for Two Paired Samples [21,22]
Wilcoxon's t-test replaces the Student's t-test for paired samples when the data do not satisfy the requirements of having data with normal or Gaussian behaviour. This test was developed by Frank Wilcoxon in 1945 and is based on the ranks of intrapair differences. The Wilcoxon test, or Wilcoxon signed-rank test, is a nonparametric method for comparing two paired samples. At first, the numerical values of the difference between each pair are calculated, with three possible conditions: increase (+), decrease (−), or equality (=). Once all the differences between the values obtained for each data pair have been calculated, these differences are ordered by their absolute value (without considering the sign), replacing the original values by the position they occupy in the ordered scale. Testing the hypothesis of equality between groups is based on the sum of the ranks of negative and positive differences.
Instead of considering only the sign of differences between pairs, this test for paired data considers the value of these differences, thus making it one of the most powerful and "popular" nonparametric tests. The Wilcoxon test is the most useful nonparametric test for comparing means with related scientific data. This test gives greater weight to significant differences between each pair of scores.
The requirements for performing the Wilcoxon test are as follows: (i) the pairs (X i , Y i ) are mutually independent; (ii) the differences, d i , are continuous variables with a symmetrical distribution; and (iii) the level of measurement is on an interval scale.
These statistical tests propose to compare two means when the results of the two samples are related two by two, according to some criterion that provides an influence between the various pairs and on the values of each pair. For each defined pair, the value of the first sample is clearly associated with the respective value of the second sample.
The evaluation of ranks is based on the classification of all differences in ascending order and the assignment of orders to them if they are non-zero. If two or more differences are identical, use the mean of the orders that would have been assigned if the observations differed. Give ranks to the signs of differences.
For sample size n ≤ 25: w = min(w + , w − ) where: w + is the sum of the positive ranks; w − is the absolute value of the sum of the negative ranks.
For sample size n > 25

Results and Discussion
This study considered the temperature range from 5 • C to 70 • C and the pressure range from 0 psi to 1200 psi (8.273709 MPa). Density reference values for water and n-heptane calibration and toluene validation at various temperatures were collected from the NIST website, https://webbook.nist.gov/chemistry/fluid/, 5 April 2023 [18].
The experiments were carried out at an accredited Brazilian oil laboratory, and the results of the toluene density and the operational conditions are available in Table 1. The repeatability and the expanded uncertainty of the results obtained are, respectively, 0.0009 g/cm 3 and 0.0029 g/cm 3 (k = 2; 95.45%).
As expected, the density results at the same temperature increased with increasing pressure, as far as the volume decreases. For temperatures of 5 • C and 20 • C, the densities calculated by the adapted DMA 512 cell are slightly higher than DMA™ 4200 M and NIST. For the temperature of 37.8 • C, the density values calculated by the proposed methodology are practically identical to those of the DMA™ 4200 M or are between the values of the DMA™ 4200 M and those tabulated by NIST. For temperatures of 50 • C and 70 • C, the densities calculated by the adapted DMA 512 cell are slightly lower than DMA™ 4200 M and NIST. For the lowest temperature, i.e., 5 • C, the maximum absolute differences between the proposed approach and both the DMA™ 4200 M and NIST approaches did not exceed the measurement uncertainty until experiment six. However, for all other temperature ranges, these differences were much smaller, being within the repeatability of the test method ( Figure 2). calculated by the adapted DMA 512 cell are slightly higher than DMA™ 4200 M and NIST. For the temperature of 37.8 °C, the density values calculated by the proposed methodology are practically identical to those of the DMA™ 4200 M or are between the values of the DMA™ 4200 M and those tabulated by NIST. For temperatures of 50 °C and 70 °C, the densities calculated by the adapted DMA 512 cell are slightly lower than DMA™ 4200 M and NIST. For the lowest temperature, i.e., 5 °C, the maximum absolute differences between the proposed approach and both the DMA™ 4200 M and NIST approaches did not exceed the measurement uncertainty until experiment six. However, for all other temperature ranges, these differences were much smaller, being within the repeatability of the test method (Figure 2). To decide which is the most appropriate statistical test for comparing the sets of data, the Shapiro-Wilk test [21] evaluated whether the difference between pairs of data has a normal distribution or not. The presence of outliers was not observed when treating the data sets. The test results show that the data referring to the densities of toluene have behaviour that deviates from normality since the tabulated W is greater than the calculated W. Therefore, the Wilcoxon test is the most adequate to evaluate the statistical compatibility between the proposed methodology and the tabulated value and between the proposed methodology and that recommended by the manufacturer (Tables 3 and 4, respectively).
Based on the Wilcoxon t-test, no systematic errors were found, only random errors. Considering a two-tailed test for a confidence level of 95% based on the W-value and the Z-value, there is no significant difference between the proposed methodology and the tabulated value. Considering a two-tailed test for a confidence level of 95% based on the W-value and the Z-value, there is no significant difference between the proposed methodology and the manufacturer's recommendation.

Conclusions
Based on a nonparametric test, the results showed compatibility between the approaches studied in the pressure range from 0 psi to 1200 psi (8.273709 MPa) and the temperature range from 5 • C to 70 • C. The great advantages are that this adapted approach proved to be faster and more user-friendly when compared to the traditional proposal of the DMA™ 4200 M. In contrast, a disadvantage is that the validated range was reduced from (−30 • C to +150 • C) to (+5 • C to +70 • C).
For future works, it is recommended to evaluate the compatibility between the proposed approach and the model developed in a Serbian [23] study, in addition to trying to extend the working range to temperatures above 70 • C.
Another approach to be developed is using other compounds to adjust the cell since water and n-heptane have boiling points close to 100 • C. One possibility is to use n-octane, whose boiling point is 126 • C at atmospheric pressure, to replace n-heptane.