Petroleum Knowledge Base

Equation of State

An equation of state describes the relation among the pressure, volume, and temperature of a given amount of fluid. Oil and gas engineering commonly uses the ideal gas equation of state, the real gas equation of state with the deviation factor Z, and cubic equations of state such as van der Waals and Peng–Robinson, to obtain gas density, formation volume factor, and the pressure of a gas column in the wellbore; at high pressure the results of the several equations differ markedly.

Concept

An equation of state is an equation relating the pressure p, volume V, and temperature T of a given amount of substance, written f(p, V, T) = 0. If two of the quantities are known, the third can be found; for a mixture, the composition must also be given. In oil and gas engineering it is used to find gas density and formation volume factor under reservoir conditions, the pressure distribution in a gas column in the wellbore, and the gas velocity in pipe flow, and compositional models and phase equilibrium calculations are also based on it.

The simplest is the ideal gas equation of state. It assumes that there are no attractive forces between molecules and that the molecules themselves occupy no volume, and is written pV = nRT. When a given amount of ideal gas changes from state 1 to state 2, the combined law applies:

p1V1/T1 = p2V2/T2

Attractive forces exist between the molecules of a real gas, and the relation among p, V, and T deviates from the equation above. In engineering, the form of the ideal gas equation is retained and multiplied by a deviation factor Z to reflect the degree of deviation, giving the real gas equation of state pV = ZnRT. Expressed with mass m and molar mass M, it is written pV = (m/M)ZRT, from which the gas density ρ = pM/(ZRT) follows. For the definition of Z and its charts and correlations, see Natural Gas Compressibility Factor; this entry uses only its conclusions.

The equation of state of a liquid differs in nature from that of a gas: liquids have low compressibility, and the change of volume with pressure is usually described by a compressibility (see Oil Compressibility); the density of a gas is approximately proportional to pressure and also varies with Z, so the equations for gas flow in porous media and for a gas column in the wellbore are nonlinear.

The commonly used gas equations of state can be divided into three classes:

  1. The ideal gas equation of state, suitable for low pressure and rough calculation;
  2. The real gas equation of state pV = ZnRT, in which Z is obtained from charts or correlations using the pseudoreduced pressure and pseudoreduced temperature according to the principle of corresponding states; it is the main method for engineering calculations of dry gas and wet gas;
  3. Cubic equations of state, such as the van der Waals equation, the Redlich–Kwong equation and its Soave modification (SRK), and the Peng–Robinson equation (PR), which calculate Z directly from the critical properties and acentric factors of the components, can describe the gas phase and the liquid phase at the same time, and are used in compositional models, flash calculations, and phase diagram calculations (for phase concepts, see Phase Diagrams and Phase Behavior).

The Hall–Yarborough correlation is itself fitted from an equation of state, in which the reduced density y equals one quarter of the product of the van der Waals co-volume b and the density.

Calculation Methods

Ideal Gas and the Universal Gas Constant

pV = nRT, ρ = pM/(RT)

R is the universal gas constant, equal to 8.314 J/(mol·K), that is, 0.008314 MPa·m³/(kmol·K). Some engineering equations take 8.31 J/(mol·K), and others take 8.31441 J/(mol·K); there is no difference within three significant figures. p must be absolute pressure, and T must be thermodynamic temperature in K.

Real Gas Equation of State

pV = ZnRT, ρ = pM/(ZRT)
Bg = pscZT/(pZscTsc)

In the segment-by-segment calculation of a gas column, the density equation is written ρ = Mp/(1000RZT); by dimensional analysis it corresponds to p in Pa, M in g/mol, and R in J/(mol·K), with ρ in kg/m³. The formation volume factor equation is obtained by writing, from the equation of state, the volumes of the same molar amount of gas at reservoir conditions and at surface standard conditions and dividing one by the other; with Zsc = 1.0, psc = 0.101 MPa, and Tsc = 293 K, it simplifies to Bg = 3.447×10−4ZT/p. For a detailed discussion of the formation volume factor, see Gas Formation Volume Factor.

Cubic Equations of State

