Energy Equation Derivation of the Oil-Gas Flow in Pipelines

Résumé — Dérivation de l’équation d’énergie de l’écoulement huile-gaz dans des pipelines — Lors de la simulation d’un écoulement multiphasique huile-gaz dans une conduite, le calcul thermodynamique représente un processus important en interaction avec le calcul hydraulique ; il influence la convergence du programme et la précision des résultats. La forme de l’équation d’énergie constitue la clef du calcul thermodynamique. Basée sur l’équation d’énergie de l’écoulement huile-gaz dans un pipeline, la formule de chute de température explicite ( ETDF ; Explicit Temperature Drop Formula ) est dérivée pour un calcul de température d’état stable huile-gaz. Cette nouvelle équation d’énergie prend en compte de nombreux facteurs, tels que l’effet Joule-Thomson, le travail de pression, le travail de frottement, ainsi que l’incidence des ondulations de terrain et le transfert de chaleur avec le milieu extérieur le long de la ligne. Ainsi, il s’agit d’une forme globale de l’équation d’énergie, laquelle pourrait décrire précisément la réalité d’un pipeline à Abstract — Energy Equation Derivation of the Oil-Gas Flow in Pipelines — In the simulation of oil-gas pipeline multiphase flow, thermodynamic computation is an important process interacting with the hydraulic calculation and it influences the convergence of the program and the accuracy of the results. The form of the energy equation is the key to the thermodynamic computation. Based on the energy equation of oil-gas flow in pipeline, the Explicit Temperature Drop Formula (ETDF) is derived for oil-gas steady state temperature calculation. This new energy equation has considered many factors, such as Joule-Thomson effect, pressure work, friction work and impact of terrain undulation and heat transfer


LIST OF SYMBOLS
Q Transferring energy per unit time (J/s) u Internal energy of per unit mass (J/kg) v Fluid velocity (m/s) g Gravity acceleration (m/s 2 ) H Altitude (m) ρ Density (kg/m 3 ) α Cross-sectional void fraction A Cross section area of the pile (m 2 ) W Work per unit time (J/s) P Pressure (Pa) τ Shear stress (Pa) S Wetted perimeter (m) Δx Pipe length of one section (m) v -Mean velocity in pipe (m/s) q Heat of oil-gas mixture transfer with the surroundings (J/s) h Enthalpy of unit mass (J/kg) T Temperature (K) c p Specific heat at constant pressure (J/(K.kg))μ J Coefficient of Joule-Thomson effect (K/Pa) ς Specific volume (m 3 /kg) D Inner diameter (m) U Overall heat transfer coefficient, (W/(m 2 .K)) β Volume expansion coefficient of liquid (K -1 ) d 4 20 Relative density of the crude oil at 20°C to density of the water at 4°C φ 1 , φ 2 and φ 3 Intermediate variable Subscripts g

Gas phase l
Oil phase e Environment i Inlet o Outlet When there are two letters marked in subscript, the first letter on behalf of the phase, the second represents the inlet or outlet.

