Numerical Simulation of Sulfur Deposition in Wellbore of Sour-Gas Reservoir

: Sulfur deposition has an important effect on the productivity of sour-gas wells. Accurately predicting the occurrence of sulfur deposition and the location and amount of sulfur deposition in wellbore can effectively guide the production of gas wells. In this paper, the wellbore sulfur deposition model, pressure model, and transient temperature model are established for various well types. Then, numerical simulations of sulfur deposition in the sour-gas well were conducted by coupling these models. Examples show that the proposed methodology has high accuracy, and the average relative error of the calculated results is 3.61%. Based on the model, a sensitivity analysis was performed on the factors affecting sulfur deposition. The results show that with the increase of wellbore inclination angle, the critical sulfur carrying velocity ﬁrst increased and then decreased, and the maximum critical velocity is about 30% larger than that of the vertical section. The amount of wellbore sulfur deposition increases with increased production time and decreased wellbore pressure, and the amount of wellbore sulfur deposition decreases with increased gas production rate, H 2 S content, and inclination angle. The results suggest that the sour-gas reservoir should be developed with the horizontal or deviated well, timely adjust the production system, and keep the gas-well production higher than the critical ﬂow rate as much as possible. At the same time, wellbore heating and insulation, pre-cleaning technology, and the closely implemented sulfur deposition prevention technology in the middle and late stage of development can be adopted to reduce the occurrence of sulfur deposition to ensure the safe and efﬁcient development of high-sulfur gas wells.


Introduction
With the increasing global demand for energy and the requirements of environmental protection, the proportion of natural gas in primary energy consumption is increasing year by year.Sour-gas reservoir development plays an important role in natural gas exploitation, and the sour-gas reservoirs are widely distributed around the world.Different from conventional gas reservoir development, the existence of elemental sulfur greatly affects the production of sour-gas reservoirs.With the decrease of temperature and pressure, elemental sulfur will precipitate from the natural gas when the sulfur concentration exceeds the sulfur solubility, thereby blocking the pore and reducing the permeability of the reservoir.At the same time, sulfur precipitates from the wellbore will be deposited on the wellbore [1], which can reduce the productivity of the gas wells and even lead to dead gas wells due to sulfur plugging.Serious harm from sulfur deposition to gas-well production has been reported in some high-sulfur content wells [2].Adopting a reasonable production system and effective prevention measures of sulfur deposition can reduce the harm of sulfur deposition to gas-well production.Therefore, it is of great significance to ascertain whether elemental sulfur precipitation and deposition occur and accurately predict the location and amount of sulfur precipitated and deposition in wellbore for guiding the formulation and application of prevention and control measures of sulfur deposition to ensure the normal production of sour-gas wells.
At present, many scholars have carried out relevant studies on sulfur deposition.Chrastil [3] first proposed a thermodynamic empirical model, which was widely used to calculate sulfur solubility.Through experimental fitting and theoretical research, many scholars have improved the Chrastil model to make it more accurate and more applicable [4][5][6][7].In recent years, some scholars have used the machine-learning method [8] and the support vector machine method [9] to calculate sulfur solubility.Zhang [10] used the static method to measure the sulfur solubility in natural gas samples and conducted a comparative analysis on various solubility calculation models.The results showed that the fitted Chrastil model had good applicability.
Abou-Kassem and Jamal [11] analyzed the influence of fluid flow rate on sulfur deposition through a core flooding experiment and proposed the concept of critical sulfur carrying velocity.Hu [1] studied sulfur glomeration mechanism and established a calculation model of critical sulfur-carrying velocity suitable for vertical Wells.Al-Jaberi used WinProp from CMG for phase behavior of a generalized deep sour-gas well in the Middle East; the results showed that sulfur deposition occurs in the tubing [12].Kuo and Closmann [13,14] established a one-dimensional radial flow model to study the effects of production rate, wellbore radius, and well spacing on the sulfur deposition.16] developed an analytical model to predict the formation damage due to sulfur deposition, and the results showed that sulfur deposition mainly occurs near the wellbore.Based on a conventional black-oil reservoir simulator and a dual porosity media analytical model, Hu [17,18] established a reservoir damage model in the presence of non-Darcy flow to analyze the relationship between sulfur deposition and saturation degree of irreducible water and the effect of sulfur deposition on well performance.Qin and Liu [19] introduced the concept of sulfur-deposition-equivalent wellbore radius (SDER) to develop a productivity equation for fractured gas wells that considers the effect of sulfur deposition.Yang [20] established a mathematical model that can be used for estimating productivity of sour-gas wells with the horizontal well type.Zou [21] developed a numerical model considering the damage of sulfur deposition with pressure change on reservoir porosity and permeability to predict the production from fractured horizontal wells in high-sulfur-content gas reservoirs and analyzed the influence of sulfur deposition on the production of fractured horizontal wells and the effects of hydraulic fracture parameters on production.
In terms of gas-well modeling, Dou [22] established a mathematical model for wellbore flow and heat transfer during the formation of high-sulfur gas invasion, which can be used to calculate wellbore temperature and pressure profile.However, the model did not consider the influence of sulfur deposition.Liu [23] established a temperature-pressure coupling model for high-pressure and high-temperature gas wells and without considering the influence of well type and sulfur deposition.Tan [24] studied the inflow characteristics of the horizontal gas well with sulfur deposition by experiment.Haq [25] modified the dynamic gas material balance equation and proposed a method to determine whether sulfur deposition occurred in the wellbore.Based on the volumetric source for horizontal wells of sulfur gas reservoirs, Shao [26] presented a semi analytical coupled reservoir/wellbore model, which can be used to predict the production and inflow profile along the horizontal well in sour-gas reservoirs.Liu [27] established a model for calculating bottomhole pressure suitable for sour-gas wells.This model has high accuracy in predicting bottomhole pressure, but it is only applicable to vertical wells and cannot calculate the amount of sulfur deposition in the wellbore.
In conclusion, the existing research is mainly aimed at the mathematical models of sulfur deposition and the productivity equations of the sour-gas well, but the numerical simulation methods that can be used to simulate the comprehensive situation of sulfur deposition in gas wells with different well types have not been formed.In this study, a prediction model of wellbore sulfur deposition considering different well trajectory types was established.By coupling the prediction model with the wellbore pressure model and unsteady temperature model, the numerical simulation method of sulfur deposition in high-sulfur gas wells was obtained.The model was solved by numerical approximation and iterative methods, and it was verified by a typical high-sulfur gas well.The influence of different factors on sulfur deposition in gas wells was analyzed, and the corresponding prevention, control, and treatment measures of sulfur deposition were put forward.This method has the characteristics of high precision and wide application range and can effectively and accurately predict the sulfur precipitation and deposition in wellbore.The results of this paper are helpful to guide the efficient and safe development of sourgas wells.