The van der Waals equation corrects the ideal gas with two constants: b accounts for the volume occupied by the molecules themselves, and a/Vm2 for the pressure reduction caused by molecular attraction.

p = RT/(Vm − b) − a/Vm2
a = 27R2Tc2/(64pc), b = RTc/(8pc)
Z3 − (1 + B)Z2 + AZ − AB = 0

The Peng–Robinson equation rewrites the attraction term and makes a vary with temperature and the acentric factor ω:

p = RT/(Vm − b) − aα/[Vm(Vm + b) + b(Vm − b)]
a = 0.45724R2Tc2/pc, b = 0.07780RTc/pc
α = [1 + κ(1 − Tr0.5)]2, κ = 0.37464 + 1.54226ω − 0.26992ω2
Z3 − (1 − B)Z2 + (A − 3B2 − 2B)Z − (AB − B2 − B3) = 0

In both, A = ap/(RT)2 (aα for the PR equation), B = bp/(RT), Vm is the molar volume, and Tr = T/Tc. For a mixture, the mixing parameters are obtained from the a and b of the components, commonly am = ΣΣyiyj(aiaj)0.5(1 − kij) and bm = Σyibi, where kij is the binary interaction coefficient. When the cubic equation has one real root, that root is used directly; when it has three real roots, the largest root corresponds to the gas phase and the smallest to the liquid phase, and the middle root has no physical meaning; when the fluid is single-phase and it is not known whether it is gas or liquid, the root with the smaller fugacity (Gibbs free energy) is taken.

Pressure of the Gas Column in the Wellbore

The variation of pressure with depth in a shut-in gas column satisfies dp = ρg·dh, with ρ given by the equation of state. When the gas is treated as ideal and the gas column is regarded as being at constant temperature, the relation between wellhead pressure and bottomhole pressure can be approximated as:

ps = pb/e0.000111554γH

where H is the well depth (m) and γ is the natural gas specific gravity, taken as 0.55 for methane when data are lacking. To take Z and the temperature change into account, the gas column is divided from bottom to top into several segments: Z is found from the pressure and temperature at the bottom of each segment, then the gas density of the segment is found, and pi+1 = pi − ρighi carries the pressure to the top of the segment, proceeding segment by segment up to the wellhead.

Worked Example

Example 1: Z and Density from Three Equations of State for the Common Example

Given: The common example for this category is used. The formation pressure is 33.84 MPa (an assumed pressure coefficient of 1.15) and the reservoir temperature is 373.15 K (assumed). The natural gas composition is an assumed value (mole fractions CH4 0.92, C2H6 0.04, C3H8 0.015, nC4H10 0.005, N2 0.01, CO2 0.01), with M = 17.63 g/mol, ppc = 4.616 MPa, Tpc = 199.5 K, ppr = 7.33, and Tpr = 1.87 (see Gas Composition and Pseudocritical Properties).

Find: Z and the gas density at reservoir conditions, and the volume that 1 m³ of reservoir gas occupies at surface standard conditions (0.101 MPa, 293.15 K).

Solution:

  1. Hall–Yarborough correlation: Z = 1.01.
  2. Peng–Robinson equation (kij taken as 0, with generic acentric factors for the components): A = 0.7027, B = 0.3053, the cubic equation has only one real root, and Z = 0.982.
  3. van der Waals equation (with the same mixing rules): Z = 1.041.
  4. Density ρ = 33.84×17.63/(Z×0.008314×373.15): 190.4 kg/m³ for Z = 1.01, 195.8 kg/m³ for Z = 0.982, 184.7 kg/m³ for Z = 1.041, and 192.3 kg/m³ for the ideal gas.
  5. Surface volume: by the ideal gas combined law, Vsc = 1×33.84×293.15/(0.101×373.15) = 263.2 m³; with Z = 1.01 taken into account, it is 1/Bg = 260.6 m³, so the ideal gas calculation is about 1% too large.

