Linear Thermo-Poroelasticity and Geomechanics Linear Thermo-Poroelasticity and Geomechanics

Most engineering applications estimate the deformation induced by loads by using the linear elasticity theory. The discretization process starts with the equilibrium equation and then develops a displacement formulation that employs the Hooke ’ s law. Problems of practical interest encompass designing of large structures, buildings, subsurface deformation, etc. These applications require determining stresses to compare them with a given failure criteria. One often tackles this way a design or material strength type of problems. For instance, Geomechanics applications in the oil and gas industry assess the induced stresses changes that hydrocarbon production or the injection of fluids, i.e., artificial lift, in a reservoir produce in the surrounding rock mass. These studies often include reservoir compaction and subsidence that pose harmful and costly effects such as in wells casing, cap-rock stability, faults reactivation, and environmental issues as well. Estimating these stress-induced changes and their consequences require accurate elasticity simulations that are usually carried out through finite element (FE) simulations. Geomechanics implies that the flow in porous media simulation must be coupled with mechanics, which causes a substantial increase in CPU time and memory requirements.


Introduction
This chapter presents a continuous Galerkin FE formulation for linear isotropic elasticity. It covers in detail how to derive such formulation beginning with the equilibrium equation and the virtual work statement. It also discretizes the continuity equation for slightly compressible single-phase flow to show how to couple different physics with elasticity. It discusses several coupling approaches such as the monolithic and iterative ones, i.e., loosely coupled. This chapter also mentions the affinity of the poroelastic case with the thermoelastic one. It thus also includes thermoelasticity in the treatment herein. It shows concrete numerical examples covering two-and three-dimensional problems of practical interest in thermo-poroelasticity. The sample problems employ triangular, quadrilateral, and hexahedral meshes and include comments about implementing boundary conditions (BCS). An introduction to domain decomposition ideas such as iterative coupling by the BCS, i.e., Dirichlet-Neumann domain decomposition and mortar methods for non-matching interfaces is included.
The treatment herein demonstrates that the continuous Galerkin formulation for linear isotropic elasticity is the foundation to develop codes for mechanics. Indeed, after discretizing linear elasticity is straightforward to extend the implementation to nonlinear mechanics such as rateindependent plasticity. It thus provides some comments about such extension. Applications of practical interest show that industrial size problems will require domain decomposition techniques to handle such simulations in a timely fashion. Unquestionably, domain decomposition techniques can exploit current parallel machines architectures which brings high-performance computing into the picture. For instance, recently the author showed that the Dirichlet-Neumann scheme could handle problems at the reservoir field-level as well as the mortar method decoupled by this last one. Its current results are backed up by papers published in peer-reviewed journals and conferences thus this book chapter summarizes that effort.

