Introduction

Energy consumption and demand are continually increasing as the world becomes more industrialized. For decades, hydrocarbons have been a major source of energy, but production from mature oil and gas producers is gradually dropping. New hydrocarbon reserves must be discovered and produced in order to fulfill this increase in energy demand. Because salt formations are associated with enormous oil and gas reservoirs, this could be an important energy source in future. Salt is a suitable hydrocarbon trap because of its poor permeability and ability to deform under stress and temperature (Hapnes, M. 2014). Because of this, the knowledge of the drilling fluid temperature while drilling through a salt formation becomes very important.

Underbalanced drilling (UBD) is a process in which the well's bottom-hole pressure is kept below the formation pressure, allowing the formation fluid to flow into the wellbore and then to the surface under control (Zhou et al 2003). The proportion of reservoirs with low porosity, permeability, pressure, and abundance grows every year as oil and gas reservoirs become more complex. As a result, conventional drilling technology has struggled to meet expected targets in this type of reservoir; however, the use of UBD technology has been able to multiply production in this type of reservoir (Wu et al 2017).

Drilling fluid, on the other hand, is made up of a base fluid, water, hydrocarbon, weighting agents, and other additives that help remove drill cuttings from the well and keep it fluid (Alotaibi et al 2010). The rheological properties of the drilling fluid change at a very high temperature (> 94 °C) as a result of hydroxyl ion and clay interaction. When drilling fluid transports cuttings from the downhole to the surface, it picks up contaminants from the formation influx, such as solids, cement, and salts, which affects the fluid's temperature distribution (Darley et al. 1956). Therefore, there is a need to study the effect of salt concentration on the drilling fluid temperature distribution (Zamora 1996).

Attempts to estimate fluid temperature in the past were mostly for heavy-oil reservoir management and thermal recovery. Lauwerier (1955), Spillette (1965), and Satman et al. (1979) developed the majority of these earlier methods. By incorporating the J-T effect, Steffensen and Smith (1973) proposed an analytical solution for estimating the fluid's static and flowing temperature at the bottom hole during steady-state flow. Heat convection and the J-T effect were identified as the main heat transfer mechanisms of fluids in the reservoir during production and injection, according to their findings.

Raymond studied the duration of equations that can be used to predict fluid temperature in the reservoir and wellbore region in 1969. In 1970, Holmes and Swift conducted an update on Raymond's findings. Under pseudo-steady flow conditions, the two researchers incorporated temperature changes in the circulating mud system. By incorporating a cementing operation into the Holmes et al. mathematical model, Sump and Williams 1973 advanced the Holmes et al. mathematical model. During mud circulation and cementing operations, this model was used to predict wellbore temperature. Keller et al. used it to predict temperature distribution in circulating mud columns in 1973. Woolley 1980 introduced an integration of the finite difference method to an existing mathematical model. Downhole temperatures were calculated using this model during circulation, injection, and production operations. The model's results were consistent with some previously collected data.

In 1996, Kabir et al. measured the temperature of the circulating fluid under a variety of operational conditions, including drilling, workover, and well-control operations. Their temperature evaluation near the bottom of the hole did not agree with the Wooley model. The reason for this was due to a discrepancy in assumptions about the stationary bottom-hole temperature, which resulted in a zero-temperature gradient at the bottom hole. In 2010, Nguyen et al. looked at the effects of friction and heat on wellbore stability, while Zhang et al (2011) used a time convolution approach to simulate the temperature distribution in the wellbore and surrounding area.

Wu et al. published a numerical coupled model in 2012 that was used to predict the temperature distribution in wellbore/reservoir conditions during the fluid circulation period, building on previous work by Zhang et al. Zhong et al. (2012) proposed a solution that addressed heat conduction and convection as the main heat transfer mechanisms in the reservoir, with a focus on the Joule-Thompson effect, which affects fluid temperature distribution in the wellbore due to cooling and heating effects.

Kutasov and Appelbaum published one of the most recent research papers in 2015. Their findings were used to predict temperatures in the wellbore and formation during drilling and cementing operations. Li et al, 2015, formulated a closed form of the mathematical model that was used to predict the temperature of gaseous drilling fluids at bottom-hole conditions in order to validate Kutasov and Appelbaum's research. The model result did not include the prediction of the annular temperature profile, which was a flaw in this study. The annular fluid was assumed to be an insulated non-flowing material with an equivalent thermal conductivity in this model.

