Prediction of Gas Hydrate Formation in the Wellbore

: The formation of gas hydrates due to temperature and pressure changes during gas storage in the wellbore poses signiﬁcant danger, necessitating the prediction of temperature and pressure distribution as well as of hydrate formation locations. We establish a temperature model that couples total thermal resistance and temperature in the wellbore-stratum composite medium system. Utilizing the two-phase pressure model alongside the temperature model, we conduct coupling calculations of temperature and pressure. Based on both temperature and pressure distribution within the wellbore and hydrate formation curve, we predict hydrate formation regions during production and analyze factors inﬂuencing temperature and pressure distribution. Results indicate that gas production rate and speciﬁc gravity of natural gas are major inﬂuencers on wellbore temperature and pressure distribution, while production time has minimal impact.


Introduction
Currently, many systems for gas storage are repurposed from former gas and oil reservoirs.However, these reservoirs may have undergone water flooding, leading to the formation of natural gas hydrates during the gas storage process.In addition, natural gas hydrate deposits can also occur during development [1][2][3].Hydrates could cause blockage of pipes and freezing of gas nozzles, which would significantly affect the productivity of gas wells.Therefore, preventing the formation of hydrates in the wellbore is crucial for the safe and efficient production of gas wells.Hydrates are ice-like compounds of gas and water.The formation of natural gas hydrates is related to the local supersaturation of natural gas, which can be evaluated by the hydrate formation pressure (HFP) and hydrate formation temperature (HFT) under thermodynamically stable conditions [4].At a given temperature, an increase in pressure above the HFP results in the production of gas hydrates.On the other hand, if the pressure remains constant, gas hydrates can form at temperatures below the HFT [5].Thus, it is significant to accurately predict the temperature and pressure distribution in the wellbore.
Research on wellbore heat transmission has been carried out for many years.Ramey [6] was the first to divide the heat transfer process in the wellbore into three parts: single-phase fluid in the tube, the wellbore itself, and the surrounding formation.He developed a theoretical model for wellbore heat transfer that has since become one of the most widely used in the field.Hagoort [7] confirmed the accuracy of Ramey's model, but observed that it produced large errors in predicting the overall heat transfer coefficient of the wellbore when Fourier time is short.As a result, it may not be suitable for accurately predicting temperature distribution in the wellbore during the early stages of production.Galvao et al. [8] developed a method that incorporates Joule-Thomson (J-T) effects, adiabatic fluid expansion, and fluid compressibility in the prediction of temperature-flow profiles, while their method only considered density as a function of temperature and ignored the impact of pressure.Most scholars rely on the overall heat transfer coefficient of the wellbore when calculating temperature distribution [9][10][11].However, the determination of the coefficient involves numerous parameters that may not be suitable for rapid engineering predictions.Additionally, few studies have examined the impact of wellbore heat capacity on temperature distribution.
Models for predicting pressure drop in the wellbore primarily consist of empirical models [12][13][14][15] and theoretical models [16][17][18][19][20]. Gray [11] developed an empirical pressure drop model for condensate gas wells that includes four parameters.Woldesemayat and Ghajar [20] compared various void fraction models, including Lockhart and Martinelli [21], Coddington and Macian [12], Petalas and Aziz [22].Their results indicated that the void fraction correlations based on the drift flux analysis method, such as Toshiba's model [13] and Dix's model [14], are more accurate.Hasan et al. [15] proposed a simplified two-phase flow model for the wellbore that avoided discontinuity issues at the transition of flow patterns by smoothing flow parameters near the flow pattern boundary.In addition, it is essential to consider the interaction between temperature and pressure of the fluid when predicting the pressure distribution in the wellbore [16][17][18]21].
The commonly used methods for hydrate prediction include the empirical equation method [23-27], K-value method [28], and thermodynamic method [29][30][31].Hammerschmidt et al. [32] derived a correlation between hydrate melting point and pressure through experimental data fitting.However, the obtained correlation is based on a fixed gas composition and may have limited applicability.Ghiasi [19] developed functions for HFT based on gas pressure and molecular weight, providing different equations for various molecular weights.In addition, Motiee [23] and Ghayyem, et al. [24] also proposed empirical formulas to predict hydrate formation conditions in different scenarios.The K-value method, which belongs to the phase equilibrium theory, involves determining a gas-solid equilibrium constant by consulting a constant equilibrium chart.However, the K-value method is limited to a specific range of pressure, up to 13.8 MPa for methane, ethane, and propane, up to 6.9 MPa for carbon dioxide and up to 13.8 MPa for hydrogen sulfide and nitrogen [25,33].Beyond this range, it tends to yield higher results than that of the empirical equations method.Van der Waals and Plateeuw [26] proposed a statistical thermodynamic model for hydrate formation based on its thermodynamic mechanism, in which they treated the hydrate as an ideal solid solution.Later, Ballard et al. [27][28][29] conducted multiple studies by utilizing thermodynamic methods to predict hydrate formation.
Despite the existence of various temperature, pressure drop, and hydrate prediction models for the wellbore, there remains a lack of systematic research on temperature distribution, pressure distribution, and hydrate formation.Therefore, the aim of this work is to undertake a comprehensive study of the impact of various factors on the temperature distribution, pressure distribution, and location of hydrate formation in the wellbore.Section 2 introduces the temperature models, pressure drop models of the wellbore, and hydrate prediction models.Subsequently, Section 3 discusses the factors that influence the temperature distribution, pressure distribution, and hydrate formation in the wellbore.Finally, Section 4 presents the conclusions drawn from this work.