Mathematical model for thermo-poroelasticity
This section discusses the governing equations for linear homogeneous isotropic thermoporoelasticity and their FE formulation. It skips details for the sake of brevity thus a more detailed treatment can be found in [1][2][3][4]. The mathematical formulation considers a bounded domain Ω ⊂ R n , n ¼ 2, 3 and its boundary is Γ ¼ ∂Ω, and a time interval of interest 0, ℑ½. Let T h be a non-degenerate, quasi-uniform conforming partition of Ω composed of triangles or quadrilaterals for two-dimensional problems, and hexahedra or tetrahedra for three-dimensional problems. For instance, Gai [5] thesis showed that deformable porous media, i.e., the reservoir matrix, the single-phase flow model equation derives from the continuity equation, i.e., a mass balance statement, for slightly incompressible single-phase flow and Darcy's law which yields: where the equation's parameters are f * , a model specific porosity, K represents the absolute permeability tensor. The dynamic viscosity is μ, while r is the fluid density, as well as g, is the gravity acceleration constant, p is the fluid pressure, and q represents sources and sinks. This latter notation is standard in fluid mechanics and reservoir simulation. Finally, the algorithmic porosity f * is defined by: where the additional parameters are accordingly α which is the Biot's constant, u represents the displacement vector, while ε 0 v is the initial volumetric strain. Herein M is the Biot's modulus [6], while f 0 and p 0 define for a reference or initial state. The common BCS for the pressure equation imply Neumann or no-flow namely: one should also consider an initial or reference pressure distribution in the whole domain. Sources and sinks simulate injector and producer wells, respectively. Herein b n is the outer unitary normal vector as usual. For the mechanics part, one begins from the equilibrium equation for a quasi-steady process, i.e., Newton second law, which means that one discards the acceleration term: where σ is the stress tensor, f corresponds to the vector of body forces, such as gravity and electromagnetic effects, for instance. One can decompose BCS in Dirichlet type, i.e., Γ u D , and Neumann type BCS, i.e., Γ u N , where the external tractions are known or prescribed. Hooke's law combined with Biot's poroelastic theory defines σ by the following expression: where T ¼ T x; t ð Þis the temperature, C is the elastic moduli, β corresponds to the coefficient of thermal dilatation while K is the bulk modulus. The Kronecker delta becomes δ while λ, and G, are the Lamé constants, and I represents the fourth-order identity tensor. The strain tensor ε is given by: One can derive a weak form by substituting Eq. (2) into Eq. (1) and then multiplying by a test function v ∈ H 1 0 Ω ð Þ and integrating over Ω and using the Gauss-divergence theorem, this yields: ð A weak form for the equilibrium Eq. (4) can be derived in a similar way, by testing against a given virtual displacement, χ. One arrives at: where t ¼ σ Á b n are the tractions applied as Neumann BCS. This is the well-known virtual work statement. The FE space can be taken as a finite-dimensional subspace of the continuous Sobolev spaces [7], thus: where P k e ð Þ represents the space of polynomials of total degree less than or equal to k, C k T h ð Þis called test functions that are continuous along the given element's edges. Let one represents the primary variables in the element e, i.e. displacements and pressure, as nodal values multiplied by shape or interpolation functions [8]: where Π e and Ψ e are matrices of shape functions given by: here nn is the number of nodes in the given element, i ¼ 1…nn j ¼ 1…nn Á n and nDOF is the number of degrees of freedom which equals the space dimension, n. Now the engineering strain b ε is defined by: where D n ð Þ , n ¼ 2, 3 is defined as: Finally substituting the generalized Hooke's law Eq. (5) into Eq. (8) and using Eq. (7) leads to the FE model for linear isotropic poroelasticity, thus: One can obtain the loose coupling approach in different ways. Eq. (15) shows one possible choice, where one solves the displacements first by taking the pressures from the previous time step. Next, one updates the pressures by using the newest displacements: where expressions for the matrices are provided in Eq. (16) and θ is the implicitness factor that lies between 0 and 1, while Δt represents the time-step size. One can define an iterative coupling scheme in different ways, but they all derive from the loose coupling scheme with incorporating an internal iteration to update lagged quantities. For further details please refer to [4]. Also notice that for thermal stresses, one can derive an equivalent pressure drop, after Eq. (5), that renders Eq. (15) unchanged.
This section completes with a comment about the Continuous Galerkin (CG) formulation for the pressure (1). It is well-known that the formulation that was presented above for flow it is not locally mass conservative, and thus the resulting fluxes are not continuous across the element edges. But it is also true that accurate flow simulations require the latter, especially for multi-phase flow, though. Nevertheless, one can utilize post-processing techniques to recover locally conservative mass fluxes [2]. This chapter, though, for convenience has restricted its focus to CG methods for flow but has realized that the coupled formulation may be modified to consider mixed FE methods and finite volumes for flow as well as changing CG by post-processing. The author already showed for the simple flow cases reported herein that CG yields to physical pressure fields that can be employed for geomechanics purposes. The precise numerical comparison among CG and Discontinuous Galerkin (DG) solutions was performed in [2] to demonstrate that CG can compute pressures accurately.

