Hydrate Formation and Decomposition Regularities in Offshore Gas Reservoir Production Pipelines

In recent years, the exploitation and utilization of offshore oil and gas resources have attracted more attention. In offshore gas reservoir production, wellbore temperature and pressure change continuously when water-bearing natural gas flows upward. The wellbore temperature is also affected by the low-temperature sea water. The combination of temperatures and pressures controlled by the upward flow, and cooling from the surrounding seawater frequently leads to the conditions of temperature and pressure for hydrate formation. This can lead to pipeline blockage and other safety accidents. In this study, we utilize mathematical models of hydrate phase equilibrium, wellbore temperature, wellbore pressure to study hydrate formation and decomposition in offshore gas reservoir production. Numerical solution algorithms are developed and numerical solutions are validated. The sensitivity influence of different parameters on the regions and regularities of hydrate formation and decomposition in wellbores are obtained through numerical simulations. It is found that increased daily gas production, water content, or geothermal gradient in offshore gas reservoir production pipelines results in less hydrate formation in the wellbores. Accordingly, the risk of wellbore blockage decreases and production safety is maintained. Decreased tubing head pressure or seawater depth results in similar effects. The result of this study establishes a set of prediction methods for hydrate formation and decomposition that can be used in the development of guidelines for safe construction design.