In 2016, Chenyang Duan et al. worked on the temperature distribution model in geothermal wellbore and formation using well test data obtained from the Tibet Geothermal field in China. In their analysis, it was opined that the rheological behavior of any fluid in the wellbore region is a function of temperature. A mathematical model was developed to cater for steady-state heat transfer in the wellbore region and unsteady state heat conduction in the formation.

Shan L. et al. developed an analytical method in 2016 that took into account the effect of fluid influx from pay-zones on temperature changes in the fluid stream in an underbalanced drilling. This mathematical model is well suited to describing fluid temperature distribution in overbalanced and underbalanced drilling situations. The annular fluid temperature is always affected by formation influx and drilling cuttings entrainment at the bottom-hole section, according to the model. The phenomenon of Joule Thomason cooling caused a decrease in the fluid temperature value at the drilling bit nozzle.

Using log data from offset wells in the Gulf of Suez basin, Abdelghany et al 2021 investigated the possibility of combining mud weights with the depth of damage method to achieve a successful underbalanced drilling technique. However, after reviewing all of the previous research on fluid temperature distribution, it is clear that none of these studies took into account the significant effect of salt influx from the formation on the annular fluid composition, which affects the temperature distribution system. As a result of this technical limitation, it is proposed that this research work address it by incorporating the salt concentration effect into the Shan model.

Modeling pore pressure in underbalanced drilling operation

In underbalanced drilling operation, the pressure distribution is modeled with an Eq. 1 as shown below

$$P_{{{\text{reservoir}}}} > P_{{{\text{bottomhome}}}} = P_{{{\text{hydrostatic}}}} + P_{{{\text{friction}}}} + P_{{{\text{choke}}}}$$
(1)

To achieve an underbalanced drilling technique, a well is drilled with a lighter fluid to lower the pressure in the bottom of the well. Because of the issues of well control in underbalanced drilling condition, the hydrostatic pressure, friction pressure and choke pressures are used as means of controlling the well. Hydrostatic pressure control is a passive method which is achieved through the materials in the wellbore as a result of the density of the drilling fluid and that of the drilled cuttings. Choke pressure control (confining or active) is a method which arises as a result of the pipe being sealed at surface, resulting in a positive pressure at surface. From eqn.1, the pressure control in underbalanced drilling is achieved through the hydrostatic mud column pressure, it is necessary to model a pore pressure in the reservoir section, to avoid any possibilities of kick or wellbore damage. The pore pressure can be generated using Eaton’s method (Eaton 1972) in eqn. 2 and eqn. 3.

$$P_{{{\text{p}}_{{\text{g}}} }} = {\text{OBG}} - \left( {{\text{OBG}} - \varphi_{{\text{d}}} } \right)*\left( {\frac{{{\text{DT}}_{{\text{n}}} }}{{{\text{DT}}}}} \right)^{3}$$
(2)
$$P_{{{\text{p}}_{{\text{g}}} }} = {\text{OBG}} - \left( {{\text{OBG}} - \varphi_{{\text{d}}} } \right)*\left( {\frac{R}{{R_{{\text{n}}} }}} \right)^{1.2}$$
(3)

where Ppg is the pore pressure gradient in ppg, φd is the hydrostatic pore pressure gradient in ppg, OBG is the overburden gradient in ppg, DT and R denote the compressional sonic slowness in µs/ft and deep resistivity logs in oms meter, respectively. DTn and Rn are the sonic and resistivity log responses against the normally compacted shale zones (Abdelghany et al 2021).

Drilling through salt formation and its operational challenges

The tendency of salt to creep and flow may present complications when drilling inside salt deposits. Borehole distortion caused by salt flow might alter fluid temperature and drilling operations. Salt can seep into the excavated rock volume after a wellbore has been drilled. This can result in issues like stuck pipes, hole instability, and excessive levels of shock and vibration while drilling. Because salt flow is a positive function of time, reducing the time component and reduces the risk of salt flow problems. Drilling activities should be completed fast as one of the ways to reduce exposure time. When drilling in salt, a high rate of penetration (ROP) is advantageous (Hapnes, M. 2014).