Nonlinear heat transfer equation
The transient nonlinear heat conduction in a given body is as follows [9][10][11]: In (17), C p is the heat capacity to constant pressure and κ ¼ κ T ð Þ is the thermal conductivity. Q T represents heat sources. Neumann BCS imply heat transfer via Fourier's law: adiabatic or no-flux BCS; h ¼ 0 of most domain boundaries.
One can derive a FE formulation for model problem (17) by multiplying by a test function and integrate by parts and applying the Gauss-divergence theorem to arrive at the following bilinear form: where the functions are: Time discretization renders the local residual for the element e: where the linear operator Á ð Þ mþθ mass and stiffness matrix respectively. Thus the Jacobian is given by: this equation renders once again: where the variation term is given by: One often employs the Newton-Raphson algorithm to solve the linearized system of equations in every time step, namely, J Á ΔT ℓ ð Þ ¼ ÀR. One can utilize the same continuous FE space that where described in Section 2. The reader may refer to [11] for a full treatment.

Domain decomposition methods
Domain Decomposition Methods (DDM) encompass highly efficient algorithms to obtain solutions of large-scale discrete problems on parallel super-computers. They mainly consist of partitioning the domain into various subdomains and then getting the global solution through the resolution of the subdomain problems [12,13] often in an iterative fashion. These methods can be seen as an iterative coupling by the internal and thus unknown BCS. There is a broad literature covering these approaches, and that is why this chapter, therefore, presents a short introduction for the sake of completeness. The recommended references include Bjorstad and Widlund [14], Bramble et al. and Marini and Quarteroni [15], who considered the Dirichlet-Neumann (DN) DDM and Neumann-Neumann.
Let L be an abstract linear differential operator, such as the Laplace operator, for instance. The DN-DDM scheme implies solving a series of problems in the proper sequence that requires a coloring tool (see Figure 1). Let the Dirichlet subdomains be colored in white while the Neumann subdomains are in black. Notice that the interface between subdomains is denoted by Γ. After one provides the initial guess on the primary variables on Γ, i.e., γ k must be given, then one can solve the problem on the white subdomains (Dirichlet problems), which corresponds to step 1 in Eq. (25). 1Þ Let the primary variable be called "displacements" and their gradient "tractions," i.e., normal derivative in the boundary. Then, the tractions on the interface Γ must be computed after first solving step 1 on the white subdomains. They are then passed through communication to solve the second step on the black subdomains, i.e., Neumann subdomains. On this latter, since the tractions are known on Γ, one can solve for unknown displacements to provide feedback on the next iteration level. Both displacements and tractions are often over-relaxed to improve the convergence rate. The given relaxation parameters, referred in Eq. (26) as θ D and θ N , must lie between 0 and 1: It happens that this approach requires at least a two-entry coloring tool or even more, i.e., there may be subdomains with mixed interfaces, colored as gray [12]. There is a lack of parallelism in the sense that black subdomains must wait for the white ones to communicate their tractions. An initial guess for tractions should be prescribed to mitigate this issue, but this latter is not feasible in most cases. A straightforward way to obtain an initial estimate for the multiplier γ k is by computing the so-called coarse-run that implies solving the same problem in a coarser mesh and interpolating over Γ by using the smaller's problem FE space. The reader may refer to the literature [16,17] for further reading and proof of convergence and also revise [2] for a more detailed description that includes implementation details, which this chapter omits for the sake of brevity.