Introduction
With the rapid development of the global economy, the discrepancy between oil and gas supply and demand has become more prominent in most countries. The shortage of oil and gas has become one of the main bottlenecks restricting economic and social development [1][2][3]. Our location to explore energy resources has changed from the land to the ocean, and offshore oil and gas will become important energy resources in the future [4][5][6]. The exploration and utilization of offshore oil and gas resources have attracted more attention in recent years. In offshore gas reservoir production, when water-bearing gas is produced, wellbore temperature and pressure will change continuously. Affected by the low-temperature environment of seawater, gas hydrate is easily formed in wellbores, and then pipelines might be blocked, resulting in safety accidents. Therefore, it is urgent to carry out relevant research on hydrate formation and decomposition regularities in pipelines during the production of offshore gas reservoirs.
During the latest seven decades, scientific groups all over the world have conducted research of relevance for the focus of this work. Some of these are briefly summarized below.
In 1958, Van der Waals and Plateeuw [7] utilized a semi Grand Canonical ensemble to develop a Langmuir type adsorption theory for filling of various guest molecules in cavities created by hydrogen bonded water molecules. Guest molecules are molecules small enough to fit into the various cavity types in the hydrate. In this version of the Grand Canonical ensemble water molecules were kept fixed (and rigid) while guest molecules were flexible to enter into the cavities according to conditions of thermodynamic equilibrium with surrounding phases, and the changes in free energy by including these molecules into the cavities. The Van der Waals and Plateeuw model [7] is still the basis for most hydrate equilibrium models today, although the approximation of a rigid water lattice may not be accurate for large guests relative to cavity size. Kvamme and Tanaka [8] derived an alternative adsorption theory. The equation for the chemical potential of water in the hydrate is identical to the original Van der Waals and Plateeuw model [7]. The most important difference is in the description of the canonical partition functions for the cavities. Kvamme and Tanaka [8] used a rigid lattice and similar approach as Van der Waals and Plateeuw [7] for small guest molecules relative to available space for movements in the cavity. For the larger guest to cavity volume ratios, a harmonic oscillator approach was utilized by Kvamme and Tanaka [8]. In 1999, Clarke et al. [9] established a gas hydrate phase equilibrium model in one-dimensional planar porous media based on Van der Waals's model and considering the parameters of surface properties of porous media. In 1999, Clennell et al. [10] and Henry et al. [11] established a theoretical model of phase equilibrium for gas hydrate in porous media based on the Van der Waals and Plateeuw model, considering the single-pore-size capillary effect. Interfacial tension is a one-dimensional quality related to interfacial stress between phases, while interface free energy is a three-dimensional property involved in phase transition; for example, interfacial free energy is defined by the work needed to create an interface. At equilibrium, this is the same value (but with the opposite sign) as the work needed to remove the interface. Interfacial tension and interface free energy are theoretically related, but interface does not reflect all characteristics of solid surface impact on hydrate phase transitions. For extremely small pores, there is also a geometrical aspect to hydrate stability in terms of strain. Extremely small pores result in substantial strain that affects hydrate stability. In 2001, Wilder et al. [12] improved Henry's phase equilibrium model by taking into account the effects of pore size and the curvature of the liquid-solid interface in small pores on the phase equilibrium.
However, a macroscopic quantity like interface free energy, typically approximated by the interfacial tension, does not reflect all effects of minerals on hydrate stability toward mineral surfaces. All mineral structure is surrounded by water molecules, and it will result in a dual effect. The first effect is that water in the first adsorbed layers can never form hydrate because of its low chemical potential in the adsorbed state [13,14]. The other aspect of structured water is the way guest molecules can be trapped in water density minimum as a function of distance from the mineral surface [15]. This latter effect is a catalyst for hydrate nucleation due to the accumulation of hydrate formers close to mineral surfaces. The formed hydrate particles close to mineral surfaces cannot stick to the mineral surfaces directly and will either be bridged by structured water or be released and possible grow outside in the pore. As discussed above, hydrate will never touch hydrate surfaces, and for sufficiently small pores, the strain in the hydrate between pore walls will increase the water hydrate chemical potential and decrease hydrate stability.
In 2002, Østergaard et al. [16] studied the thermodynamic model of methane hydrate phase equilibrium considering the capillary effect, and pointed out that removing decomposed methane gas and adding chemical inhibitors have a great influence on methane hydrate phase equilibrium in porous media. Even without the effect of pores, the system of water and methane distributed over three phases (methane, water, hydrate) cannot be in thermodynamic equilibrium, because the number of independent variables is 12 and the sum of conservation laws and equilibrium condition gives 11 constraints. The system is therefore thermodynamically overdetermined and cannot reach the state of equilibrium [17][18][19]. Removing the methane phase reduces the number of phases, and if the pore mineral effects are disregarded, the remaining system can reach equilibrium between liquid water with dissolved methane and hydrate phase. Mineral surfaces cannot be ignored, but removing the gas phase shifts the degrees of freedom and the remaining number of phases to distribute the mass in the system. When a separate gas phase is present, the number of hydrate phases is also more than one, since the composition and free energy of hydrate phase formed from gas and water is different from that formed from dissolved hydrate formers in water.
In 2017, Kvamme et al. [20] analyzed the effect of hydrogen sulfide on the thermodynamic stability of the carbon dioxide-nitrogen hydrate mixture based on the process of gas hydrate extraction by carbon dioxide replacement. Hydrogen sulfide presents a net positive electrostatic field on the outside when rotating in the cavity, and since the average electrostatic field from water in the cavity is negative inward, there is an electrostatic stabilizing component for H 2 S [21]. In 2018, Kvamme et al. [22] studied the effect of methanol on hydrate stability. Thermodynamically, methanol can be considered as inert with respect to hydrate since it cannot participate in the hydrate and remains in the water (except for small amounts in gas). As discussed above, hydrate stability depends on temperature, pressure, and the concentration of all components in all co-existing phases.
In 1983, Vysniauskas and Bishnoi [23] divided the process of gas hydrate formation into initial clusters, nucleus formation, and hydrate growth. They proposed a semi-empirical hydrate formation rate model, which is determined by the concentration of water, crystal nucleus, and methane molecules, and the area of gas-liquid interface. In 1987, Englezos et al. [24] proposed a kinetic model of hydrate formation to describe the growth rates of methane hydrate, ethane hydrate, and mixed gas hydrate in high-pressure stirred vessels. In 1991, Sloan and Fleyfel [25] proposed a formation model based on hydrate clusters, suggesting that hydrate clusters will continue to grow until they reach a critical diameter. In 1993, Lekvam and Ruoff [26] considered that the nucleation process of hydrate includes five elementary reactions: gas dissolving in liquid phase, formation of unstable hydrate oligomer, slow formation of hydrate grain by hydrate oligomer, transformation of oligomer into hydrate grain, and formation of hydrate grains resulting from the reaction between water and dissolved gas; then, they proposed a formation kinetics model. All of the above models are empirical. Some are based on two-film theory analogies and some are purely phenomenological. In 2002, Kashchiev and Firoozabadi [27] established a model of hydrate nucleation rate suitable for multi-nucleus or single-nucleus mechanism, and deduced the equation of induction time for hydrate formation [28]. Although formally linked to classical nucleation theory, the modification and adoption to the final result changed that. In 2004, Kvamme et al. [29] established the phase-field theory of carbon dioxide hydrate nucleation in aqueous solution, and monitored the dynamic process of carbon dioxide hydrate formation by magnetic resonance imaging. In 2009, Talaghat et al. [30] developed a hydrate formation model for flow systems with low-dose inhibitors based on the Kashchiev model. In 2012, based on the kinetics of hydrate formation, ZareNezhad and Varaminian [31] proposed a heat-and mass-transfer model for gas hydrate formation in flowing systems. In 2016, Kvamme et al. [32] analyzed the hydrate formation mechanism under the conditions of water and impurities in the process of natural gas transportation, and proposed the maximum allowable water content to avoid hydrate formation in the pipeline.
In 1987, Kim et al. [33] used a pressure-temperature-volume (PVT) cell to study hydrate dissociation under various stirring conditions. They correlated the decomposition rate of natural gas hydrate to temperature, pressure, and particle surface area. The final result is similar to a two-film theory model for mass transport across phases, although one of the contributions is the "hydrate reaction". The kinetic decomposition model of natural gas hydrate was first proposed, which laid an important foundation for the study of hydrate decomposition kinetics. In 1987, Kamath et al. [34] considered that the endothermic process of hydrate decomposition was very similar to the phenomenon of nucleate boiling, and established a model of hydrate decomposition driven by the temperature difference between the liquid phase and the hydrate surface. In 2000, Clarke and Bishnoi [35] carried out ethane hydrate decomposition experiments on the same experimental equipment as the Kim study, and measured the intrinsic decomposition rate. They also carried out methane-ethane mixture hydrate decomposition experiments [36]. Based on Kim's model, considering the irregularity and size distribution of hydrate crystal particles, the one-dimensional decomposition rate equation of hydrate was derived. In 2001, Goel et al. [37] proposed a new model for predicting the rate of hydrate decomposition in gas hydrate reservoirs. It was considered that the rate of hydrate decomposition is related to the surface area, pressure difference, and reaction order, which provides a method for analyzing hydrate reservoirs. In 2016, Wei et al. [38] proposed a hydrate decomposition model in the annulus during offshore drilling, and studied the hydrate decomposition regularities in wellbore flow. Then, the micro-decomposition mechanism of hydrate was analyzed [39], and the hydrate decomposition regularities and well control safety measures in the process of solid fluidization exploitation of marine natural gas hydrate were studied [40].
However, few studies have been carried out on the regions and regularities of hydrate formation and decomposition under the conditions that the wellbore temperature and pressure vary with the well depth in the production of water-bearing natural gas. In this paper, mathematical models of hydrate phase equilibrium, wellbore temperature, wellbore pressure, hydrate formation, and decomposition are established, and a numerical solution method is developed and validated. The sensitivity influences of different parameters on the regions and regularities of hydrate formation and decomposition in wellbores are obtained. Finally, a set of prediction methods for hydrate formation and decomposition regularities in offshore gas reservoir production pipelines is formed, which is of great significance. Figure 1 schematically illustrates the production of an offshore gas reservoir. The water-bearing natural gas enters the bottom hole from the gas reservoir and flows upward in the wellbore. The gas and water are then produced from the wellhead. In this process, the external temperature around the wellbore successively goes through high temperature of formation at the bottom hole, low temperature of formation at the mud line, low temperature of seawater, and high temperature near the sea surface. The wellbore temperature and pressure change continuously with the upward flow, as well as the influence of the low-temperature environment of seawater. When the temperature and pressure conditions in the wellbore reach hydrate forming conditions then, gas hydrate will form in the wellbore. Parts of the hydrate will connect to the pipeline walls and can grow further from there. Eventually, this can lead to pipeline blockage. Other parts of the hydrate will flow as solid particles which may either grow or decompose along the flow in the pipeline. Aiming at this process, we established the relevant theoretical models in this study as follows.  [37] proposed a new model for predicting the rate of hydrate decomposition in gas hydrate reservoirs. It was considered that the rate of hydrate decomposition is related to the surface area, pressure difference, and reaction order, which provides a method for analyzing hydrate reservoirs. In 2016, Wei et al. [38] proposed a hydrate decomposition model in the annulus during offshore drilling, and studied the hydrate decomposition regularities in wellbore flow. Then, the micro-decomposition mechanism of hydrate was analyzed [39], and the hydrate decomposition regularities and well control safety measures in the process of solid fluidization exploitation of marine natural gas hydrate were studied [40]. However, few studies have been carried out on the regions and regularities of hydrate formation and decomposition under the conditions that the wellbore temperature and pressure vary with the well depth in the production of water-bearing natural gas. In this paper, mathematical models of hydrate phase equilibrium, wellbore temperature, wellbore pressure, hydrate formation, and decomposition are established, and a numerical solution method is developed and validated. The sensitivity influences of different parameters on the regions and regularities of hydrate formation and decomposition in wellbores are obtained. Finally, a set of prediction methods for hydrate formation and decomposition regularities in offshore gas reservoir production pipelines is formed, which is of great significance. Figure 1 schematically illustrates the production of an offshore gas reservoir. The water-bearing natural gas enters the bottom hole from the gas reservoir and flows upward in the wellbore. The gas and water are then produced from the wellhead. In this process, the external temperature around the wellbore successively goes through high temperature of formation at the bottom hole, low temperature of formation at the mud line, low temperature of seawater, and high temperature near the sea surface. The wellbore temperature and pressure change continuously with the upward flow, as well as the influence of the low-temperature environment of seawater. When the temperature and pressure conditions in the wellbore reach hydrate forming conditions then, gas hydrate will form in the wellbore. Parts of the hydrate will connect to the pipeline walls and can grow further from there. Eventually, this can lead to pipeline blockage. Other parts of the hydrate will flow as solid particles which may either grow or decompose along the flow in the pipeline. Aiming at this process, we established the relevant theoretical models in this study as follows.