Model Assumption
The following assumptions were made for this study: (a) When the gas production flow velocity in the wellbore is greater than the critical sulfur carrying velocity, the precipitated sulfur does not deposit.(b) When the gas production flow velocity is less than the critical sulfur-carrying velocity, the precipitated liquid sulfur will fall to the bottom of the well, and the precipitated solid sulfur will adhere to the wellbore to form sulfur scale deposition.(c) The influence of differential pressure force, additional mass force, Bassett force, and Magnus force is ignored.(d) The liquid sulfur droplets are ellipsoid and solid sulfur particles are spheroids in the wellbore, and their morphology does not change during movement.(e) The flow in wellbore is one-dimensional, stable, and linear.

Sulfur Solubility
According to the thermodynamic empirical model proposed by J. Chrastil [3], the formula for calculating sulfur solubility is: Based on the experimental data, Roberts [4] fitted the Chrastil model and obtained empirical correlation with constant coefficients: With the decrease of temperature and pressure, sulfur solubility will decrease.When the instantaneous sulfur solubility, C s , is less than the initial sulfur solubility, C o , the sulfur will be precipitated from the gas.The formula for calculating the amount of sulfur precipitation is: According to the results of the previous studies on the phase state of sulfur, this paper considers that when the temperature is greater than 393 K, the precipitated sulfur is liquid, and when the temperature is less than 393 K, the precipitated sulfur is solid.

Critical Liquid Sulfur Carrying Velocity
After the liquid sulfur is precipitated, it is mainly affected by gravity, G, buoyancy, F f , and drag, F D , as well as friction, f, and support force, F N , of the inner wall of the wellbore, as shown in Figure 1.

Critical Liquid Sulfur Carrying Velocity
After the liquid sulfur is precipitated, it is mainly affected by gravity, G, buoyancy, Ff, and drag, FD, as well as friction, f, and support force, FN, of the inner wall of the wellbore, as shown in Figure 1.The expression of each force can be found in literature [1] and Equations ( 4) and ( 5).

(
) When the resultant force on the liquid sulfur is 0, the following equation can be obtained: ( ) Substituting Equations ( 4) and ( 5) into Equation ( 6): Then the formula for calculating critical carrying velocity of liquid sulfur can be obtained: According to Li's model [28], liquid sulfur droplets in wellbore are ellipsoid, and the volume calculation formula is: The critical carrying velocity should be the gas production flow velocity at which the largest diameter of the droplet in the wellbore can still be taken out of the wellhead.Therefore, the maximum diameter of the droplet is the droplet height, and the droplet height can be calculated by: The expression of each force can be found in literature [1] and Equations ( 4) and (5).
When the resultant force on the liquid sulfur is 0, the following equation can be obtained: Substituting Equations ( 4) and ( 5) into Equation (6): Then the formula for calculating critical carrying velocity of liquid sulfur can be obtained: According to Li's model [28], liquid sulfur droplets in wellbore are ellipsoid, and the volume calculation formula is: The critical carrying velocity should be the gas production flow velocity at which the largest diameter of the droplet in the wellbore can still be taken out of the wellhead.Therefore, the maximum diameter of the droplet is the droplet height, and the droplet height can be calculated by: Substituting Equations ( 9) and (10) into Equation (8): Processes 2022, 10, 1743 The critical Weber number of droplets in the gas flow is 20~30, and the effective inflow area of ellipsoid droplets is close to 100%.Therefore, take N we = 30, C D = 1 and substitute into Equation (11):

