Equivalent Circulation Density Analysis of Geothermal Well by Coupling Temperature

The accurate control of the wellbore pressure not only prevents lost circulation/blowout and fracturing formation by managing the density of the drilling fluid, but also improves productivity by mitigating reservoir damage. Calculating the geothermal pressure of a geothermal well by constant parameters would easily bring big errors, as the changes of physical, rheological and thermal properties of drilling fluids with temperature are neglected. This paper researched the wellbore pressure coupling by calculating the temperature distribution with the existing model, fitting the rule of density of the drilling fluid with the temperature and establishing mathematical models to simulate the wellbore pressures, which are expressed as the variation of Equivalent Circulating Density (ECD) under different conditions. With this method, the temperature and ECDs in the wellbore of the first medium-deep geothermal well, ZK212 Yangyi Geothermal Field in Tibet, were determined, and the sensitivity analysis was simulated by assumed parameters, i.e., the circulating time, flow rate, geothermal gradient, diameters of the wellbore, rheological models and regimes. The results indicated that the geothermal gradient and flow rate were the most influential parameters on the temperature and ECD distribution, and additives added in the drilling fluid should be added carefully as they change the properties of the drilling fluid and induce the redistribution of temperature. To ensure the safe drilling and velocity of pipes tripping into the hole, the depth and diameter of the wellbore are considered to control the surge pressure.


Introduction
Proper wellbore pressure is the key to ensuring the drilling success.When complex geological areas with multi-pressure systems need to be drilled, one of the severe challenges associated with drilling is to avoid drilling accidents, such as loss of circulation, blowout, or even collapse [1].Hydrothermal resources are buried in a tough but fractured formation, and the reservoir depth is shallow, which causes the deep formation pressure to be relatively low and the shallow formation pressure gradient to vary fiercely as well as being hard to control, thus drilling accidents are prone to occur [2].To ensure safe drilling, the principal is to keep the annular pressure, which is usually expressed as the equivalent density, within the range of formation pore pressure and fracture pressure, i.e., p f < p a < p frac .The annular pressures, such as static pressure, circulation pressure, initiating circulation pressure, viscous pressure and inertial pressure, are regulated through modifying drilling fluid systems, the operation procedure, and back pressure, at any point in the annulus for various well conditions [3].The temperature at the bottom hole is much higher than the wellhead of the geothermal well; this temperature influences the density and properties of the drilling fluid, thus cannot be neglected.The calculated equivalent circulation density (ECD) with surface measured parameters will receive the improper result which raises the risk of lost circulation/blowout.The variation of the drilling fluid parameters with temperature will affect the pressure balance at the bottom hole, so wellbore temperature, drilling fluid density and rheology should be involved when building the wellbore pressure model of high temperature geothermal wells.Fluctuation pressure (surge and swag pressure) generated by a downward or upward pipe movement or running casing poses a great threat for safe drilling and induces lost circulation, kick and borehole collapse; the parameters that can control the fluctuation pressure are another problem to be studied.
Ansari [4] and Sylvester built a model to calculate a deliverability curve, pressure gradient and flux rate by Geoflow; the discontinuous pressure gradient and deliverability curve could be obtained by the Ansari Model, while the Drift Flux Model could achieve suitable results for geothermal wells [5].Li [6] established the formation fracture pressure model with consideration of thermal stress subjected to heat transfer in the high temperature geothermal well.Zhong [7] discovered the formation pore pressure in the high pressure and high temperature wellbore was not equal to the initial formation pressure, and varied with time because of the temperature influence.Fan [8] built a static model of the fluctuation pressure caused by the viscosity of laminar Bingham fluid.Tao [9] calculated the fluctuation pressure in high temperature and high pressure wells by the static method.Fu [10] simulated fluctuation pressure and analyzed the related parameters that impacted on the fluctuation pressure.
The research of drilling fluid properties is mainly focused on the oil well.As property per content in the drilling fluid performs different features with a variety of temperatures and pressures, the properties of each drilling fluid are different.McMordie [11] logged the density of water-based and oil-based drilling fluid under the conditions of 70-400 • F and 0-14,000 psig.Hoberock [12] provided the density prediction model of water-based and oil-based drilling fluid based on the mass balance.Harris [13] simulated the distribution of wellbore temperature and pressure by a Crank-Nicolson difference scheme and established the density model of Bingham fluid based on the pressure and temperature functions.Wang [14] built the calculus model of drilling fluid equivalent static density (ESD) in the high temperature and high pressure wells under conditions of formation temperature gradient, while water-based and oil-based drilling fluid were not distinguished.
It is important to describe the wellbore temperature distribution exactly for estimating the bottom hole pressure and fast drilling.Ramey [15] built the model of heat transfer in the wellbore and formation; while the model is suitable for the stable heat transfer, it cannot be applied to transient heat exchange.Sagar [16] expanded the Ramey Model into a multiphase flow system which has weighed the kinetic energy variation and Joule-Thompson effect.Willhite [17] deduced the thermal resistance between wellbore and near wellbore formation in detail and provided the expression of the total heat transfer coefficient.Hasan and Kabir [18] established a one-dimension pseudo-steady state model which calculated the analytic solution and built a two-phase rheological model of a geothermal well which considered heat loss caused by pressure drop and thermal resistance.Raymond [19] researched a numerical method to predict the wellbore temperature at stable state and quasi stability.Yang [20] gave a mathematical model of wellbore temperature and formation temperature under lost circulation.
This paper initially predicted the temperature distribution in the wellbore during the drilling, then fitted the density of the drilling fluid with the temperature, built the models of annulus pressure under different drilling conditions, and finally obtained the accurate ECD in the annulus and surge pressure using the corrected density of the drilling fluid.The parameters, such as time, flow rate, diameter of the wellbore, etc., in the wellbore which may influence the wellbore pressure were analyzed.