Phase Equilibrium Model of Natural Gas Hydrate
Based on the process of offshore gas reservoir production, a phase equilibrium model of natural gas hydrate is required in order to determine whether the temperature and pressure conditions in

Phase Equilibrium Model of Natural Gas Hydrate
Based on the process of offshore gas reservoir production, a phase equilibrium model of natural gas hydrate is required in order to determine whether the temperature and pressure conditions in the wellbore meet the hydrate formation or decomposition conditions during the rising process of water-bearing natural gas. In order to simplify the calculation, this paper adopts the hydrate phase equilibrium model established through experimental data analysis by Dzyuba et al. [41]: where T m is the temperature of mixed fluid in the wellbore (K), and P eq is the phase equilibrium pressure of natural gas hydrate (10 6 Pa). According to Equation (1), the equilibrium pressure P eq of natural gas hydrate can be calculated according to wellbore temperature T m through the above natural gas hydrate phase equilibrium model. Compared with wellbore pressure P m in the same condition, if P eq is smaller than P m , the calculated position is in the formation region of hydrate; if P eq is equal to P m , the calculated position is the critical formation or critical decomposition position of hydrate; if P eq is larger than P m , the calculated position is in the non-formation or decomposition region of hydrate.

Wellbore Temperature Model
Based on the law of conservation of energy and basic equations of heat transfer, the wellbore temperature distribution model in the process of producing water-bearing natural gas is established: where: In Equations (2)-(9), T w is seawater temperature (K); T s is formation temperature (K); z is well depth (m); h w is seawater depth (m); q f is the heat generated by the mixed-fluid flow friction in the wellbore (W/m); q h is the heat of phase change in the formation or decomposition of hydrate (W/m); q e is the heat exchange between the outside and the mixed fluid in the wellbore (W/m); c m , c g , and c l are, respectively, the specific heat capacity of mixed fluid, gas phase, and liquid phase in the wellbore (J/(kg·K)); v m , v g , and v l are, respectively, the velocity of mixed fluid, gas phase, and liquid phase in the wellbore (m/s); ρ m , ρ g , and ρ l are, respectively, the density of mixed fluid, gas phase, and liquid phase in the wellbore (kg/m 3 ); E g and E l are, respectively, the volume fraction of gas phase and liquid phase (%); D pi , D po , D ci , D co , D csi , D cso , and D s are, respectively, the inner diameter of tubing (called production pipeline), outer diameter of tubing, inner diameter of casing, outer diameter of casing, inner diameter of cement sheath, outer diameter of cement sheath, and diameter of temperature range in the formation (m); ∆n hyd is the amount of substance of the hydrate phase change per length unit and time unit (mol/(s·m)); q hyd is the heat of phase change per amount of substance hydrate (J/mol); U s is the comprehensive heat transfer coefficient between formation and mixed fluid in the wellbore in the well section below the mud line (W/(m 2 ·K)); U w is the comprehensive heat transfer coefficient between seawater and mixed fluid in the wellbore in the well section above the mud line (W/(m 2 ·K)); α pi is the convective heat transfer coefficient at the inner wall of the tubing (W/(m 2 ·K)); α pc is the convection heat transfer coefficient in the tubing-casing annulus below the mud line (W/(m 2 ·K)); α pw is the convection heat transfer coefficient at the outer wall of the tubing with seawater above the mud line (W/(m 2 ·K)); λ p , λ c , λ cs , and λ s are, respectively, the thermal conductivity coefficient of the tubing, casing, cement sheath, and formation (W/(m·K)); f is the flow friction coefficient (dimensionless); and Q m is the volume flow of mixed fluid in the wellbore (m 3 /s). The temperature of seawater and formation is solved as follows [42]: where T w0 is the sea surface temperature (K), T hw is the seabed temperature (K), and ∆T s is the geothermal gradient (K/m).

Wellbore Pressure Model
Based on the process of offshore gas reservoir production, the wellbore pressure distribution model in the process of producing water-bearing natural gas is established [43][44][45]: where P m is the wellbore pressure (Pa); dP g dz , dP f dz , and dP a dz are, respectively, the pressure drop caused by gravity, frictional resistance, and a change in mixed-fluid velocity (Pa/m); and g is the acceleration of gravity (m/s 2 ).

Formation and Decomposition Models of Natural Gas Hydrate
In the production of an offshore gas reservoir, based on the phase equilibrium model of natural gas hydrate combined with the wellbore temperature and pressure, it can be judged whether the hydrate forms or decomposes in the pipeline. In order to analyze the regularities of hydrate formation and decomposition, the formation and decomposition models of natural gas hydrate in offshore gas reservoir production pipeline are established, in which the natural gas is assumed to be pure methane gas.
In this study, the hydrate dynamic formation model established by Englezos et al. [24] is adopted: Energies 2020, 13, 248 Additionally, the hydrate dynamic decomposition model established by Kim et al. [33] is adopted: where n f and n d are, respectively, the amount of substance of hydrate in the process of hydrate formation and decomposition in the wellbore (mol); t f and t d are, respectively, the time of hydrate formation and decomposition (s); K f and K d are, respectively, the reaction rate constant of hydrate formation and decomposition (mol/(s·m 2 ·Pa)); A f and A d are, respectively, the effective reaction area of hydrate formation and decomposition (m 2 ); f m (T m , P m ) is the fugacity of methane gas at a wellbore temperature of T m and wellbore pressure of P m (Pa); and f eq (T m , P eq ) is the fugacity of methane gas at a wellbore temperature of T m and hydrate phase equilibrium pressure of P eq (Pa). The solution of each parameter is as follows.
The reaction rate constant of hydrate formation and decomposition is calculated by [24,33]: where K is the reaction rate constant of hydrate formation and decomposition, which represents K f or K d (mol/(s·m 2 ·Pa)); K c is the intrinsic reaction rate of hydrate formation and decomposition (mol/(s·m 2 ·Pa)); and K m is the mass transfer rate of methane gas at a certain temperature and pressure (mol/(s·m 2 ·Pa)).
In order to simplify the calculation and more clearly analyze the hydrate formation and decomposition regularities in the wellbore, it is assumed in this study that all hydrates formed are homogeneous spherical particles, keep the same velocity with the gas flow rising in the wellbore, and decompose after the critical decomposition position. Based on this, the effective reaction area of hydrate formation and decomposition is established: where A is the effective reaction area of hydrate formation and decomposition, which represents A f or A d (m 2 ); n h is the amount of substance of hydrate in the process of hydrate formation and decomposition, which represents n f or n d (mol); D h is the diameter of hydrate particle (m); V h is the volume of hydrate particle (m 3 ); M h is the molar mass of hydrate (kg/mol); and ρ h is the density of hydrate (kg/m 3 ). According to the definition of gas fugacity [46], the calculation model of methane gas fugacity is as follows: Then, the calculation of methane gas fugacity can be derived as: where f x (T x , P x ) is the fugacity of methane gas at a certain temperature T x and a certain pressure P x , which represents f m (T m , P m ) or f eq (T m , P eq ) (Pa); T x is a certain temperature (K); P x is a certain pressure (Pa); P * is the reference pressure (Pa); R is the general gas constant (m 3 ·Pa/(mol·K)); V x is the molar volume of methane gas at T x and P x (L/mol); and a and b are R-K constants, with a as the measure of intermolecular attraction and b the measure of the molecule size (dimensionless).