The PR equation is about 3% lower than the Hall–Yarborough correlation, and the van der Waals equation is about 3% higher. When the pressure is halved (16.92 MPa), the three give 0.912, 0.906, and 0.884, with the van der Waals equation the lowest. Figure 1 shows the three curves at 373.15 K in full: below about 25 MPa the PR equation and the Hall–Yarborough correlation are close, and the higher the pressure, the further apart they become; the van der Waals equation is too low in the low-pressure range and too high in the high-pressure range.

Variation of the deviation factor with pressure at 373.15 K for the natural gas of the common example (comparison of three methods; composition and temperature are assumed values)
Figure 1 Variation of the deviation factor with pressure at 373.15 K for the natural gas of the common example (comparison of three methods; composition and temperature are assumed values)

Example 2: Shut-In Wellhead Pressure of a Gas Well

Given: The same gas reservoir as in Example 1, with a reservoir midpoint true vertical depth of 3000 m and the well completely filled with natural gas, γ = 0.609; the wellhead temperature is 10 °C and the bottomhole temperature is 100 °C (an assumed geothermal gradient of 3 °C/100 m, used to find the temperature distribution of the gas column).

Find: The shut-in wellhead pressure.

Solution:

  1. Ideal gas approximate formula: ps = 33.84/e0.000111554×0.609×3000 = 27.60 MPa, which is 0.816 of the bottomhole pressure.
  2. Segment-by-segment numerical method: 2000 segments, with Z found for each segment from the Hall–Yarborough correlation and temperature varying linearly with depth, gives ps = 27.51 MPa, which is 0.813 of the bottomhole pressure.
  3. Taking 85% of the bottomhole pressure as a simplification gives 28.76 MPa.

In this example the two equation-of-state methods differ by only 0.09 MPa. The reason is that Z falls from 1.01 at the bottomhole to about 0.83 near the wellhead, so over most of the gas column Z is less than 1 and the gas is heavier than an ideal gas; whereas the mean temperature of the gas column, about 328 K, is higher than the roughly 306 K implied by the coefficient of the approximate formula, which makes the gas column lighter, and the two effects largely cancel.

Example 3: Recalculation of a Set of Comparison Cases

Given: A set of design comparison cases gives the static bottomhole pressure and shut-in wellhead pressure of two wells: a normal-pressure well with a well depth of 2881 m, static bottomhole pressure 32 MPa, bottomhole temperature 74 °C, wellhead temperature 16 °C, and γ = 0.68; and a high-temperature high-pressure well with a well depth of 7520 m, static bottomhole pressure 170 MPa, bottomhole temperature 226 °C, wellhead temperature 16 °C, γ = 0.55, CO2 mass fraction 0.02%, and a trace of H2S. The original table lists the results of the ideal gas approximate formula as 25.8 MPa and 107 MPa, and the results from the real gas PVT equation as 25.3 MPa and 145 MPa; the high-temperature high-pressure well also has a measured wellhead value of 145 MPa. The two methods differ by about 2% and 26%.

Find: Recalculate with the two methods of this entry.

Solution: The pseudocritical properties are from the relative density equation for dry gas with γ < 0.7: ppc = 4.609 MPa and Tpc = 212.36 K for the normal-pressure well; 4.641 MPa and 189.39 K for the high-temperature high-pressure well.

  1. Normal-pressure well: approximate formula 25.72 MPa, segment-by-segment numerical method 25.07 MPa.
  2. High-temperature high-pressure well: approximate formula 107.2 MPa, segment-by-segment numerical method 145.0 MPa, in agreement with the measured value; but ppr at the bottomhole reaches 36.6, beyond the range of the Standing-Katz chart, so this is an extrapolation, and this agreement does not show that the correlation is generally reliable in this range; wells of this kind should be checked against measured PVT data. Taking 85% as a simplification gives 144.5 MPa.

For the normal-pressure well, Z is less than 1 and the ideal gas approximate formula gives too high a value; for the high-temperature high-pressure well, Z is much greater than 1, the gas column is light, and the approximate formula gives a markedly low value.

Recommended Values

