1 Introduction

Coupling THM effects on fractured porous media is important to describe processes such as carbon storage, hydrogen storage, geothermal energy extraction, underground storage of thermal energy, gas-oil recovery, remediation of contaminated sites, isolation of hazardous waste, amongst others (Jing and Hudson 2002; Kolditz et al. 2016; Ma et al. 2016; Maedo et al. 2021; Bai and Tahmasebi 2022; Damirchi et al. 2022; Mahmoodpour et al. 2022; Saeedmonir and Khoei 2022; Aliyu et al. 2023). The first fully coupled flow-deformation analysis for elastic responses of saturated single porous media was considered in Biot (1941). Since then, the model has been widely adopted to describe pore pressure and effective stress distribution in saturated porous media (Detournay and Cheng 1988; Cheng et al. 1993). Throughout the literature, the most basic principles of THM modelling are demonstrated by Terzaghi's consolidation theory (von Terzaghi 1923), Biot’s theory of elasticity (Biot 1941) and mixture theory (Goodman and Cowin 1972; Bowen 1982).

In recent years, more advanced models have been developed for deformable formations considering plasticity and continuum damage effects (Khalili and Loret 2001; Mortara 2009; Busetti et al. 2012; Shojaei et al. 2014; Ma 2016; Spiezia et al. 2016; Brünig and Michalski 2017; Zhao et al. 2018; Shen et al. 2019; Paluszny et al. 2020; Maedo et al. 2021; Ma et al. 2022; Kong et al. 2023; Zhang et al. 2023) including the coupling of elastoplastic damage models with micromechanics. These models adeptly capture phenomena such as strain softening and changes in elastic stiffness through the damage model, while accounting for irrecoverable strain and the residual state using plasticity theory. This coupling is crucial, as it enables the representation of permanent deformations within the material (Ma and Zhao 2018). However, despite these advancements, a critical gap exists in the consideration of coupled thermal effects within existing models. Current models, while adept at simulating mechanical and damage responses, often fall short of adequately addressing the thermal effects inherent in fractured rock formations.

Considering thermal loading in porous media, McTigue (1986) is one of the most cited research articles that considers local thermal equilibrium in rock and provides analytical results for the thermo-elastic behaviour of saturated porous rock with single porosity. The thermo-mechanical behaviour is based on Biot’s (1941) poro-elasticity theory and on the isothermal theory of Rice and Cleary (1976). The characteristic of McTigue’s model is that the thermal expansion of the porous medium is controlled by the solid skeleton only, the constitutive diffusion equations are based on Darcy’s and Fourier's laws and a reduced form of the energy balance equation is presented as convective transport. Masters et al. (2000), assumed local thermal equilibrium among all phases and only one temperature variable was considered. Both convection and conduction are included in the model of Masters et al. (2000) and they validated their model with a double porosity isothermal problem and a non-isothermal single porosity example. For non-isothermal conditions, Bowen and Garcia (1970) introduced the thermo-mechanical theory of a mixture, in which each phase had its own temperature, considering non-linear elasticity, non-linear heat conduction, non-linear viscosity, and diffusion. Aifantis (1980) and Aifantis and Beskos (1980) were among the first to attempt non-isothermal models in fractured media, based on the assumption that the flow mechanism is convective in the fractures and conductive in the porous phase. De La Cruz and Spanos (1989) coupled the temperature variation and mechanical motion by considering separate temperature and heat transfer parameters for each phase of the saturated porous medium. Liu and Yu (2011), following the framework of Nishimura et al. (2009), recommended a coupled THM model to describe the behaviour of unsaturated porous media during freezing. Their model was based on thermodynamics and fluid mechanics. It took into consideration the elastoplastic deformation and the change of the volumetric heat capacity and ice content during freezing. Khalili and Selvadurai (2003), proposed a fully coupled THM model for fully saturated elastic double porous media, assuming local thermal non-equilibrium. Thermal convection was accounted for between the phases, and three balance energy equations were proposed for the solid, porous and fracture domains (Khalili and Selvadurai 2003). Furthermore, the constitutive equations proposed by the THM model of Gelet et al. (2012) can be used to identify the possible failure of a borehole exposed to both temperature and pressure gradients. Tan et al. (2011) set up a coupled THM model describing the heat transfer and temperature distribution as well as water migration. They suggested a fully coupled THM model combined with a damage theory model, which could analyse the freeze–thaw stability of a tunnel under severe conditions. Huang et al. (2018) carried out a validation of the THM laboratory test conducted by Neaupane et al. (1999) by comparing it to a theoretical THM model, which was also numerically analysed, and found a good prediction of the heat and frost energy dissipation. Their validation demonstrated that all the critical parameters, including pore ice pressure, permeability, and thermal energy, were linked to the unfrozen water content. However, their test was limited to homogeneous and isotropic rock in which thermal transmission was the same in every direction during freezing. Finally, Ma et al. (2022) proposed a coupled THM elastoplastic damage model for concrete subjected to dynamic loading, focusing on thermal hardening due high temperature loading (20 °C < T < 950 °C) and triaxial conditions.

Previous investigations in the literature have generally not considered brittle–ductile behaviour, and existing damage models have demonstrated limitations in their capacity to explore phenomena such as fracturing, crack re-opening, or closure. Moreover, earlier models have struggled to simultaneously account for both thermal-hydro-mechanical (THM) effects and elastoplastic hardening influences. This study presents a groundbreaking constitutive model designed to emulate THM effects within a medium (rock) proximate to a wellbore. What sets this research apart is its integration of both thermal and elastoplastic continuum damage effects, departing from the conventional assumption of elasticity and isothermal conditions. This fully coupled THM double-porosity FEM model may be applied to simulate several wellbore stability scenarios during drilling and production of oil and gas; estimate any pore-fissure pressure and temperature evolution on a double porosity fractured medium during carbon sequestration due to different CO2 injection scenarios; estimate the THM effects of thermal energy hydrogen storage, etc. This research expands the work of Ma et al. (2016) and Ma and Zhao (2018), introducing also thermal effects to rock, based on the work of Khalili and Selvadurai (2003), Gelet et al. (2012) and Ma et al. (2022). Hardening plasticity effects and permeability evolution are also considered in the proposed model based on the research of Khalili et al. (2008). The solution for the governing differential equations was obtained by numerical implementation of the constitutive model using an innovative finite element formulation developed in MATLAB.

2 Constitutive modelling

The model consists of a fully coupled THM formulation, where rock is treated as a two-phase system consisting of solid and liquid. The formulation presented consists of three separate inter-connected models considering deformation, flow, and heat exchange. Two interacting domains are identified: one representing the porous medium and the other the fracture network. Non-isothermal conditions are considered to exist in the double porous media during thermal loading, due to the different thermal diffusivity of the fluid in the pores and fissure and of the solid grains. However, adopting a non-isothermal model raises two issues: the correct termination of the work conjugate variables that describe the constitutive coupling laws and the definition of the heat transfer parameters between domains (Gelet et al. 2012). For the current research and for simplicity, the assumption that pores and fissures have the same temperature at each time step is adopted, i.e., the domains are in thermal equilibrium and one energy balance equation is written for the entire system. However, mass transfer between the domains is considered and the double porosity model of Khalili (2008) and Gelet et al. (2012) is adopted to describe the porous and fissure network.

The model is formulated as a coupled system of the partial differential governing equations, which are discretised in space by a finite element formulation and discretised in time by using the modified Euler’s forward scheme with automatic sub-stepping. The set of coupled governing equations are non-linear, second-order differential equations that contain both spatial and temporal derivatives of the primary variables, which are deformations, pore and fissure pressure and temperature of the solid. The solution of the discretised numerical model constructed from the differential equations can be used to solve the continuum problem as a linear problem using finite elements. The solutions produced by this technique for a typical boundary value problem are formed of both global and local solutions. For this research, the global solution scheme is used for the primary variables. The integrated constitutive model produces the local solutions, and variables such as stress, strain, plastic hardening, damage and permeability evolution are determined. In Fig. 1 the constitutive model flow chart can be seen. The detailed analytical formulation of the model and the constitutive relationships, as well as the damage evolution and hardening effects on rock are presented in the following sections.