Numerical Simulation
In order to analyze the regions and regularities of hydrate formation and decomposition in offshore gas reservoir production pipelines, a numerical simulation process is established as follows.
Mathcad is commonly used software in engineering calculations [47]. It can be used for text editing, mathematical calculation, chart drawing, animation, function solving, programming, logic operation, simulation, and so on. It integrates equations, text, and charts into a worksheet in a visual format. We can express mathematics problems in a Mathcad worksheet in a similar way to writing on the blackboard. Combined with the mathematical method, the calculation is done by the computing engine at the program bottom. Finally, the results are presented in the worksheet. Mathcad has the advantages of rich functions, easy operation, and wide application, thus we chose it as the numerical simulation software.
In this study, the finite difference method is adopted to carry out numerical simulation. In this method [48], the solution domain is divided into difference meshes, and the continuous solution domain is expressed by a finite number of mesh nodes. Then, the algebraic equations with unknown parameters at grid nodes are established and the numerical solutions are finally obtained. The finite difference method was one of the earliest methods used in computer numerical simulation. It has the characteristics of intuitive mathematical concepts, concise expression, good universality, and so on. It is also a relatively mature numerical method and easy to realize on the computer. The format of the finite difference method is as follows: where ∆z is the length of calculation step and X i and X i+1 are, respectively, the values of calculating parameters at nodes i and i + 1. At the same time, the effects of boundary conditions and initial conditions are taken into account in the model solution, as shown in the following.
Wellhead pressure equals wellhead oil pressure: sea surface temperature equals ambient temperature: and bottom hole temperature is equal to formation temperature at the same depth: where P m (0) is the wellhead pressure (Pa), P 0 is the tubing head pressure (Pa), z H is the depth of the bottom hole (m), T e is ambient temperature (K), T m (z H ) is the bottom hole temperature (K), and T mr (z H ) is the formation temperature at the same depth as the bottom hole (K). Figure 2 is the numerical simulation process of the regions and regularities of hydrate formation and decomposition in an offshore pipeline during gas reservoir production. The order of calculation is from wellhead to bottom hole. The parameters at node i in the wellbore are known. We illustrate the numerical simulation process by taking nodes i to i + 1 as an example in Figure 2. ζ is the accuracy of the calculation error. the numerical simulation process by taking nodes i to i + 1 as an example in Figure 2. ζ is the accuracy of the calculation error.

Model Verification
In order to verify the accuracy of the theoretical models and numerical simulation, we used the field measured data from the literature for comparison. Currently, there are few studies on the field measured data of the regions and regularities of hydrate formation and decomposition in offshore gas reservoir production pipelines. Since these depend on wellbore temperature and pressure, we used the field measured data of wellbore temperature and pressure of offshore production gas well A-X in the South China Sea for comparison [49]. At the same time, we use onshore production gas well LN-X for comparison to verify the accuracy of hydrate formation region prediction [50].
The basic parameters of well A-X are as follows [49]: it is a vertical well, well depth is 4520 m, seawater depth is 1350 m, sea surface temperature is 298 K, geothermal gradient is 0.0345 K/m, and bottom hole pressure is 32.97 × 10 6 Pa. Based on the basic data of well A-X, the wellbore temperature and pressure are calculated under the condition of different daily gas production (Figure 3), and the results are compared with the field measured data in Table 1. The calculation of relative error is as follows: where η is the relative error between measured and calculated data, FM is the measured data, and FC is the calculated data.

Model Verification
In order to verify the accuracy of the theoretical models and numerical simulation, we used the field measured data from the literature for comparison. Currently, there are few studies on the field measured data of the regions and regularities of hydrate formation and decomposition in offshore gas reservoir production pipelines. Since these depend on wellbore temperature and pressure, we used the field measured data of wellbore temperature and pressure of offshore production gas well A-X in the South China Sea for comparison [49]. At the same time, we use onshore production gas well LN-X for comparison to verify the accuracy of hydrate formation region prediction [50].
The basic parameters of well A-X are as follows [49]: it is a vertical well, well depth is 4520 m, seawater depth is 1350 m, sea surface temperature is 298 K, geothermal gradient is 0.0345 K/m, and bottom hole pressure is 32.97 × 10 6 Pa. Based on the basic data of well A-X, the wellbore temperature and pressure are calculated under the condition of different daily gas production (Figure 3), and the results are compared with the field measured data in Table 1. The calculation of relative error is as follows: where η is the relative error between measured and calculated data, F M is the measured data, and F C is the calculated data.  The basic parameters of well LN-X are as follows [50]: it is a vertical well, well depth is 5200 m, daily gas production is 4 × 10 4 m 3 /d, water content is 0.056%, surface temperature is 287 K, wellhead temperature is 294 K, geothermal gradient is 0.02 K/m, tubing head pressure is 29.2 × 10 6 Pa, bottom hole pressure is 50 × 10 6 Pa, and tubing outer diameter is 0.114 m. Hydrate formation was found in the well section above the depth of 180 m during gas production. The wellbore structure is shown in Table 2. Based on the basic parameters of well LN-X, the prediction method established in this study is adopted. According to the numerical simulation process in Figure 2, the seawater depth is set to 0 m. The wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, and hydrate formation region are obtained as shown in Figure 4. It can be seen that the wellhead temperature is 294.0 K, the bottom hole temperature is 398.3 K, the tubing head pressure is 29.2 × 10 6 Pa, and the bottom hole pressure is 50.0 × 10 6 Pa. The intersection of wellbore pressure and hydrate equilibrium pressure is the critical position of hydrate formation, which is about 175 m deep. The region to the left of the blue line in Figure 4b is the hydrate formation region, which is also the well section above 175 m. The results are compared with the field measured data in Table 3, and the relative error is calculated by Equation (25).  The basic parameters of well LN-X are as follows [50]: it is a vertical well, well depth is 5200 m, daily gas production is 4 × 10 4 m 3 /d, water content is 0.056%, surface temperature is 287 K, wellhead temperature is 294 K, geothermal gradient is 0.02 K/m, tubing head pressure is 29.2 × 10 6 Pa, bottom hole pressure is 50 × 10 6 Pa, and tubing outer diameter is 0.114 m. Hydrate formation was found in the well section above the depth of 180 m during gas production. The wellbore structure is shown in Table 2. Based on the basic parameters of well LN-X, the prediction method established in this study is adopted. According to the numerical simulation process in Figure 2, the seawater depth is set to 0 m. The wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, and hydrate formation region are obtained as shown in Figure 4. It can be seen that the wellhead temperature is 294.0 K, the bottom hole temperature is 398.3 K, the tubing head pressure is 29.2 × 10 6 Pa, and the bottom hole pressure is 50.0 × 10 6 Pa. The intersection of wellbore pressure and hydrate equilibrium pressure is the critical position of hydrate formation, which is about 175 m deep. The region to the left of the blue line in Figure 4b is the hydrate formation region, which is also the well section above 175 m. The results are compared with the field measured data in Table 3, and the relative error is calculated by Equation (25).   As can be seen from Tables 1 and 3, the relative errors between measured and calculated data are all less than 5%. The error is small, verifying the accuracy of the theoretical model and numerical simulation method, and showing that the prediction method of the regions and regularities of hydrate formation and decomposition in the offshore gas reservoir production pipeline established in this study has high accuracy.