Temperature Distribution Models
During the production process, natural gas flows from underground through the wellbore, resulting in heat transfer due to temperature differences between the fluid and formation.Assuming a one-dimensional stable flow for the fluid in the wellbore, the energy balance for a control volume of unit length within the wellbore (as shown in Figure 1) is obtained [32]: where q l is the heat exchange amount between the fluid and formation per unit length of the wellbore, W/m.E is the internal energy of the fluid, J/kg.m is the mass of the fluid in the control volume, kg.h is the enthalpy of the fluid, J/kg.G m is the mass flow of fluid, kg/s.v is the flow velocity of the fluid, m/s.g is the gravity, m/s 2 , z is the height of the wellbore, and the subscripts cv and w denote the control volume and wall, respectively.
where ql is the heat exchange amount between the fluid and formation per unit length of the wellbore, W/m.E is the internal energy of the fluid, J/kg.m is the mass of the fluid in the control volume, kg.h is the enthalpy of the fluid, J/kg.Gm is the mass flow of fluid, kg/s.v is the flow velocity of the fluid, m/s.g is the gravity, m/s², z is the height of the wellbore, and the subscripts cv and w denote the control volume and wall, respectively.By disregarding the heat transfer in the axial direction, we can introduce a heat transfer coefficient per unit length of the wellbore denoted by kl.This leads to the expression of ql as follows: where kl is the heat transfer coefficient per unit length of the wellbore.This value is the reciprocal of the total thermal resistance, W/(m•K); Te is the temperature of formation, and K; Tf is the temperature of the fluid, K.
The enthalpy of natural gas conforms to the fundamental equation of thermodynamics, given as follows: where Cp is the heat capacity of the fluid, kJ/(kg•K); p is the pressure of the fluid, and MPa; αH is the Joule-Tomson coefficient, K/MPa.
Based on the above formulas, we can derive the expression for the temperature gradient along the vertical direction within the wellbore as follows: In the present work, kl is used to measure the heat transfer capacity of the wellbore.Then, the thermal resistance of the wellbore, as shown in Figure 2, is given as follows:  By disregarding the heat transfer in the axial direction, we can introduce a heat transfer coefficient per unit length of the wellbore denoted by k l .This leads to the expression of q l as follows: where k l is the heat transfer coefficient per unit length of the wellbore.This value is the reciprocal of the total thermal resistance, W/(m•K); T e is the temperature of formation, and K; T f is the temperature of the fluid, K.
The enthalpy of natural gas conforms to the fundamental equation of thermodynamics, given as follows: where C p is the heat capacity of the fluid, kJ/(kg•K); p is the pressure of the fluid, and MPa; α H is the Joule-Tomson coefficient, K/MPa.Based on the above formulas, we can derive the expression for the temperature gradient along the vertical direction within the wellbore as follows: In the present work, k l is used to measure the heat transfer capacity of the wellbore.Then, the thermal resistance of the wellbore, as shown in Figure 2, is given as follows: where R f , R tub , R ann , R cas , R cem , R earth represent the convective thermal resistance between tubing and fluid, the thermal resistance of tubing, the thermal resistance of annular fluid, the thermal resistance of casing, the thermal resistance of cement loop, and the thermal resistance of formation, respectively, (m•K)/W.
Energies 2023, 16, x FOR PEER REVIEW 3 of 11 where ql is the heat exchange amount between the fluid and formation per unit length of the wellbore, W/m.E is the internal energy of the fluid, J/kg.m is the mass of the fluid in the control volume, kg.h is the enthalpy of the fluid, J/kg.Gm is the mass flow of fluid, kg/s.v is the flow velocity of the fluid, m/s.g is the gravity, m/s², z is the height of the wellbore, and the subscripts cv and w denote the control volume and wall, respectively.By disregarding the heat transfer in the axial direction, we can introduce a heat transfer coefficient per unit length of the wellbore denoted by kl.This leads to the expression of ql as follows: where kl is the heat transfer coefficient per unit length of the wellbore.This value is the reciprocal of the total thermal resistance, W/(m•K); Te is the temperature of formation, and K; Tf is the temperature of the fluid, K.
The enthalpy of natural gas conforms to the fundamental equation of thermodynamics, given as follows: where Cp is the heat capacity of the fluid, kJ/(kg•K); p is the pressure of the fluid, and MPa; αH is the Joule-Tomson coefficient, K/MPa.
Based on the above formulas, we can derive the expression for the temperature gradient along the vertical direction within the wellbore as follows: In the present work, kl is used to measure the heat transfer capacity of the wellbore.Then, the thermal resistance of the wellbore, as shown in Figure 2, is given as follows:  Based on the results of Cheng et al. [30], we consider the transient heat-conduction time function, f (t), as a function of wellbore heat capacity, formation heat capacity, and dimensionless time.Then the heat-conduction time function f (t) can be given as Energies 2023, 16, 5579 4 of 10 where τ D is dimensionless time; C 1 is the Euler's constant, with the value of 0.5772; and ω is a dimensionless parameter representing the ratio of the formation heat capacity and the wellbore heat capacity.