Fig. 1
figure 1

Flowchart of constitutive model implementation

2.1 Deformation model

The deformation model is described by the concept of geomechanical effective stress (Khalili and Valliappan 1996). According to Khalili and Selvadurai (2003), Gelet et al. (2012) and Bai (2016) and adopting Voigt’s notation, the incremental form of the effective stress for saturated double porous media can be given as:

$$\dot{\varvec{\sigma }}^{\prime } = \dot{\varvec{\sigma }} + j_{1} \mathop {p_{1} }\limits^{ \cdot } {\varvec{\delta}} + j_{2} \mathop {p_{2} }\limits^{ \cdot } {\varvec{\delta}} + \frac{{C_{Ts} }}{{C_{f} }}\dot{T}_{s} {{\varvec{\updelta}}}$$
(1)

where \(j_{1}\) and \(j_{2}\) are the effective stress parameters that relate, respectively, the pore pressure and fissure pressure to the matrix deformation vector; \({\varvec{\delta}}\) is Kronecker’s delta function; \(\dot{\varvec{\sigma }}\) is the incremental total stress; \(\mathop {p_{1} }\limits^{ \cdot } ,\) \(\mathop {p_{2} }\limits^{ \cdot }\) and \(\dot{T}_{s}\) are the increments of pore and fissure fluid pressures and temperature of the solid respectively; and \(\frac{{C_{Ts} }}{{C_{fr} }}\) is the ratio between the volumetric thermal expansion of the solid and the compressibility of the fracture domain. Based on Khalili et al. (2010), the volumetric thermal expansion coefficient of a whole porous medium is fully determined and equal to the thermal expansion of the solid skeleton. The effective stress parameters can be expressed as follows:

$$\begin{aligned} j_{1} & = {{C_{p} } \mathord{\left/ {\vphantom {{C_{p} } {C_{fr} }}} \right. \kern-0pt} {C_{fr} }} - {{C_{s} } \mathord{\left/ {\vphantom {{C_{s} } {C_{fr} }}} \right. \kern-0pt} {C_{fr} }} \\ j_{2} & = 1 - {{C_{p} } \mathord{\left/ {\vphantom {{C_{p} } {C_{fr} }}} \right. \kern-0pt} {C_{fr} }} \\ \end{aligned}$$
(2)

where \(C_{p}\), \(C_{fr }\) and \(C_{s }\) represent the drained tangent elastic compressibilities of the porous medium, the fractured porous domain and the solid skeleton, respectively.

Selecting a representative volume of the fractured porous medium as an element, and assuming no internal acting forces, the linear momentum equation for the whole element can be expressed as:

$$div{\varvec{\sigma}} + {\varvec{F}} = 0$$
(3)

where \({\varvec{\sigma}}\) is the total external stress and \({\varvec{F}}\) represents the body force per unit volume.

For the case of small deformations, the total strain component can be expressed as:

$${\varvec{\varepsilon}} = \frac{1}{2}\left( {\nabla {\varvec{u}} + {\varvec{u}}\nabla } \right)$$
(4)

where u is the displacement vector of the solid phase.

The incremental stress–strain relationship can be indicated as:

$$\dot{\varvec{\sigma }}^{\prime } = \left[ {\varvec{C}} \right]\dot{\varvec{\varepsilon }}$$
(5)

where \({\varvec{C}}\) is the tangential drained stiffness of the solid matrix of the damaged material including any elastic thermal effects and \(\dot{\varvec{\varepsilon }}\) is the strain increment of the solid skeleton.

Following Eqs. (1)–(5) the partial differential equation for the deformation model of a thermo-elastic double porous medium is described as follows:

$$div\left( {\frac{1}{2}\left[ {\varvec{C}} \right]\left( {\nabla \dot{\varvec{u}} + \dot{\varvec{u}}\nabla } \right) - j_{1} \mathop {p_{1} }\limits^{ \cdot } {\varvec{\delta}} - j_{2} \mathop {p_{2} }\limits^{ \cdot } {\varvec{\delta}} - \frac{{C_{Ts} }}{{C_{fr} }}\dot{T}_{s} {{\varvec{\updelta}}}} \right) + \dot{\varvec{F}} = 0$$
(6)

\(C_{fr}\) according to Khalili et al. (2008) can be expressed in terms of Young’s modulus (E) and Poisson’s ratio \(\left( \nu \right)\) as:

$$\left\{ {\begin{array}{*{20}l} {C_{fr} = \frac{{\left( {1 - 2\nu } \right)\left( {1 + \nu } \right)}}{{\left( {1 - v} \right)E}},} \hfill & {\quad for\;1D\;strain\;conditions} \hfill \\ {C_{fr} = \frac{{2\left( {1 - 2\nu } \right)\left( {1 + \nu } \right)}}{E},} \hfill & {\quad for\;2D\;strain\;conditions} \hfill \\ {C_{fr} = \frac{{3\left( {1 - 2\nu } \right)}}{E},} \hfill & {\quad for\;3D\;strain\;conditions} \hfill \\ \end{array} } \right.$$
(7)

2.2 Flow model

The flow of fractured rock, in the pores and fissures, is determined by linking Darcy's law with the fluid and temperature gradient mass balance equation. Disregarding any internal and viscous effects, considering an isotropic porous material, Darcy’s law is as follows:

$${\varvec{v}}_{a}^{r} = - \frac{{{\varvec{k}}_{a} }}{\mu } \left( {\nabla p_{a} + \rho_{f} {\varvec{g}}} \right) - \varphi_{a} \Theta \nabla T, a = 1, 2$$
(8)

where \(a = 1 , 2\) represent the porous and fracture networks respectively, \({\varvec{v}}_{a}^{r}\) is the relative velocity of the fluid, \({\varvec{k}}_{a}\) is the average permeability, \(\nabla p_{a}\) is the fluid pressure gradient, \(\rho_{f}\) is the density of the fluid, \(\mu\) is the dynamic viscosity of the fluid, \({\varvec{g}}\) is the vector of gravitational acceleration, \(\varphi_{a}\) is the porosity of pores or fissures, and \(\Theta\) is the thermo-osmosis coefficient coupling fluid flux to the temperature gradient.

The relative velocity of the fluid can be expressed as:

$${\varvec{v}}_{a}^{r} = \varphi_{a} \left( {{\varvec{v}}_{a} - {\varvec{v}}_{s} } \right)$$
(9)

where \({\varvec{v}}_{a}\) is the absolute fluid velocity and \({\varvec{v}}_{s}\) is the velocity of the solid structure.

Ma et al. (2016) and Bai (2016) suggested that by considering the conservation of mass and the mass exchange between the porous medium and fissure network, the mass balance equation for a double porosity system can be given as:

$$- div\left( {\varphi_{a} \rho_{f} {\varvec{v}}_{s} } \right) - div\left( {\rho_{f} {\varvec{v}}_{a}^{r} } \right) = \frac{\partial }{\partial t}(\varphi_{a} \rho_{f} ) + \left( { - 1} \right)^{a} \gamma \left( {p_{1} - p_{2} } \right)$$
(10)

where \(p_{1} ,\) and \(p_{2}\) are the pore and fissure fluid pressures, respectively, and \(\gamma\) is the shape factor for quasi-steady-state conditions that controls the exchange of fluid mass between the porous matrix and the fissure network and it is expressed according to Warren and Root (1963) as:

$$\gamma = \frac{{4\omega \left( {\omega + 2} \right)}}{{l^{2} }}$$
(11)

where \(\omega\) is the number of the total sets of fractures and \(l\) is the characteristic dimension for matrix blocks, which can be expressed from surface-volume ratio following the work of Bai (2016) as follows:

$$l = \left\{ {\begin{array}{*{20}l} {\frac{{3d_{1} d_{2} d_{3} }}{{\left( {d_{1} d_{2} + d_{2} d_{3} + d_{1} d_{3} } \right)}},} \hfill & {\quad \omega = 3} \hfill \\ {\frac{{2d_{1} d_{2} }}{{\left( {d_{1} + d_{2} } \right)}},} \hfill & {\quad \omega = 2} \hfill \\ {d_{1} ,} \hfill & {\quad \omega = 1} \hfill \\ \end{array} } \right.$$
(12)

where \(d_{1} , d_{2} ,\; {\text{and}}\;d_{3}\) is the average fissure spacing along three orthogonal directions.

Applying the Lagrangian total derivative concept to Eq. (9) the flow equation will be as follows:

$$- \rho_{f} div\left( {{\varvec{v}}_{a}^{r} } \right) = \varphi_{a} \frac{{d_{a} \rho_{f} }}{dt} + \rho_{f} \frac{{d_{s} \varphi_{a} }}{dt} + \varphi_{a} \rho_{f} div\left( {{\varvec{v}}_{s} } \right) + \left( { - 1} \right)^{a + 1} \gamma \left( {p_{1} - p_{2} } \right)$$
(13)

The term \(\frac{{d_{a} \rho_{f} }}{dt}\) can be rewritten using the coefficient of fluid compressibility (\(C_{fl} )\) and the thermal expansion coefficient of the fluid (\(C_{Tf} )\) following Khalili et al. (2008) as:

$$\frac{{d_{a} \rho_{f} }}{dt} = C_{fl} \rho_{f} \frac{{d_{a} p_{a} }}{dt} - \rho_{f} C_{Tf} \frac{{d_{a} T_{a} }}{dt}$$
(14)

where \(T_{a}\) is the water temperature in the porous and fissure domain.

According to Ma et al. (2016), the divergence of the velocity of the solid structure can be expressed as follows:

$$div\left( {{\varvec{v}}_{s} } \right) = \frac{1}{{V_{total} }}\frac{{d_{s} V_{total} }}{dt}$$
(15)

The term \(\frac{{d_{s} \varphi_{a} }}{dt}\) from Eq. (13) can be also expressed as:

$$\frac{{d_{s} \varphi_{a} }}{dt} = \frac{1}{{V_{total} }}\left( {\frac{{d_{s} V_{a} }}{dt} - \varphi_{a} \frac{{d_{s} V_{total} }}{dt}} \right)$$
(16)

2.3 Heat transfer to the solid medium

The heat transfer is due to the temperature gradient only and can be described by the multi-dimensional extension of Fourier’s Law as:

$${\varvec{q}}_{s} = - \varphi_{s} k_{s} \nabla T_{s}$$
(17)

where \(\varvec{ q}_{s}\) is the conductive heat flux, \(\varphi_{s}\) is the porosity of the solid and \(k_{s}\) is the thermal conductivity of the solid.

According to Gelet et al. (2012) and Bai (2016) and assuming that the pore-fluid, fissure-fluid and solid are in local equilibrium, the energy balance equation for the solid phase can be presented as:

$$div\left( {\varphi_{s} k_{s} \nabla T_{s} } \right) = T_{s} \dot{s}_{solid}$$
(18)

where \(\dot{s}_{solid}\) is the change in entropy per unit volume which can be expressed, following Bai (2016), as:

$$\dot{s}_{solid} = \frac{{C_{Ts} }}{{C_{f} }}\dot{\varepsilon } - \left( { j_{1} - \varphi_{1} } \right)C_{Ts} \mathop {p_{1} }\limits^{ \cdot } - ( j_{2} - \varphi_{2} )C_{Ts} \mathop {p_{2} }\limits^{ \cdot } + \frac{{\rho^{s} C_{ps} }}{{T_{s} }}\dot{T}_{s}$$
(19)

where \(C_{ps}\) is the possible heat capacity of the solid (J/m3 K) and \(\rho^{s}\) is the apparent density of the solid (kg/m3), which is equal to the porosity of the solid \(\left( {\varphi_{s} } \right)\) multiplied by the intrinsic density of the solid \(\left( {\rho_{s} } \right)\).

2.4 Damage variable

For a certain Representative Elementary Volume (REV), big enough to contain several discrete micro-cracks; a plane normal to the direction vector (\({\varvec{n}}_{s}\)) is considered, which has an area (\(A\)) consisting of a damaged area (\(A_{D}\)) and an undamaged area (\(A_{u}\)). If we denote D as the damage variable linked to the vector (\({\varvec{n}}_{s} )\) then it is a scalar for isotropic damage and anisotropic operations:

$$D = \frac{{A_{D} }}{A}$$
(20)

In fracture mechanics, a fracture takes place when the current principal tensile stress exceeds the tensile strength in the stress domain. However, rock materials are exposed to both hydrostatic and deviatoric stress. Consequently, the equivalent stress or Von-Mises criterion is applied. Von-Mises criterion is applicable for the analysis of plastic deformation for ductile materials. The yielding of the ductile material begins when the second invariant of deviatoric stress \(J_{2}\) reaches a critical value. The equivalent stress is equal to the deviatoric stress as \(\sigma_{e} = \sqrt {3J_{2} } .\)

The damage evolution law based on the Von-Mises criterion following the work of Yazdchi et al. (1996), Lemaitre (1985), Kachanov (1980) and Ma (2014) is:

$$\dot{D} = \left\{ {\begin{array}{*{20}l} {{\text{H}}_{{ \sigma_{e} }} \left( {\sigma_{e} } \right)^{1/m} ,} \hfill & {\quad \sigma_{e} > \sigma_{et} } \hfill \\ {0,} \hfill & {\quad \sigma_{e} \le \sigma_{et} } \hfill \\ \end{array} } \right.$$
(21)

where \({\text{H}}_{{ \sigma_{e} }}\) is the damage evolution rate and depends on the stress state (confining pressure and stress ratio):

$${\rm H}_{{ \sigma_{e} }} = h_{{ \sigma_{e} }} \left| {lnz} \right|\left| {ln\left( {\frac{{M_{cs} + \eta }}{{2M_{cs} }}} \right)} \right|$$
(22)

where \(z\) controls the effects of the confining pressure on material behaviour and is expressed as \(z = {{p_{o}^{\prime} } \mathord{\left/ {\vphantom {{p_{o}^{\prime} } {\left( {p_{conf}^{\prime} + 1} \right)}}} \right. \kern-0pt} {\left( {p_{conf}^{\prime} + 1} \right)}}\), with the \(p_{o}^{\prime}\) being the maximum hydrostatic compressive pressure or the historic consolidation pressure and \(p_{conf}^{\prime}\) is the confining pressure; \(h_{{ \sigma_{e} }}\) is a material constant that may be determined by fitting to experimental results; \(\eta = \frac{q}{{p^{\prime}}}\) can be used to determine the relationship between deviatoric and hydrostatic stresses (this is important as, generally, hydrostatic stress can be responsible for the closure of micro-cracks, and we need to discover the propagation of the micro-cracks); and \(M_{cs}\) is the slope of the critical state line. Based on these, the threshold of the damage equivalent stress \(\sigma_{et}\) can be expressed as (Ma et al. 2016):

$$\sigma_{et} = \sigma_{et0} + \frac{{k_{{\sigma_{e} }} p^{\prime}{\text{exp}}\left( {1/h} \right)}}{{\left( {1 - D} \right)}}$$
(23)

where \(\sigma_{et0}\) is the initial threshold of damage equivalent stress, \(k_{{\sigma_{e} }} > 0\) is a rock constant that controls the increase in the rate for the damage equivalent stress threshold. The hydrostatic stress p′ is responsible for the development of micro-cracks and the plastic hardening or softening of the rock is determined by the plastic hardening energy \(h\).

2.5 Constitutive relationships

According to the framework of continuum damage mechanics (Lemaitre 1985; Voyiadjis and Kattan 2005; Ma et al. 2016), the irrecoverable energy dissipation \(\psi\) consists of two parts: the damage elastic part \(\psi_{e}\) and the damage plastic part \(\psi_{p}\). In this work, the plastic and elastic parts are denoted using the labels 'p' and 'e' respectively. In isothermal conditions, the irrecoverable energy dissipation \(\psi\) is expressed as:

$$\psi = \psi_{e} + \psi_{p} = \frac{1}{2}\left[ {{\varvec{\varepsilon}}^{e} } \right]^{T} \left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]\left[ {{\varvec{\varepsilon}}^{e} } \right] + \psi_{p}$$
(24)

where \({\varvec{\varepsilon}}^{e}\) is the second-order symmetric elastic strain tensor and \({\varvec{S}}_{{{\varvec{DT}}}}\) is the fourth-order elastic stiffness tensor for the damaged material including elastic thermal effects. Thermal influence is included in the elastic strain using:

$${\varvec{S}}_{{{\varvec{DT}}}} = \left( {1 - D} \right)^{2} {\varvec{S}}_{{\varvec{T}}}$$
(25)

where \({\varvec{S}}_{{\varvec{T}}}\) is the fourth-order elastic stiffness of the undamaged material considering only thermal elastic deformations.

The effective stress, is presented as the derivative of the energy dissipation to the derivative of the elastic strain:

$$\varvec{\sigma^{\prime}} = \frac{\partial \psi }{{\partial {\varvec{\varepsilon}}^{e} }} = \left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]\left[ {{\varvec{\varepsilon}}^{e} } \right]$$
(26)

By differentiating Eq. (26), the stress rate (using Einstein convection) is determined as follows:

$$\dot{\varvec{\sigma }}^{\prime } = - \frac{{2\dot{D}}}{1 - D}\left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]:{\varvec{\varepsilon}}^{e} + \left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]:\dot{\varvec{\varepsilon }}^{e}$$
(27)