Influence Factors Analyses
In order to calculate the regions and regularities of hydrate formation and decomposition in the offshore gas reservoir production pipeline, we set up the simplified wellbore structure, as shown in Figure 1: the tubing length is equal to the well depth, the outer diameter of tubing is 0.114 m, the inner diameter of tubing is 0.100 m, the casing length and cement sheath length are both 2000 m, the outer diameter of casing is 0.219 m, the inner diameter of casing is 0.198 m, the inner diameter of cement sheath is 0.219 m, and the outer diameter of cement ring is 0.241 m. Then, according to the mathematical model and numerical simulation method established in this paper, the numerical simulation analysis under conditions of different daily gas production, tubing head pressure, water content, sea surface temperature, seawater depth, and geothermal gradient was carried out as described in the following sections.

Influence of Daily Gas Production
The basic parameters of numerical simulation are as follows: daily gas production is 1 × 10 5 m 3 /d, 2 × 10 5 m 3 /d, and 3 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; tubing head pressure is 5 × 10 6 Pa; and water content is 0.1%. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different daily gas production in offshore gas reservoir production were obtained, as shown in Figure 5.  As can be seen from Tables 1 and 3, the relative errors between measured and calculated data are all less than 5%. The error is small, verifying the accuracy of the theoretical model and numerical simulation method, and showing that the prediction method of the regions and regularities of hydrate formation and decomposition in the offshore gas reservoir production pipeline established in this study has high accuracy.

Influence Factors Analyses
In order to calculate the regions and regularities of hydrate formation and decomposition in the offshore gas reservoir production pipeline, we set up the simplified wellbore structure, as shown in Figure 1: the tubing length is equal to the well depth, the outer diameter of tubing is 0.114 m, the inner diameter of tubing is 0.100 m, the casing length and cement sheath length are both 2000 m, the outer diameter of casing is 0.219 m, the inner diameter of casing is 0.198 m, the inner diameter of cement sheath is 0.219 m, and the outer diameter of cement ring is 0.241 m. Then, according to the mathematical model and numerical simulation method established in this paper, the numerical simulation analysis under conditions of different daily gas production, tubing head pressure, water content, sea surface temperature, seawater depth, and geothermal gradient was carried out as described in the following sections.

Influence of Daily Gas Production
The basic parameters of numerical simulation are as follows: daily gas production is 1 × 10 5 m 3 /d, 2 × 10 5 m 3 /d, and 3 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; tubing head pressure is 5 × 10 6 Pa; and water content is 0.1%. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different daily gas production in offshore gas reservoir production were obtained, as shown in Figure 5. From Figure 5a, it can be seen that in the production of an offshore gas reservoir, the formation temperature below the mud line decreases and the seawater temperature above the mud line increases with decreased well depth; thus, wellbore temperature Tm first decreases and then increases with decreased well depth under the influence of formation and seawater temperature. With increased daily gas production (from 1 × 10 5 to 3 × 10 5 m 3 /d), the heat transfer time of the mixed fluid in wellbore with formation and seawater is shortened and the heat transfer capacity is reduced. Therefore, the minimum temperature of the mixed fluid in the wellbore increases from 277.8 K to 283.0 K, and the wellhead temperature decreases from 288.0 K to 285.5 K. Furthermore, the phase equilibrium pressure Peq calculated by the hydrate phase equilibrium model also increases in the lower well section and decreases slightly at the wellhead, as shown in Figure 5b.
From Figure 5b, it can be seen that with increased daily gas production (from 1 × 10 5 to 3 × 10 5 m 3 /d), wellbore pressure Pm increases and bottom hole pressure increases from 8.9 × 10 6 Pa to 10.8 × 10 6 Pa. When daily gas production is 1 × 10 5 m 3 /d or 2 × 10 5 m 3 /d, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The first intersection is the critical position of hydrate formation, and the second intersection is the critical position of hydrate decomposition. Referring to Figure 5c, before the gas flow rises to the first intersection, where the depth of the well is greater than the critical hydrate formation position (also known as the nonhydrate region), the temperature and pressure conditions in the wellbore do not meet the conditions for hydrate formation, thus there is no hydrate in the wellbore. When the gas flow rises between the first and second points of intersection, where the well depth is between the critical hydrate formation position and decomposition location (also known as the hydrate formation region), the temperature and pressure conditions in the wellbore meet the conditions for hydrate formation, thus hydrate formation occurs continuously in the wellbore. In addition, according to the above assumption, the From Figure 5a, it can be seen that in the production of an offshore gas reservoir, the formation temperature below the mud line decreases and the seawater temperature above the mud line increases with decreased well depth; thus, wellbore temperature T m first decreases and then increases with decreased well depth under the influence of formation and seawater temperature. With increased daily gas production (from 1 × 10 5 to 3 × 10 5 m 3 /d), the heat transfer time of the mixed fluid in wellbore with formation and seawater is shortened and the heat transfer capacity is reduced. Therefore, the minimum temperature of the mixed fluid in the wellbore increases from 277.8 K to 283.0 K, and the wellhead temperature decreases from 288.0 K to 285.5 K. Furthermore, the phase equilibrium pressure P eq calculated by the hydrate phase equilibrium model also increases in the lower well section and decreases slightly at the wellhead, as shown in Figure 5b.
From Figure 5b, it can be seen that with increased daily gas production (from 1 × 10 5 to 3 × 10 5 m 3 /d), wellbore pressure P m increases and bottom hole pressure increases from 8.9 × 10 6 Pa to 10.8 × 10 6 Pa. When daily gas production is 1 × 10 5 m 3 /d or 2 × 10 5 m 3 /d, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The first intersection is the critical position of hydrate formation, and the second intersection is the critical position of hydrate decomposition. Referring to Figure 5c, before the gas flow rises to the first intersection, where the depth of the well is greater than the critical hydrate formation position (also known as the non-hydrate region), the temperature and pressure conditions in the wellbore do not meet the conditions for hydrate formation, thus there is no hydrate in the wellbore. When the gas flow rises between the first and second points of intersection, where the well depth is between the critical hydrate formation position and decomposition location (also known as the hydrate formation region), the temperature and pressure conditions in the wellbore meet the conditions for hydrate formation, thus hydrate formation occurs continuously in the wellbore. In addition, according to the above assumption, the hydrate formed is all homogeneous sphere particles and keeps the same velocity as the gas flow rising along the wellbore. After the gas flow rises to the second intersection, where the depth of the well is less than the critical decomposition position of the hydrate (also known as the hydrate decomposition region), the temperature and pressure conditions in the wellbore meet the decomposition conditions of the hydrate, thus the hydrate formed in the wellbore is constantly decomposing. When the daily gas production is 3 × 10 5 m 3 /d, there is no intersection between the wellbore pressure and the hydrate phase equilibrium pressure curves, which indicates that the temperature and pressure conditions in the wellbore do not meet the conditions for hydrate formation and no hydrate is formed in the wellbore.
From Figure 5c, it can be seen that when the daily gas production is 1 × 10 5 m 3 /d, the hydrate formation region is from 1492 m to 348 m and the hydrate decomposition region is from 348 m to 0 m. When the daily gas production is 2 × 10 5 m 3 /d, the hydrate formation region is from 1097 m to 341 m and the hydrate decomposition region is from 341 m to 0 m. When the daily gas production is 3 × 10 5 m 3 /d, no hydrate is formed in the wellbore.
From Figure 5c,d, it can be seen that before the gas flow reaches the critical position of hydrate formation in the process of rising along the wellbore, the amount of substance of single hydrate particle n f in the wellbore is 0. In the hydrate formation region, the amount of substance of single hydrate particle n f gradually increases from 0. In the region of hydrate decomposition, the amount of substance of single hydrate particle n d begins to decrease. When other conditions are constant, with increased daily gas production (from 1 × 10 5 to 3 × 10 5 m 3 /d), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle decrease, making it more difficult to block the wellbore and more helpful to keep the safety of production.