Pressure Distribution Models
The continuity equation in the control volume can be obtained from the mass balance as follows: where ρ is the density, kg/m 3 ; v is the velocity, and m/s; A is the cross-sectional area of tubing, m 2 .The external force exerted on the fluid equals the momentum change of the fluid in a given control volume and can be calculated as: The external force exerted on the fluid in a given control volume includes the gravity of fluid in the vertical direction ρgAdzsinθ, the differential pressure between inlet and outlet of control volume pA − (p + dp)A, and friction between the fluid and tubing τ w πDdz, where τ w is the friction per unit tubing area, Pa.
The equation of mass conservation of fluid in the wellbore during production could be obtained as follows: where θ is the inclination angle of the wellbore, and f is the frictional coefficient.
As can be seen from Equation ( 9), the pressure drop along the wellbore includes the gravity head, the friction head, and the dynamic head.The pressure drop per unit control volume length can be obtained by simply calculating the f and dv/dz.According to the recommendations in ref. [31], the frictional coefficient of mixed fluids could be calculated by Chen's correlation: where ∆ is the roughness of tubing, mm; Re m is Reynolds number; D denotes the radius of tubing, mm; and Λ is a dimensionless number and can be calculated by the following formula: The dynamic head can be calculated by the following formula:

Gas Hydrate Formation Models
Cao et al. [34] conducted a comparative study of the K-value method and the empirical equation method for predicting hydrate formation.The results indicated that the Ponomalev empirical formula method performs with greater accuracy, as derived from the where parameters B and B 1 that relate to the specific gravity of natural gas are listed in Table 1.The formation pressure of hydrate at different temperatures can be obtained from the Ponomalev formula.When the temperature of the fluid is lower than the HFT at a certain pressure or the pressure of the fluid is greater than the HFP at a certain temperature, hydrate formation occurs at that specific depth of the wellbore.By following this principle, we can predict the location of hydrate formation within the wellbore.
In this study, the physical parameters of the fluid, such as density and specific heat capacity, are considered as temperature-and pressure-dependent functions, which have been derived from the REFPROP database [35].The operation parameters of gas storage are shown in Table 2.