In addition to oil-based muds, two types of water-based muds can be utilized while drilling in salt regions. For long salt portions, a water-based mud is typically utilized, which can incorporate either a low or high salt concentration. Using a low-salt mud, matching formation salt dissolution and erosion with wellbore creep is extremely difficult. This is because the top and bottom of a lengthy salt section have vastly different salt creep and dissolve rates. As a result, the wellbore diameter varies with depth. The breakdown of salt during drilling can be regulated by employing a highly salt saturated water-based mud or an oil-based mud. Even when using a heavily salt laden mud, hole enlargement can be a concern. This is due to the influence of temperature on salt solubility. When drilling, cold salt-saturated mud is pushed downhole. This mud will be heated by the bottom-hole temperature, causing it to become undersaturated. As the mud returns up the annulus, it dissolves formation salt, enlarging the diameter of the wellbore. The lower temperature of the mud when it reaches the surface will cause extra salt to precipitate out. When the mud is circulated, the process will repeat again (Muecke N. 1994).

Excessive torque and pack off, stuck pipe, casing running blockage, and poor cementing are all common problems associated with well construction in salt formations due to the salt creep effect. Furthermore, the salt exit could have a rubble zone with mud losses and wellbore instability. Mud weight and properties control both salt creeping and salt exit challenges. Drillers commonly use pre-established tables with recommended mud weights to drill salt sections. If salt creep is underestimated based on actual well conditions, it can result in non-productive time and costly additional rig time to compensate for the incorrect salt creep estimation (Castagnoli, J. et al. 2016). The crystalline structure of salt rocks, also known as evaporites, causes them to creep; creep is defined as time-dependent permanent deformation when subjected to any level of shear stress. Several constitutive models for simulating time-dependent deformation under a constant deviatoric stress have been described in the literature (Maia and Loureiro 2005). The salt layer thickness, formation temperature, mineralogical composition, water content, presence of impurities, and the degree to which differential stresses are applied to the salt body all influence creep behavior.

Barker et al. (1994) devised an analytical equation that allowed engineers to calculate stress, temperature, and closure rate combinations. This equation is based on salt formations' steady-state creep and can be used for any stress and temperature combination. The radius of the well is expressed as a function of time using Eq. 4

$$R = R_{o} {\text{exp}}\left( { - \frac{{\sqrt 3^{n + 1} }}{4n - 2}Ae^{{ - \frac{B}{T}\left( {{\text{p}}_{{\text{o}}} - {\text{p}}_{{\text{w}}} } \right)^{n} {\Delta }t}} } \right)$$
(4)

n is the stress exponent of salt, po is the horizontal in-situ stress, pw is the wellbore pressure, R is the radius after creep, Ro is the original wellbore radius, and t is the creep time or exposure time, where A is the salt constant, B is the temperature exponent of salt, and T is the formation temperature. The equation shows that the wellbore radius, and formation temperature (fluid temperature in downhole) are all affected by the salt concentration. Liu et al. (2011) used Barker's methodology to assume that the fluidity parameter ϒ is estimated by Eq. 5 to account for the effect of temperature on salt creep behavior.

$$Y = {\text{Aexp}}\left( { - \frac{B}{T}} \right)$$
(5)

Because of salt creep behavior, this Eq. 5 shows that the fluid temperature is affected by the fluidity parameter.

Methodology

In underbalanced drilling, fluid interaction mechanism occurs during production where the hot reservoir fluids enter the wellbore and flow back to the surface. As the flows continue, the fluid begins to lose heat to the cooler surrounding (Shan L. et al. 2016). This heat exchange between the wellbore fluid and the formation leads to heating up of surrounding rock, causing reduction in temperature and heat transfer between the fluids and the rock. The heat transfer between the tubing and annulus is governed primarily by a convection mechanism. The fluid influx from the pay-zones during underbalanced drilling in salty formation is composed of salt influx fluid which creates a hot temperature fluid stream. The assumptions used in the model formulation are;

  1. 1.

    Annular fluid temperature is affected by an influx of oil and salt formation fluid during underbalanced drilling

  2. 2.

    Drill cuttings entrainment at the bottom hole affects the annular fluid temperature because of their heat capacity and thermal conductivities.

  3. 3.

    The fluid temperature is reduced at the drill bit nozzle due to the Joule Thomason cooling effect.

During underbalanced drilling, the drilling fluid is injected into the drill string with heat in the string which is proportional to the product of fluid heat capacity, and the mass flow rate. The mass flowrate is mathematically expressed as

$$m_{{\text{p}}} = \rho_{{\text{p}}} Q_{{\text{p}}}$$
(6)