INTRODUCTION
In recent years, with the vigorous development of oil and gas resources and constant exploitation of waxy crude oil, multiphase transportation technology brings about flow-insurance issues such as wax deposition, hydrate formation and pigging, which wax deposition is believed to be a significant influence to the security and economical operation of multiphase transportation system.As wax deposition narrows the effective flow area of pipe, delivery capacity reduces, delivery pressure increases and if serious, blockage may occur.All of the thermo-physical parameters of multiphase mixture are linked with the temperature of the mixed fluid and the wax deposition rate is relative to the inner wall temperature directly bound up with that of the fluid [1].Therefore, it is necessary to do some research on the temperatures of oil-gas flow and inner wall, which is crucial to security and economical operation of the pipeline system.
In the study of fluid dynamics and thermodynamics, the each form of item in energy equation for describing various complex phenomenon has been very complex.There are many variables requiring introduced, so there are some difficulties in solving governing problems, not benefit for engineering application [2].The various fields relating to oil industry orienting to engineering need an equation easy to be solved on the premise of keeping enough engineering error urgently.
with the surroundings along the line.So it is an overall form of energy equation, which could describe the actual fact of multiphase pipeline accurately.Therefore, some standpoints in literatures on the temperature calculation of oil-gas two-phase flow in pipelines are reviewed.Elimination of temperature iteration loop and integration of the explicit temperature equation, instead of enthalpy energy equation, into the conjugated hydraulic and thermal computation have been found to improve the efficiency of algorithm.The calculation applied to both the component model, also applied to the black-oil model.This model is incorporated into the component model and black-oil model, respectively, and two simulations are carried out with two practical pipeline Yingmai-Yaha and Lufeng multiphase pipeline and the temperature results are compared with the simulation calculated by the OLGA and the measured.It is shown that this model has simulated the temperature distribution very well.Finally, we analyzed the influence of the specific heat capacity of oil and gas on the temperature of the mixture of fluids and the influence of the Joule-Thomson effect on the temperature distribution on the pipeline.It is shown that the Joule-Thomson coefficient is a key factor to well describe the oil-gas two-phase flow.
As the fluid flows in pipe, heat is constantly transferred to the surroundings and the temperatures of the fluid and enthalpy value are changed.The temperature drop calculation for single flow usually calculated by the Sukhoi model that only takes heat transfer with the surroundings and friction work into account [3].For oil-gas flow differs from that for single-phase liquid or gas in that not only the oil-gas mixture transfers heat to the surroundings through wall but the quality and heat exchanges between gas and liquid should also be considered.The calculation should take into consideration the Joule-Thomson effect caused by the gas cubic expansion, due to the gas and the temperature rise as a result of the heat generated by friction in the liquid flow, due to the oil [4].So the accurate prediction of the temperature distribution of oil-gas flow is very complicated.
The models calculating temperature drop in oil-gas two phase flow pipeline used by the scholars and business software such as pipephase often only consider the wall heat transfer and energy conversion caused by elevation changes.Although an accurate prediction of the temperature distribution of the oil-gas flow is very complicated, the temperature of the mixed fluid can be calculated using the energy equation, that is, the enthalpy equation combining with continuity equation and equation of momentum [5].
Gregory and Aziz [6] proposed a simple relationship between enthalpy of oil-gas mixture and liquid holdup but they only find that the effect of liquid holdup on enthalpy of the mixture is insignificant.According to the previous derivation, it is inappropriate to calculate enthalpy of the mixture on the basis of liquid holdup.Instead, it should be calculated by use of mass liquid holdup of the cross section.
In his method, Cawkwell and Charles [7] added the change of the latent heat of phase to the calculation of enthalpy increment in the energy equation, but methods for calculating latent heat of phase change are not stated.In fact, there's no need to additionally compute the latent heat of phase change, for the fact that the phase change between gas and liquid is a gradual process and is included in enthalpy difference between the two phases.
Alves et al. [8] proposed a model that applies to calculating the temperature drop of single phase fluid and oil-gas fluids with a full range of contained angles and unified Coulter-Bardon formula [9] and Ramey formula [10].They neglected mass transfer between gas and liquid but they took into account pressure gradient, slope of the pipeline, acceleration energy loss and Joule-Thomson effect in the temperature calculation and they applied a new method to adjust the specific heat capacity and the Joule-Thomson effect coefficient.This model is widely used to calculate temperatures of pipe fluids and is accurate for both compositional model and black-oil model.
Dulchovnaya and Adewumi [11] suggested a novel approach in calculating the temperature of oil-gas flow.In their model, the energy equation of oil-gas mixed fluid doesn't include the kinetic energy term and the potential energy term.One of the main disadvantages of their model is that it neglects the difference between the internal energy and the enthalpy.Moshfeghian et al. [12] used the energy equation that their model doesn't contain potential energy term to calculate the temperature of mixed fluid in undulant pipelines.In practice, gas has a high density under high pressure conditions, so the effect of the undulation or of the potential energy, on the temperature drop of mixed fluid should not be ignored.The liquid holdup in oil-gas pipes effects significantly the temperature drop computation and is dependent on the pipeline inclination.For declined pipes, the liquid holdup is relatively low and the temperature drop of oil-gas mixed fluid increases, while for upward pipes, the liquid holdup is high and temperature drop decreases.
Li et al. [13,14] propose to use a method deviating from the calculating temperature drop of the oil-gas flow in an horizontal pipe, to directly calculate the temperature drop of a two-phases flow in an undulant pipe, by replacing mass gas content with section gas content to calculate specific heat of mixed fluid.They guess that they would obtain a higher precision on the calculating temperature of the mixed fluid in comparison with the former method.However, based on the former derivation, slipping between gas and liquid has little influence on the enthalpy of the mixed fluid if the kinetic energy is neglected.Therefore, calculate the temperature drop in an undulant pipe, using a section gas content in place of a mass gas content for the determination of the specific heat to is apparently not well-founded.The feasibility of utilizing the temperature drop formula, with no consideration of the potential energy, to calculate the temperature drop of oilgas flow in an undulant pipe is questionable.Furthermore, the temperature drop formula considering the Joule-Thomson effect of the gas and the heat generated by friction of the liquid, respectively, is non-uniform in theory.As the Joule-Thomson effect coefficient of the oil is below 0°C and as the gas temperature is over 0°C within a certain range, the oil is heated and the gas is cooled due to friction.The frictiongenerated heat for the oil and the Joule-Thomson effect of the gas can be uniformly expressed by the Joule-Thomson effect of the mixed fluid.