Influence of Tubing Head Pressure
The basic parameters of the numerical simulation are as follows: tubing head pressure is 0.1 × 10 6 Pa, 5 × 10 6 Pa, and 10 × 10 6 Pa; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; and water content is 0.1%. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different tubing head pressures in offshore gas reservoir production were obtained, as shown in Figure 6.
From Figure 6a,b, it can be seen that in the production of an offshore gas reservoir, with increased tubing head pressure (from 0.1 × 10 6 to 10 × 10 6 Pa), wellbore pressure P m increases, then the density of the mixed fluid in wellbore ρ m and specific heat capacity c m increase under the influence of compression, and the change of wellbore temperature tends to slow down. At the same time, velocity v m of the mixed fluid in the wellbore decreases, then the heat transfer time and heat transfer capacity between the mixed fluid and the formation and the seawater in the wellbore increase, and the temperature change in the wellbore tends to accelerate. Combined with these two factors, the change of wellbore temperature T m is not obvious with the increased tubing head pressure, and phase equilibrium pressure P eq calculated by the hydrate phase equilibrium model has no obvious change, as shown in Figure 6b.
From Figure 6b, it can be seen that with increased tubing head pressure (from 0.1 × 10 6 to 10 × 10 6 Pa), the bottom hole pressure increases from 2.2 × 10 6 Pa to 17.3 × 10 6 Pa. When the tubing head pressure is 5 × 10 6 Pa or 10 × 10 6 Pa, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and the hydrate phase equilibrium pressure curves. The gas flow in turn goes through the nonhydrate, hydrate formation, and hydrate decomposition regions. When the tubing head pressure is 0.1 × 10 6 Pa, there is no intersection between the wellbore pressure and the hydrate phase equilibrium pressure curves, and no hydrate is formed in the wellbore. From Figure 6c, it can be seen that when the tubing head pressure is 0.1 × 10 6 Pa, no hydrate is formed in the wellbore. When the tubing head pressure is 5 × 10 6 Pa, the hydrate formation region is from 1492 m to 348 m and the hydrate decomposition region is from 348 m to 0 m. When the well head oil pressure is 10 × 10 6 Pa, the depth of hydrate formation is from 1760 m to 21 m, and that of hydrate decomposition is from 21 m to 0 m. From Figure 6c,d, it can be seen that when other conditions are constant, with increased tubing head pressure (from 0.1 × 10 6 to 10 × 10 6 Pa), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle increase, which makes it easier to block the wellbore and even harder to keep the safety of production.

Influence of Water Content
The basic parameters of the numerical simulation are as follows: water content is 0.1%, 0.2%, and 0.3%; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; and tubing head pressure is 5 × 10 6 Pa. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different water content in offshore gas reservoir production were obtained, as shown in Figure 7.
From Figure 7a,b, it can be seen that in the production of the offshore gas reservoir, with increased water content (from 0.1% to 0.3%), the volume fraction of liquid phase in the wellbore increases, the density of mixed fluid ρm and specific heat capacity cm increase, and the change of wellbore temperature decreases with the same heat transfer capacity. Therefore, the minimum temperature of the mixed fluid in the wellbore increases from 277.8 K to 281.4 K and the wellhead temperature decreases from 288.0 K to 285.2 K. Furthermore, the phase equilibrium pressure Peq From Figure 6c, it can be seen that when the tubing head pressure is 0.1 × 10 6 Pa, no hydrate is formed in the wellbore. When the tubing head pressure is 5 × 10 6 Pa, the hydrate formation region is from 1492 m to 348 m and the hydrate decomposition region is from 348 m to 0 m. When the well head oil pressure is 10 × 10 6 Pa, the depth of hydrate formation is from 1760 m to 21 m, and that of hydrate decomposition is from 21 m to 0 m. From Figure 6c,d, it can be seen that when other conditions are constant, with increased tubing head pressure (from 0.1 × 10 6 to 10 × 10 6 Pa), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle increase, which makes it easier to block the wellbore and even harder to keep the safety of production.

Influence of Water Content
The basic parameters of the numerical simulation are as follows: water content is 0.1%, 0.2%, and 0.3%; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; and tubing head pressure is 5 × 10 6 Pa. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different water content in offshore gas reservoir production were obtained, as shown in Figure 7. calculated by the hydrate phase equilibrium model also increases in the lower well section and decreases at the wellhead (Figure 7b). From Figure 7b, it can be seen that with increased water content (from 0.1% to 0.3%), the density of mixed fluid in the wellbore increases, wellbore pressure Pm increases, and the bottom hole pressure increases from 8.9 × 10 6 Pa to 14.5 × 10 6 Pa. With any water content, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The gas flow in turn goes through the nonhydrate, hydrate formation, and hydrate decomposition regions.
From Figure 7c, it can be seen that when the water content is 0.1%, the depth of hydrate formation is from 1492 m to 348 m and the region of hydrate decomposition is from 348 m to 0 m. When the water content is 0.2%, the hydrate formation region is from 1314 m to 298 m and the hydrate decomposition region is from 298 m to 0 m. When the water content is 0.3%, the hydrate formation region is from 997 m to 380 m and the hydrate decomposition region is from 380 m to 0 m. From Figure 7c,d, it can be seen that when other conditions are constant, with increased water content (from 0.1% to 0.3%), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle decrease, which makes it more difficult to block the wellbore and more helpful to keep the safety of production.