Method Applicable to Notes
Ideal gas equation of state Low-pressure gas, rough calculation Error grows as pressure rises; the ideal gas approximate formula has little error when the wellhead pressure is below 25 MPa, but the error can be as high as 30% in high-temperature high-pressure gas wells
Real gas equation of state (Z + correlations) Density, formation volume factor, gas column, and pipe flow calculations for dry gas and wet gas The several Z correlations differ more at high pressure and low Tpr; when ppr is beyond the range of the chart, it is an extrapolation
Peng–Robinson and SRK equations Compositional models, flash calculations, phase diagrams, condensate gas, and volatile oil Require the critical properties, acentric factors, and kij of the components; in this example the gas-phase Z is about 3% lower than the correlation, and calculating liquid-phase density often requires a volume translation correction
van der Waals equation Explaining the principle In this example it is too high in the high-pressure range and too low in the medium-pressure range, and is not suitable for engineering calculation

R is taken as 8.314 J/(mol·K) or 0.008314 MPa·m³/(kmol·K). The pressure and temperature used for surface standard conditions should be stated; in China they are generally taken as 0.101 MPa and 20 °C.

Simplified value for shut-in wellhead pressure: the Canadian industry recommended practice IRP 1:2007 takes 85% of the bottomhole pressure for wells deeper than 1800 m. This ratio is only an empirical value; in Example 2 it is 1.25 MPa higher than the segment-by-segment numerical method, and for the high-temperature high-pressure well in Example 3 it is 0.5 MPa lower than the measured value, so it is not necessarily on the conservative side, and when it is used it should be compared with the calculated value from the equation of state.

Influencing Factors and Considerations

  1. Units. Use absolute pressure for pressure and K for temperature; the unit of R must match those of p and V, for example R = 0.008314 MPa·m³/(kmol·K) when p is in MPa and V is in m³.
  2. Direction of the deviation factor. When Z < 1, the gas is heavier than an ideal gas at the same pressure and temperature, so a gas column calculated as an ideal gas is too light and the wellhead pressure too high; when Z > 1, the opposite is true. The bottomhole Z of a high-temperature high-pressure gas well may be much greater than 1, and the ideal gas approximate formula may significantly underestimate the shut-in wellhead pressure and hence the internal pressure borne by the tubing, casing, and wellhead equipment. For such wells, calculate with the real gas equation of state or with measured PVT data.
  3. Temperature. Temperature does not appear in the ideal gas approximate formula, which amounts to treating the whole gas column at one fixed temperature; the higher the gas column temperature, the lower the density at a given pressure and the higher the wellhead pressure. For deep wells, calculate in segments according to the temperature profile.
  4. Composition. Z correlations reflect composition through the pseudocritical properties, and when there is much CO2 or H2S, the pseudocritical properties should be corrected first (see Gas Composition and Pseudocritical Properties). Cubic equations of state require the components to be specified one by one; for fluids containing C7+, the heavy fraction must first be characterized, and kij and the heavy fraction parameters are usually fitted to PVT experimental data.
  5. Root finding. A cubic equation of state may have three real roots in the two-phase region, with the largest root taken for the gas phase and the smallest for the liquid phase; when there is one real root, it is used directly. The Hall–Yarborough correlation and the cubic equations all require iteration or the solution of a cubic equation, and convergence should be checked when programming.
  6. Linearization of gas flow in porous media. The basic differential equation of gas well testing contains p/(μZ); when it is assumed constant, the equation becomes linear. At pressures above 14 MPa this term is nearly constant, and the simplification should not be made for low-pressure gas wells.

References

  1. Li Kexiang. Drilling and Completion Technology for Oil and Gas Reservoir Protection (in Chinese). Petroleum Industry Press, 1993.
  2. Zhang Qi. Principles and Design of Oil Production Engineering (in Chinese). China University of Petroleum Press, 2000.
  3. Gao Deli et al. Drilling Technology for Deep and Ultra-Deep Wells under Complex Geological Conditions (in Chinese). Petroleum Industry Press, 2004.
  4. Wan Renpu. Modern Well Completion Engineering (3rd Edition) (in Chinese). Petroleum Industry Press, 2008.