Equation (27) can be rearranged to:

$$\dot{\varvec{\sigma }}^{\prime } = \left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]: \dot{\varvec{\varepsilon }}^{d}$$
(28)

in which

$$\dot{\varvec{\varepsilon }}^{d} = \dot{\varvec{\varepsilon }}^{e} - \frac{{2\dot{D}}}{1 - D}{\varvec{\varepsilon}}^{e}$$
(29)

According to Khalili and Valliappan (1996), the elastic constitutive equation for fully saturated fractured porous media can be achieved using the Maxwell-Betti reciprocal work theorem. Applying Betti’s theorem and using Eqs. (1), (28) and (29), the elastic strain components (\(\dot{\varvec{\varepsilon }}^{e} , \frac{1}{{V_{total} }}\frac{{d_{s} V_{a} }}{dt}\)) are related to the stress components (\(\dot{\sigma }, \dot{p}_{a} )\) as follows:

$$\dot{\varvec{\varepsilon }}^{e} = \dot{\varvec{\varepsilon }}^{d} + \frac{{2\dot{D}}}{1 - D}{\varvec{\varepsilon}}^{e} + \dot{\varvec{\varepsilon }}^{T} = \frac{1}{{\left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]}}\left( {\dot{\varvec{\sigma }} - j_{1} \mathop {p_{1} }\limits^{ \cdot } {\varvec{\delta}} - j_{2} \mathop {p_{2} }\limits^{ \cdot } {\varvec{\delta}}} \right) + \frac{{2\dot{D}}}{1 - D}{\varvec{\varepsilon}}^{e} - \frac{{C_{Ts} }}{{C_{fr} }}\dot{T}_{s}$$
(30)

It is assumed that temperature changes induce elastic strain, which leads to isotropic elastic expansion. The change in the pore and fissure volume, presented in Eq. (15), over the current volume of the porous domain with respect to the moving solid can be expressed as (Khalili et al. (2008)):

$$\frac{1}{{V_{total} }}\frac{{d_{s} V_{1} }}{dt} = \frac{{\dot{V}_{1} }}{{V_{total} }} = - j_{1} \left( {\dot{\varvec{\varepsilon }}_{v}^{e} - \dot{\varvec{\varepsilon }}_{T} } \right) + j_{11}^{e} \mathop {p_{1} }\limits^{ \cdot } - j_{12}^{e} \left( {\mathop {p_{2} }\limits^{ \cdot } - \mathop {p_{1} }\limits^{ \cdot } } \right) + \varphi_{1} \frac{{C_{Ts} }}{{C_{fr} }}\dot{T}_{s}$$
(31)
$$\frac{1}{{V_{total} }}\frac{{d_{s} V_{2} }}{dt} = \frac{{\dot{V}_{2} }}{{V_{total} }} = - j_{2} \left( {\dot{\varvec{\varepsilon }}_{v}^{e} - \dot{\varvec{\varepsilon }}_{T} } \right) + j_{22}^{e} \mathop {p_{2} }\limits^{ \cdot } - j_{21}^{e} \left( {\mathop {p_{1} }\limits^{ \cdot } - \mathop {p_{2} }\limits^{ \cdot } } \right) + \varphi_{2} \frac{{C_{Ts} }}{{C_{fr} }}\dot{T}_{s}$$
(32)

where \(j_{11}^{e}\), \(j_{22}^{e}\), \(j_{21}^{e}\), \(j_{12}^{e}\) are the elastic coefficients relating to the porous volumetric deformations and changes of the porous fluid pressures. The elastic coefficients can be obtained using:

$$j_{11}^{e} = \varphi_{1} C_{fr} + j_{12}^{e}$$
(33)
$$j_{22}^{e} = \varphi_{2} C_{fr} + j_{21}^{e}$$
(34)
$$j_{12}^{e} = j_{21}^{e} = \left( { j_{1} j_{2} - \frac{{\varphi_{1} \varphi_{2} }}{{\varphi_{1} + \varphi_{2} }}} \right)C_{fr}$$
(35)

The total strain increment of the solid skeleton and the fluid volume change rate are made up of elastic and plastic parts:

$$\dot{\varvec{\varepsilon }} = \dot{\varvec{\varepsilon }}^{e} + \dot{\varvec{\varepsilon }}^{p}$$
(36)
$$\frac{{\dot{V}_{a} }}{{V_{total} }} = \frac{{\dot{V}_{a}^{e} }}{{V_{total} }} + \frac{{\dot{V}_{a}^{p} }}{{V_{total} }}$$
(37)

Following the general plasticity approach and the definition of the effective stress concept, the incremental volumetric plastic strain rate and the incremental rates of fluid volumes in the porous and fracture domains can be expressed based on Ma et al. (2016) as follows:

$$\dot{\varvec{\varepsilon }}^{p} = \dot{\lambda }\frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}$$
(38)
$$\frac{{\dot{V}_{1}^{p} }}{{V_{total} }} = \dot{\lambda }\frac{\partial g}{{\partial p_{a} }} = \dot{\lambda }\frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}\frac{{\partial \varvec{\sigma^{\prime}}}}{{\partial p_{a} }} = - j_{1} \dot{\lambda }{\varvec{\delta}}^{T} \frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}$$
(39)
$$\frac{{\dot{V}_{2}^{p} }}{{V_{total} }} = \dot{\lambda }\frac{\partial g}{{\partial p_{a} }} = \dot{\lambda }\frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}\frac{{\partial \varvec{\sigma^{\prime}}}}{{\partial p_{a} }} = - j_{2} \dot{\lambda }{\varvec{\delta}}^{T} \frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}$$
(40)

in which \(\dot{\lambda }\) and g(\(\varvec{\sigma^{\prime}})\) are the plastic multipliers and plastic potential as expressed by Khalili et al. (2008), respectively and presented in Appendix 1.

The yield function can be expressed in terms of effective stress and plastic hardening parameter as follows:

$$f\left( {\varvec{\sigma^{\prime}},p_{c}^{\prime} \left( {\dot{\varvec{\varepsilon }}^{p} ,D} \right)} \right) = 0$$
(41)

where \(p_{c}^{\prime}\) is a function of the plastic volumetric strain and damage that controls the size of the yield surface. The adopted bounding yield surface model can be found in the work of Khalili et al. (2005) and Ma (2014) and is presented in Appendix 1.