The mortar FE method (MFEM)
The primary goal here is to extend MFEM to glue curved interfaces such as the one shown in Figure 2 where MFEM treats non-matching interfaces. The section first introduces a brief description of non-uniform rational B-Splines curves and surfaces (NURBS) in [2,3,18]. The reader is where ϒ stands for the gluing condition among subdomain interfaces and the jump u ½ on the displacements is required to vanish in an integral or "weak" sense, thus: the parameters in Eq. (28) are as follows: Φ h represents the mortar space while v h corresponds to the weighting space and Λ h is the Lagrange multiplier space, i.e., the linear combination of mortar functions, often polynomial functions, and Lagrange multiplier degrees of freedom. Let T h M be a conforming partition of the so-called parametric space, Ω, whose image serves as the mortar's geometrical entity, i.e., curve or surface, composed of line-segments (n ¼ 2Þ or quadrilaterals (n ¼ 3). One takes the mortar space as a finite-dimensional subspace of the continuous Sobolev spaces, that is: Figure 2. Ω 1 is in the top, Ω 2 is in the bottom, and the interface Γ is the bold curve.
herein P k e M À Á stands for the space of polynomials of total degree less than or equal to k while represents test functions that are continuous along the edges of e M .
One can write in a matrix or algebraic form, Eq. (28) as: The equation above corresponds to the so-called "saddle-point problem (SPP)." Notice that subdomains are only connected using the Lagrange multiplier Λ if they happen to be known (it is well-known that for elasticity, the multipliers are the unknown tractions on the interface), then one can decouple the system in Eq. (30) and then one just needs to perform subdomain solves. For the SPP (30), one may match displacements or tractions in the interface. The Dirichlet-Neumann scheme that the section presents is only a particular case of the most general Robin-Robin domain decomposition scheme [2,3]. The rectangular matrices ϒ i ð Þ Â Ã , i ¼ 1…2, are denoted as projectors since they permit to map to and from the given mortar space [2,3].
The following line integral defines the projector, for 2-D problems, as: where w k ð Þ j represents the global non-mortar side interpolation functions and Φ i are the mortar space basis functions, while d ξ C k kis the length of the tangent vector associated to the B-Spline or NURBS curve. Similarly, 3-D problems imply: where ∂ ξ S Â ∂ η S is the norm of the surface's normal vector. Particular quadrature rules to compute these integrals must be developed. The reader should refer to [3] for a detailed explanation including the proper algorithm in pseudo-code.

Numerical examples
The author implemented these FE models in the Integrated Parallel Finite Element Analysis program (IPFA) that is a C++ application whose main characteristics are described in [2,12]. IPFA employs standard continuous Lagrange polynomials as shape functions for the space Finite Element Method -Simulation, Numerical Analysis and Solution Techniques discretization in each subdomain, P k e ð Þ, as well as mortar space P k e M À Á . It also utilizes piecewise linear polynomials for the space discretizations in all examples herein that were run on a MacBook Pro laptop equipped with an Intel(R) Quad-Core(TM) i7-4870HQ CPU @ 2.5 GHz and 16 GB of RAM. The author chose this laptop for the sake of convenience, in particular, the availability of debugging tools free of charge, such as the Microsoft Visual Studio Community. Aside, one can achieve some level of parallelism due to the multi-core technology.

Example 1: Two-dimensional steady state single-phase flow
The example is a manufactured problem where the solution is a priori chosen. Then, one substitutes the given pressure field in the governing partial differential equation to obtain the source term, i.e., loading, that reproduces the input field. The problem in strong form looks like: where the domain of interest corresponds to the unitary square and Dirichlet BCS are enforced. The input pressure field is given by: Figure 3 shows the pressure field that corresponds to the problem 6.1 whose discretization encompasses three subdomains: two of them (the top and bottom ones) consist of triangular meshes while the one in the middle was discretized by a regular Cartesian quadrilateral mesh. The top-left corner of the figure shows the mesh that is employed.
The pressure field is on the right-top corner, and its horizontal derivative is in the bottom-left corner, while the discrepancy between the numerical and exact solutions, i.e., the absolute error, was rendered in the right-bottom corner. Table 1 represents the number of elements and points of each mesh from top to bottom. The mortars as geometrical entities correspond to two B-Splines interpolants (NURBS with all weights equal 1) that were constructed by interpolating a sinusoidal wave as the figure shows (see [3] for details). Thirty-two quadratic mortar elements per curve were utilized to glue these three subdomains. A direct frontal solver was used to solve the global SPP in Eq. (30) [3]. The results that are summarized on Figure 3 are in good agreement with the analytical solution. The absolute error against the correct answer is also displayed. The discrepancy is of the order of 10 À4 . Notice that besides the example only matched the displacements on the interface, a good accordance is also obtained for the horizontal derivative.
Whether or not one utilizes the SPP approach, the local problems are completely disconnected. This fact can be exploited to reduce the computational time significantly. Indeed, these sub problems can be handled in separate threads using a shared memory approach, i.e., multithreading assembling. A convergence analysis was also performed, by successively running refined meshes [3] and by keeping a refinement ratio of 2:1 between subdomains. The exercise used a piecewise quadratic mortar space where the number of mortar elements equals the number of coarse edges in the non-mortar sides. It tackled meshes of size 8, 16, 32, 64, 128 and 256 respectively. Figure 4 displays the resulting convergence rate in a log À log plot. The slope of the least-squares straight line is 1.44143, where the coefficient of determination is R 2 ¼ 84%.