Influence of Sea Surface Temperature
The basic parameters of numerical simulation are as follows: sea surface temperature is 288 K, 298 K, and 308 K; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); geothermal gradient is 0.025 K/m; tubing head pressure is 5 × 10 6 Pa; and water content is 298 K. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase From Figure 7a,b, it can be seen that in the production of the offshore gas reservoir, with increased water content (from 0.1 to 0.3%), the volume fraction of liquid phase in the wellbore increases, the density of mixed fluid ρ m and specific heat capacity c m increase, and the change of wellbore temperature decreases with the same heat transfer capacity. Therefore, the minimum temperature of the mixed fluid in the wellbore increases from 277.8 K to 281.4 K and the wellhead temperature decreases from 288.0 K to 285.2 K. Furthermore, the phase equilibrium pressure P eq calculated by the hydrate phase equilibrium model also increases in the lower well section and decreases at the wellhead (Figure 7b).
From Figure 7b, it can be seen that with increased water content (from 0.1 to 0.3%), the density of mixed fluid in the wellbore increases, wellbore pressure P m increases, and the bottom hole pressure increases from 8.9 × 10 6 Pa to 14.5 × 10 6 Pa. With any water content, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The gas flow in turn goes through the nonhydrate, hydrate formation, and hydrate decomposition regions.
From Figure 7c, it can be seen that when the water content is 0.1%, the depth of hydrate formation is from 1492 m to 348 m and the region of hydrate decomposition is from 348 m to 0 m. When the water content is 0.2%, the hydrate formation region is from 1314 m to 298 m and the hydrate decomposition region is from 298 m to 0 m. When the water content is 0.3%, the hydrate formation region is from 997 m to 380 m and the hydrate decomposition region is from 380 m to 0 m.
From Figure 7c,d, it can be seen that when other conditions are constant, with increased water content (from 0.1 to 0.3%), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle decrease, which makes it more difficult to block the wellbore and more helpful to keep the safety of production.

Influence of Sea Surface Temperature
The basic parameters of numerical simulation are as follows: sea surface temperature is 288 K, 298 K, and 308 K; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); geothermal gradient is 0.025 K/m; tubing head pressure is 5 × 10 6 Pa; and water content is 298 K. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different sea surface temperatures in offshore gas reservoir production were obtained, as shown in Figure 8. From Figure 8a,b, it can be seen that in the production of an offshore gas reservoir, with increased sea surface temperature (from 288 K to 308 K), the shallow seawater will be affected and the temperature will increase, but the deep seawater will not be affected by sea surface temperature equal to ambient temperature. Therefore, wellbore temperature Tm in the upper wellbore near the sea surface increases and the wellhead temperature increases from 285.1 K to 290.8 K, while wellbore temperature Tm in the lower wellbore remains the same. Furthermore, phase equilibrium pressure Peq calculated by the hydrate phase equilibrium model also remains constant in the lower well section but increases near the wellhead, as shown in Figure 8b.
Wellbore pressure Pm does not change with increased sea surface temperature (from 288 K to 308 K), as shown in Figure 8b. The hydrate formation region is constant, from 1492 m to 348 m ( Figure  8c), the hydrate formation rate is equal, and the amount substance of single hydrate particle remains constant (Figure 8d). The hydrate decomposition region does not change from 348 m to 0 m ( Figure  8c), and hydrate decomposition rate increases with sea surface temperature (Figure 8d).

Influence of Seawater Depth
The basic parameters of numerical simulation are as follows: well depth is 2500 m, 3000 m, and 3500 m (corresponding seawater depth is 500 m, 1000 m, and 1500 m, respectively); daily gas production is 1 × 10 5 m 3 /d; sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; tubing From Figure 8a,b, it can be seen that in the production of an offshore gas reservoir, with increased sea surface temperature (from 288 K to 308 K), the shallow seawater will be affected and the temperature will increase, but the deep seawater will not be affected by sea surface temperature equal to ambient temperature. Therefore, wellbore temperature T m in the upper wellbore near the sea surface increases and the wellhead temperature increases from 285.1 K to 290.8 K, while wellbore temperature T m in the lower wellbore remains the same. Furthermore, phase equilibrium pressure P eq calculated by the hydrate phase equilibrium model also remains constant in the lower well section but increases near the wellhead, as shown in Figure 8b.
Wellbore pressure P m does not change with increased sea surface temperature (from 288 K to 308 K), as shown in Figure 8b. The hydrate formation region is constant, from 1492 m to 348 m (Figure 8c), the hydrate formation rate is equal, and the amount substance of single hydrate particle remains constant (Figure 8d). The hydrate decomposition region does not change from 348 m to 0 m (Figure 8c), and hydrate decomposition rate increases with sea surface temperature (Figure 8d).

Influence of Seawater Depth
The basic parameters of numerical simulation are as follows: well depth is 2500 m, 3000 m, and 3500 m (corresponding seawater depth is 500 m, 1000 m, and 1500 m, respectively); daily gas production is 1 × 10 5 m 3 /d; sea surface temperature is 298 K; geothermal gradient is 0.025 K/m; tubing head pressure is 5 × 10 6 Pa; and water content is 0.1%. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different seawater depths in offshore gas reservoir production were obtained, as shown in Figure 9. decomposition regions, hydrate formation, and decomposition regularities under different seawater depths in offshore gas reservoir production were obtained, as shown in Figure 9. From Figure 9a,b, it can be seen that in the production of an offshore gas reservoir, when the length of the well section below the mud line is the same, with increased seawater depth (from 500 m to 1500 m), the sea floor temperature decreases and the heat transfer time between the seawater and the mixed fluid in the wellbore and heat transfer capacity increase. As a result, wellbore temperature Tm decreases. The bottom hole temperature decreases from 331.5 K to 325.8 K, the minimum temperature of the mixed fluid in the wellbore decreases from 285.9 K to 277.8 K, and the wellhead temperature decreases from 289.5 K to 288.0 K. Furthermore, phase equilibrium pressure Peq calculated by the hydrate phase equilibrium model is reduced (Figure 9b).
From Figure 9b, it can be seen that with increased seawater depth (from 500 m to 1500 m), wellbore pressure Pm at the same depth is almost the same. When the seawater depth is 1000 m or 1500 m, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The gas flow in turn goes through the nonhydrate, hydrate formation, and hydrate decomposition regions. When the seawater depth is 500 m, there is no intersection between the wellbore pressure and hydrate phase equilibrium pressure curves, and no hydrate is formed in the wellbore.
From Figure 9c, it can be seen that when the seawater depth is 500 m, no hydrate is formed in the wellbore. When the seawater depth is 1000 m, the hydrate formation region is from 1274 m to 421 m and the hydrate decomposition region is from 421 m to 0 m. When the seawater depth is 1000 m, From Figure 9a,b, it can be seen that in the production of an offshore gas reservoir, when the length of the well section below the mud line is the same, with increased seawater depth (from 500 m to 1500 m), the sea floor temperature decreases and the heat transfer time between the seawater and the mixed fluid in the wellbore and heat transfer capacity increase. As a result, wellbore temperature T m decreases. The bottom hole temperature decreases from 331.5 K to 325.8 K, the minimum temperature of the mixed fluid in the wellbore decreases from 285.9 K to 277.8 K, and the wellhead temperature decreases from 289.5 K to 288.0 K. Furthermore, phase equilibrium pressure P eq calculated by the hydrate phase equilibrium model is reduced (Figure 9b).
From Figure 9b, it can be seen that with increased seawater depth (from 500 m to 1500 m), wellbore pressure P m at the same depth is almost the same. When the seawater depth is 1000 m or 1500 m, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The gas flow in turn goes through the nonhydrate, hydrate formation, and hydrate decomposition regions.
When the seawater depth is 500 m, there is no intersection between the wellbore pressure and hydrate phase equilibrium pressure curves, and no hydrate is formed in the wellbore.
From Figure 9c, it can be seen that when the seawater depth is 500 m, no hydrate is formed in the wellbore. When the seawater depth is 1000 m, the hydrate formation region is from 1274 m to 421 m and the hydrate decomposition region is from 421 m to 0 m. When the seawater depth is 1000 m, the hydrate formation region is from 1492 m to 348 m and the hydrate decomposition region is from 348 m to 0 m.
From Figure 9c,d, it can be seen that when other conditions are constant and the length of the well below the mud line is the same, with increased seawater depth (from 500 m to 1500 m), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle increase, which makes it easier to block the wellbore and even harder to keep the safety of production.

