{'fraction_non_alphanumeric': 0.021448326466106, 'fraction_numerical': 0.0036687926849918156, 'mean_word_length': 4.660702875399361, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Finite-element analysis of thermal-induced stresses around a cased injection well

Injection of surface fluids (sea water, CO2, steam) into hydrocarbon reservoirs induces thermal stresses in the wellbore structures and in the near-well area. These stresses may endanger the integrity of the casing, the cement and the surrounding formation. Therefore, an accurate assessment of injection-induced thermal stresses and the associated risk of failure are of utmost importance for a safe and environmentally secure oil production. A coupled finite-element model has been developed and tested as a tool for assessing the probability and extent of failure caused by thermal-induced stresses around a cased wellbore. A feature of the model is an option for an automatic mesh refinement using Nikishkov elements and a quad-tree data structure. The refinement is automatically provided in the regions of rapid change of the nodal variables (displacements, temperature).


Introduction
Injection of surface fluids (sea water, CO 2 ) into hydrocarbon reservoirs is a part of the production technology during enhanced oil recovery and underground storage of greenhouse gases. During underground production of heavy oil, steam-assisted gravity drainage and cyclic injection of steam are major technologies used at present. All these types of technology involve thermal and mechanical interaction between the injection fluid and the wellbore structures at depth that were previously in thermal equilibrium with the formation and thus had the temperature equal to the formation temperature at the depth of interest. Subjecting the wellbore structures and the near-well area to the temperature of the injected fluid induces thermal stresses and strains in the wellbore casing, cement and in the surrounding rocks [1,2]. This may, and often does, result in an integrity loss of the structures. There is no need to say that an integrity loss can have negative economic and environmental consequences. Therefore, a quantitative analysis of the risk and extent of thermallyinduced damage is of utmost importance for a prolonged, environmentally secure hydrocarbon production. This is especially true in the new millennium when conventional easy-to-develop reserves are being gradually depleted, and more and more difficult fields are involved in production, e.g. deepwater fields and high temperature high pressure reservoirs.
The most common types of casing failure in wells with cyclic steam injection are caused by heating/cooling-induced tensile stresses or by casing buckling. In this work, only the former mechanism is investigated. This mechanism works as follows. During injection of the hot fluid A common cure against casing failure caused by heating/cooling-induced tensile stresses is to set a pre-stressed casing. In that technology, the casing is stressed in tension in the axial direction before it is cemented. After the cementation is completed, the initial tensile stresses will prevent the casing from yielding when heating wants to induce compressive stresses in the casing. As a result, the risk of casing failure in tension will be reduced during a subsequent cooling.
Stress analysis in casing subjected to thermal loading is usually done without taking into account the effect of the surrounding rock formation (e.g. [3][4][5][6]). It is conceivable that the heterogeneous reservoir rock, with interbedding softer and harder rocks, might additionally aggravate the stress environment in the wellbore structure and thus further reduce the well integrity.
The main objectives of the work presented in this paper were to develop and test a finite-element model of thermal induced stresses generated in the wellbore casing, cement and near-well area during injection of surface fluids; and to study the usually neglected effect that the presence of hard or soft rock layers might have on stresses and failure of casing and cement. Also, we aimed to investigate the effect of pre-stressed casing on the stability of the cement and the near-well rock. Also, we aimed to test an automatic mesh refinement algorithm that makes use of Nikishkov finite elements, described further in the paper. It should be emphasized that all materials are linear elastic in our model. Thus, we cannot model the heat-induced yielding and the subsequent generation of tensile stresses during cooling. But the model allows us to estimate whether the yielding will occur or not, and if yes, what parts of the wellbore structures and the formation are most prone to thermal-induced failure.

Finite-element model
The finite-element method (FEM) is one of the most popular methods for engineering stress analysis, at least of the problems that do not involve stress singularities or material fragmentation. Amongst the reasons for the wide-spread use of FEM in solid and structural mechanics are its flexibility and relative ease of implementation in a computer code, good capabilities for implementing even the most complex material models, and a solid and well-established theoretical background of FEM [7].
Our wellbore model is a two-dimensional model and represents an axisymmetric problem. Both steady-state and transient simulations are possible. In the transient mode, the Crank-Nicolson scheme for time integration is used. Coupling between the thermal and mechanical models is one-way coupling, i.e. the results from the temperature field computation are fed into the mechanical model, but the results of the stress analysis do not in any way affect the thermal model. The mechanical model computes the mechanical stresses induced by both mechanical and thermal loading of the system.

Geometry
The geometry of the problem is schematically shown in figure 1. As evident in figure 1, the wellbore section being analysed is always straight and parallel to the greatest in-situ far-field principal stress. Due to the nature of FEM, the model has to be finite, even though in reality the rock formation has an infinite extent in horizontal direction. It is common to assume that keeping the ratio between the model radius and the wellbore radius at or greater than 10 provides a good approximation to the infinite case. In our simulations, this ratio was equal to approximately 20.
The dimensions of the model used in our simulations are listed in table 1.
2.2. Elements, mesh and remeshing Two types of mesh can be used in the model implementation. One makes use of triangular 3-node elements. The same mesh is used for the thermal and mechanical analyses, thus the accuracy is first order in temperature and displacements. The other type of mesh geometry makes use of rectangular   elements and is used when automatic remeshing is opted for. An example of this type of mesh is shown in figure 2. Only this latter type of mesh was used in the simulations described in this paper. The rectangular mesh may initially include both the conventional 8-node serendipity elements and the Nikishkov elements. Examples of the Nikishkov refinement elements are shown in figure 3. An extensive discussion of these elements and their shape functions can be found in [8]. When automatic refinement is performed, the elements are contained in a quad-tree data structure. After refinement, the so-called mesh balancing is carried out, in order to ensure that no two elements having a common boundary have a generation difference in excess of 1.
2.3. Material properties All materials are assumed to be linear elastic herein. Poromechanical effects in the rock are neglected. Thermal and elastic properties of four materials that represent casing, cement and two types of rock are listed in table 2. These parameters are used for the finite-element stress computation. During postprocessing, appropriate failure criteria are checked for every part of the model. The parameters that are used in this failure analysis are listed in table 3. It should be emphasized that the yield stress of steel and the parameters of the Mohr-Coulomb failure criterion listed for cement and rocks are used for the evaluation of the failure risk only, and do not serve as input in the FEM stress analysis.

Mechanical initial and boundary conditions
The largest in-situ principal stress is assumed to be parallel to the wellbore axis. For the sake of clarity, this stress will be termed 'vertical' in what follows. Accordingly, the wellbore is vertical, too. The top boundary of the model is assumed to be located at a depth of D = 500 m. The initial vertical stress is assumed to be equal to the weight of the overburden having a density of 2500 kg/m 3 . The initial vertical stress is thus equal to 12.5 MPa. Two other initial in-situ stresses, i.e. the horizontal stresses, are assumed to be equal to each other, in order to assure axial symmetry of the problem. Roller boundary conditions are set at the top, bottom and at the far boundary of the model. These are the most common boundary conditions used for this type of problems in rock mechanics. The initial conditions are applied in the sequence that should mimick as accurately as possible what is happening during completion of a cased well.   Just after the wellbore has been drilled, and before the casing is set, the radial σ rr and circumferential σ θθ stresses in the model can be evaluated using a well-known analytical solution from the theory of elasticity as follows [9]: where r is the radial coordinate, i.e. the distance from the borehole axis; R w is the radius of the well; R o is the external radius of the model; w σ is the wellbore pressure; o σ is the radial stress acting at the external boundary of the model. We assume o σ to be equal to the theoretical in-situ horizontal stress given by ( ) where ν is the Poisson's ratio of the rock, and v σ is the vertical stress applied to the model and equal to the overburden pressure. We assume w σ to be equal to the 'completion stress', p c , which is the wellbore pressure at the time just before the casing is installed. It can be assumed to be equal to e.g. 6 MPa for a 500 m deep well. The stresses given by (1) and (2) are applied as initial stresses inside the rock. Inside the cement, the initial stress state is assumed to be hydrostatic. In order to ensure the radial stress continuity between cement and rock, this hydrostatic stress has to be equal to p c . Finally, in the casing, the initial radial stress is equal to p c , and the initial vertical stress is equal to zero (in a casing that has not been pre-stressed) or to some positive value (in a pre-stressed casing). The initial wellbore pressure at the inner wall of the casing is equal to p c , and so is the initial radial stress at the outer wall of the casing. This ensures continuity of the initial radial stress across the boundary between the casing and the cement. During injection, rollers are retained as boundary conditions at the top, bottom and far vertical boundaries of the model. At the wellbore wall, a normal stress equal to the downhole injection pressure is applied, e.g. 7 MPa.

Thermal initial and boundary conditions
The initial temperature distribution is homogeneous, the temperature being equal to the virgin formation temperature which should eventually be evaluated based on the geothermal gradient and the depth, D. It is assumed to be equal to 30°C in the simulations presented in this paper.
Two thermal modes are available: steady state and transient. In the steady state mode, the stress problem is solved for a homogeneous temperature field, with the temperature equal to the downhole steam temperature in all parts of the model, i.e. casing, cement and rock. In the transient mode, the temperature is rapidly increased at the inner wall of the casing so as to acquire a profile along the wellbore axis. As a special case, for a relatively short section of the well, the temperature along the wellbore wall may well be assumed to be constant. In the simulations of a relatively short wellbore section described in this paper the downhole steam temperature is assumed to be equal to 280°C along the entire wellbore section. In general, the temperature distribution along the wellbore axis should be provided by a wellbore flow simulation as an input to our finite-element model.
In the transient simulations, two types of boundary conditions, i.e. Dirichlet (isothermal) or Neumann (adiabatic), can be applied at the bottom, top and far vertical side of the model during injection. In the simulations presented in this paper, we apply the adiabatic boundary condition at the top and bottom boundaries, and isothermal condition at the far vertical side of the model. On that latter boundary, the temperature is maintained constant and equal to the original formation temperature, i.e. 30°C.

Results
Eight test cases have been studied, summarized in Table 4. The test cases differ in lithology, thermal regime and casing pre-tension. In the transient simulations, the stress distributions have been analysed after 10 hours of injection. At that time, the temperature front propagates to between 0.5 and 1.0 m from the borehole axis into the formation. The casing pre-tension, if any, was chosen so as to match the expected compressive stresses caused by the temperature increase. Figure 4 shows the vertical (axial) stress distributions for the steady state thermal regime. All vertical stresses shown here are taken along the borehole and in the middle of the casing. In both cases shown in the figure the casing is in compression due to the thermal stresses but the rock formation has a great influence on the stresses in the casing. In case A where a soft layer of rock is located in between stiffer layers, a very large negative peak in the vertical stress is observed at the location of the layer. In case B were a stiff layer is lying in between softer rocks the casing is less compressed in the neighbourhood of the layer but in the region of the soft rock the compression is larger. Thus, a thin layer of a soft rock in between stiffer layers might be more dangerous for the borehole integrity than the opposite lithology.   Pre-tensioning the casing should prevent compression in the casing. As can be seen in figure 6 the applied pretension that was calculated based on the injection temperature without taking into account the effect of the surrounding formation, was not sufficient to prevent large axial compressive stresses from developing in the casing, especially in Case C were a thin layer of soft rock is formed between stiffer layers. It can be concluded that the amount of pre-tension needed depends on the rock formation the casing is installed in.  The distribution of the axial stress in the cement indicates the same trends as those in the casing, although the magnitude of the generated stresses is an order of magnitude lower in the cement. This is due to the fact that the elastic modulus of cement is an order of magnitude smaller in cement. Since the strength of the cement is however much lower than that of steel, the induced thermal stresses might have much more devastating results in the cement than they might have in steel. Cement failure may represent a serious threat for the wellbore integrity since this might create a hydraulic communication up along the well.
Analysis of the radial stresses has shown that in case A tensile radial stresses develop at the interface between the casing and the cement in the vicinity of the boundaries between the rock layers. These radial stresses are found in the simulations with and without casing pre-tensioning. Analysis of the shear stress produced at the interfaces casing/cement and cement/rock indicates that increased shear stresses are produced near the central layer in our model. Both elevated radial tensile stresses and shear stresses at the interfaces may result in various forms of failure in and around the casing.
Applying the strength data shown in table 3 it was found that in the case of a soft middle layer the soft rock will fail, as also will the cement in the vicinity of the soft layer. In the case of a stiff middle layer, no failure would occur in the model, but the safety factor is higher in the stiff layers and the casing than they are in the soft layer and the cement.

Conclusions
A finite element code has been developed to model the thermal induced stresses in a steel casing, cement and the near-well area caused by fluid injection as part of e.g. enhanced oil recovery or thermal production of heavy oil. The finite element code makes use of a special type of element, the Nikishkov element, that allows an automatic adaptive refinement of 8-node serendipity elements using a quad-tree data structure. Numerical simulations of test cases with the developed code have proven that interbedding layers of relatively soft and relatively stiff rocks have a major effect on the thermal stress distribution along the casing as well as on the effect a casing pre-tension might have on the reduction of thermal compressive stresses. A complex stress environments form along the well that may include elevated axial stresses, shear stresses along the boundaries casing/cement and cement/rock, or even tensile radial stresses between the casing and the cement. These stress conditions may result in the material failure which can jeopardize the well integrity during steam injection. It should be noted that the simulations presented in this paper have been carried out for a very short casing section. Further work is required in order to conclude whether the effect found out herein will still be as well pronounced in more realistic, longer casing sections. Also, poroelastic effects in the rocks should be further included in the model.