Finite Element Method -Simulation, Numerical Analysis and Solution Techniques
This slope agrees with the theory that predicts a rate of O h 3=2 [2,3]. However, the resulting slope is slightly lower because of numerical errors, such as quadrature and linear system solving errors.
Finally, Figure 5 shows pressure snapshots that represent four different Dirichlet-Neumann iteration levels evolving from left-to-right and top-to-bottom. The fact that no initial guess for pressure was provided explains the mismatch in the first snapshot. That is why one needs to eliminate discrepancies by running the process to match up those subdomains, i.e., the traction residual in the interface must vanish, which for this case occurs in just a handful of iterations. The stop criterion precisely involves the residual in the tractions in the interface that is required to fall below the given tolerance. For this particular problem, the iterative process spent six iterations to achieve a residual lower than 10 À6 [3].

Example 2: Coupled flow and mechanics
This example analyzes a coupled flow and mechanics simulation in a reconstructed reservoir (RS) model with different meshes for the flow and mechanics physics [18]. The author proposed such a reconstruction workflow in [18] which permits this latter feature by computing a projection operator to mapping pressures from the original flow mesh into the so-called reference mechanics mesh. Toward that end, the example employs the slightly compressible flow formulation loosely combined with the mechanics model as shown in Eq. (15). The objective is to show a realistic field level RS compaction and subsidence coupled computation. The goal is thus working three different cases for the mechanics part in which one only changes the resolution of the reconstructed mechanics mesh in the pay-zone while preserving the mechanical properties constant as well as the geometry, BCS, and the depletion scenario. The exercise admits the actual static properties as being in the pay-zone such as porosity f and permeability for the isotropic case K x ¼ K z ¼ K y as shown in Figure 6, whose depiction is three Figure 5. The numerical L 2 convergence rate for problem 6.1.
times exaggerated in the zÀdirection. The numerical values are assumed to be as follows: the fluid viscosity is 0.01325 cp and the total compressibility is c t ¼ 1:4 Â 10 À5 Psi À1 (M À1 ¼ f Á c t ). This example does not incorporate gravity loading for both flow and mechanics. Table 2 compiles the mesh dimensions in every direction. The example also contemplates Nz ¼ 10, Nu ¼ 5, No ¼ 7, Nc ¼ 5 (mesh patches on the corners and No and Nu stand for overand under-burden respectively). The table also displays the number of elements, ne, degrees of freedom (DOF) and timing data for all three cases. The example considers 30 vertical producer wells as revealed in Figure 6. The initial condition encompasses a constant pressure of 10,000 Psi in the whole pay-zone while the pressure in the producer wells is set at 5000 Psi. This assumption resembles a depletion scenario. BCS correspond to no-flow on all RS faces for the pressure equation, while Figure 7 depicts BCS for mechanics that are the typical traction free surface on the top and far-field on all remainder planes. Notice that the far-field BCS implies that the displacement in the perpendicular direction to the given plane is zero. The example also assumes a zero initial displacement field.       Table 2 covered, from top-to-bottom and left-to-right. Notice that the action of the projection operator improves with the refinement of the reference mechanics mesh as one should expect. The monotone pressure behavior, which does not drastically change across neighboring elements in the original RS mesh, may explain this improvement. Though, some items remain red-colored because they are inactive. That happens due to the interpolation error that tends to smooth out the RS topology. Perhaps it is not clear in the picture, but the reference mechanics mesh's layers (since   Table 2. the thickness distribution in the zÀdirection is not uniform but instead graded toward the edge) are not evenly-spaced which tells why these inactive spots appear. Finally, Table 3 reviews results for the minimum and maximum vertical displacements u z for all cases considered above. Notice that the differences between them are less than 3% for u z min and 8% for u z max, which proves the consistency of the projection operator. The shape of the compaction dome and the subsidence profile are alike as well. Notice that this is the case for linear isotropic elasticity. For non-linear elasticity or rate-independent plasticity probably one may expect more significant differences, though. The table also displays timing data, which reveals how the computational burden grows with the mesh refinement (see also the time spent to assemble the stiffness matrix in the last column of Table 2). Figure 11 zooms out the snapshot corresponding at  Finite Element Method -Simulation, Numerical Analysis and Solution Techniques 40 years to reveal the subsidence in the surface. The plot is exaggerated several times. It also exposes the subsidence profile on the surface in the centerline of the mechanics mesh in the most extended direction. The differences between the three cases are minimal; it seems that the profile does converge toward a mesh independent solution, which is not far from the last row on the table.
The above-coupled flow and geomechanics computation, which used the reconstructed model, confirmed that the procedure is quite useful to tackle realistic reservoir compaction and subsidence simulations [18].