Temperature Model of Wellbore
As shown in Figure 1, the drilling fluid flows into the pipes and then enters the annulus.The heat transfer process occurs among the drilling fluid, pipe, casing and formation which is constantly in circulation because of the temperature difference.The stable temperature distribution will be established after a period of circulation time.

Temperature Model of Wellbore
As shown in Figure 1, the drilling fluid flows into the pipes and then enters the annulus.The heat transfer process occurs among the drilling fluid, pipe, casing and formation which is constantly in circulation because of the temperature difference.The stable temperature distribution will be established after a period of circulation time.

Assumed Condition of Model
To simplify the model, some assumed conditions of the model should be given based on the characteristic of actual wellbore heat transfer, which are (1) the axial heat conduction can be neglected compared with the axial heat convection; (2) there is no radial temperature gradient; (3) the formation temperature gradient and circulation rate remain constant; (4) the thermal properties of rock stay the same and do not change with the temperature and pressure; (5) the specific heat and heat conduction of rock perform isotropy; and (6) the temperature generated by pressure drop is neglected.

Mathematical Equations
The formation temperature is related not only to the well diameter, but also to the drilling time.Heat loss will decrease with time as the heat flow in the annulus tends to be stable.The heat transfer flux density between the annulus and formation can be considered as invariant.The equation of heat transfer from wellbore to the surroundings can be simplified to a 1-Dimension diffusivity issue if it only considers a very short section.The formation temperature surrounding the wellbore varies with radius and time can be calculated by the energy balance equation (Equation ( 1)) [21].
where Tf is the formation temperature near the wellbore, °C; is the formation density, kg/m 3 ; is the specific heat capacity of formation, J/(kg•°C); is the thermal conductivity of formation, W/(m•K); r is the radius, m.

Assumed Condition of Model
To simplify the model, some assumed conditions of the model should be given based on the characteristic of actual wellbore heat transfer, which are (1) the axial heat conduction can be neglected compared with the axial heat convection; (2) there is no radial temperature gradient; (3) the formation temperature gradient and circulation rate remain constant; (4) the thermal properties of rock stay the same and do not change with the temperature and pressure; (5) the specific heat and heat conduction of rock perform isotropy; and (6) the temperature generated by pressure drop is neglected.