where \(\rho_{p}\) is the drilling fluid density and \(Q_{p}\) is the volumetric flowrate. The drilling fluid flows down the drill strings and the heat transfer rate is proportional to the string thermal conductivity \(K_{p}\). As the drilling fluid flows down the bit nozzles, it expands, and its temperature drops by a value called ∆\(T_{b}\) due to Joule Thompson cooling effect. At the bottom hole, the drilling fluid temperature is further increased with the entrained drill cuttings and formation oil and salt influx. The annular heat at the bottom hole in non-saline formation is proportional to the product of mixture heat capacity \(C_{a}\) and mixture mass flowrate \(m_{a}\).

$$C_{{\text{a}}} m_{{\text{a}}} = C_{{\text{p}}} m_{{\text{p}}} + C_{{\text{s}}} m_{{\text{s}}} + C_{{\text{f}}} m_{{\text{f}}}$$
(7)

And in saline formation, the annular fluid at the bottomhole is estimated as

$$C_{{\text{a}}} m_{{\text{a}}} = C_{{\text{p}}} m_{{\text{p}}} + C_{{\text{s}}} m_{{\text{s}}} + C_{{\text{f}}} m_{{\text{f}}} + C_{{{\text{sc}}}} m_{{{\text{sc}}}}$$
(8)

where \(C_{s}\) and \(m_{s}\) are solid cuttings heat capacity and mass flowrate, respectively.\(C_{f}\) is the heat capacity of the formation influx fluid (oil) and \(C_{sc}\) and \(m_{sc}\) are salt concentrations influx heat capacity and mass flowrate, respectively.

$$C_{{\text{s}}} m_{{\text{s}}} = C_{{\text{h}}} m_{{\text{h}}} + C_{{\text{r}}} m_{{\text{r}}}$$
(9)

\(C_{h}\) and \(m_{h}\) are heat capacity and mass flowrate of the hydrocarbon, respectively, while \(C_{r}\) and \(m_{r}\) are heat capacity and mass flowrate of the rock in the cuttings. The hydrocarbon and rock mass flowrate can be calculated as;

$$m_{{\text{h}}} = \frac{\pi }{4}D_{{\text{b}}}^{{2}} R_{{\text{p}}} {\Phi }\rho_{{\text{h}}}$$
(10)
$$m_{r} = \frac{\pi }{4}D_{b}^{2} R_{b} \left( {1 - {\Phi }} \right)p_{r}$$
(11)

where \(D_{b} is\) the diameter of the drill bit, \(R_{p}\) is the rate of penetration, Ф is the rock porosity, \(\rho_{h}\) is the hydrocarbon density, and \(\rho_{r}\) is the density of rock. The mass flowrate of the fluid is calculated as;

$$m_{{\text{f}}} = Q_{{\text{f}}} \rho_{{\text{f}}}$$
(12)

where \(\rho_{f}\) is the density of the fluid influx and \(Q_{f}\) is the flowrate of the fluid influx.

The fluid mixture flows up in the annulus and the heat transfer rates of drill string and cement sheath are proportional to thermal conductivity of drill string \(K_{p}\) and cement sheath \(K_{c}\), respectively. Using Shan L model, the fluid temperatures in the drill string and the annulus are expressed using Eq. 13 and Eq. 14.

$$T_{{\text{p}}} = C_{1} Ae^{{{\text{r}}_{{1}} {\text{L}}}} + C_{2} Ae^{{{\text{r}}_{{2}} {\text{L}}}} + GL + \frac{{{\text{AG}} + ABT_{{{\text{go}}}} - G\left( {B + E} \right)}}{AB}$$
(13)
$$T_{{\text{a}}} = C_{1} \left( {A + r_{1} } \right)e^{{{\text{r}}_{{1}} {\text{L}}}} + C_{2} \left( {A + r_{2} } \right)e^{{{\text{r}}_{{2}} {\text{L}}}} + GL + \frac{{AG + ABT_{{{\text{go}}}} - EG}}{AB}$$
(14)

where