Example 3: Nonlinear heat transfer: arch problem
The example addresses the interesting problem that has been investigated by several researchers [9,10]. Its distinctive features are the two re-entrant corners. Near sharp corners, there may be singularities in the solution, which cause the spatial derivatives of the solution to become unbounded. The material properties are constant density and specific heat, and a linear isotropic thermal conductivity, (35) Figure 12 shows the domain and the mesh. The BCS are of Dirichlet type on the left-(T ¼ 10 3 ) and right-most (T ¼ 0) sides, and insulation on all other sides: n Á κ∇T  Table 3. Simulations performed in example 6.2. Figure 11. Subsidence profiles after 40 years of evolution.
Linear Thermo-Poroelasticity and Geomechanics http://dx.doi.org/10.5772/intechopen.71873 mesh consists of 7985 points and 15,539 elements. The domain lengths are 1 mÂ0.5 m. The initial temperature distribution was taken to be [9]: which is the short-time linear solution at a time t * for a plane semi-infinite medium. In the analysis, it is assumed κ ¼ 1 and t * ¼ 0:0005 s in the calculation of the initial conditions. Figure 13 shows temperature field snapshots for different times increasing from top to bottom. The example simulates 0.1 s with a fully implicit approach. It is observed that a heating front quickly travels from left to right as expected due to the temperature gradient. The temperature scale in the color maps is from 0 to 1000 K. As a qualitative benchmark, the temperature profile reported by Winget and Hughes [9] accords very well with the results herein.
The example finalizes with a simple loosely coupled thermal and mechanics computation. It takes the temperature variation that the arch problem experiences as driving force for the mechanical problem. It assumes linear isotropic elasticity with E ¼ 30 Ksi and ν ¼ 0:3 and the coefficient of thermal dilatation β ¼ 1 Á 10 À5 K À1 and the bulk modulus. The bottommost edges are clamped while the remainders are traction free. The right column in Figure 13 includes three snapshots that depict the mean stress. Dilatation grows from the upper-right corner  Finite Element Method -Simulation, Numerical Analysis and Solution Techniques while compression appears from the upper-left corner, which are clearly observed in the results. The figure depicts the magnitude of the induced thermal stresses. The reader should refer to [10] for further details about this thermo-elasticity example.

Concluding remarks
This chapter introduced how to estimate stress-induced changes using elasticity simulations that are often performed through FE computations. It thus presented a formulation for linear thermo-poroelasticity. It covered the nonlinear energy equation as well. It also implemented a comprehensive MFEM on curved interfaces where the classical DN-DDM was employed to decouple the global SPP for elasticity, and steady single-phase flow. The coupled flow and geomechanics computation that utilizes the reconstructed model showed that this workflow is valuable to tackle realistic reservoir compaction and subsidence simulations. The research presented herein unfolds new prospects to further parallel codes for reservoir simulation coupled with geomechanics.