TEMPERATURE DROP MODEL FOR OIL-GAS FLOW
In order to simplify the complexity of an oil-gas piping system, some assumptions on to the oil-gas flow are made as follows: -the cross section of the pipe is constant; -the mixed flow in pipe is regarded as one-dimensional steady flow and the temperature, pressure and other parameters of the mixed fluid are treated as the average of pipeline section; -the heat conduction of the mixed fluid is neglected compared to the convective heat transfer of inner wall; -the flow in pipeline is steady, no change of the state parameters of the fluid as time goes on.When oil-gas fluids flow through the pipe and when the surrounding temperature is colder than the fluids, the heat will be lost from the fluids, leading to a decline in temperature.In an oil-gas two phase flow pipeline, some ways of energy conversion and transformation of mixing fluid in pipe are proposed: -the heat transfer with the surroundings along the line; -the pressure work in boundaries of inlet and outlet of control volume to fluid; -the friction work between the fluid and pipe the wall to fluid; -the Joule-Thomson effect is caused by the gas cubic expansion.Take segment i as the object to study (see Fig. 1).

Gas Energy Equation
Per unit of time, the gas energy that flows into and pours out of control volume are respectively expressed: ( Per unit of time, the pressure work in boundaries of inlet and outlet of control volume to gas are respectively expressed: (3) Per unit of time, the friction work between the fluid and the pipe wall to gas are respectively expressed: where vg is mean velocity of gas in pipe section, .
W lg is given by the power to gas between gas and oil phase.
According to the law of conservation of energy, the energy equation becomes: (6) Substituting Equations (1-5) into Equation ( 6), Equation ( 6) can be rewritten as: see Equation (7) where Δq g is the total heat transferred with the surroundings by gas in per unit time and h = u + v 2 /2 with the assumption, ρ go = ρ gi + Δρ g , α o = α i + Δα, v go = v gi + Δv g , h go = h gi + Δh g .Ignore high order an infinitesimal, Equation ( 7) can be expressed by dividing Δx: see Equation (8).
Energy balance of pipe section i.
Difference quotient replaced by derivative and neglect high order minority, Equation ( 8) can be rewritten as: see Equation (9).Specific heat at constant pressure and coefficient of Joule-Thomson effect can be defined as: Under the condition that the composition of the mixed fluid is constant, h g is given as a function of the pressure and the temperature by h g = h g (p, T).Therefore: (12) Substituting Equation ( 12) into Equation ( 9) and combining relationship among thermo-dynamical parameters, we can obtain: see Equation (13).

Oil Energy Equation
Analogously, the oil energy equation can be expressed (each expression seen in Appendix): see Equation ( 14) where Δq l is the total heat transferred with the surroundings by oil per unit of time and h = u + v 2 /2.With the assumption, 14) can be expressed by dividing Δx: see Equation (15).Difference quotient replaced by derivative and neglect high order minority, Equation ( 15) can be rewritten as: see Equation ( 16).
The volume expansion coefficient of liquid β can be defined as: (17) and ( 18)   (13) Then: (19) So: (20) β l is obtained by the relation [15]: (21) The fluid in the pipeline is far from a critical state and β is, in general, relatively small.Equation ( 16) can be expressed: see Equation (22).