Prediction of Hydrate Formation Region
Figure 3 shows the temperature and pressure distribution of the fluid in the wellbore and the HFP of a fixed component natural gas.As depicted in Figure 3a, hydrate formation requires a low-temperature and high-pressure environment, which is situated to the left of the HFP line (solid blue line).By determining the point of intersection between the two curves, we can estimate that hydrates will form at a fluid temperature of around 20 • C within the wellbore.The calculated and measured temperature and pressure along the wellbore are presented in Figure 3b.The temperature distribution is well predicted while the pressure is underpredicted at the near-ground position.This might be due to the fact that the input parameters in Table 2 are based on operational experience rather than experimental measurements, resulting in discrepancies between calculated and measured values.Furthermore, Figure 3b indicates that the depth range of 50~100 m will be subject to hydrate formation.It is worth noting that the HFP exponentially increases with temperature, suggesting that preventing hydrate formation is feasible if the temperature of the fluid at the wellhead remains above a specific value.
the pressure is underpredicted at the near-ground position.This might be due to the fact that the input parameters in Table 2 are based on operational experience rather than experimental measurements, resulting in discrepancies between calculated and measured values.Furthermore, Figure 3b indicates that the depth range of 50~100 m will be subject to hydrate formation.It is worth noting that the HFP exponentially increases with temperature, suggesting that preventing hydrate formation is feasible if the temperature of the fluid at the wellhead remains above a specific value.

Influence of the Gas Production Rate
The gas production rate is a critical parameter that affects both the flow process and heat transfer.Therefore, this subchapter aims to explore how it influences the distribution of temperature and pressure.Figure 4a illustrates the temperature distribution of fluid under varying gas production rates.The plot highlights that the temperature change at the bottom of the well is relatively slow compared to other locations.This is attributed to the small temperature gap between natural gas at the bottom of the well and the formation, causing a sluggish rate of heat transfer.Additionally, when the gas production rate escalates, higher amounts of heat are transferred from the gas storage to the fluid per unit time, resulting in elevated wellbore fluid temperatures.