Mathematical Equations
The formation temperature is related not only to the well diameter, but also to the drilling time.Heat loss will decrease with time as the heat flow in the annulus tends to be stable.The heat transfer flux density between the annulus and formation can be considered as invariant.The equation of heat transfer from wellbore to the surroundings can be simplified to a 1-Dimension diffusivity issue if it only considers a very short section.The formation temperature surrounding the wellbore varies with radius and time can be calculated by the energy balance equation (Equation (1)) [21].
where T f is the formation temperature near the wellbore, • C; ρ f is the formation density, kg/m 3 ; c f is the specific heat capacity of formation, J/(kg = 0 Equation ( 2) can be solved by Laplace transform.When r D = 1, the temperature at the interface of the wellbore and formation is We define dimensionless temperature T D , as The function of T D was used to arrive at the following expression, To construct the easy-to-calculate wellbore temperature field model, a few assumptions should be listed: (1) the Joule-Thompson Effect of fluid in the wellbore is neglected; (2) it is homogeneous for rock in each formation layer, and the borehole diameter does not change with the depth; (3) the influence of frictional heat is neglected; (4) the phase of the fluid in the wellbore does not transform.
The annulus and pipe temperature differential model can be deduced according to the first law of thermodynamics and the basic principle of heat transfer [23].
where T a is the drilling fluid temperature in the annulus, • C; T p is the drilling fluid temperature in the pipe, • C; L is the well depth, m; Q is the drilling fluid flow rate, m 3 /s; T εi is the initial formation temperature, • C; U a is the total convection coefficient between the annulus and formation, W/(m•K); C m is the specific heat of the drilling fluid, W/(m•K); U p is the total convection coefficient between the annulus and the pipe, W/(m•K); ρ m is the drilling fluid density at the depth of L in the well, kg/m 3 .r w is the inner radius of the wellbore, m; r c is the outer radius of the casing, m; r cm is the radius of cement, m; r pi is the inner radius of the pipe, m; r po is the outer radius of the pipe, m. k t is the thermal conductivity of the pipe, W/(m•K); k c is the thermal conductivity of the casing, W/(m•K); k cm is the thermal conductivity of cement, W/(m•K); h a is the convection heat transfer coefficient of the annulus, W/(m 2 •K); h pi is the convection heat transfer coefficient of the inner pipe, W/(m 2 •K); h po is the convection heat transfer coefficient of the outer pipe, W/(m 2 •K).

Initial and Boundary Conditions
The drilling fluid temperature of pipes and the annulus at the wellhead is known, where T in is the inlet temperature of the drilling fluid, • C; T out is the outlet temperature of the drilling fluid, • C. The drilling fluid temperature of the pipe and annulus at the well bottom is equal, where Z is the depth of the bottom hole, m.
Combining Equations ( 5)-( 7) and Equation ( 8), the temperatures in the pipe and annulus can be calculated, where β 1 , β 2 are modeling coefficients; G is the geothermal gradient, • C/100 m; T s is the surface temperature, • C.

Pressure Model in the Wellbore during Circulation
Five types of pressure, which are static pressure, annulus pressure drop, Initiating Circulation Pressure, viscous pressure, and inertial pressure, exist in the wellbore during the drilling.As listed in Table 1, the five types of pressure are not in the wellbore all the time; different pressure combinations appear in different drilling conditions."+" indicates that the pressure is downward; "-" indicates that the pressure is upward.

Pressure Gradient of Circulating Drilling Fluid in the Annulus
The pressure gradient of circulating drilling fluid in the annulus is given as follows [24], where, the three terms of the right equation are hydrostatic pressure gradient, frictional pressure drop gradient and acceleration pressure gradient, respectively, L is length, m.The acceleration pressure gradient is somewhat smaller compared with the other two pressure gradients when the circulation is stable, so the pressure gradient is neglected and Equation ( 10) can be shortened as follows, where ρ m is the drilling fluid density at depth z, kg/m 3 .The static pressure can be expressed as ESD (equivalent static density), where p sz is the static pressure at the bottom, MPa; p 0 is the pressure at the surface, MPa.Oil-based drilling fluid is generally considered that is not suitable for a geothermal well because oil-based drilling fluid may pollute the reservoir and reduce the production of the geothermal well.So, in this paper, water-based drilling fluid is used.A mathematical equation of the procedure of evaluating the density as a function of pressure and temperature is by [25], where, where ρ m is the drilling fluid density under the condition of p and T, kg/m 3 ; ρ m0 is the drilling fluid density measured at the surface, kg/m 3 ; p is the experiment pressure, Pa; p 0 is the atmosphere pressure, MPa; T is the experiment temperature, • C; T 0 is the temperature at the surface, the value is 15 • C; γ p , γ pp , γ T , γ TT and γ pT are coefficients which should be determined, for different drilling fluids, from density measurement at elevated pressures and temperatures.As the effect of pressure on density is insignificant relative to the effect of temperature in the geothermal well, the effect factor to density simply considers temperature, and if we expand Equation ( 11) in a Taylors series, and neglect the pressure terms and all higher order terms, Equation ( 11) can be conversed as follows,

Friction Pressure Loss
The rheological models generally used by drilling engineers to approximate fluid behavior are (1) the Newtonian model, ( 2) the Bingham plastic model, and (3) the power-law model.To determine the flow state of the drilling fluid, the Reynolds number N Re should be calculated as follows, For engineering application, flow of a Newtonian fluid in pipes is usually considered to be laminar if the Reynolds number is less than 2100 and turbulent if the Reynolds numbers is greater than 2100.As shown in Table 2, a different rheological laminar model has a different frictional pressure drop gradient.
The frictional pressure loss expressions for all the three rheological models under turbulent conditions are the same.In the pipes, the frictional pressure loss is shown as follows, The frictional pressure loss in the annular is, where, f is the fanning friction factor; µ is the viscosity of the drilling fluid, mPa•s; is the average flow rate, m/s; τ y is the sheer stress at the yield point, Pa; K is the velocity coefficient; d is the inner diameter of the pipe, m; d 1 is the outer diameter of the pipe, m; d 2 is the inner diameter of the casing, m.
2.2.4.Iterative Method to Solve the Pressure and Temperature Models Suppose the wellbore consists of n overlying cylinder units and each unit's length is ∆z = Z/n.The temperature of the drilling fluid in each unit can be described as follows, Suppose the temperature, pressure and density of the drilling fluid are identical in each element of statics pressure, so the iteration equation of statics pressure is, The boundary conditions are, So the static pressure in the annulus is, The calculation model of ESD is expressed as follows, Combining Equations ( 20) and ( 21), the ECD is shown as follows,

Surge Pressure
Casing running is the first step during cementing, and casing running surge pressure may induce weak formation leakage and cause a downhole problem.According to this problem, the calculation model of casing running surge pressure was established.

Initiating Circulation Pressure
Drilling fluid usually exhibits a thixotropic behavior when the circulation starts.The pressure gradient required to start the circulation can be computed if the gel strength of the drilling fluid is known.Since the shear stress is greatest at the pipe wall, this is where the initial fluid movement will occur.Equating the wall shear stress to the gel strength yields, and where τ g is the gel strength, Pa.
Changing from consistent units to field units and solving for pressure dp f /dL gives and

Inertial Effects
The pressure change in a fluid due to inertial effects can be estimated from consideration of the vertical forces acting on a cube of the fluid at a depth H.As shown in Figure 2, the force is not to be at rest but accelerating in a downward direction.The sum of the downward forces must be equal to the mass of the fluid element multiplied by its acceleration [27].
where γ is the unit weight, N/m 3 .

Inertial Effects
The pressure change in a fluid due to inertial effects can be estimated from consideration of the vertical forces acting on a cube of the fluid at a depth H.As shown in Figure 2, the force is not to be at rest but accelerating in a downward direction.The sum of the downward forces must be equal to the mass of the fluid element multiplied by its acceleration [27].
where γ is the unit weight, N/m 3 .Simplifying the expression above, we can get the expression below,

ΔH
If the magnitude of the pressure gradient due to fluid acceleration is the only pressure of interest, then, For a pipe with a closed end in an incompressible fluid, the relation between fluid acceleration and pipe acceleration is given by, where ap is the tripping acceleration, m/s 2 .Simplifying the expression above, we can get the expression below, If the magnitude of the pressure gradient due to fluid acceleration is the only pressure of interest, then, For a pipe with a closed end in an incompressible fluid, the relation between fluid acceleration and pipe acceleration is given by, where a p is the tripping acceleration, m/s 2 .

Viscous Pressure Due to Vertical Pipe Movement
As the pipe is moved downward in a well, the drilling fluid must move upward to exit the region being entered by the new volume of the extending pipe.Likewise, an upward pipe movement requires a downward fluid movement.The flow pattern of the moving fluid can be either laminar or turbulent depending on the velocity at which the pipe is moved.It is possible to derive mathematical equations for surge and swab pressure only for the laminar flow pattern.Empirical correlations must be used if the flow pattern is turbulent.
A typical velocity profile for laminar flow caused by pulling the pipe out of the hole at velocity, −υ p , is shown in Figure 3.Note that the velocity profile inside the inner pipe caused by a vertical pipe movement is identical to the velocity profile caused by pumping fluid down the inner pipe.If the mean fluid velocity in the pipe is expressed relative to the pipe wall, the viscous pressure in pipes can be expressed as follows, where v i is average rate relative to pipes, m/s.

Viscous Pressure Due to Vertical Pipe Movement
As the pipe is moved downward in a well, the drilling fluid must move upward to exit the region being entered by the new volume of the extending pipe.Likewise, an upward pipe movement requires a downward fluid movement.The flow pattern of the moving fluid can be either laminar or turbulent depending on the velocity at which the pipe is moved.It is possible to derive mathematical equations for surge and swab pressure only for the laminar flow pattern.Empirical correlations must be used if the flow pattern is turbulent.
A typical velocity profile for flow caused by pulling the pipe out of the hole at velocity, −υp, is shown in Figure 3.Note that the velocity profile inside the inner pipe caused by a vertical pipe movement is identical to the velocity profile caused by pumping fluid down the inner pipe.If the mean fluid velocity in the pipe is expressed relative to the pipe wall, the viscous pressure in pipes can be expressed as follows, where ν i is average rate relative to pipes, m/s.The velocity profile in the annulus caused by vertical pipe movement differs from the velocity profile caused by pumping fluid through the annulus in that the velocity at the wall of the inner pipe is not zero [28].The velocity for slot flow is given by, where h is the wide between pipe wall and case wall, m.The constants of integrations, τ0 and υ0, can be evaluated as the boundary conditions ν= − ν p , at y=0 ν=0, at y=h (37) Applying these boundary conditions yields The flow rate q can be described as follow, The expression for laminar flow due to the vertical movement of an open-ended pipe of uniform cross-sectional area in a Newtonian fluid is shown as follows, The velocity profile in the annulus caused by vertical pipe movement differs from the velocity profile caused by pumping fluid through the annulus in that the velocity at the wall of the inner pipe is not zero [28].The velocity for slot flow is given by, where h is the wide between pipe wall and case wall, m.The constants of integrations, τ 0 and υ 0 , can be evaluated as the boundary conditions Applying these boundary conditions yields The flow rate q can be described as follow, The expression for laminar flow due to the vertical movement of an open-ended pipe of uniform cross-sectional area in a Newtonian fluid is shown as follows, where d ci is diameter of pipe, m; d pi is the diameter of inner case, m.The viscous pressure gradient is given, For the non-Newtonian rheological model, the resulting surge pressure equations are far too complex for field application.A simplified technique for computing surge was presented by Burkhardt [29].The simplified method is based on the use of an effective fluid velocity in the annular flow equation.An effective mean annular velocity is given by, where K is the mud clinging constant, of which given by Fontenot [30].
where a is ratio of pipe diameter to hole diameter.

Result and Discussion
The first production well ZK212, which has been drilled to exploit the deep reservoir in 2012 and 2013, is selected as the example.This well was drilled to a depth of 1508 m without any kick or blowout, but some fluid leak-off or loss occurred that was affected by the circulating temperature; the input temperature of the drilling fluid is 25 • C. The temperature of the bottom hole is 235 • C calculated by a SiO 2 geothermometer.The mean temperature gradient is 14 • C/100 m.The thermodynamics properties of materials in the wellbore and formation are listed in Table 1 and the fresh water from the river was used as the drilling fluid.According to the previous study [31], the height of the ZK212 to the zero point was −11.87 m, which means that the pore pressure was lower than the hydrostatic pressure.The density of the water varies with temperature, shown as follows, The ZK212 has a 245 mm string to 600 m.It is completed as an open hole from the 245 mm casing shoe to the bottom.The pump capacity for the drilling fluid is 40 m 3 /h.The Thermodynamics parameters and sizes of each section in the well are shown in Tables 3 and 4 respectively.The wellbore temperature distribution in the ZK212 can be calculated based on the mathematical model and numerical solution.

Temperature and ECD Distribution in the Wellbore
As shown in Figure 4, the formation was heated from the surface to 300 m, then cooled to the bottom.The location of the highest fluid temperature is at a point above the well bottom in the annulus; it is not at the well bottom because of the high formation temperature influence when the fluid rises from the bottom.The wellbore temperature distribution in the ZK212 can be calculated based on the mathematical model and numerical solution.

Temperature and ECD Distribution in the Wellbore
As shown in Figure 4, the formation was heated from the surface to 300 m, then cooled to the bottom.The location of the highest fluid temperature is at a point above the well bottom in the annulus; it is not at the well bottom because of the high formation temperature influence when the fluid rises from the bottom.Figure 5a is the relation curve of the drilling fluid temperature in the annulus and circulation time.It is illustrated that the circulation time has a strong influence on the annular temperature, when other parameters remain constant.As the circulation time grows, the impact on annular temperature wears off and the highest temperature in the annulus moves upward.The change of temperature becomes slow after 8 h circulation.Figure 5b shows that the variations of the ECD with circulation are parallel to the annular temperature.The circulation time only influences the density of the drilling fluid through the temperature.The ECD tends to remain stable with the circulation time.It is illustrated that the circulation time has a strong influence on the annular temperature, when other parameters remain constant.As the circulation time grows, the impact on annular temperature wears off and the highest temperature in the annulus moves upward.The change of temperature becomes slow after 8 h circulation.Figure 5b shows that the variations of the ECD with circulation are parallel to the annular temperature.The circulation time only influences the density of the drilling fluid through the temperature.The ECD tends to remain stable with the circulation time.The relations of the drilling fluid temperature in the annulus and the flow rate are shown in Figure 6a.The flow rate is connected with the strength of convection, which has a large influence on the distribution of temperature in the wellbore because of the high temperature.The larger velocity of the drilling fluid flows into the well, while the lower temperature distributes into the annulus.Figure 6b expresses the ECD in the annulus with depth under a different flow rate.Big differences exist in the different flow rate; there is a positive correlation between the flow rate and the ECD, as the flow rate effect not only changes the density, but also the friction pressure loss.The geothermal gradient is another important parameter to temperature distribution in the annulus (Figure 7a).The geothermal gradient increases 42.9% or decreases 28.6%, the temperature of the bottom hole elevates 20 °C or reduces 30 °C.The ECD distributions in the annulus under various geothermal gradients differ greatly (Figure 7b).It is obvious that an inaccurate geothermal gradient will lead to a large error in predicting the temperature distribution and calculating the ECD in the annulus.The relations of the drilling fluid temperature in the annulus and the flow rate are shown in Figure 6a.The flow rate is connected with the strength of convection, which has a large influence on the distribution of temperature in the wellbore because of the high temperature.The larger velocity of the drilling fluid flows into the well, while the lower temperature distributes into the annulus.Figure 6b expresses the ECD in the annulus with depth under a different flow rate.Big differences exist in the different flow rate; there is a positive correlation between the flow rate and the ECD, as the flow rate effect not only changes the density, but also the friction pressure loss.The relations of the drilling fluid temperature in the annulus and the flow rate are shown in Figure 6a.The flow rate is connected with the strength of convection, which has a large influence on the distribution of temperature in the wellbore because of the high temperature.The larger velocity of the drilling fluid flows into the well, while the lower temperature distributes into the annulus.Figure 6b expresses the ECD in the annulus with depth under a different flow rate.Big differences exist in the different flow rate; there is a positive correlation between the flow rate and the ECD, as the flow rate effect not only changes the density, but also the friction pressure loss.The geothermal gradient is another important parameter to temperature distribution in the annulus (Figure 7a).The geothermal gradient increases 42.9% or decreases 28.6%, the temperature of the bottom hole elevates 20 °C or reduces 30 °C.The ECD distributions in the annulus under various geothermal gradients differ greatly (Figure 7b).It is obvious that an inaccurate geothermal gradient will lead to a large error in predicting the temperature distribution and calculating the ECD in the annulus.The geothermal gradient is another important parameter to temperature distribution in the annulus (Figure 7a).The geothermal gradient increases 42.9% or decreases 28.6%, the temperature of the bottom hole elevates 20 • C or reduces 30 • C. The ECD distributions in the annulus under various geothermal gradients differ greatly (Figure 7b).It is obvious that an inaccurate geothermal gradient will lead to a large error in predicting the temperature distribution and calculating the ECD in the annulus.Figure 8a demonstrates that the annular diameter affects the temperature distribution in the annulus.Assume that the wellbore diameter keeps constant; the diameters of the pipe are 133 mm, 159 mm and 168 mm respectively.The result indicates that the temperature in the annulus reduces as the annular diameter decreases; as the flow rate in the small annular diameter is faster than in the large annular diameter, the cooling performance enhances.The temperature in the shallow well part is little affected.The ECDs under a different annular diameter represent obvious variance in both the shallow and deep part of the well; f variation of the annular diameter causes the flow rate change, which induces the friction pressure loss in the annulus (Figure 8b).Loss of circulation is a common problem during the drilling.To prevent the problem and keep the pressure balance in the wellbore, some additives should be added to the drilling fluid, which will change the fluid model and physical properties and temperature distribution of the wellbore.The additive is added in the drilling fluid when drilled to the leakage layer, which varies the properties of the drilling fluid relative to the initial one.Kaolinite was added in water to maintain the safe drilling, the density and viscosity, thermal conductivity and thermal capacity reach to 1030 kg/m 3 , 98 mPa•s, 1.731 W/(m•K) and 1256 J/(kg•°C) respectively.The drilling fluid turns into the Bingham model, and the calculated NRe is 384.As shown in Figure 9a, the temperature of the Bingham model Figure 8a demonstrates that the annular diameter affects the temperature distribution in the annulus.Assume that the wellbore diameter keeps constant; the diameters of the pipe are 133 mm, 159 mm and 168 mm respectively.The result indicates that the temperature in the annulus reduces as the annular diameter decreases; as the flow rate in the small annular diameter is faster than in the large annular diameter, the cooling performance enhances.The temperature in the shallow well part is little affected.The ECDs under a different annular diameter represent obvious variance in both the shallow and deep part of the well; f variation of the annular diameter causes the flow rate change, which induces the friction pressure loss in the annulus (Figure 8b). Figure 8a demonstrates that the annular diameter affects the temperature distribution in the annulus.Assume that the wellbore diameter keeps constant; the diameters of the pipe are 133 mm, 159 mm and 168 mm respectively.The result indicates that the temperature in the annulus reduces as the annular diameter decreases; as the flow rate in the small annular diameter is faster than in the large annular diameter, the cooling performance enhances.The temperature in the shallow well part is little affected.The ECDs under a different annular diameter represent obvious variance in both the shallow and deep part of the well; f variation of the annular diameter causes the flow rate change, which induces the friction pressure loss in the annulus (Figure 8b).Loss of circulation is a common problem during the drilling.To prevent the problem and keep the pressure balance in the wellbore, some additives should be added to the drilling fluid, which will change the fluid model and physical properties and temperature distribution of the wellbore.The additive is added in the drilling fluid when drilled to the leakage layer, which varies the properties of the drilling fluid relative to the initial one.Kaolinite was added in water to maintain the safe drilling, the density and viscosity, thermal conductivity and thermal capacity reach to 1030 kg/m 3 , 98 mPa•s, 1.731 W/(m•K) and 1256 J/(kg•°C) respectively.The drilling fluid turns into the Bingham model, and the calculated NRe is 384.As shown in Figure 9a, the temperature of the Bingham model Loss of circulation is a common problem during the drilling.To prevent the problem and keep the pressure balance in the wellbore, some additives should be added to the drilling fluid, which will change the fluid model and physical properties and temperature distribution of the wellbore.The additive is added in the drilling fluid when drilled to the leakage layer, which varies the properties of the drilling fluid relative to the initial one.Kaolinite was added in water to maintain the safe drilling, the density and viscosity, thermal conductivity and thermal capacity reach to 1030 kg/m 3 , 98 mPa•s, 1.731 W/(m•K) and 1256 J/(kg• • C) respectively.The drilling fluid turns into the Bingham model, and the calculated N Re is 384.As shown in Figure 9a, the temperature of the Bingham model in the wellbore is much higher than the temperature of the primary Newtonian model, so it is important to note that the temperature in the wellbore will shift after adding additives.Figure 9b shows that the ECD of the drilling fluid to which additives are added has a wide range of variation which is from 976 kg/m 3 to 1042 kg/m 3 .The position of highest ECD with additives is at the wellhead and it is higher relative to that of primary drilling fluid without additives.
Energies 2017, 10, 268 15 of 18 in the wellbore is much higher than the temperature of the primary Newtonian model, so it is important to note that the temperature in the wellbore will shift after adding additives.Figure 9b shows that the ECD of the drilling fluid to which additives are added has a wide range of variation which is from 976 kg/m 3 to 1042 kg/m 3 .The position of highest ECD with additives is at the wellhead and it is higher relative to that of primary drilling fluid without additives.

Surge Pressure Analysis
The movement of the pipes can be considered as a process of acceleration, constant speed and deceleration.The acceleration is 0.5 m/s 2 , and the maximum rate of the pipes is 2 m/s.In this study, the stable method is adopted to analyze the surge method in the well.
Suppose other parameters remain constant except the velocity of pipes tripping in the well.Figure 10 illustrates that the surge pressure of bottom hole increases with the velocity of pipes tripping; the bottom hole pressure under the pipes tripping velocity of 0.25 m/s is 0.03 MPa and the pressure is up to 1.97 MPa when the velocity of pipes tripping reaches to 2 m/s.

Surge Pressure Analysis
The movement of the pipes can be considered as a process of acceleration, constant speed and deceleration.The acceleration is 0.5 m/s 2 , and the maximum rate of the pipes is 2 m/s.In this study, the stable method is adopted to analyze the surge method in the well.
Suppose other parameters remain constant except the velocity of pipes tripping in the well.Figure 10 illustrates that the surge pressure of bottom hole increases with the velocity of pipes tripping; the bottom hole pressure under the pipes tripping velocity of 0.25 m/s is 0.03 MPa and the pressure is up to 1.97 MPa when the velocity of pipes tripping reaches to 2 m/s.
Energies 2017, 10, 268 15 of 18 in the wellbore is much higher than the temperature of the primary Newtonian model, so it is important to note that the temperature in the wellbore will shift after adding additives.Figure 9b shows that the ECD of the drilling fluid to which additives are added has a wide range of variation which is from 976 kg/m 3 to 1042 kg/m 3 .The position of highest ECD with additives is at the wellhead and it is higher relative to that of primary drilling fluid without additives.

Surge Pressure Analysis
The movement of the pipes can be considered as a process of acceleration, constant speed and deceleration.The acceleration is 0.5 m/s 2 , and the maximum rate of the pipes is 2 m/s.In this study, the stable method is adopted to analyze the surge method in the well.
Suppose other parameters remain constant except the velocity of pipes tripping in the well.Figure 10 illustrates that the surge pressure of bottom hole increases with the velocity of pipes tripping; the bottom hole pressure under the pipes tripping velocity of 0.25 m/s is 0.03 MPa and the pressure is up to 1.97 MPa when the velocity of pipes tripping reaches to 2 m/s.Presume that the rate at which the pipes trip in the well is 2 m/s and other parameters remain the same.As the pipes trip in the hole from the depth of 300 m to the bottom hole and from the depth of 1200 m to the bottom hole, the surge pressure are seen in Table 5 which increases from 0.39 MPa to 1.29 MPa.Assume that the diameter of the wellbore can regulate, and the other diameters stay the same.As seen in Table 6, the larger the diameter of the wellbore is, the lower the surge pressure obtained.The diameter of the wellbore has significant influence on the surge pressure.

Conclusions
Pressure and temperature are crucial parameters for well drilling, and temperature should be considered when building the wellbore distribution under different conditions, as the density and rheology of the drilling fluid change with the temperature.This paper modeled the temperature distribution by the Hasan model, and a simulation of sensitivity analysis was also completed.The result indicates that the temperature of the drilling fluid in the bottom hole is much higher than the surface temperature; changing some parameters will lead to temperature redistribution in the wellbore.According to the sensitivity analysis, the geothermal gradient and flow rate are the most important parameters to temperature distribution.Circulation time and diameter of the wellbore also affect the temperature distribution, while the influence will gradually recede as the parameters increase; the wellbore temperature should be recalculated when primitive drilling fluid adds additives to maintain the wellbore stability as the properties have changed.
The ECD is affected by the temperature.Research shows that the rheological models, diameter of the wellbore, the geothermal gradient and flow rate all have a great influence on the ECD, especially the flow rate and geothermal gradient.The ECD has a large relation with the circulation time in the transient period, while gradually the ECD has no influence on circulation time as the drilling fluid become steady.
The surge pressure caused by casing running will be generated during cementing.According to the study, the velocity and depth of pipes tripping and the diameter of the wellbore are important parameters to the surge pressure.

Figure 1 .
Figure 1.Circulation model parameter in the wellbore.

Figure 1 .
Figure 1.Circulation model parameter in the wellbore.

Figure 2 .
Figure 2. Forces acting on a fluid element.

Figure 3 .
Figure 3. Velocity profiles for the laminar flow pattern when the pipe is pulled out of the well.

Figure 3 .
Figure 3. Velocity profiles for the laminar flow pattern when the pipe is pulled out of the well.

Figure 4 .
Figure 4.The temperature profile in the pipe and annulus (circulating 1 h).

Figure 4 .
Figure 4.The temperature profile in the pipe and annulus (circulating 1 h).

Figure
Figure5ais the relation curve of the drilling fluid temperature in the annulus and circulation time.It is illustrated that the circulation time has a strong influence on the annular temperature, when other parameters remain constant.As the circulation time grows, the impact on annular temperature wears off and the highest temperature in the annulus moves upward.The change of temperature becomes slow after 8 h circulation.Figure5bshows that the variations of the ECD with circulation are parallel to the annular temperature.The circulation time only influences the density of the drilling fluid through the temperature.The ECD tends to remain stable with the circulation time.

Figure 5 .
Figure 5. Temperature (a) and ECD (b) in the annulus with the circulation time.

Figure 6 .
Figure 6.Temperature (a) and ECD (b) in the annulus with the flow rate (circulating 8 h).

Figure 5 .
Figure 5. Temperature (a) and ECD (b) in the annulus with the circulation time.

Figure 5 .
Figure 5. Temperature (a) and ECD (b) in the annulus with the circulation time.

Figure 6 .
Figure 6.Temperature (a) and ECD (b) in the annulus with the flow rate (circulating 8 h).

Figure 6 .
Figure 6.Temperature (a) and ECD (b) in the annulus with the flow rate (circulating 8 h).

Figure 7 .
Figure 7. Temperature (a) and ECD (b) in the annulus with the geothermal gradient (circulating 8 h).

Figure 8 .
Figure 8. Temperature (a) and ECD (b) in the annulus with the outer diameter of the pipe (circulating 8 h).

Figure 7 .
Figure 7. Temperature (a) and ECD (b) in the annulus with the geothermal gradient (circulating 8 h).

Figure 7 .
Figure 7. Temperature (a) and ECD (b) in the annulus with the geothermal gradient (circulating 8 h).

Figure 8 .
Figure 8. Temperature (a) and ECD (b) in the annulus with the outer diameter of the pipe (circulating 8 h).

Figure 8 .
Figure 8. Temperature (a) and ECD (b) in the annulus with the outer diameter of the pipe (circulating 8 h).

Figure 9 .
Figure 9. Temperature (a) and ECD (b) in the annulus with the rheological model of the pipe (circulating 8 h).

Figure 10 .
Figure 10.The bottom bole pressure with different rates of trip in.

Figure 9 .
Figure 9. Temperature (a) and ECD (b) in the annulus with the rheological model of the pipe (circulating 8 h).

Figure 9 .
Figure 9. Temperature (a) and ECD (b) in the annulus with the rheological model of the pipe (circulating 8 h).

Figure 10 .
Figure 10.The bottom bole pressure with different rates of trip in.Figure 10.The bottom bole pressure with different rates of trip in.

Figure 10 .
Figure 10.The bottom bole pressure with different rates of trip in.Figure 10.The bottom bole pressure with different rates of trip in.
• • C); k f is the thermal conductivity of formation, W/(m•K); r is the radius, m.To transform Equation (1) into dimensionless form, dimensionless radius, r D = r/r w , dimensionless time, α = k f /ρ f c f , t D = αt/r 2 w , dimensionless temperature T D, the Kabir and

Table 2 .
[26]frictional pressure loss of a different rheological model under laminar in the pipe and annulus[26].

Table 3 .
Thermodynamics properties of the materials and formation.

Table 4 .
The inner and outer diameter of the casing, pipe, and cement.

Table 4 .
The inner and outer diameter of the casing, pipe, and cement.

Table 5 .
Surge pressure at the bottom hole as the pipes trip in under different depths.

Table 6 .
Surge pressure at the bottom hole as the pipes trip in under different wellbore diameters.