The consistency condition for the yield surface according to Ma and Zhao (2018) is presented as follows:

$$\dot{f} = \left( {\frac{\partial f}{{\partial \varvec{\sigma^{\prime}}}}} \right)^{T} \varvec{\sigma^{\prime}} + \frac{\partial f}{{\partial p_{c}^{\prime} }}\left( {\frac{{\partial p_{c}^{\prime} }}{{\partial \varepsilon_{v}^{p} }}\dot{\varvec{\varepsilon }}^{p} + \frac{{\partial p_{c}^{\prime} }}{\partial D}\dot{D}} \right)$$
(42)

According to Ma et al. (2016, 2022) and Reppas et al. (2022), the plastic hardening modulus \(h_{p}\), which is presented analytically in Appendix 2, can be expressed as follows:

$$h_{p} = - \frac{\partial f}{{\partial p_{c}^{\prime} }}\frac{\partial g}{{\partial p^{\prime}}}\left( {\frac{{\partial p_{c}^{\prime} }}{{\partial \varepsilon_{v}^{p} }} + \frac{{\partial p_{c}^{\prime} }}{\partial D}\frac{{\dot{D}}}{{\dot{\varepsilon }_{v}^{p} }}} \right)$$
(43)

Then, substituting Eqs. (38) and (43) into Eq. (42), the consistency condition is rearranged as follows:

$$\dot{f} = \left( {\frac{\partial f}{{\partial \varvec{\sigma^{\prime}}}}} \right)^{T} \varvec{\sigma^{\prime}} - \dot{\lambda }h_{p} = 0$$
(44)

where \(\dot{\lambda }\) is the plastic multiplier for the damaged material and can be expressed as:

$$\dot{\lambda } = \frac{1}{H}\left( {\frac{\partial f}{{\partial \varvec{\sigma^{\prime}}}}} \right)^{T} \left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]\left[ {\dot{\varvec{\varepsilon }}^{d} } \right]$$
(45)

The total hardening modulus \(H = H\left( D \right)\) can be defined as:

$$H = h_{p} + \left( {\frac{\partial f}{{\partial \varvec{\sigma^{\prime}}}}} \right)^{T} \left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]\left( {\frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}} \right)$$
(46)

The elastoplastic damage constitutive equation for the solid skeleton is outlined by substituting Eqs. (30)–(35) and (41) into (28) as follows:

$$\dot{\varvec{\sigma }}^{\prime} = \left[ {{\varvec{S}}_{{{\varvec{DTp}}}} } \right]:\dot{\varvec{\varepsilon }}^{d} = \left( {\left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right] - \frac{1}{H}\left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]\left( {\frac{\partial f}{{\partial \varvec{\sigma^{\prime}}}}} \right)^{T} \left( {\frac{\partial g}{{\partial \varvec{\sigma^{\prime}}}}} \right)\left[ {{\varvec{S}}_{{{\varvec{DT}}}} } \right]} \right):\dot{\varvec{\varepsilon }}^{d}$$
(47)

Ma and Zhao (2018) suggested that the stiffness \({\varvec{S}}_{{{\varvec{DTp}}}}\) of the double-porosity system is the drained elastoplastic fourth-order stiffness matrix of the damaged material. The elastoplastic stress-rate equation including temperature effects is presented as:

$$\dot{\varvec{\sigma }} = \left[ {{\varvec{S}}_{{{\varvec{DTp}}}} } \right]:\dot{\varvec{\varepsilon }}^{d} - \beta_{1} \mathop {p_{1} }\limits^{ \cdot } {\varvec{\delta}} - \beta_{2} \mathop {p_{1} }\limits^{ \cdot } {\varvec{\delta}} - \frac{{C_{Ts} }}{{C_{f} }}\dot{T}_{s} {{\varvec{\updelta}}}$$
(48)

Based on Eqs. (4) and (29), when damage occurs the damage strain rate is equal to:

$$\dot{\varvec{\varepsilon }}^{d} = \frac{1}{2}\left( {\nabla \dot{\varvec{u}}_{{\varvec{d}}} + \dot{\varvec{u}}_{{\varvec{d}}} \nabla } \right)$$
(49)

2.6 Critical state concept

Critical state mechanics (CSM) has been extended to rock materials satisfactorily by many investigators (Gerogiannopoulos and Brown 1978; Shah 1997; Wong et al. 1997; Sheldon et al. 2006; Ma 2016; Reppas et al. 2020). While initially designed for soil analysis, these models have proven effective in capturing the intricate mechanisms of plastic strain exhibited by porous rocks (Cuss et al. 2003; Sheldon et al. 2006). Porous rocks, unlike low-porosity crystalline rocks, undergo deformation characterised by the localisation of zones prone to shearing, with the ability to shift around through processes such as shear, dilation, or compaction. This unique behavior arises from the rearrangement of their packing and the reduction in grain size of individual grains (Schultz and Siddharthan 2005). The versatility of CSM in accommodating such diverse rock behaviors is highlighted in the work by Navarro et al. (2010), where a model of this type successfully reproduces the main behaviour of rock using a relatively low number of parameters. This adaptability makes CSM a valuable tool for understanding and predicting the mechanical response of porous rocks under various conditions, contributing to advancements in geomechanics and rock engineering (Alonso et al. 2012).

The critical state is defined as the state at which the material approaches a large shear deformation at a constant shear stress (Khalili et al. 2008). The critical state line (CSL) separates the brittle and ductile deformation behaviour of rock. For critical state models, the damaged thermo-elastic modulus can be expressed as (Khalili et al. 2005; Reppas et al. 2022):

$${\varvec{S}}_{{{\varvec{DT}}}} = \left[ {\begin{array}{*{20}l} {K_{DT} } \hfill & {\quad 0} \hfill \\ 0 \hfill & {\quad 3G_{DT} } \hfill \\ \end{array} } \right] = \left[ {\begin{array}{*{20}l} {\left( {1 - D} \right)^{2} \frac{{vp^{\prime}}}{{ \kappa_{T} }}} \hfill & {\quad 0} \hfill \\ 0 \hfill & {\quad 3\frac{{3\left( {1 - 2\nu } \right)}}{{2\left( {1 + \nu } \right)}}K_{DT} } \hfill \\ \end{array} } \right]$$
(50)

Where \(K_{DT}\) is the elastic bulk modulus considering thermal effects, \(G_{DT}\) is the elastic shear modulus considering thermal effects, \(v = 1 + e\) is the specific volume, \(\kappa_{T}\) is the slope of the unloading- reloading line in a \(v - lnp^{\prime}\) domain, and \(\nu\) is the Poisson’s ratio of the material. Note, the thermal influence on \(\kappa_{T}\) is shown in Reppas et al. (2022).

2.7 Permeability evolution

Ma and Wang (2016) proposed a permeability evolution model for fissured porous sandstones under a wide range of confining pressures. The relationship between permeability and the overall porosity can provide an estimation of the permeability evolution:

$$k = k_{0} \left( {\frac{\varphi }{{\varphi_{0} }}} \right)^{\Psi } \left( {\frac{1}{\tau }} \right)^{\varsigma }$$
(51)

where \(k, k_{0}\) are the current and reference permeabilities, \(\varphi\), \(\varphi_{0}\) are the current and reference porosities, and \(\Psi\) and \(\varsigma\) are the parameters of the permeability and permeability resistance.

The reference porosity \(\varphi_{0} = \frac{e}{{1 + e_{0} }}\), according to Ma and Wang (2016), is obtained through physical testing, and the current porosity can be calculated based on volumetric strain \(\varepsilon_{v} = \varepsilon_{1} + 2\varepsilon_{3}\) in a triaxial test, which can be found using the bounding surface of the presented model. According to Ma and Wang (2016), the fractured matrix solids are not deformable, and the volumetric change mainly comes from the change in pore space:

$$\varphi = \frac{{e_{0} - \left( {1 + e_{0} } \right)\varepsilon_{v} }}{{1 + \left( {e_{0} - \left( {1 + e_{0} } \right)\varepsilon_{v} } \right)}}$$
(52)

2.8 Summary of fully coupled equations

The fully coupled constitutive equations can be achieved by the combination of the deformation model, the flow model and the heat exchange. It is assumed that the temperature of the solid and the temperature of the liquid in the pores and fracture network is the same, for any specific point, at each time step.

The deformation equation after implementing Eqs. (4749) into Eq. (6) is as follows:

$$div\left( {\frac{1}{2}\left[ {{\varvec{S}}_{{{\varvec{DTp}}}} } \right]\left( {\nabla \dot{\varvec{u}}_{{\varvec{d}}} + \dot{\varvec{u}}_{{\varvec{d}}} \nabla } \right) - j_{1} \mathop {p_{1} }\limits^{ \cdot } {\varvec{\delta}} - j_{2} \mathop {p_{2} }\limits^{ \cdot } {\varvec{\delta}} - \frac{{C_{Ts} }}{{C_{fr} }}\dot{T}_{s} {\varvec{\delta}}} \right) + \dot{\varvec{F}} = 0$$
(53)

The flow equations are expressed after implementing Eqs. (3140) into Eq. (10):

$$div\left( {\frac{{{\varvec{k}}_{1} }}{{\mu_{f} }} \left( {\nabla p_{1} + \rho_{f} {\varvec{g}}} \right) + \varphi_{1} \Theta_{1} \nabla T} \right) = \beta_{1} div\dot{\varvec{u}} + j_{11} \mathop {p_{1} }\limits^{ \cdot } - j_{12} \mathop {p_{2} }\limits^{ \cdot } - \varphi_{1} C_{T} \dot{T}_{1} - \left( {j_{1} - \varphi_{1} } \right)C_{TS} \dot{T}_{s} + \gamma \left( {p_{1} - p_{2} } \right)$$
(54)
$$div\left( {\frac{{{\varvec{k}}_{2} }}{{\mu_{f} }} \left( {\nabla p_{2} + \rho_{f} {\varvec{g}}} \right) + \varphi_{2} {\Theta }_{2} \nabla T} \right) = j_{2} div\dot{\varvec{u}} + j_{22} \mathop {p_{2} }\limits^{ \cdot } - j_{21} \mathop {p_{1} }\limits^{ \cdot } - \varphi_{2} C_{T} \dot{T}_{2} - ( \beta_{2} - \varphi_{2} )C_{s} \dot{T}_{s} + \gamma \left( {p_{2} - p_{1} } \right)$$
(55)

The energy balance equation for the solid medium is expressed after implementing Eqs. (19) and (30) into Eq. (18):

$$div\left( {\varphi_{s} k_{s} \nabla T_{s} } \right) = T_{s} \frac{{C_{s} }}{{C_{fr} }}div\left( {\dot{u}} \right) - T_{s} (\beta_{1} - \varphi_{1} )C_{s} \mathop {p_{1} }\limits^{ \cdot } - T_{s} ( \beta_{2} - \varphi_{2} )C_{s} \mathop {p_{2} }\limits^{ \cdot } + \varphi_{s} C_{ps} \dot{T}_{s} - \omega_{s1} \left( {T_{1} - T_{s} } \right) - \omega_{s2} \left( {T_{2} - T_{s} } \right)$$
(56)

where the displacement vector can be expressed as \(div{\varvec{u}} = {\varvec{\delta}}^{T} \left( {\dot{\varvec{\varepsilon }} - \dot{\varvec{\varepsilon }}_{T} } \right)\)

The effective stress parameters are:

$$j_{12} = j_{21} = \left( { j_{1} j_{2} - \varphi_{1} \varphi_{2} \frac{{ j_{1} + j_{2} }}{{ \varphi_{1} + \varphi_{2} }}} \right)C_{fr}$$
(57)
$$j_{11} = \varphi_{1} C_{fl} + (j_{1} - \varphi_{1} )C_{s} + j_{12}$$
(58)
$$j_{22} = \varphi_{2} C_{fl} + (j_{2} - \varphi_{2} )C_{s} + j_{21}$$
(59)

3 Model validation

The fully coupled theoretical model presented in Eqs. (5356) after converted into a FEM model (Appendix 3), is implemented in MATLAB and results from the literature are used to validate it. The selected geometry and mesh used for validation of the FEM model is presented in Fig. 2, based on the work of Kazemi (1969), Gelet et al (2012) and Ma and Zhao (2018). A unit thickness of the drawdown regime is used for the analysis. An axisymmetric plane stress formulation is adopted, as the loading conditions display symmetry about the vertical axis. A vertical wellbore in a thermo-elastoplastic fractured medium is considered with inner radius \(r_{w}\) = 0.1 m, and an outer radius of 800 m at the far-field. A schematic illustration of the in-situ stresses and fluid pressure is presented in Fig. 2a, while the boundary conditions are shown in Fig. 2b. \(P_{o}\) is the initial pore and fissure pressure before drilling and \(T_{form}\) is the temperature of the formation before applying any pressure or thermal loading. It is assumed that the three mediums have the same temperature for each time step, \(T_{1} = T_{2} = T_{s}\). The fully saturated formation is located at a depth of 1000 m, and the subjected vertical gradients are presented in Fig. 2b. Distances of the horizontal grid points of the mesh (in m) from the centre of the wellbore are: [0.1, 0.101, 0.102, 0.105, 0.110, 0.115, 0.120, 0.125, 0.130, 0.140, 0.150, 0.20, 0.50, 1, 2, 5, 10, 20, 50, 100, 200, 500, 800].

Fig. 2
figure 2

a Schematic illustration of the well-plan view, b finite-element mesh and boundary conditions for axisymmetric problem (not to scale)

Considering only elasticity and THM effects, the fully coupled FEM model is validated against the numerical results of Gelet et al (2012). Pore/Fissure pressures versus the radial distance from the wellbore wall are selected to validate two of the primary unknowns of the FEM model and effective stresses versus the radial distance from the wellbore wall are also compared to validate one of the secondary variables. For the damage evolution and plasticity effects, neglecting however any thermal loading, the model is validated against the work of Ma and Zhao (2018). Pore/Fissure pressures are compared to the work of Ma and Zhao (2018) to validate the influence of damage to the primary unknowns, while damage evolution validation makes the suggested damage-plasticity model robust.

Gelet et al. (2012) validated their model against a single porosity case (McTigue 1986). All the material moduli were set as inputs. The selected time for validation was t = 80 s. An internal pressure \(P_{i}\) and temperature \(T_{i}\) is applied representing the constant mud pressure of Gelet et al (2012). The internal selected pressure was \(P_{i} = 12\) MPa. The internal temperature was set equal to \(T_{i}\) = + 50 °C, 0 °C, − 50 °C to validate the case scenarios of cooling or heating the fractured medium in the vicinity of the wellbore. The initial temperature of the formation was set to \(T_{form}\) = 50 °C. The material parameters used for the validation are presented in Table 1.

Table 1 Material parameters for the elastic problem (Gelet et al. 2012)

Figures 3, 4, 5, 6, 7 and 8 present the effect of temperature difference between the fluid in the wellbore and of the in-situ fluid at the wellbore wall. Figures 3, 5 and 7 present the effect of 0 °C, + 50 °C, − 50 °C thermal loading to the pore and fissure pressure of the wellbore wall, while Figs. 4, 6 and 8 examine the effect of the same thermal loading to the effective stresses of the wellbore. Based on the research of Gelet et al. (2012), the value of the radial stress at the well bore is not influenced by changing the temperature, while the hoop stress changes significantly. For this reason and adopting this assumption, the thermal expansion influence due to cooling or heating was applied only to the hoop stress as a boundary condition. The model agrees with the results of Gelet et al. (2012) and reasonably captures the behaviour of the rock in the vicinity of the wellbore, once temperature loading is applied. Additionally, the model seems to remarkably agree with both the pore/fissure pressures and the effective stresses.