Influence of the Gas Production Rate
The gas production rate is a critical parameter that affects both the flow process and heat transfer.Therefore, this subchapter aims to explore how it influences the distribution of temperature and pressure.Figure 4a illustrates the temperature distribution of fluid under varying gas production rates.The plot highlights that the temperature change at the bottom of the well is relatively slow compared to other locations.This is attributed to the small temperature gap between natural gas at the bottom of the well and the formation, causing a sluggish rate of heat transfer.Additionally, when the gas production rate escalates, higher amounts of heat are transferred from the gas storage to the fluid per unit time, resulting in elevated wellbore fluid temperatures.In Figure 4b, the wellhead pressure (WHP) of fluid is depicted under varying gas production rates.It can be observed that, for low gas production rates, the WHP increases as the gas production rate increases, whereas for high gas production rates, the WHP decreases with increasing gas production rate.This phenomenon can be explained by considering the total pressure drop, which is significantly influenced by gravity at low gas production rates.Specifically, an increase in gas production rate reduces the density of the mixed fluid, resulting in a smaller gravity head and higher fluid pressure (refer to In Figure 4b, the wellhead pressure (WHP) of fluid is depicted under varying gas production rates.It can be observed that, for low gas production rates, the WHP increases as the gas production rate increases, whereas for high gas production rates, the WHP decreases with increasing gas production rate.This phenomenon can be explained by considering the total pressure drop, which is significantly influenced by gravity at low gas production rates.Specifically, an increase in gas production rate reduces the density of the mixed fluid, resulting in a smaller gravity head and higher fluid pressure (refer to Figure 4c).In contrast, when gas production rates are high, the total pressure drop is primarily governed by friction head.As the gas production rate increases, it leads to heightened fluid friction, thereby elevating the friction head and reducing the fluid pressure (see Figure 4d).

Influence of the Producing Time
Figure 5a,b illustrate the temperature and pressure distribution of fluid at varying production times, respectively.As indicated in Figure 5a, the fluid temperature slightly increases with longer production times due to ample heat exchange between the fluid and formation.In contrast, it is evident from Figure 5b that the fluid pressure is hardly impacted by production time, and the pressure distribution remains mostly uniform irrespective of the production time.This can be attributed to the rapid attainment of a stable state for fluid pressure.
Energies 2023, 16, x FOR PEER REVIEW 8 irrespective of the production time.This can be attributed to the rapid attainmen stable state for fluid pressure.

Influence of the Water Production Rate
Figure 6a,b depict the temperature and pressure distribution of fluid at varying w production rates, respectively.It is evident from both figures that as the water produ rate increases, the fluid pressure decreases while the fluid temperature increases.phenomenon can be attributed to the fact that higher water production rates enable heat transfer from the bottom of the well, causing a rise in fluid temperature.More an increase in water production rate leads to elevated mixed fluid density and gr head, resulting in greater energy consumption of the mixed fluid from the bottom h the wellhead.Consequently, the fluid pressure along the wellbore decreases.

Influence of the Water Production Rate
Figure 6a,b depict the temperature and pressure distribution of fluid at varying water production rates, respectively.It is evident from both figures that as the water production rate increases, the fluid pressure decreases while the fluid temperature increases.This phenomenon can be attributed to the fact that higher water production rates enable more heat transfer from the bottom of the well, causing a rise in fluid temperature.Moreover, an increase in water production rate leads to elevated mixed fluid density and gravity head, resulting in greater energy consumption of the mixed fluid from the bottom hole to the wellhead.Consequently, the fluid pressure along the wellbore decreases.
phenomenon can be attributed to the fact that higher water production rates enable heat transfer from the bottom of the well, causing a rise in fluid temperature.More an increase in water production rate leads to elevated mixed fluid density and gr head, resulting in greater energy consumption of the mixed fluid from the bottom h the wellhead.Consequently, the fluid pressure along the wellbore decreases.

Influence of Natural Gas Components on Hydrate Formation
The impact of natural gas composition on hydrate formation within the wellb investigated in this section, assuming that natural gas is a mixture of methane and et Three types of natural gas are employed with specific gravities of 0.56, 0.75, and 0.94 corresponding methane mole fractions of 0.99, 0.6, and 0.2, respectively.Figure 7 trates the temperature and pressure distribution of fluid in the wellbore and HFP u different specific gravity values for natural gas.The solid lines represent the HF

Influence of Natural Gas Components on Hydrate Formation
The impact of natural gas composition on hydrate formation within the wellbore is investigated in this section, assuming that natural gas is a mixture of methane and ethane.Three types of natural gas are employed with specific gravities of 0.56, 0.75, and 0.94, and corresponding methane mole fractions of 0.99, 0.6, and 0.2, respectively.Figure 7 illustrates the temperature and pressure distribution of fluid in the wellbore and HFP under different specific gravity values for natural gas.The solid lines represent the HFP for varying specific gravities, while the lines with symbols show the temperature and pressure values of the wellbore.The findings reveal that, with increasing specific gravity, both the HFP and temperature and pressure along the wellbore decrease, indicating easier hydrate formation during production.In other words, lower methane mole fractions facilitate hydrate formation.Table 1 further demonstrates that an increase in natural gas specific gravity corresponds to higher parameters B and B 1 and a lower HFP.
Energies 2023, 16, x FOR PEER REVIEW 9 of 11 varying specific gravities, while the lines with symbols show the temperature and pressure values of the wellbore.The findings reveal that, with increasing specific gravity, both the HFP and temperature and pressure along the wellbore decrease, indicating easier hydrate formation during production.In other words, lower methane mole fractions facilitate hydrate formation.Table 1 further demonstrates that an increase in natural gas specific gravity corresponds to higher parameters B and B1 and a lower HFP.Further research could focus on refining the temperature model by incorporating additional parameters or factors that might affect temperature distribution in the wellbore and surrounding stratum.Additionally, investigating the impact of other variables, such as the composition of the gas or the presence of inhibitors, on hydrate formation and its relation to temperature and pressure distribution could provide valuable insights.Exploring the applicability of the findings in different geological conditions or wellbore designs would also contribute to a more comprehensive understanding of gas hydrate formation and its implications for gas storage production.

Conclusions
In this study, a wellbore temperature and pressure coupling model is established, and the wellbore temperature and pressure distribution of a gas well are calculated.The influence of the gas production rate, water production rate, and production time on the wellbore temperature and pressure distribution are analyzed.The results indicate that as gas production increases, the temperature of the wellbore fluid rises while the pressure of Further research could focus on refining the temperature model by incorporating additional parameters or factors that might affect temperature distribution in the wellbore and surrounding stratum.Additionally, investigating the impact of other variables, such as the composition of the gas or the presence of inhibitors, on hydrate formation and its relation to temperature and pressure distribution could provide valuable insights.Exploring the applicability of the findings in different geological conditions or wellbore designs would also contribute to a more comprehensive understanding of gas hydrate formation and its implications for gas storage production.

Conclusions
In this study, a wellbore temperature and pressure coupling model is established, and the wellbore temperature and pressure distribution of a gas well are calculated.The influence of the gas production rate, water production rate, and production time on the wellbore temperature and pressure distribution are analyzed.The results indicate that as gas production increases, the temperature of the wellbore fluid rises while the pressure of the wellhead fluid initially rises and then declines.Similarly, with an increase in water production, the temperature of the wellbore fluid increases while the extracted pressure decreases.As production time is prolonged, there is a slight rise in the temperature of the extracted well fluid, while the pressure experiences minimal changes.The gas production rate has the greatest impact, followed by the water production rate, while production time has minimal influence.The hydrate formation position in the wellbore is predicted by utilizing the Ponomalev empirical formula and considering the temperature and pressure distribution of fluid in the wellbore.The formation of gas hydrates is significantly influenced by the specific gravity of natural gas, with higher specific gravities leading to easier formation.

Figure 1 .
Figure 1.Energy balance in control volume.

Figure 1 .
Figure 1.Energy balance in control volume.

Figure 1 .
Figure 1.Energy balance in control volume.

Figure 3 .
Figure 3. Prediction of the hydrate formation region: (a) HFP and the pressure of fluid vs. the temperature of fluid; (b) temperature and pressure distribution along the wellbore.

Figure 3 .
Figure 3. Prediction of the hydrate formation region: (a) HFP and the pressure of fluid vs. the temperature of fluid; (b) temperature and pressure distribution along the wellbore.

Figure 4 .
Figure 4. Influence of gas production rate: (a) temperature distribution; (b) well head pressure (WHP); (c) pressure distribution at low gas production rate; (d) pressure distribution at high gas production rate.

Figure 4 .
Figure 4. Influence of gas production rate: (a) temperature distribution; (b) well head pressure (WHP); (c) pressure distribution at low gas production rate; (d) pressure distribution at high gas production rate.

Figure 7 .
Figure 7. Prediction of hydrate formation position under different specific gravity.

Figure 7 .
Figure 7. Prediction of hydrate formation position under different specific gravity.

Table 1 .
The value of B and B 1 under different specific gravity.

Table 2 .
Operation parameters of gas storage.