Influence of Geothermal Gradient
The basic parameters of numerical simulation are as follows: geothermal gradient is 0.015 K/m, 0.025 K/m, and 0.035 K/m; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; tubing head pressure is 5 × 10 6 Pa; and water content is 0.1%. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different geothermal gradients in offshore gas reservoir production were obtained, as shown in Figure 10. From Figure 9c,d, it can be seen that when other conditions are constant and the length of the well below the mud line is the same, with increased seawater depth (from 500 m to 1500 m), the hydrate formation region in the wellbore and the amount of substance of single hydrate particle increase, which makes it easier to block the wellbore and even harder to keep the safety of production.

Influence of Geothermal Gradient
The basic parameters of numerical simulation are as follows: geothermal gradient is 0.015 K/m, 0.025 K/m, and 0.035 K/m; daily gas production is 1 × 10 5 m 3 /d; well depth is 3500 m (includes seawater depth of 1500 m); sea surface temperature is 298 K; tubing head pressure is 5 × 10 6 Pa; and water content is 0.1%. Through numerical simulation, the wellbore temperature, wellbore pressure, hydrate phase equilibrium pressure, hydrate formation and decomposition regions, hydrate formation, and decomposition regularities under different geothermal gradients in offshore gas reservoir production were obtained, as shown in Figure 10. From Figure 10a,b, it can be seen that in the production of an offshore gas reservoir, with increased geothermal gradient (from 0.015 K/m to 0.035 K/m), the seawater temperature has no change, the formation temperature increases, and the heat transfer capacity increases below the mud line. Therefore, wellbore temperature Tm increases in the lower well section. The bottom hole temperature increases from 306.0 K to 346.0 K, the minimum temperature of the mixed fluid in the wellbore increases from 277.3 K to 278.1 K, and the wellhead temperature remains unchanged at 288.0 From Figure 10a,b, it can be seen that in the production of an offshore gas reservoir, with increased geothermal gradient (from 0.015 K/m to 0.035 K/m), the seawater temperature has no change, the formation temperature increases, and the heat transfer capacity increases below the mud line. Therefore, wellbore temperature T m increases in the lower well section. The bottom hole temperature increases from 306.0 K to 346.0 K, the minimum temperature of the mixed fluid in the wellbore increases from 277.3 K to 278.1 K, and the wellhead temperature remains unchanged at 288.0 K. Furthermore, phase equilibrium pressure P eq calculated by the hydrate phase equilibrium model increases in the lower well section and remains constant near the wellhead (Figure 10b).
From Figure 10b, it can be seen that with increased geothermal gradient (from 0.015 K/m to 0.035 K/m), wellbore pressure P m is basically unchanged. At any geothermal gradient, the well depth decreases continuously as the gas flow rises along the wellbore, and there are two intersecting points between the wellbore pressure and hydrate phase equilibrium pressure curves. The gas flow in turn goes through the nonhydrate, hydrate formation, and hydrate decomposition regions.
From Figure 10c, it can be seen that when the geothermal gradient is 0.015 K/m, the hydrate formation region is from 1702 m to 348 m and the hydrate decomposition region is from 348 m to 0 m. When the geothermal gradient is 0.025 K/m, the hydrate formation region is from 1492 m to 348 m and the hydrate decomposition region is from 348 m to 0 m. When the geothermal gradient is 0.035 K/m, the hydrate formation region is from 1383 m to 348 m and the hydrate decomposition region is from 348 m to 0 m.
From Figure 10c,d, it can be seen that when other conditions are constant, with increased geothermal gradient (from 0.015 K/m to 0.035 K/m), the length of the hydrate formation region in the wellbore and the amount of substance of single hydrate particle decrease, which makes it more difficult to block the wellbore and more helpful to keep the safety of production.

Conclusions
In this study, based on the process of offshore gas reservoir production, mathematical models of hydrate phase equilibrium, wellbore temperature, wellbore pressure, hydrate formation, and decomposition are established, and a numerical solution method is developed and validated. The sensitivity influences of different parameters on the regions and regularities of hydrate formation and decomposition in a wellbore are obtained through numerical simulation. In addition, a set of prediction methods is formed.
The formation and decomposition of hydrate are mainly affected by temperature and pressure. In offshore gas reservoir production pipelines, the hydrate formation region will be longer and more hydrate will be formed at lower temperature or higher pressure. With increased daily gas production rate and water content, the minimum wellbore temperature increases, wellbore pressure increases, and hydrate formation region decreases; with increased tubing head pressure, wellbore pressure increases and the length of the hydrate formation region increases; with increased sea surface temperature, the length of the hydrate formation region does not change; with increased seawater depth, the wellbore temperature decreases and the length of the hydrate formation region increases; with increased geothermal gradient, the wellbore temperature increases in the lower well section and the hydrate formation region decreases.
With increased daily gas production, water content, or geothermal gradient in an offshore gas reservoir production pipeline, less hydrate is formed in the wellbore, the risk of wellbore blockage decreases, which is more helpful to ensure production safety. Decreased tubing head pressure or seawater depth has the same effect. More broadly, the flow rate, delivery pressure, water content, environmental temperature, and length of pipeline will all affect the temperature, pressure, and hydrate formation in the actual production process, and these parameters should be adjusted reasonably.