$$C_{1} = \frac{{AB\left( {A{\Delta }T_{{\text{b}}} - G} \right) - [ABT_{{{\text{po}}}} - ABT_{{{\text{go}}}} - AG + G\left( {B + E} \right)r_{2} e^{{{\text{r}}_{{2}} {\text{L}}_{{{\text{max}}}} }} }}{{A^{2} B\left( {r_{1} e^{{{\text{r}}_{{1}} {\text{L}}_{{{\text{max}}}} }} - r_{2} e^{{{\text{r}}_{{2}} {\text{L}}_{{{\text{max}}}} }} } \right)}}$$
(15)
$$C_{2} = \frac{{ - AB\left( {A{\Delta }T_{{\text{b}}} - G} \right) + [ABT_{{{\text{po}}}} - ABT_{{{\text{go}}}} - AG + G\left( {B + E} \right)r_{1} e^{{{\text{r}}_{{1}} {\text{L}}_{{{\text{max}}}} }} }}{{A^{2} B\left( {r_{1} e^{{{\text{r}}_{{1}} {\text{L}}_{{{\text{max}}}} }} - r_{2} e^{{{\text{r}}_{{2}} {\text{L}}_{{{\text{max}}}} }} } \right)}}$$
(16)
$$R_{2} = \frac{{B - E - A + \sqrt {\left( {B + E - A} \right)^{2} + 4AB} }}{2};A = \frac{{\pi d_{{\text{p}}} K_{{\text{p}}} }}{{C_{{\text{p}}} m_{{\text{p}}} t_{{\text{p}}} }};B = \frac{{\pi d_{{\text{c}}} K_{{\text{c}}} }}{{C_{{\text{a}}} m_{{\text{a}}} t_{{\text{c}}} }};E = \frac{{\pi d_{{\text{d}}} K_{{\text{p}}} }}{{C_{{\text{a}}} m_{{\text{a}}} t_{{\text{p}}} }}$$
(17)

The Tp and Ta are fluid temperature in both pipe and annular sections, estimated in oC. In drilling through a saline formation, an emphasis is placed on the salt concentration effect on the fluid temperature distribution in the wellbore and annular space. Mixing rule is used to consider the effect of salt concentration on the annular fluid composition. Previous research analysis shows that salt concentration affects the overall specific heat capacity of the fluid in the annulus and considerably changes the thermal conductivity properties. The actual value of thermal conductivity is evaluated from the density, heat capacity, and thermal diffusivity of any selected fluid samples using eqn. (Olayiwola et al.).

$$\lambda \left( T \right) = a\left( T \right)*C_{{\text{v}}} \left( T \right)*\rho \left( T \right)$$
(18)

where a is the thermal diffusivity, \(C_{v}\) is the heat capacity and ρ is the density of the fluid. To modify Shan model to account for the effect of salt concentration influx into the wellbore. The returned drilling fluid from saline formation is adjusted to be primarily composed of dissolved salt, drilling fluid, and cuttings. This process consequently changes the drilling fluid composition in the wellbore and annulus as;

$${\text{Annular }} {\text{Component}} = {\text{Drilling }} {\text{fluid}} + {\text{Solid}} + {\text{Influx}} + {\text{Salt }} {\text{Content}}$$
(19)

To calculate the overall specific capacity of the mixture in the annular section, the mixture rule is employed. Recall in Eq. 8 that the overall heat capacity of the annular mixture during UBD is expressed as follows;

$$C_{{\text{a}}} m_{{\text{a}}} = C_{{\text{p}}} m_{{\text{p}}} + C_{{\text{s}}} m_{{\text{s}}} + C_{{\text{f}}} m_{{\text{f}}} + C_{{{\text{sc}}}} m_{{{\text{sc}}}}$$
(20)

where \(C_{SC} and m_{SC}\) denote the heat capacity and mass flowrate of the salt content. The adjustment factor for salt concentration effect in the annular space is determined numerically as stated in Eq. 7 and Eq. 8, respectively.

$$\left( {\text{Adjustment factor}} \right)_{UBD} = \frac{{c_{{\text{p}}} m_{{\text{p}}} + c_{{\text{s}}} m_{{\text{s}}} + c_{{\text{f}}} m_{{\text{f}}} + c_{{{\text{sc}}}} m_{{{\text{sc}}}} }}{{c_{{\text{p}}} m_{{\text{p}}} + c_{{\text{s}}} m_{{\text{s}}} + c_{{\text{f}}} m_{{\text{f}}} }}$$
(21)

Before estimating the fluid temperature in saline formation, using eqns. 13 and 14, the overall specific heat capacity (SHC) of the annular fluid needs to be corrected for salt concentration effect using Eq. 21. This is achieved by making

$$\left( {{\text{SHC}}} \right)_{Saline} = {\text{AF}}*\left( {{\text{SHC}}} \right)_{{{\text{Non}} - {\text{saline}}}}$$
(22)

The unit of the specific heat capacity is in J/Kg/OC. In this technical study, since this adjustment factor, denoted as AF, was not experimentally determined in the laboratory, the AF value is then taken in the range of 0 < X <  + ∞, where XAF. The technical explanation of this limit function is that salt concentration can either increase or decrease the specific heat capacity of the annular fluid, depending on the drilling fluid type, i.e., oil-based or water-based mud. The adjustment factor can be used to switch between drilling saline and non-saline formations without any computational issue.

Results and discussions

The X field data in Table 1 are used to predict the fluid temperature distribution in underbalanced drilling. The result was also compared with the MWD data from the field. To illustrate the significance of salt concentration effect on the fluid temperature distribution, the field data were used to simulate fluid temperature distribution under the influence of salt concentration effect, using Eqs. 13, 14 and 22. The obtained results are then compared with both measured and base results to determine percentage of variation using Eq. 23

$$\% \;\;{\text{variation}} = \frac{{{\text{Temp}}_{{{\text{new}}}} - {\text{Temp}}_{{{\text{old}}}} }}{{{\text{Temp}}_{{{\text{old}}}} }}*100\%$$
(23)
Table 1 Field parameters for X well

Geological settings of X field

X field is an oil field located in the northern Huanghua depression of Bohai Bay Basin, China. It is a field with well-developed natural fractures with severe loss of circulation. The field was explored with a horizontal well technique which is limited as a result of multi-faults, broken fault blocks and deep-buried formation of interest. The field, being a typical complex fault-block reservoir, is faced with much challenges as low-rate drilling, low production for the single well, quick breakthrough of water, low oil recovery efficiency and serious sand production in the shallow formation by development of the conventional orientation wells. The horizontal well development technique is positively explored and applied so as to improve the development efficiency.

The horizontal well development technique of the complex fault-block reservoirs in the oilfield is formed by the scale application of the horizontal well technique and continual summarization of practical experiences. The choice of underbalalnced drilling technique in the field was as a result of normal pressure distribution encountered at different drilling depths. The field is also characterized with low production rate, and hence, the choice of the underbalance drilling method is to eliminate the occurrence of loss circulation during drilling operation. Saving cost is also one of the major considerations because the field is a marginal field (Haimin et al, 2006). The X field data shown in Table 2 are extracted from Shan paper, 2016.

Table 2 Data Set for X Well in China (Shan et al.)

The field temperature measurement

The field data came from the field's horizontal well X, which was drilled underbalanced with oil in water emulsion. The pay zone was essentially penetrated in bit runs. In the first run, a MWD tool was used to measure bottom-hole pressures and temperature data. At the measured depth of 5190 m, the peak temperature around 20 h implies a reservoir temperature of 155 °C. Near the ground surface, the temperature around 75 h displays a geo-temperature of 20 °C. According to these findings, the average geothermal gradient per meter of observed depth is 0.025 °C. The bottom-hole annulus temperature averages around 106 °C during this bit run. The temperature of the returned fluid was measured to be 67 °C as shown in Fig. 1.

Fig. 1
figure 1

BHP and temperature data measured by MWD in X field (Shan et al 2016)

Model Result

The established model Eqs. 13 and 14 are tested with input data from X field and the predictive temperature results obtained are presented in Fig. 2 under base case and modified approach. The overbalanced temperature result is also obtained by putting the value of influx from oil and salt water to be equal to zero. The results obtained in these scenarios are tabulated in Table 3

Fig. 2
figure 2

Fluid temperature predictive result (UBD vs OBD)

Table 3 Comparison of results

Table 3 demonstrates that the type of drilling technique used influences the estimation of fluid temperature measured at the wellbore condition, as shown in Fig. 1. For example, the model estimates the fluid temperature value at the wellbore using X field data to be 121 °C under UBD conditions, while it is estimated to be 127 °C under OBD conditions. The 6 °C difference demonstrates that the cooling effect of inflow into the formation during underbalanced drilling was ignored while employing the model for overbalanced drilling circumstances. Furthermore, when comparing the annular fluid temperature at the surface, the model result provided a fluid temperature of 65 °C during underbalanced drilling, whereas in overbalanced technique, the estimated surface temperature is 36 °C. This reveals that the values calculated by these two conditions differ by 29 °C. As a result, the model projected that the temperature of the returned drilling fluid would be lower in overbalanced drilling than the temperature measured under underbalanced drilling condition.

Though this situation is somewhat confusing, it is assumed that during overbalanced drilling, the returned fluid loses heat to the surrounding formation while being returned to the surface, as opposed to what happened during underbalanced drilling. Another factor that may contribute to the uncertainty is the difference in model assumptions between the underbalanced and overbalanced drilling conditions. Both the two drilling conditions case findings agreed with the measured value in the pipe section at the surface when these two values were compared to field data.

However, at the wellbore condition, the base case model correctly predicted the fluid temperature distribution with about a 7% error. Furthermore, the modification of the model for overbalanced approach yielded a result that is about 13% different from the measured value. This difference of 13% confirms that the overbalanced drilling technique uniquely estimates the temperature value by neglecting the impact of influx on the fluid temperature distribution in the wellbore region. In underbalanced drilling scenario, the model, on the other hand, properly anticipated the fluid temperature distribution with around a 7% inaccuracy at the wellbore condition. Furthermore, modifying the model for an overbalanced approach produced a result that differed by around 13% from the measured value. This 13 percent discrepancy demonstrates that the overbalanced drilling approach accurately calculates temperature by ignoring the impact of influx on the fluid temperature distribution in the wellbore region.

Salt concentration effect on fluid temperature distribution using model result

When looking at the impact of salt content on the temperature model, Table 4 shows that salt concentration had a significant impact on the fluid temperature distribution. The AF factor of 0.8 is chosen as a low value and 1.2 as a high value for the study using Eqs. 13, 14 and 22.

Table 4 Base case and modified results

The low modified scenario anticipated a surface temperature of 55 °C, which is 10 °C lower than the base case model's prediction. The fluid temperature value anticipated by the high AF factor was 71.4 °C, which is around 6.4 °C higher than what the base case model projected. The salt concentration effect reduces the heat temperature distribution at the surface when the AF is low and increases the temperature value when the AF is high, according to this investigation. The low modified scenario, on the other hand, anticipated a temperature of 128 °C at the wellbore, which is 8 °C higher than what the base case models indicated.

The high AF factor anticipated a fluid temperature of 115 °C, which is around 6 °C lower than the base case model indicated. The salt concentration effect raises the heat temperature distribution at the wellbore when the AF is low and decreases the temperature value when the AF is high, according to this analysis. This is because the interaction between the salt concentration and the drilling fluid in the wellbore alters the rheological property of the mixture fluid, affecting the mixture's conductivity. Furthermore, as shown in Fig. 3, the influence of salt concentration on pipe temperature at both high and low AF of 1.2 and 0.8 reveals that at near-surface conditions, salt concentration has no significant effect on fluid temperature distribution. This is due to the fact that the salt concentration in the fluid drops dramatically as it travels from the wellbore to the surface. The concentration of salt, on the other hand, has a significant impact on the fluid temperature trend near the wellbore.

Fig. 3
figure 3

Fluid temperature predictive result under base case and salt concentration effect

For example, with a low AF of 0.8, the fluid temperature in the wellbore changes from 121 to 128.5 °C, and at a high AF of 1.2, the fluid temperature changes from 121 to 115.4 °C. This simply means that the fluid temperature in the wellbore is reduced when the AF value is high, and increased when the AF value is low. Salt concentration alters the heat capacity of a fluid mixture, raising fluid temperature at low concentrations and decreasing fluid temperature at high concentrations, according to the technical explanation. Furthermore, the result in Table 4 demonstrates that we have good evidence that the presence of salt in the wellbore fluid mixture has a 6 percent effect on the matching fluid temperature value.

Because the fluid temperature values measured by the two circumstances differ, a statistical analysis of the model findings is undertaken to see if salt fluid influx affects fluid temperature distribution during drilling. The goal of this phase is to see if there is a significant difference between the fluid temperature distribution estimated in the base case and the modified case with the salt concentration effect. To do so, a hypothesis is developed based on the projected results in Table 4 and tested using the double T-test method. A t-test is an inferential statistic that is used to see if there is a significant difference in the means of two groups that are related in some way. It's most commonly employed when data sets, such as those obtained by flipping a coin 100 times, are expected to follow a normal distribution and have unknown variances. A t-test is a hypothesis testing technique that can be used to assess an assumption that is applicable to a population. To evaluate statistical significance, a t-test examines the t-statistic, t-distribution values, and degrees of freedom. An analysis of variance must be used to execute a test with three or more means.

Three key data values are required to calculate a t-test. They include the mean difference (the difference between the mean values in each data set), the standard deviation of each group, and the number of data values in each group. The t-value is the result of the t-test. After that, the estimated t-value is compared to a value from a critical value table (called the T-Distribution Table). This comparison aids in determining whether the difference is due to chance alone. The t-test determines if the difference between the groups is a meaningful difference in the study or merely a meaningless random difference.

The formula for computing the t-value and degrees of freedom for a paired t-test is:

$$T = \frac{{{\text{mean }}1 - {\text{mean }}2}}{{\frac{{S\left( {{\text{diff}}} \right)}}{\sqrt n }}}$$
(24)

mean1 and mean2 = The average values of each of the sample set, ss(diff) = The standard deviation of the differences of the paired data values, n = The sample size (the number of paired differences) n − 1 = The degrees of freedom​

The following is a list of the steps in the workflow process.

  1. 1.

    Setting the hypothetical statement H0No difference between fluid temperature distribution between base case and modified case.

    H1There is difference between fluid temperature distribution between base case and modified case.

  2. 2.

    Calculating the P value. The P value is the smallest level of significance that would lead to rejection of the null hypothesis. By using the T test method in Eq. 24, the P value is given as P value0.0397

  3. 3.

    Comparing the P value with a fixed significance level α of 0.05

  4. 4.

    Make a conclusion. Since the P values is less than the fixed significance level α of 0.05, we hereby reject the null hypothesis and conclude that there is a difference in fluid temperature distribution estimates between the base case and modified case.

This statistical finding clearly confirms that salt content alters fluid temperature distribution during drilling conditions. It is an important parameter that should not be overlooked when drilling through a saline formation and accurate fluid temperature prediction is sought.

This statistical finding clearly confirms that salt content alters fluid temperature distribution during drilling conditions. It is an important parameter that should not be overlooked when drilling through a saline formation and accurate fluid temperature prediction is sought.

The P value in Table 5 supports our initial research hypothesis that salt concentration has an effect on temperature distribution during drilling. We have evidence to reject the null hypothesis and validate our earlier conclusion that salt concentration is an important parameter that controls the fluid temperature trend in saline production because the calculated P value is 0.0397, which is likewise less than 0.05. Because of its importance, its proper estimation necessitates a high degree of precision in modeling. This mathematical model has a good chance of achieving this goal.

Table 5 Statistical result

Conclusions

With the findings of this study, it is demonstrated that fluid temperature distribution may be accurately predicted using a mathematical model under a variety of drilling situations. The pattern of fluid temperature dispersion is determined by the drilling technique used. The type of formation to be drilled, in particular, has an impact on the distribution pattern. The salinity impact alters the fluid temperature in the wellbore in a salt-dominated deposit. In conclusion, following a careful examination of this documentation, the following conclusions are reached:

  1. 1.

    The results of replicating the X field temperature measurement show that Shan's mathematical model can accurately predict fluid temperature profiles in both underbalanced and overbalanced drilling scenarios. With a margin of error of less than 10%, the model properly predicted the temperature distribution of the X field. This demonstrates that the model may be trusted as a fast look computational method for determining the fluid temperature pattern during drilling.

  2. 2.

    The X field data test of hypothesis suggests that the underbalanced and overbalanced drilling procedures have different fluid temperature distributions, because of the fluid influx that occurs during underbalanced drilling. This is the single variable that distinguishes between the two drilling procedures in terms of fluid temperature distribution.

  3. 3.

    When drilling through a saline deposit, the fluid temperature distribution is altered by salt content, according to the X field case study with the modified model. The rheology and thermal conductivity properties of the annular fluid are altered as a result of the salt concentration, which modifies the fluid temperature distribution. The P value for the statistical output using the paired T-test method was 0.0397, confirming the research assertion that salt concentration does alter fluid temperature distribution during drilling conditions.

  4. 4.

    When tested using X field data, the improved model indicated that when both high and low adjusted factor AF are applied, the fluid temperature in the wellbore changes by at least 7%. The technical reason for this is that adding salt to a fluid combination modifies its rheology by raising the fluid's specific heat capacity.

Future works

Following a thorough examination of this paper's accomplishments and limitations, I hereby recommend the following:

  • 1. It is suggested that the model be updated to account for the 2-phase combination of oil and water as fluid influx into the formation during underbalanced drilling.

  • 2. To ascertain an exact influence of the concentration on the annular fluid temperature profile, a laboratory examination of a sampling annular fluid with salt concentration should be performed.

  • 3. Fluid temperature estimate in horizontal and directional drillings should be improved using the modified model.