Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 11, No. 1, 2024 97 Simulation and Analysis of Temperature and Pressure Fields in the Wellbore of Self‐Injection Well Bao Zhang1, 2, *, Hongtao Jing2, Chongfeng Wang3, Xiaotong Yu2, Zhongwu Yang4, Wei Li2, Yinglin Zhang2 1 School of Petroleum Engineering, China University of Petroleum (East China), Qingdao, 266580, China 2 Oil and Gas Engineering Research Institute, Petro China Tarim Oilfield Company, Korla, 841000, China 3 Fengcheng Oilfield Operation Area, Xinjiang Oilfield Company, Korla, 841000, China 4 Boda Oil and Gas Production Management Area, Petro China Tarim Oilfield Branch, Korla, 841000, China *Corresponding author: Bao Zhang Abstract: Aiming at the problem of wellbore waxing in high-temperature, high-pressure and highly-waxed deep gas condensate reservoirs, a wellbore temperature/pressure field prediction model for self-injection wells was established with the site parameters of the Bozi gas condensate field in the Tarim Basin of China using the OLGA software. With the help of the parameters of example wells on site in the Bozi, wellbore temperature and pressure in the process of gas extraction from 10 self- injector wells were predicted, and the following findings were obtained: the temperature decreases gradually in the process of condensate gas well lifting, and the slopes of the temperature profile shown an overall The overall slope of the temperature profile shown a trend of gradually becoming larger, indicating that the temperature drop was increasing, and the single wells in the block reflect similar wellbore temperature profile characteristics. During the lifting process, the pressure gradually decreases, and the slope of the pressure profile does not change significantly, indicating that the pressure drop along the way was relatively constant, and the single wells in the block reflect similar wellbore pressure field distribution characteristics. Combining the temperature gradient and pressure gradient interpretation data of different wells and time interfering test wells in Bozi, and using them as the basis for temperature and pressure profile regression, the above 10 condensate wells in Bozi block were classified according to different temperatures and pressures, and the temperature and pressure profiles were regressed and fitted to fit the actual working conditions, which lays a data basis for the analysis of wax formation in the example wells in Bozi. Keywords: High temperature and pressure; Condensate gas; Temperature-pressure field; High wax content; Simulation software. 1. Introduction The phenomenon of wellbore clogging in the Bozi block was relatively common, and the clogging materials were mainly wax, aromatic hydrocarbons, asphaltene and other types, and the clogging mechanism was unclear, resulting in a lack of safe and effective preventive and control measures. In recent years, some wells in Bozi block had shown poor production after modification, and even wellbore clogging, and asphaltene and other substances had been found in the samples, so it was urgent to carry out the research on clogging mechanism and clogging material precipitation law, and to formulate effective preventive and control countermeasures, and the prediction and analysis of the temperature and pressure field of the wellbore was a prerequisite for revealing the mechanism of wellbore clogging, and therefore it was urgent to carry out the prediction and analysis of the temperature and pressure of the wellbore in the field operation of the Bozi block. Research on wellbore temperature field had been carried out at home and abroad since the 1930s. One of the most classical temperature prediction models was the wellbore temperature prediction method during fluid injection proposed by Ramey [1] in 1962. After that, Hong Zhang [2] and others proposed a set of equations about fluid temperature and pressure, flow velocity and density and solved them iteratively by considering the Joule-Thomson effect for the temperature and pressure solving problem of underground gas storage under injection and extraction conditions. The model was validated by comparing the field data with the simulation results of the multi-physics field software, and the effects of the Joule-Thomson coefficient and injection parameters on the temperature-pressure field were also analyzed. Shi et al. [3] integrated the parameters that may affect the temperature and pressure, and based on the heat transfer process, momentum and energy conservation equations, they proposed the temperature and pressure calculation method and established the temperature-pressure coupling calculation model. Combined with the measured data, they verified that the model meets the accuracy of industrial calculation and at the same time analyzed the necessity of coupled calculation. Chen et al. [4] established the unsteady state temperature model based on the principle of heat transfer for open and closed wells, and selected a suitable pressure calculation model according to the fluid properties, coupled the temperature and pressure calculation and verified the model. Wang et al. [5] and others, to study the heat transfer law of wellbore during drilling fluid circulation in high temperature and high-pressure gas wells, proposed a transient temperature prediction model for wellbore based on the law of thermodynamics and the law of conservation of energy, and combined with the field application of changing the drilling fluid discharge rate and circulation time to investigate the changes of the temperature in the annulus. Yu et al.[6] in order to accurately predict the wellbore temperature and pressure distribution, selected the coefficient of friction and heat transfer coefficient to calculate and analyses the corresponding wellbore temperature and pressure at different 98 stages of gas wells through PIPESIM software, and combined with the results of the calculations, put forward the optimization scheme for gas well injection and extraction. Wang [7] et al. performed a coupled analysis of temperature and pressure based on the equation of state and Feng hour’s gas transport equation, combined with a classical wellbore flow heat transfer model, and coupled analysis of temperature and pressure. The results were like the oil and gas production flow process: parameters such as discharge volume, tubing size, formation temperature gradient and pressure gradient had a large influence on the wellbore temperature and pressure. Galvao [8] et al. considered the flow of compressible single-phase fluid in a homogeneous infinite-acting reservoir system and provided temperature transient data for a pressure drop test at an arbitrary measurement location along the wellbore, and synthesized the heat transfer process between the wellbore-reservoir and correlation coefficients, a new transient temperature-pressure coupled calculation model was proposed, which consists of a combined system of reservoir, casing, and tubing. Zheng et al. [9] established a wellbore temperature-pressure prediction model based on the conservation of fluid energy, momentum, and mass, and took into account the fluid velocities, densities, and Joule- Thomson coefficients affecting the wellbore temperatures and pressures of high-temperature and high-pressure gas wells and analyzed the impact of different production rates and production times on the wellbore temperature-pressure prediction model and the effect of different production rates and production times on the wellbore temperature-pressure prediction model. The effects of different gas production rates and production times on the temperature and pressure of the wellbore of high temperature and high-pressure gas wells were analyzed. Through the above literature research on wellbore temperature and pressure distribution, the prediction model had developed from one-dimensional to multi-dimensional, and from steady state research to non-steady state research. As scholars continue to go deeper and optimize each parameter of the model, the model accuracy and applicability range were increasing, but systematic research on wellbore dynamics during the switching process was less. For this reason, this paper adopts OLGA software to predict the wellbore temperature and pressure of 10 wells in Bozi gas field, and explores the change trend of wellbore temperature and pressure, which shown that the wellbore temperature and pressure calculation model can be effectively used for the prediction and analysis of the wellbore temperature-pressure field in the wellbore of the spontaneous blowout wells. 2. Computational Model OLGA was a transient simulation software for unsteady multiphase flow, which was able to simulate the flow characteristic parameters and motion state of multiphase media in oil wells, pipelines and oil and gas processing facilities, including temperature and pressure distribution simulation, segment plug flow tracking simulation, wax caking process simulation, etc. Therefore, OLGA software was used here to simulate and determine the distribution of the wellbore temperature and pressure fields in 10 typical single wells of the Bozi block. The model for simulating and calculating wellbore temperature and pressure profiles was a two-fluid model:     VL V V VA v A m t x          (1)    L L L L L LV H A v H A m t x        (2)    2 0 ( ) sinVL Vw V V VV V Vi A vA v P A m v A g t x x                    (3)      2 0 sin L L LL L L L LV Lw Li L L H A vH A PH A m v H A g t x x                   (4) where,  gas content of the cross-section (factor less), LH liquid-holding rate (dimensionless), VLm flow rate in the control body converted from the gas phase to the liquid phase per unit pipeline length ( kg / m s ), LVm flow rate in the control body converted from the liquid phase to the gas phase per unit pipeline length ( kg / m s ), P pressure in the pipeline ( Pa ),  pipeline inclination angle (  ), Vw gas phase in the pipeline subjected to shear from the wall ( N m ), Lw liquid phase in the pipeline subjected to shear from the wall ( N m ), Vi shear at the interface of the gas phase in the pipeline (subjected to flow patterns) ( N m ), Li shear at the interface of the liquid phase in the pipeline (subjected to flow patterns) ( N m ), 0v pipeline phase- variable flow rate (at time 0VLm  , 0 Lv v ,at time 0VLm  , 0 Vv v ) ( m / s ). 3. Wellbore Temperature and Pressure Simulation Process In OLGA software, OLGA Basic module was used to set up the wellbore model, and the wellbore structure parameters were defined one by one according to the basic geometrical parameters such as casing material and size of different well sections based on the well structure, as shown in Fig. 1, and finally RunBach checks and calibrates the wellbore model. PVTsim software was used to provide the physical parameter files required for OLGA simulation, and the PR equation of state was used as the calculation base model, the well stream components and their mass fractions were set in Create New Data base module, and the temperature and pressure ranges were preset in OLGA module and WAX module, such as -50~200℃ and 0.01~200MPa, so as to generate the OLGA TAB file and WAX file that can be recognized by the software, and set the calculation data points as required. In the wellbore physical model, start the WAXDEPOSITION calculation function in the OPTIONS module, and import the generated TAB file and WAX file, and at the same time, define the fluid properties of each node in the wellbore physical model one by one, as in Fig. 2, to simulate and calculate the distribution of the wellbore temperature field and pressure field. 99 Figure 1. Physical modelling of the wellbore Figure 2. Simulation of wellbore temperature and pressure fields For Bozi block Bozi 1-1 well, Bozi 3 well, Bozi 1JS well, Bozi 12 well, Bozi 24 well, Bozi 102-2 well, Bozi 105 well, Bozi 301 well, Bozi 3-2X well and Bozi 3-3X well, a total of 10 production wells, to establish a single wellbore temperature field and pressure field distribution. 4. Analyses of Example Wells For the 10 condensate wells in Bozi block, based on the corresponding wellbore model, combined with the well conditions and production parameters, the simulation determines the distribution of their wellbore temperature field and pressure field, as can be seen from Fig. 3, the temperature of condensate wells gradually decreases during the process of well fluid lifting, and the slope of the temperature profile shown a gradual trend of becoming larger and larger, indicating that the rate of temperature drop was constantly increasing, and the single wells in the block embody a similar wellbore temperature profile characteristics. During the lifting process of the well stream material, the pressure gradually decreases, and the overall trend of the slope of the pressure profile was not significant, indicating that the pressure drop along the course was relatively constant, and the single wells in the block reflect similar wellbore pressure field distribution characteristics. Obviously, the wellhead temperature was the lowest temperature of the wellbore, and the wax precipitation points of condensate samples were lower than the lowest temperature of the wellbore. If the relationship between this characteristic temperature and the nodal temperature was judged, the wellbore temperature was higher than the wax precipitation point, the oil temperature-led wax precipitation process will not occur in the wellbore, and the wellbore will not be subjected to oil temperature-led deposition plugging. 100 (g) Bozi 105 well (h) Bozi 301 well (i) Bozi 3-2X well (j) Bozi 3-3X well Figure 3. Simulation results of temperature and pressure field distribution characteristics of well borehole In order to reproduce the differences in the distribution of temperature and pressure fields among individual wells more intuitively, and taking into account that temperature was an important influencing factor for the formation of precipitated wax deposition and gas hydrate, etc., the 10 condensate wells mentioned above were classified into the following three major categories based on the depth of a single well and the temperature of the wellhead: Category I: Bozi 3, Bozi 301, Bozi 3-2X, Bozi 3-3X; Category II: Bozi 12, Bozi 102-2; Category III: Bozi 1-1, Bozi 1JS, Bozi 24, Bozi 105; Category III: Bozi 1-1, Bozi 1JS, Bozi 24, Bozi 105; and Category III: Bozi 1-1, Bozi 1JS, Bozi 102-2. wells, Bozi 102-2 wells; Category III: Bozi 1-1 wells, Bozi 1JS wells, Bozi 24 wells, Bozi 105 wells. According to the aforementioned classification, the distribution curves of wellbore temperature field and pressure field were plotted separately, as shown in Figs. 4 and 5, which show that for the condensate wells with similar well depth and wellhead temperature, the change trend of wellbore temperature was relatively similar during the process of lifting up of well streams, the slope of the temperature profile shown a trend of becoming larger overall, and the overall decrease in the temperature was also relatively similar; for the wellbore pressure, the change trend of wellbore pressure was also relatively similar during the process of lifting up of well streams, with the slope of the pressure profile being relatively similar and the overall decrease in temperature was also relatively similar. For the wellbore pressure, during the lifting process of well stream material, the change trend was also similar, and the change trend of pressure profile slope was not significant, but the pressure difference between the bottom of each well was large, even for the similar Bozi 3 and Bozi 3- 2X wells, the difference between the wellhead pressures reaches 30MPa, and the difference between the bottom of the wells' pressures was close to 45MPa (e.g., Fig. 5(a)), which was analysed to be mainly due to the difference between the production rates of the condensate wells and the difference of the differential pressures. 101 (a) Type Ⅰ (b) Type Ⅱ (c) Type Ⅲ Figure 4. Comparison of simulation results of wellbore temperature field distribution characteristics (a) Type Ⅰ (b) Type Ⅱ (c) Type Ⅲ Figure 5. Comparison of simulation results of wellbore pressure field distribution characteristics 102 Further combining the temperature gradient and pressure gradient interpretation data from different wells and different time periods of interference test wells, such as Bozi 3, Bozi 13, Bozi 17, Bozi 301, Bozi 302, Bozi 1202 and Bozi 1302 wells, and using them as the basis for regression of the temperature and pressure profiles, the above 10 condensate wells in Bozi block were classified according to different temperatures and pressures, and the temperature and pressure profiles were regressed and fitted to make them more in line with the actual working conditions. The temperature and pressure profiles of the above 10 condensate wells in Bozi Block were classified according to different temperatures and pressures, and the temperature and pressure profiles were regressed and fitted to fit the actual conditions. The temperature and pressure distributions along the depth of the wellbore were ordered data points, so a linear fitting algorithm was used to construct a straight line or a curve, if all the parameter points were on the line, the temperature and pressure distributions were not in a mismatch state; if the parameter points were not on the line, the temperature and pressure distributions were in a mismatch state, so a linear fitting algorithm was used to fit the parameter quantities, and to further determine the temperature and pressure profiles of the whole wellbore. The linear relationship of the variables was used to react to the linear characteristics, because there were many variables of temperature and pressure along the depth of the wellbore, so take the temperature parameter as an example, assuming that the set of temperature variables is X={x1, x2, ..., xn}, where x represents the temperature variables and n represents the depth of the wellbore; the fitting equation of the fitted curve is l(x), and the sum of the squares of the errors at each point, S, is calculated as in Eq. (5):      2 1 2 2 1,2 n n S l x x A x Y      (5) Where Y is a straight line fit, i.e.  Y X aX b  , where: a is the slope, b is the intercept;  A x is the fitting function, given the point of the horizontal coordinates of the vector obtained after substituting the fitting equation  l x . On the basis of equation (5), given the temperature variable set data (xi, xj), and i ≠ j, based on  Y X aX b  doing a straight line fit to find the variable mean square error  ,A a b , then the calculation of the equation is:        2 2 , 1, 1 , 1, 1 , n n i j i j i j j i j j A a b Y x x ax b x           (6) The mean square error  ,A a b in Eq. (6) is a binary function, and by taking the partial derivatives of each element of the binary function, it is calculated as:     1 , 2 0 n i i i A a b ax b Y x a         (7)     1 , 2 0 n i i A a b ax b Y b         (8) In Eqs. (7) and (8), the sign of the partial derivative  is indicated. The matrix must satisfy Eq. (9) for the partial derivative equation of the binary function  ,A a b as shown in Eq. (7) and Eq. (8): 11 2 1 1 , 1, nn ji ji n n n i i i j i i i j i j xn x b a x x x x                                   (9) Combining the above equations (6) to (9), that is, the linear fitting algorithm temperature mismatch process, it is necessary to find the slope a and interceptb in the straight line fit  Y X aX b  , then the calculation of Eq: , 1, 1 1 2 2 1 1 n n n i j i j i j i j i j n n i i i i n x x x x a n x x                          (10) 2 1 1 1 , 1, 2 2 1 1 n n n n j i i i j j i i i j i j n n i i i i x x x x x b n x x                            (11) According to the equations shown in Eqs. (10) and (11), the values of slope a and interceptb can be obtained, which can be substituted into Eqs. (6) to (9) to analyse the change of slope a , when the slope a does not show any change, the temperature was in a normal state, and does not need to be calibrated, and when there was a significant change in the slope a , it indicates that the temperature was in the state of mismatch and needs to be calibrated. The distribution regression of wellbore pressure was the same as that of temperature distribution regression, which can also be calculated using the above method. As a result, as shown in Fig. 6, the regression results of the distribution of wellbore temperature and pressure profiles of the above 10 wells of condensate gas wells in Bozi block were obtained, and it was obvious that all the results of the simulated data had some deviation from the regression data, and the relative deviation of the wells Bozi 3 and Bozi 1JS was the largest, and there were significant differences of the temperature and pressure profile slopes. The slopes of temperature and pressure profiles were significantly different. 103 (a) Bozi 1-1well (b) Bozi 3 well (c) Bozi 1JS well (d) Bozi 12 well (e) Bozi 24 well (f) Bozi 102-2 well (g) Bozi 105 well (h) Bozi 301 well 104 (i) Bozi 3-2X well (j) Bozi 3-3X well Figure 6. Regression of temperature and pressure distribution in single wellbore 5. Conclusions Aiming at the problem of wellbore waxing in high temperature, high pressure and high wax content deep gas condensate reservoirs, a wellbore temperature/pressure field prediction model for self-injection wells was established with the site parameters of Bozi gas condensate field in the Tarim Basin of China, using OLGA software, and the wellbore temperature/pressure field prediction model of self-injection wells was able to predict the wellbore temperature and pressure data of the example wells of Bozi effectively in the process of gas production. It was found that: during the lifting process of condensate wells, the temperature decreases gradually, and the slope of the temperature profile shown a trend of gradually increasing, indicating that the temperature drop was increasing, and the single wells in the block reflect similar characteristics of the wellbore temperature profile. During the lifting process, the pressure gradually decreases, and the slope of the pressure profile does not had a significant trend, indicating that the pressure drop along the route was relatively constant, and the single wells in the block reflect similar wellbore pressure field distribution characteristics. For the wellbore pressure, during the lifting process of well flow material, its change trend was also similar, and the change trend of pressure profile slope was not significant, but the pressure difference between the bottom of each well was large, even for the adjacent Bozi 3 and Bozi 3-2X wells, the difference between their wellhead pressures reaches 30MPa, and the difference between the bottom of the wells' pressures was close to 45MPa, and the analysis suggests that this was mainly due to the difference between the production of condensate wells and the pressure difference change. It was analysed that this was mainly due to the difference in production of condensate gas wells. Further combining the temperature gradient and pressure gradient interpretation data of different wells and different time interfering test wells in Bozi, and using them as the basis for temperature and pressure profile regression, the above 10 condensate wells in Bozi block were classified according to different temperatures and pressures, and the temperature and pressure profiles were regressed and fitted to fit the temperature and pressure profiles so as to make them more in line with the actual working conditions, and the results of the distribution regression of the temperature and pressure profiles of the wellbore and the pressure profiles of the above 10 condensate wells in Bozi block were obtained. Obviously, the simulation data results had some deviation from the regression data results, and the relative deviation was the largest in Bozi 3 wells and Bozi 1JS wells, and the slopes of the temperature and pressure profiles were significantly different. References [1] Ramey H. J.. Wellbore heat transmission[J]. Journal of Petroleum Technology, 1962, 14(4):427-435. [2] Hong Zhang, Ruichen Shen, Qimin Liang, et al. Coupling analysis oftemperature and pressure distribution of underground gas storage injec-tion-production wellbore[J]. Science Technology and Engineering, 2017, 17(31):66~73. [3] Xiaoli Shi, Deli Gao, Yanbin Wang. Predictive analysis on borehole temperature and pressure of HTHP gas wells considering coupling effect[J]. Oil Drilling & Production Technology, 2018, 40(5):541~546. [4] Xinyue Chen. Research on Prediction Model of Temperature and Pressure Distribution in Wellbore of High Temperature and High Pressure Gas Well[D]. Cheng Du: Southwest Petroleum University, 2019. [5] Ke Wang, Biao Liu, Jun Zhang, et al. Calculation and Analysis of Wellbore Temperature Field in HTHP Gas Wells[J]. China Petroleum Machinery, 2019, 47(1):8~13. [6] Yang Yu, Limin Li, Zonghao Dong, et al. Prediction for Wellbore Temperature and Pressure in Injection-production Well of the Xiangguosi Gas Storage[J]. Petroleum Tubular Goods & Instruments, 2019, 5(2):35~38. [7] Haizhu Wang, Xiaojiang Li, Kamy Sepehrnoori, et al. Calculation of the wellbore temperature and pressure distribution during supercritical CO2 fracturing flowback process[J]. International Journal of Heat and Mass Transfer, 2019, 139(4):10~16. [8] Galvao M. S. C., Carvalho M. S., Barreto A. B.. A coupled transient wellbore/reservoir temperature analytical model[J]. SPE Journal, 2019, 24(5):1~27. [9] Jie Zheng, Yihua Dou, Yinping Cao, et al. Prediction and analysis of wellbore temperature and pressure of HTHP gas wells considering multifactor coupling[J]. Journal of Failure Analysis and Prevention, 2020, 20(1):1~8.