Fig. 3
figure 3

Validation of pore and fissure pressure, at time 80 s for 0 °C temperature change (Gelet et al. 2012)

Fig. 4
figure 4

Validation of the compressive Radial and Hoop effective stress, at time 80 s for 0 °C temperature change (Gelet et al. 2012)-absolute value presented

Fig. 5
figure 5

Validation of pore and fissure pressure, at time 80 s for + 50 °C temperature change (Gelet et al. 2012)

Fig. 6
figure 6

Validation of the compressive Radial and Hoop effective stress, at time 80 s for + 50 °C temperature change (Gelet et al. 2012)-absolute value presented

Fig. 7
figure 7

Validation of pore and fissure pressure, at time 80 s for − 50 °C temperature change (Gelet et al. 2012)

Fig. 8
figure 8

Validation of the compressive Radial and Hoop effective stress, at 80 s for − 50 °C temperature change (Gelet et al. 2012)-absolute value presented

According to Ma and Zhao (2018), elastic analysis gives an underestimation of the effective stresses and an overestimation of the fluid pressures. During loading, new created fractures or micro-cracks, which indicates damage, increase the porosity and reduce pore pressures (Detournay and Cheng 1988). Consequently, an elastoplastic model is appropriate for a more realistic scenarios. The damage evolution law was presented in Sect. 2.4 and is validated against the work of Ma and Zhao (2018), in which thermal effects are ignored and critical state mechanics are considered. The wellbore's internal pressure was set as 0, indicating a post-drilling scenario. Based on Ma (2014) and Kazemi (1969), the initial stress state for material with elastic modulus E = 10 GPa is \(p_{c}^{\prime} = 35.3\) MPa and \(\overset{\lower0.5em\hbox{$\smash{\scriptscriptstyle\smile}$}}{p}_{c}^{\prime} = 63\) MPa. The material properties and critical state mechanics parameters based on Ma and Zhao (2018) are listed in Table 2.

Table 2 Material parameters for the damage validation (Ma and Zhao 2018)

The damage variables used based on the work of Ma and Zhao (2018) are listed in Table 3:

Table 3 Damage material parameters

The effective stress parameters were set equal to \(j_{1} = 0.99\) and \(j_{2} = 0.01\), based on Johnson and Cleary (1991), to reproduce the results of Ma and Zhao (2018). In Fig. 9 the fluid pressure response in the double porous fractured domain is presented considering both elastic and elastoplastic damage behaviour. The outcomes of the proposed model are compared to the numerical results of Ma and Zhao (2018), and satisfactoraly reproduce the effect of damage to the pore/fissure pressure at the vicinity of the wellbore for a particular time step (t = 80 s). In Fig. 10, the evolution of damage in time is also reproduced versus the radial distance from the wellbore, and the results fit satisfactoraly the outcome of Ma and Zhao (2018).

Fig. 9
figure 9

Pore-Fissure pressure diagram with and without damage for a drilled borehole, validation for a material with E = 10 GPa

Fig. 10
figure 10

Validation of damage evolution in different time steps for E = 10 GPa (Ma and Zhao 2018)

To validate the plasticity and hardening effects (Appendix 1), an axially symmetric mesh which consisted of 64 four-node quadrilateral elements with 2 by 2 integration points was considered. One-half of the sample was analysed, and the boundary conditions are presented in Fig. 11. The numerical model is used to reproduce experimental triaxial tests and validated against the experimental results of Reppas et al. (2023).

Fig. 11
figure 11

The finite element mesh and boundary condition for the UCS and triaxial test simulation

Based on Ma (2014), for strain increments smaller than 10−4, the numbers of steps are sufficient to give a representative solution. Consequently, to reduce the computational time, the axial strain rate was set as 10−4. The hardening parameters \(m_{p}\), the material constant \(k_{d}\), the slope of the unloading–reloading line \(\kappa ,\) the critical state line’s slope \(M_{cs}\) and the Poisson's ratio \(\nu\) are taken from the research of Reppas et al. (2022) and Reppas et al. (2023) and presented in Table 4. The void ratio was estimated based on the experimental tests of Reppas et al. (2023) as \(e_{0} = 0.38\). Damage evolution parameters and initial damage are assumed to be constant in all the tests with \(D_{initial} = 0.015\). The damage parameters are the same as presented in Table 3. The numerical simulation is compared to a set of three triaxial tests with sample characteristics presented in Table 5.

Table 4 Parameter values for 12.5 MPa (Reppas et al. 2022, 2023)
Table 5 Rock samples dimensions and temperatures (Reppas et al. 2023)

It can be seen from Figs. 4, 5, 6, 7, 8 and 9 that the model reproduces the literature results, with a slight difference at the wellbore wall. Specifically, at the wellbore wall, hoop effective stresses are around 8% underestimated for positive thermal loading compared to the work of Gelet et al. (2012), while maximum damage in time is 4% lower than in the work of Ma and Zhao (2018). At a small radial distance from the wellbore wall and further to the far field the model is in perfect agreement with the literature results.

A robust representation of the experimental results (Figs. 12, 13, 14 and 15) can be seen for the deviatoric stress- axial strain curve while for the volumetric strain-axial strain curve there is good agreement until reaching nearly the 6% axial strain. This is mainly happening as the Poisson’s ratio is increasing and the model cannot accept values of Poisson’s ratio bigger than 0.5.

Fig. 12
figure 12

Deviatoric stress-axial strain relationship for triaxial 12.5 MPa test at 15 °C. (Experimental tests and Numerical simulation)

Fig. 13
figure 13

Volumetric strain-axial strain relationship for triaxial 12.5 MPa test at 15 °C. (Experimental tests and Numerical simulation)

Fig. 14
figure 14

Deviatoric stress-axial strain relationship for triaxial 12.5 MPa test at − 5 °C. (Experimental tests and Numerical simulation)

Fig. 15
figure 15

Volumetric strain-axial strain relationship for triaxial 12.5 MPa test at − 5 °C. (Experimental tests and Numerical simulation)

It can be said that by validating against an elastic THM model and against an elastoplastic hydro-mechanical model, as well as against experimental triaxial tests, the model seems robust and can be used to investigate different loading scenarios and examine various fluid-thermal-deformation examples.

4 Wellbore stability representative scenario and parametric study

4.1 Simulation of representative injection scenario

To demonstrate the capability of the model to simulate wellbore stability scenarios, the effects of internal wellbore pressures and temperatures, due to CO2 injection or other applications, on the pore-fissure pressures, effective stresses and damage evolution of the surrounding rock are presented. A unit thickness of the drawdown regime is analysed in this chapter. A vertical wellbore of inner radius rw = 0.1 m is considered and a unit thickness of the wellbore is simulated, with the outer radius being set to 800 m to describe the boundary conditions at the far-field. Vertical deformation of the whole medium is assumed to be constrained. Elastoplastic damage effects on the wellbore wall are considered and the isotropic material parameters for the parametric study were taken from Tables 1 and 2. The finite element mesh and boundary conditions of the problem can be seen in Fig. 16. Since the loading displays symmetry about the vertical axis of the wellbore, an axisymmetric formulation is selected. Coordinates, measured in meters from the centre of the wellbore, of the horizontal grid points of the mesh are: [0.1, 0.1025, 0.105, 0.1075, 0.110, 0.115, 0.120, 0.125, 0.130, 0.135, 0.140, 0.145, 0.150, 0.155, 0.160, 0.17, 0.180, 0.190, 0.20, 0.22, 0.25, 0.30, 0.50, 1, 2, 5, 10, 20, 50, 100, 200, 400, 600, 800]. This demonstrates that more points are considered close to the wellbore, which is the area of interest, as mesh refinement technique. The results are presented at time t = 80 s, and t = 800 s. The time (t = 80 s), corresponds to an early time response of the system, where the difference between the three temperatures is the largest.

Fig. 16
figure 16

a Schematic illustration of the injection well-plan view, b finite-element mesh and boundary conditions for axisymmetric problem (not to scale)