Oil-Gas Mixing Fluid Energy Equation
The heat of the oil-gas mixture transfer with the surroundings per unit of time q is expressed: where dq = {[UπD o (T -T e )]/Wm} dx, the power to gas between gas and oil phase W lg , to oil W gl are equal in quantity and contrary sign.Equation ( 13) added by Equation ( 22) can obtain: see Equation (24).Then: ( where φ 1 , φ 2 and φ 3 are defined as: See Equation (28).The pipeline section of (i, i + 1), the length is Δx i , the angle contained by the infinitesimal section and horizontal is θ.The parameters φ 1 , φ 2 and φ 3 are assumed to be constant for a dx length.With this assumption, Equation ( 25) can be integrated in the pipeline section of (i, i + 1) as: (29) This model is called the Explicit Temperature Drop Formula (ETDF).The average temperature of the gas-liquid mixture in the pipe Δx i is , then: (30) Equation ( 29) is the new energy equation of the oil-gas flow in the pipeline; many factors have been considered, such as Joule-Thomson effect, pressure work, friction work and impact of the ground undulation and the heat transfer with the surroundings along the line.So it is an overall form of energy equation, which could fully describe the actual fact of oil-gas two-phase pipeline accurately on the thermodynamics.
In the simulation of multiphase flow, the convergence of equations is crucial and most scholars focus lies in how to improve the stability of the solution of equations.The heat transfer characteristics in the energy equation proposed by Chen et al. [16] is represented by only one variable.And even the heat transfer is not included in the model presented by Munkejord et al. [17].Cazarez et al. [18] consider the influence of the force existed in fluid interior to energy but he has not considered the heat transfer with the surroundings and the phase transformation.These practices are more common in multiphase flow simulation.There are some scholars studying heat transfer in multiphase flow for further.Andreani [19] takes into account the phase transformation heat and the radiant heat transfer.Collado and Munoz [20] focus on the work considering the pressure work, the gas expanding work and the entropy is introduced in the energy equation.Deng and Gong [21] and Sagar et al. [22] introduces the Joule-Thomson effect into an equation using a thermodynamic circular connection.The circular relationship of single gas is not accordance with the oil.When the liquid holdup is slightly higher, the assumption that the oil-gas mixture fits with the relationship of a single gas may not be tenable.So the relationship is applied to the gas and oil phase, respectively and independently.
A computer code in C++ language was developed and the program flow chart is shown in Figure 2. As shown in the Figure 2, pressure iteration is adopted to couple the hydraulic and thermal-dynamic models, due to the replacement of the enthalpy equation with the explicit equation of the temperature field.Therefore, the temperature loop is avoided and the algorithm is fast-convergent.The calculation applies to both the component model and the black-oil model.
The main calculation process is composed of five parts: -input the based data; -estimate the initial pressure of mixing fluid P 0 , calculate the flow parameters and the physical properties and the cross-sectional void fraction according to known network condition; -decide flow pattern; -calculate the pressure drop of fluid and obtain the pressure P k according to the flow pattern; -repeat the step 2-4 until ⏐P k -P o ⏐< ε, satisfy the precision requirement; -receive the temperature of the fluid using Equation (29).
The calculations of continuity equation, momentum equation, regime transition criterion and thermal properties is seen in Reference [23].

EXAMPLE OF ANALYSIS AND COMPARISONS
In order to verify the correctness and the validity of the ETDC model, the model is prepared for the program modules and embedded into the UPTP multiphase flow simulation software (based on the black-oil model) and TPCOM software (based on component model) and both developed by the China University of Petroleum Multiphase Flow Projects (CUPMFP).The TPCOMP software has been applied in a feasibility analysis of the Yingmai-Yaha multiphase pipeline.

Example 1: the Black-Oil Model
Taking a oil-gas pipeline of Lufeng 13-2 oilfield as an example, verify the proposed model for calculating the temperatures of mixed fluid in this paper.The input parameters (altitude, pipe parameters, surrounding temperature and overall heat transfer The flow of program.coefficient, throughput of mixture fluid, inlet pressure and temperature) of UPTP are in accordance with the measured value in order to preferably compare the calculation result.
The gas-liquid two phases pipelines is 50 km long and they undulate along with topography.Table 1 presents the operation parameters.Figure 3 presents the vertical sectional profile of pipeline.
In Table 2 the temperature drop means the difference of the threshold temperature and the endpoint temperature; the Relative Errors of Temperature Drop (RETD) be defined as: It can be seen from Table 2 that the prediction of ETDF agrees well with the measured value for oil-gas flow.It is an overall form of the energy equation, which could reflect the actual fact of multiphase pipeline accurately.

Example 2: the Component Model
Taking an oil-gas pipeline of Yingmai-Yaha oilfield as an example, verify the proposed model for calculating the temperatures of mixed fluid in this paper.The gas-liquid pipeline is 145 km in length, pipe diameter Φ 610 × 17.5 and upward in topography.Table 3 presents the component of pipeconveying fluid.The inlet pressure and temperature are 50°C and 5 MPa.The proportion of light component in the piping fluid is large, so the phase change easily occurs when the temperature and pressure fluctuate.The input parameters of TPCOM are in accordance with the OLGA that is advanced multiphase flow simulation software in order to preferably compare the calculation result.The vertical sectional profile of the pipeline is shown in Figure 4. Figure 4 shows the temperature distribution of gas-liquid mixing fluid comparisons between TPCOM and OLGA.OLGA never clarifies the model of thermodynamic computation but the result simulated result of OLGA is high in reliability and it has been widely recognized in the process design and applied of multiphase flow pipeline.So OLGA is selected for the comparison of calculations.This new energy equation has considered many factors, such as the Joule-Thomson effect, the pressure work, the friction work and the impact of the terrain undulation and the heat transfer with the surroundings along the line.It is an overall form of energy equation, which could reflect the actual fact of multiphase pipeline accurately.So the simulation result of the TPCOM is close to that of OLGA.That demonstrates the ETDF model is correct at certain extent.
From the previous derivation, gas-oil mixing enthalpy of the fluid is the most important factor effecting the temperature distribution and the enthalpy is closely related to the gas and oil specific heat at constant pressure and gas Joule-Thomson effect coefficient.In order to verify the accuracy of ETDF, the contrast distribution of the gas and the oil specific heat at constant pressure between the TPCOM using the Peng-Robinson Equation of State (PR EOS) and OLGA see in Figure 5.
The difference of gas and oil specific heat at constant pressure calculated between TPCOM and OLGA is small from Figure 5.
OLGA cannot output the gas Joule-Thomson effect coefficient, so the indirect method is applied to analyze the effect of it on the temperature of the gas-oil mixing.Figure 6 provides the simulated result of OLGA considering the Joule-Thomson effect, TPCOM considering Joule-Thomson effect and not.
The temperature distribution of TPCOM that does not take into account the Joule-Thomson effect is above the one of OLGA and TPCOM that both consider Joule-Thomson effect.The difference of outlet temperature between the TPCOM and TPCOM (without Joule-Thomson) is 4 K.It is shown that the Joule-Thomson coefficient is a key factor to well describe the flow.
The Joule-Thomson coefficient is expressed: The Joule-Thomson coefficient distribution of gas fluid.According to the thermodynamics equation, Equation (31) can be rewritten as: (32) The Joule-Thomson coefficient in TPCOM is calculated by using PR EOS. Figure 7 provides the information about the calculation of Joule-Thomson effect parameter.
Figure 7 provides the simulated value of the Joule-Thomson coefficient becomes larger and larger along the pipeline.Because the temperature and pressure of the oil-gas fluid becomes smaller and smaller and the correlation between the Joule-Thomson coefficient and temperature is positive and the pressure is same also.The difference of the temperature calculated by the OLGA and TPCOM without Joule-Thomson is more and more significant seen in Figure 6, as a result of the value of the Joule-Thomson coefficient increasing along the pipeline.On the basis of comprehensive analysis of Table 2 and Figure 6, the temperature distribution calculated by ETDF model is persuasive.
Main factors affecting on temperature are pressure, liquid holdup and gas and oil flow rate.The calculation of these parameters is base on the thermodynamic properties of the fluid.The thermodynamic properties such as the Joule-Thomson coefficient, the specific heat at constant pressure and so on are calculated by PR EOS.The PR EOS is suitable for the oil-gas fluid containing high level of light constituent.On the other hand, the liquid holdup is small when this kind of fluid flows in the pipeline.So that the state parameters of the fluid at the calculation node change little that can be considered as the flow in pipeline is steady, no change of the state parameters of the fluid as time goes on.That is in a good accordance with the main assumption of the model.The ETDF model self can be used to simulate any kind of fluid in the steady flow.

CONCLUSION
A model named ETDF based on the general energy equation has been introduced to describe the Explicit Temperature Drop Formula for an oil-gas steady flow in a pipeline.The model considers many factors, such as the Joule-Thomson effect, the pressure work, the friction work and the impact of the terrain undulation and the heat transfer with the surroundings along the line.The model is taking into account of the interaction and mass transfer of both phases for energy.The model can be applicable to analyze the component model and the black-oil model.
In this model, the temperature iteration loop is canceled and the model has accurately predicted the temperature distribution Input based data Initial pressure of mixing fluid, P 0 Calculate the physical and flow characteristic parameters Obtain pressure of mixing fluid, P k Decide flow pattern Receive temperature of mixing fluid, T k

Figure 4
Figure 3Vertical sectional profile of pipeline.
Figure 6Comparison of temperature distribution between TPCOM and OLGA.

Figure 5 Comparison
Figure 5Comparison of specific heat at constant pressure distribution of oil-gas mixing fluid.
fluid.This model has improved the efficiency of algorithm and is applicable to both compositional model and black-oil model.The model and algorithm can predict the temperature distribution in an oil-gas flow pipeline presented in this study accurately, comparing with the measured result of the actual pipe and OLGA software simulation.

TABLE 2
Result comparison of temperature drop of a 50.0 km long pipeline * MV represented by measured value.