Critical Solid Sulfur Carrying Velocity
According to the experimental study on the cutting behavior in the wellbore, solid sulfur particles will form rolling motions when the wellbore inclination angle α is high, as shown in Figure 2.
Substituting Equations ( 9) and (10) The critical Weber number of droplets in the gas flow is 20~30, and the effective inflow area of ellipsoid droplets is close to 100%.Therefore, take Nwe = 30, CD = 1 and substitute into Equation ( 11

Critical Solid Sulfur Carrying Velocity
According to the experimental study on the cutting behavior in the wellbore, solid sulfur particles will form rolling motions when the wellbore inclination angle α is high, as shown in Figure 2.
Substituting Equations ( 4) and (5) into Equation ( 13): ( ) The volume calculation formula of solid sulfur particles is: The stressed area of drag force is: Establish the torque equilibrium equation: Substituting Equations ( 4) and (5) into Equation (13): The volume calculation formula of solid sulfur particles is: The stressed area of drag force is: Substituting Equations (15) and ( 16) into Equation ( 14): When the inclination angle is low, solid sulfur particles are suspended in gas and move towards the wellhead.Thus, the influence of solid sulfur particles on wellbore friction and support force can be neglected, and the torque balance equation is: Then the critical carrying velocity is: Substituting Equations ( 15) and ( 16) into Equation ( 19): According to the experimental results of Ford [29], the critical suspension velocity is roughly the same as the critical roll velocity when the inclination angle is 40~60 • .Considering the continuity of the relationship between the solid-sulfur-carrying velocity and the inclination angle, the paper deems that when the wellbore inclination angle is less than 45 • , the solid sulfur particles mainly move to the wellhead by suspension, and when the inclination angle is greater than 45 • , the solid sulfur particles mainly move to the wellhead by rolling.Therefore, the calculation formula of critical solid-sulfur-carrying velocity is: Within this equation, the drag coefficient, C D , adopts the multi-gene GP model established by Barati [30]: Re is the Reynolds number, and its expression is:

Diffusion Deposition Model of Sulfur
When solid sulfur is precipitated and the gas flow velocity in wellbore is less than the critical sulfur-carrying velocity, sulfur will migrate to the pipe wall and then attach and deposit on the pipe wall.The mass transfer flux is expressed as: Within this equation:

Wellbore Pressure Model
Divide the wellbore into N sections of equal depth (i = 1, 2, 3, . . ., N).The pressure drop of the section is shown in Figure 3.The external force on the section is equal to the change in momentum of the fluid in the section: The external forces on the section mainly include the gravity, FG, friction, Fτ, and the external forces generated by the pressure difference.The expressions of each force are: According to the law of conservation of mass: The external force on the section is equal to the change in momentum of the fluid in the section: The external forces on the section mainly include the gravity, F G , friction, Fτ, and the external forces generated by the pressure difference.The expressions of each force are: Combining Equations ( 26)-( 30), the pressure drop of wellbore section is: Within this equation: The heat transfer of the section is shown in Figure 4.According to the law of conservation of energy: According to the basic theory of thermodynamics: According to the definition of specific heat of mixed fluid and Joule Thomson coefficient: Substituting Equations ( 33)-(35) into Equation ( 32): According to the transient heat transfer differential equation of wellbore and formation, the thermal conductivity differential equation of wellbore and formation is: According to the law of conservation of energy: According to the basic theory of thermodynamics: According to the definition of specific heat of mixed fluid and Joule Thomson coefficient: Substituting Equations ( 33)-(35) into Equation (32): Processes 2022, 10, 1743 According to the transient heat transfer differential equation of wellbore and formation, the thermal conductivity differential equation of wellbore and formation is: Within this equation: According to the Fourier's theorem: Considering the initial conditions, the temperature at any location of the wellbore is the initial formation temperature, and the formation temperature at infinity is the initial formation temperature.After dimensionless processing, the following results can be obtained: After Laplace transform, Bessel equation solution, and Stefest numerical inversion, Equation (40) can be obtained as: The dimensionless time function is [31,32]: Within this equation: Substituting Equation (40) into Equation (36): Within this equation, considering the influence of sulfur deposition, the total wellbore heat transfer coefficient is: Consider Equation (42) as an ordinary differential equation: Within this equation: The initial value of wellbore temperature distribution is equal to the formation temperature: Given the bottom hole temperature condition, Equation ( 43) can be used to calculate the inlet and outlet temperature of each section.

Numerical Simulation of Sulfur Deposition in Sour-Gas Well 4.1. Model Solution
It is shown that some parameters interacted with each other in the wellbore pressure model and unsteady temperature model.Considering the influence of sulfur precipitation and deposition, the fluid physical properties and wellbore inner diameter will also change with time.In this paper, the sulfur deposition prediction model is coupled with the wellbore pressure and temperature model through numerical approximation, and the numerical simulation of sulfur deposition in the sour-gas well is carried out.The coupling solution steps are as follows: (a) Divide the wellbore into several sections according to the wellbore trajectory, and input data, such as section length and deviation angle for each unit.(b) Input initial physical parameters.(c) Calculate the initial value of wellbore temperature distribution, T ini , by Equation (44).
The initial value of wellbore pressure distribution, p ini , can be obtained linearly from the initial bottomhole pressure to wellhead pressure.(d) Calculate the pressure of each section from the wellhead as the inlet end to obtain the wellbore pressure distribution, p cal .The specific calculation process is: a Calculate the sulfur solubility of the section i by Equation (2) to determine whether the sulfur is precipitated.If so (C s > C o ), determine whether the sulfur is deposited on the pipe wall according to the temperature conditions and gas flow velocity.If so (T > 119 • C and v gcr > v m ), calculate the thickness of sulfur deposition and the wellbore diameter of the section i by Equations ( 24) and ( 25  The specific coupling solution process is shown in Figure 5.The specific coupling solution process is shown in Figure 5.

Model Validation
For model validation, a typical high-sulfur content gas well (vertical well, located in Canada) was studied.The basic gas-well parameters and produced natural-gas parameters are shown in Table 1.The calculation results of wellhead temperature, bottomhole pressure, and sulfur deposition location are shown in Table 2.The calculated value is close to the measured value, and the relative errors are all less than 5%, indicating that the model in this paper has high accuracy.
The critical carrying velocity model in this paper was used to calculate the critical sulfur-carrying velocity at different well angles, and the basic parameters are shown in Table 3.It can be seen from Figure 6 that the calculation results and the experimental results of Ford [29] have the same change law.Because fluids and particle sizes used in the experiments and calculation model are different, there are some differences in the specific shape of these curves and values.The analysis of the relationship between critical sulfur-carrying velocity and well bore inclination angle shows that the critical sulfur-carrying velocity first increases and then decreases with the increase of inclination angle, and the maximum critical sulfur carrying velocity is about 30% lager than that in the vertical well section.Additionally, the critical sulfur-carrying velocity of the horizontal section is also slightly larger than that o the vertical section.Therefore, compared with the vertical wells, the gas production rate of the horizontal and deviated wells needs to be appropriately increased to ensure tha  The analysis of the relationship between critical sulfur-carrying velocity and wellbore inclination angle shows that the critical sulfur-carrying velocity first increases and then decreases with the increase of inclination angle, and the maximum critical sulfur-carrying velocity is about 30% lager than that in the vertical well section.Additionally, the critical sulfur-carrying velocity of the horizontal section is also slightly larger than that of the vertical section.Therefore, compared with the vertical wells, the gas production rate of the horizontal and deviated wells needs to be appropriately increased to ensure that the gas production flow velocity in the wellbore exceeds the critical sulfur-carrying velocity to avoid sulfur deposition.

Model Application
The sulfur depositions in four sour-gas wells located in a sour-gas reservoir in Sichuan Basin, China are simulated using the proposed methodology in this section.The basic gas-well parameters are shown in Table 4.The produced natural-gas parameters are shown in Table 5.And the calculation results are shown in Table 6.The calculation accuracy of the proposed model is high.The maximum relative error of calculating wellhead temperature and bottomhole pressure is 7.25%, and the average error is 3.61%.The proposed model is used to predict sulfur precipitation and deposition in the above four wells, and the results are shown in Figure 7 The calculation accuracy of the proposed model is high.The maximum relative error of calculating wellhead temperature and bottomhole pressure is 7.25%, and the average error is 3.61%.The proposed model is used to predict sulfur precipitation and deposition in the above four wells, and the results are shown in Figure 7.As can be seen from Figure 7, the gas production flow velocities in Well A and Well C were greater than the critical sulfur-carrying velocities; thus, no sulfur depositions occur in Well A and Well C. The gas production flow velocities in Well B and Well D were lower than the critical sulfur-carrying velocities when the well depths exceed 4700 m and 6330 m, respectively.However, the sulfur solubility of these sections was higher than the initial sulfur solubility, and there is no sulfur precipitated; therefore, there is no sulfur deposition occurring in Well B and Well D either.However, sulfur precipitated in the middle and upper parts of the wellbore of each well, and sulfur may be deposited during the gathering and transportation process after the wellhead.It is necessary to take measures, such as sulfur solvent mixed injection and regular pigging, to prevent sulfur deposition from affecting production in the gathering and transportation process.As can be seen from Figure 7, the gas production flow velocities in Well A and Well C were greater than the critical sulfur-carrying velocities; thus, no sulfur depositions occur in Well A and Well C. The gas production flow velocities in Well B and Well D were lower than the critical sulfur-carrying velocities when the well depths exceed 4700 m and 6330 m, respectively.However, the sulfur solubility of these sections was higher than the initial sulfur solubility, and there is no sulfur precipitated; therefore, there is no sulfur deposition occurring in Well B and Well D either.However, sulfur precipitated in the middle and upper parts of the wellbore of each well, and sulfur may be deposited during the gathering and transportation process after the wellhead.It is necessary to take measures, such as sulfur solvent mixed injection and regular pigging, to prevent sulfur deposition from affecting production in the gathering and transportation process.

Production Time
Assuming the production system remains unchanged, with the increase of production time, the sulfur solubility is basically unchanged, while the sulfur scale thickness increases monotonically.It is shown in Figure 8 that the sulfur scale thickness dose not decrease with the increase of well depth but increases first and then decreases.The reason is that within a certain pressure interval, gas viscosity does not monotonously increase or decrease with temperature but decreases first and then increases (as shown in Figure 9), which leads to changes in fluid flow parameters, thus resulting in a maximum sulfur precipitation rate and sulfur scale thickness.When the sulfur scale thickness is too large, sulfur plugging will form, and the productivity of the gas well will be seriously affected.Therefore, the production system should be dynamically adjusted to change the wellbore temperature and pressure distribution so that the sulfur scale can be evenly distributed along the wellbore.Alternatively, the proposed model can be adopted to predict the sulfur deposition location and carry out regular preventive cleaning in the production process to effectively avoid the occurrence of sulfur plugging in the wellbore.
crease with the increase of well depth but increases first and then decreases.The reason is that within a certain pressure interval, gas viscosity does not monotonously increase or decrease with temperature but decreases first and then increases (as shown in Figure 9), which leads to changes in fluid flow parameters, thus resulting in a maximum sulfur precipitation rate and sulfur scale thickness.When the sulfur scale thickness is too large, sulfur plugging will form, and the productivity of the gas well will be seriously affected.Therefore, the production system should be dynamically adjusted to change the wellbore temperature and pressure distribution so that the sulfur scale can be evenly distributed along the wellbore.Alternatively, the proposed model can be adopted to predict the sulfur deposition location and carry out regular preventive cleaning in the production process to effectively avoid the occurrence of sulfur plugging in the wellbore.creases monotonically.It is shown in Figure 8 that the sulfur scale thickness dose not de-crease with the increase of well depth but increases first and then decreases.The reason is that within a certain pressure interval, gas viscosity does not monotonously increase or decrease with temperature but decreases first and then increases (as shown in Figure 9), which leads to changes in fluid flow parameters, thus resulting in a maximum sulfur precipitation rate and sulfur scale thickness.When the sulfur scale thickness is too large, sulfur plugging will form, and the productivity of the gas well will be seriously affected.Therefore, the production system should be dynamically adjusted to change the wellbore temperature and pressure distribution so that the sulfur scale can be evenly distributed along the wellbore.Alternatively, the proposed model can be adopted to predict the sulfur deposition location and carry out regular preventive cleaning in the production process to effectively avoid the occurrence of sulfur plugging in the wellbore.

Gas Production Rate
Figure 10 shows that under the same production time, increasing the gas production rate led to a larger sulfur solubility and sulfur scale thickness, and the sulfur deposition location moves closer to the wellhead.However, under the same gas production quantity, the larger the production rate, the smaller the sulfur scale thickness.In addition, when the gas production flow velocity exceeds the critical sulfur-carrying velocity, sulfur deposition is no longer generated in the wellbore.This is because the increased gas production rate increases the temperature, which increases the sulfur solubility and sulfur-carrying capacity of the produced natural gas.Therefore, the gas production rate should be greater than the critical sulfur-carrying velocity as far as possible to reduce sulfur deposition in the wellbore.
gas production flow velocity exceeds the critical sulfur-carrying velocity, sulfur deposition is no longer generated in the wellbore.This is because the increased gas production rate increases the temperature, which increases the sulfur solubility and sulfur-carrying capacity of the produced natural gas.Therefore, the gas production rate should be greater than the critical sulfur-carrying velocity as far as possible to reduce sulfur deposition in the wellbore.

Wellbore Pressure
From Figure 11, it was observed that with decreasing wellbore pressure, the sulfur solubility decreased, sulfur scale thickness increased, and the sulfur deposition location moves closer to the bottomhole.When the wellbore pressure decreased to less than 50% of the original wellbore pressure, the sulfur deposition rate increases exponentially.This means that with the development of the sour-gas well, the occurrence of wellbore sulfur

Wellbore Pressure
From Figure 11, it was observed that with decreasing wellbore pressure, the sulfur solubility decreased, sulfur scale thickness increased, and the sulfur deposition location moves closer to the bottomhole.When the wellbore pressure decreased to less than 50% of the original wellbore pressure, the sulfur deposition rate increases exponentially.This means that with the development of the sour-gas well, the occurrence of wellbore sulfur deposition will gradually extend from the wellhead to the bottomhole, the occurrence of sulfur deposition will become more serious, and the probability of wellbore sulfur plugging will be higher.Therefore, it is suggested to closely implement wellbore pre-cleaning and other technical measures to prevent sulfur deposition and to pay attention to observing and analyzing the production dynamic data in the middle and late stages of gas well production.When sulfur plugging occurs, timely adopt the corresponding sulfur-plugging relief measures to ensure the normal production of gas wells.sulfur deposition will become more serious, and the probability of wellbore sulfur plugging will be higher.Therefore, it is suggested to closely implement wellbore pre-cleaning and other technical measures to prevent sulfur deposition and to pay attention to observing and analyzing the production dynamic data in the middle and late stages of gas well production.When sulfur plugging occurs, timely adopt the corresponding sulfur-plugging relief measures to ensure the normal production of gas wells.

H2S Content
In the middle and late stages of sour-gas well production, the H2S content will continue to increase, which will change the density, viscosity, and sulfur solubility of the produced natural gas in the wellbore.The impact of H2S content on sulfur deposition in wellbore shows that with the increases of H2S content, the sulfur solubility increased, deposition rate decreased, and the sulfur deposition location is closer to the wellhead.It relieves the occurrence of sulfur deposition in the middle and late stages of gas well production to a certain extent.However, the increases of H2S content will inevitably bring more serious corrosion to equipment and pipelines, and the natural gas purification process will also have a burden.It is necessary to pay attention to the possible harm and safety risks of these problems.

Well Trajectory
Three well trajectory types are simulated in this section: vertical well, horizontal well, and deviated well.The basic well trajectory parameters are shown in Table 7.And the simulation results are shown in Figure 12.

H 2 S Content
In the middle and late stages of sour-gas well production, the H 2 S content will continue to increase, which will change the density, viscosity, and sulfur solubility of the produced natural gas in the wellbore.The impact of H 2 S content on sulfur deposition in wellbore shows that with the increases of H 2 S content, the sulfur solubility increased, deposition rate decreased, and the sulfur deposition location is closer to the wellhead.It relieves the occurrence of sulfur deposition in the middle and late stages of gas well production to a certain extent.However, the increases of H 2 S content will inevitably bring more serious corrosion to equipment and pipelines, and the natural gas purification process will also have a burden.It is necessary to pay attention to the possible harm and safety risks of these problems.

Well Trajectory
Three well trajectory types are simulated in this section: vertical well, horizontal well, and deviated well.The basic well trajectory parameters are shown in Table 7.And the simulation results are shown in Figure 12.From Figure 13a,b, it was observed that the temperature comparison of each well trajectory type is horizontal well > deviated well > vertical well, the bottom hole pressure comparison is horizontal well < deviated well < vertical well, and the difference is mainly reflected in the build-up section.This is because with the increase of wellbore inclination angle, the actual vertical depth of the build-up section decreases, the heat conduction and emission of the wellbore to the formation decreases, and the pressure drop of fluid due to gravity and kinetic energy decreases.It can be seen from Figure 13c,d that with the increase of well inclination angle, the sulfur precipitation location is closer to the wellhead,  From Figure 13a,b, it was observed that the temperature comparison of each well trajectory type is horizontal well > deviated well > vertical well, the bottom hole pressure comparison is horizontal well < deviated well < vertical well, and the difference is mainly reflected in the build-up section.This is because with the increase of wellbore inclination angle, the actual vertical depth of the build-up section decreases, the heat conduction and emission of the wellbore to the formation decreases, and the pressure drop of fluid due to gravity and kinetic energy decreases.It can be seen from Figure 13c,d that with the increase of well inclination angle, the sulfur precipitation location is closer to the wellhead, and the sulfur scale thickness is smaller.Combined with Figure 13a,b, it is shown that temperature has a greater effect on sulfur deposition than pressure.Since the gas well productivity of horizontal wells and deviated wells is often greater than that of vertical wells, it is suggested that horizontal wells or highly deviated wells should be selected as the production well types.In addition, heating and insulation measures can be taken for the wellbore to reduce the occurrence of sulfur deposition.From Figure 13a,b, it was observed that the temperature comparison of each well trajectory type is horizontal well > deviated well > vertical well, the bottom hole pressure comparison is horizontal well < deviated well < vertical well, and the difference is mainly reflected in the build-up section.This is because with the increase of wellbore inclination angle, the actual vertical depth of the build-up section decreases, the heat conduction and emission of the wellbore to the formation decreases, and the pressure drop of fluid due to gravity and kinetic energy decreases.It can be seen from Figure 13c,d that with the increase of well inclination angle, the sulfur precipitation location is closer to the wellhead, and the sulfur scale thickness is smaller.Combined with Figure 13a,b, it is shown that temperature has a greater effect on sulfur deposition than pressure.Since the gas well productivity of horizontal wells and deviated wells is often greater than that of vertical wells, it is suggested that horizontal wells or highly deviated wells should be selected as the production well types.In addition, heating and insulation measures can be taken for the wellbore to reduce the occurrence of sulfur deposition.

Conclusions
In this study, a numerical simulation procedure of sulfur deposition in the sour-gas well is proposed.The following conclusions are obtained: (a) The wellbore sulfur deposition prediction model, pressure model, and transient tem-

Conclusions
In this study, a numerical simulation procedure of sulfur deposition in the sour-gas well is proposed.The following conclusions are obtained: (a) The wellbore sulfur deposition prediction model, pressure model, and transient temperature model considering the influence of different wellbore inclination angles were established.By coupling these models, the numerical simulation of sulfur deposition in the high-sulfur gas well was carried out.The average error between the calculated value and the measured value is 3.61%, indicating that the model has good calculation accuracy and engineering application value.(b) The proposed methodology was used to simulate four sour-gas wells in China, and the results show that sulfur deposition are not formed in these wells, but elemental sulfur is precipitated.The influence of wellbore inclination angle on critical sulfurcarrying velocity is analyzed, and the results show that the critical sulfur-carrying velocity increases first and then decreases with the increase of inclination angle, and the maximum critical sulfur-carrying velocity is about 20% larger than that of the vertical well section.(c) The effects of production time, gas production rate, wellbore pressure, H 2 S content, and well trajectory on wellbore sulfur deposition were analyzed.The results show that the wellbore sulfur deposition increases with the increase of production time and the decrease of wellbore pressure and decreases with the increase of gas production rate, H 2 S content, and inclination angle.Additionally, when gas production flow velocity exceeds the critical sulfur-carrying velocity, sulfur deposition will not occur in the wellbore.(d) The technological measures to control sulfur deposition and prevent sulfur plugging of wellbore were presented.a. Adjust production systems dynamically to avoid gas wells under the same production system for too long.b.Use a pre-cleaning process where sulfur plugging may occur.c.Keep the gas production flow velocity greater than the critical sulfur-carrying velocity as far as possible.d.In the middle and late stages of gas well production, the production dynamics should be observed carefully and the technical measures to prevent sulfur deposition in wellbore should be implemented closely.e. Use the well type with large inclination angle for production.
In addition, heat and insulation measures should be applied to the wellbore.

Figure 1 .
Figure 1.Stress analysis of liquid sulfur droplet in wellbore.

Figure 1 .
Figure 1.Stress analysis of liquid sulfur droplet in wellbore.

Figure 2 .
Figure 2. Stress analysis of solid sulfur particle in wellbore.Establish the torque equilibrium equation:

Figure 2 .
Figure 2. Stress analysis of solid sulfur particle in wellbore.

3 .
of sulfur deposition, the sulfur scale thickness increases and the wellbore diameter decreases, and its change equation is: Wellbore Pressure Model and Transient Temperature Model 3.1.Model Assumption The following assumptions were made: (a) The fluid in the wellbore is a one-dimensional steady flow.(b) The change of physical property parameters, such as density during fluid flow, is considered.(c) Changes in wellbore diameter (except those due to sulfur deposition) are not considered, i.e., energy loss due to wellbore diameter change is not considered.(d) Formation temperature remains constant.(e) The effect of sulfur deposition on temperature distribution is considered in the wellbore transient temperature model.(f) The initial value of wellbore temperature distribution is given by the original formation temperature and geothermal gradient.

Figure 3 .
Figure 3. Schematic diagram of section pressure drop.According to the law of conservation of mass: ( ) d 0 d vA z ρ

Figure 3 .
Figure 3. Schematic diagram of section pressure drop.

Figure 4 .
Figure 4. Schematic diagram of section heat transfer.

Figure 4 .
Figure 4. Schematic diagram of section heat transfer.
c.Assign T i,out to T i+1 .Repeat steps a~c to get the wellbore temperature distribution, T cal .(f)Compare the initial values, T ini and p ini , with the calculated values, T cal and p cal .If the error is greater than the allowable error, δ, assign T cal and p cal to T ini and p ini , and repeat steps (d)~(f) until the required accuracy is reached.(g) Assign T cal and p cal on day t to T ini and p ini on day t + 1, and repeat steps (d)~(g) to get wellbore pressure and temperature distribution in different production times.

Processes 2022 ,
10, x FOR PEER REVIEW 12 of 23 (f) Compare the initial values, Tini and pini, with the calculated values, Tcal and pcal.If the error is greater than the allowable error, δ, assign Tcal and pcal to Tini and pini, and repeat steps (d)~(f) until the required accuracy is reached.(g) Assign Tcal and pcal on day t to Tini and pini on day t + 1, and repeat steps (d)~(g) to get wellbore pressure and temperature distribution in different production times.

Figure 5 .
Figure 5. Flow chart of coupling solution.

Figure 5 .
Figure 5. Flow chart of coupling solution.

Figure 6 .
Figure 6.Relationship between critical sulfur-carrying velocity and inclination angle.

Figure 6 .
Figure 6.Relationship between critical sulfur-carrying velocity and inclination angle.

Figure 7 .
Figure 7. Predicted results with: (a) wellbore temperature distribution; (b) critical sulfur-carrying velocity versus gas production flow velocity; (c) sulfur solubility distribution along the wellbore.

Figure 7 .
Figure 7. Predicted results with: (a) wellbore temperature distribution; (b) critical sulfur-carrying velocity versus gas production flow velocity; (c) sulfur solubility distribution along the wellbore.

Figure 8 .
Figure 8. Calculated results with: (a) sulfur solubility distribution at different production times; (b) sulfur scale thickness distribution at different production times.

Figure 9 .
Figure 9. Gas viscosity under different temperatures and pressures.

Figure 8 .
Figure 8. Calculated results with: (a) sulfur solubility distribution at different production times; (b) sulfur scale thickness distribution at different production times.

Figure 8 .
Figure 8. Calculated results with: (a) sulfur solubility distribution at different production times; (b) sulfur scale thickness distribution at different production times.

Figure 9 .
Figure 9. Gas viscosity under different temperatures and pressures.Figure 9. Gas viscosity under different temperatures and pressures.

Figure 9 .
Figure 9. Gas viscosity under different temperatures and pressures.Figure 9. Gas viscosity under different temperatures and pressures.

Figure 10 .
Figure 10.Calculated results with: (a) sulfur solubility distribution at different gas production rates (at same production time); (b) sulfur scale thickness distribution at different gas production rates (at same production time); (c) sulfur solubility distribution at different gas production rates (at same gas production quantity); (d) sulfur scale thickness distribution at different gas production rates (at same gas production quantity).

Figure 10 .
Figure 10.Calculated results with: (a) sulfur solubility distribution at different gas production rates (at same production time); (b) sulfur scale thickness distribution at different gas production rates (at same production time); (c) sulfur solubility distribution at different gas production rates (at same gas production quantity); (d) sulfur scale thickness distribution at different gas production rates (at same gas production quantity).

Figure 11 .
Figure 11.Calculated results with: (a) sulfur solubility distribution at different wellbore pressure; (b) sulfur scale thickness distribution at different wellbore pressure.

Table 7 .Figure 11 .
Figure 11.Calculated results with: (a) sulfur solubility distribution at different wellbore pressure; (b) sulfur scale thickness distribution at different wellbore pressure.

Figure 12 .
Figure 12.Calculated results with: (a) sulfur solubility distribution at different H2S content; (b) sulfur scale thickness distribution at different H2S content.

Figure 12 .
Figure 12.Calculated results with: (a) sulfur solubility distribution at different H 2 S content; (b) sulfur scale thickness distribution at different H 2 S content.

Figure 12 .
Figure 12.Calculated results with: (a) sulfur solubility distribution at different H2S content; (b) sulfur scale thickness distribution at different H2S content.

Figure 13 .
Figure 13.Calculated results with: (a) temperature distribution of different well trajectory types; (b) pressure distribution of different well trajectory types; (c) sulfur solubility distribution of different well trajectory types; (d) sulfur scale thickness distribution of different well trajectory types.

Figure 13 .
Figure 13.Calculated results with: (a) temperature distribution of different well trajectory types; (b) pressure distribution of different well trajectory types; (c) sulfur solubility distribution of different well trajectory types; (d) sulfur scale thickness distribution of different well trajectory types.
); b Calculate the fluid physical properties in section i considering sulfur precipitation; c Substitute the fluid physical properties into Equation (31) to calculate the initial value of the outlet pressure, p i,out , in section i; d Since the initial pressure value cannot meet the accuracy requirements, it cannot be determined whether its value is larger or smaller than the actual value.Based on the idea of numerical approximation, assign the average value of p i,in and p i,out to p i,in .Repeat steps a~c to get the revised value of the outlet pressure, p i,out' ; e Compare the initial value, p i,out , and the revised value, p i,out'.If the error is greater than the allowable error, δ, assign p i,out' to p i,out and repeat steps a~e; f If the error is smaller than δ, assign p i,out to p i+1,in and repeat steps a~f to get the wellbore pressure distribution, p cal .
(e) Calculate the temperature of each section from the bottom of the well as the inlet end to obtain the wellbore temperature distribution, T cal .The specific calculation process is: a. Calculate thermal physical parameters of section i; b.Substitute thermal physical parameters and pressure calculated by step (d) into Equation (43) to calculate the outlet temperature, T i,out , in section i;

Table 1 .
Gas-well and produced natural-gas parameters.

Table 2 .
Calculation results of model validation.

Table 3 .
Basic parameters used in critical carrying velocity model.

Table 5 .
Produced natural gas parameters.

Table 6 .
Calculation results of model application.

Table 6 .
. Calculation results of model application.

Table 7 .
Basic well trajectory parameters.
Total wellbore heat transfer coefficient without sulfur scale, W/(m•K) r to Distance of tubing outer wall to wellbore center, m r ti Distance of tubing inner wall to wellbore center, m