Different scenarios are simulated to examine the behaviour of the rock during the injection of CO2. The pressure of the CO2 is considered as the internal pressure of the wellbore (\(P_{i } \;{\text{or }}\;P_{{CO_{2} }}\)) and the stress due to the weight of the formation as external radial stress \(\left( {\sigma_{r} } \right)\). The initial pore and fissure pressure, assuming the system to be in equilibrium, before injection, is equal to the hydrostatic pressure (\(P_{0}\)) and is influenced by effective stress parameters due to post drilling effects. The temperature of the formation (\(T_{form}\)) was selected according to the studied depth. It should be noted that the \(\left( {P_{0} } \right)\) and \(\left( {T_{form} } \right)\) are the pressure and temperature of the formation prior to any drilling. The internal temperature of the wellbore (\(T_{i}\)) was selected according to the injected temperature of the CO2.

During CO2 injection, typically the pressure and temperature of the CO2 will increase with depth of the wellbore (Vilarrasa et al. 2013). An example of 1000 m depth, with \(P_{i }\) = 24.5 MPa and \(T_{form}\) = 33 °C, was selected based on Vilarrasa et al. (2013). The damage parameters for the damage evolution law which are based on the tensile principal stress are the same as those used in Table 3.

The simulated internal temperatures of the wellbore were − 15 °C, − 10 °C, − 5 °C, 0 °C, 5 °C. These temperatures were selected to identify the cooling effects on rock due to CO2 injection. The range of them were based on the research of Vilarrasa et al. (2013). The pore-fissure pressures and the effective stresses results of simulations are presented in Figs. 17 and 18, respectively.

Fig. 17
figure 17

Pore-Fissure pressure profiles in a dual-porosity system at a t = 80 s, b t = 800 s

Fig. 18
figure 18

Radial and Hoop effective stresses profiles in a dual-porosity system at a t = 80 s, b t = 800 s

For internal wellbore temperature of − 15 °C, there is a huge drop of the pore pressure at the early stage of the simulation (t = 80 s), from 12 MPa to almost 1 MPa compared to the temperature of 5 °C (Fig. 16a). This can induce stress-relief and lead to rock fracturing (Khaledi et al. 2021). However, this pore pressure drop decreases as time passes and the pore and fissure pressure are trying to reach equilibrium. Additionally, for t = 80 s, the compressive radial stress increases for higher temperature difference while the hoop stress decreases. For 800 s, this change in effective stresses becomes more apparent.

Studying different material parameters is also important, as mechanical parameters can influence the induced damage of the material. Additionally, different temperature conditions can also alter the effective pressures of the rock. Young’s modulus, leakage term and permeability evolution are investigated. Young’s modulus describes the elastic behaviour of the material, leakage term controls the flow between the porous and fissure domain and permeability indicates how quickly the saline water flows inside the fractured porous domain. All of them can influence the outcome of the deformation, flow, and heat transfer.

4.2 Young’s modulus E influence on the results

To identify the influence to the numerical simulation of E, two different injection temperatures are used: 5 °C and 33 °C. The temperature of the formation is considered \(T_{form}\) = 33 °C. These temperatures are selected to investigate if Young’s modulus influence exist when there is a temperature difference between wellbore wall and formation.

In Figs. 19 and 20 the influence of Young’s modulus on effective stresses and damage evolution is presented, respectively.

Fig. 19
figure 19

Influence of Young’s modulus (E) on the effective stresses of the rock under different internal temperatures a Ti = 5 °C and b Ti = 33 °C, t = 80 s

Fig. 20
figure 20

Influence of (E) on the damage of the rock under different internal temperatures a Ti = 5 °C and b Ti = 33 °C, t = 80 s

4.3 Leakage term influence on the results

The leakage parameter or aperture factor controls the transfer of mass between the porous block and the fissure domain in local thermal non-equilibrium. Values of the leakage term can vary from 5.3 × 10−11/Pa s to 10−7/Pa s (Kazemi 1969; Gelet et al. 2012). Three different values were used (10−7, 10−9, 10−11) to study the influence of the fluid leakage parameter on the results. The temperature of the formation is considered \(T_{form}\) = 33 °C. The internal temperature for this parametric study is 5 °C corresponding to an injected temperature of − 5 °C according to Vilarrasa and Laloui (2016). The same mesh, boundary conditions were used as described in Fig. 15. Young’s modulus was set equal to 10 GPa, to focus the parametric study to the leakage aperture factor. In Fig. 21, the influence of the leakage term to the effective stresses of the wellbore is presented, while in Figs. 22 and 23 the effect of the leakage term to the pore-fissure rock pressures and damage is investigated, respectively.

Fig. 21
figure 21

Leakage term influence on effective stress (Ti = 5 °C)

Fig. 22
figure 22

Leakage term influence on pore-fissure pressure (Ti = 5 °C

Fig. 23
figure 23

Leakage term influence on damage (Ti = 5 °C

From Fig. 21, the radial effective stress becomes more compressive as the aperture factor decreases, while the hoop effective stress is slightly changing. Additionally, it can be seen from Fig. 22 that lower leakage parameter induces higher pore pressure drop and increases the difference in pressure between the two phases. It can be outlined that rocks with low capability of mass transfer between the phases are vulnerable to potential fracturing due to stress relief and extreme pore pressure drop.

As far as it concerns the damage, the lower the leakage term is, the less damage appears in the vicinity of the wellbore at a specific timestep of injection, as seen in Fig. 23. Once the mass transfer is achieved and the two domains are in equilibrium the damage will increase and the rock can then be considered as a single-phase medium.

4.4 Permeability influence on the results

Changing the permeability of the rock can influence the dissipation speed of the fluid inside the domain. For the estimation of the permeability influence to the effective stresses and pore-fissure pressures, the permeability of the porous domain kept constant, while the permeability of the fissure network varied. The internal wellbore temperature of 5 °C is used indicating the scenario of injecting CO2 at − 5 °C. Figure 24 presents the permeability influence on the effective stresses, while Fig. 25 the permeability influence on the pore and fissure pressures.

Fig. 24
figure 24

Influence on the effective stress keeping the permeability of the porous domain constant and varying the permeability of the fissure network (Ti = 5 °C)

Fig. 25
figure 25

Influence on the pore-fissure pressure keeping the permeability of the porous domain constant and varying the permeability of the fracture network (Ti = 5 °C)

It can be seen in Fig. 24 that the effective stresses are not influenced significantly by the permeability. However, changing the permeability, the difference between the pore and fissure network pressure can increase. Consequently, more time will be needed for them to achieve equilibrium (see Fig. 25).

5 Conclusions

The developed theoretical THM model, integrating elastoplastic material behaviour and damage evolution in double porosity fractured media, represents a significant advancement in the understanding and simulation capabilities of geomechanical systems. The model offers a comprehensive exploration of deformability, fluid flow, and heat transfer phenomena. By ensuring equilibrium, adhering to constitutive laws, and satisfying boundary conditions through meticulous global and local solution schemes, the model provides a robust framework for accurate simulations. Implemented using the Finite Element Method (FEM) in MATLAB, the numerical model demonstrates its capability to reproduce results from prior studies and experimental triaxial tests. This validation underscores the reliability of the model in capturing critical geomechanical phenomena.

Furthermore, the model's sensitivity to material strength, leakage term, and permeability highlights its potential for in-depth analyses. A suggested sensitivity analysis of mechanical critical state mechanics parameters offers a pathway to enhance the model's versatility and applicability under diverse loading conditions. Looking forward, the model holds promise for future investigations into multiphase flow and heat transfer between porosities (pores and fractures). This extension would enable a more detailed and accurate simulation of double porous media behaviour under realistic conditions.

The model's capacity to incorporate these additional complexities positions it as a valuable asset for researchers and practitioners seeking a comprehensive understanding of geomechanical systems. Overall, the theoretical THM model stands as a powerful and adaptable tool with broad applications in the field of geomechanics and porous media studies.