An open source FEM code for solving coupled thermo-poroelastoplastic processes
Open Geomechanics, Volume 5 (2024), article no. 1, 19 p.

Coupled thermo-hydro-mechanical (THM) processes are ubiquitous in subsurface energy production and geological utilization and storage operations. Numerical simulation of strongly coupled THM processes is a non-trivial task, yet required to predict the performance of many applications in energy geomechanics. The majority of existing and open source THM numerical codes are not end user adaptable and do not include elastoplasticity coupled to mass and energy balance equations. This article presents an open source thermo-poroelastoplastic finite element numerical code with a fully-coupled monolithic solution strategy that is solved with Fenicsx computing platform. The formulation employs a mixed finite element scheme for pore pressure diffusivity, Petrov-Galerkin methods for energy transport, mean stress dependent yield surface, and non-associative plastic potential. The numerical solution is verified with small-scale conventional triaxial tests, including drained and undrained compression and extension. We present example simulations reaching the yield surface induced by coupled hydro-mechanical and thermal loads. In addition, we present two example large-scale applications related to geothermal energy and carbon geological storage. Results show that the numerical solution accurately predicts changes of temperature, pore pressure, and stress for a wide range of model geometries and boundary conditions, including the plastic response. The code is freely available to the general community for use and modification.

Published online:
DOI: 10.5802/ogeo.17
Keywords: Plasticity, Coupled processes, Numerical code, Energy geomechanics
McLean, Matthew L. 1; Espinoza, D. Nicolas 2

1 Department of Petroleum and Geosystems Engineering The University of Texas at Austin Austin, TX, USA
2 The University of Texas at Austin
License: CC-BY-NC-SA 4.0
Copyrights: The authors retain unrestricted copyrights and publishing rights
     author = {McLean, Matthew L. and Espinoza, D. Nicolas},
     title = {An open source {FEM} code for solving coupled thermo-poroelastoplastic processes},
     journal = {Open Geomechanics},
     eid = {1},
     pages = {1--19},
     publisher = {Alert Geomaterials},
     volume = {5},
     year = {2024},
     doi = {10.5802/ogeo.17},
     language = {en},
     url = {}
AU  - McLean, Matthew L.
AU  - Espinoza, D. Nicolas
TI  - An open source FEM code for solving coupled thermo-poroelastoplastic processes
JO  - Open Geomechanics
PY  - 2024
SP  - 1
EP  - 19
VL  - 5
PB  - Alert Geomaterials
UR  -
DO  - 10.5802/ogeo.17
LA  - en
ID  - OGEO_2024__5__A1_0
ER  - 
%0 Journal Article
%A McLean, Matthew L.
%A Espinoza, D. Nicolas
%T An open source FEM code for solving coupled thermo-poroelastoplastic processes
%J Open Geomechanics
%D 2024
%P 1-19
%V 5
%I Alert Geomaterials
%R 10.5802/ogeo.17
%G en
%F OGEO_2024__5__A1_0
McLean, Matthew L.; Espinoza, D. Nicolas. An open source FEM code for solving coupled thermo-poroelastoplastic processes. Open Geomechanics, Volume 5 (2024), article  no. 1, 19 p. doi : 10.5802/ogeo.17.

[1] Allis, Rick; Moore, Joe; Davatzes, Nick; Gwynn, Mark; Hardwick, Christian; Kirby, Stefan; McLennan, John; Pankow, Kris; Potter, Stephen; Simmons, Stuart EGS concept testing and development at the Milford, Utah FORGE site, 41st Workshop on Geothermal Reservoir Engineering, Stanford University (2016)

[2] Bai, M; Abousleiman, Y Thermoporoelastic coupling with application to consolidation, International Journal for Numerical and analytical methods in Geomechanics, Volume 21 (1997) no. 2, pp. 121-132 | DOI | Zbl

[3] Balay, Satish; Abhyankar, Shrirang; Adams, Mark F.; Benson, Steven; Brown, Jed; Brune, Peter; Buschelman, Kris; Constantinescu, Emil M.; Dalcin, Lisandro; Dener, Alp; Eijkhout, Victor; Faibussowitsch, Jacob; Gropp, William D.; Hapla, Václav; Isaac, Tobin; Jolivet, Pierre; Karpeev, Dmitry; Kaushik, Dinesh; Knepley, Matthew G.; Kong, Fande; Kruger, Scott; May, Dave A.; McInnes, Lois Curfman; Mills, Richard Tran; Mitchell, Lawrence; Munson, Todd; Roman, Jose E.; Rupp, Karl; Sanan, Patrick; Sarich, Jason; Smith, Barry F.; Zampini, Stefano; Zhang, Hong; Zhang, Hong; Zhang, Junchao PETSc Web page,, 2022

[4] Berger, Lorenz; Bordas, Rafel; Kay, David; Tavener, Simon A stabilized finite element method for finite-strain three-field poroelasticity, Computational Mechanics, Volume 60 (2017), pp. 51-68 | DOI | MR | Zbl

[5] Brezzi, Franco; Douglas, Jim; Marini, L. D. Two families of mixed finite elements for second order elliptic problems, Numerische Mathematik, Volume 47 (1985) no. 2, pp. 217-235 | DOI | MR | Zbl

[6] Brooks, Alexander N; Hughes, Thomas JR Streamline upwind/Petrov-Galerkin formulations for convection dominated flows with particular emphasis on the incompressible Navier-Stokes equations, Computer methods in applied mechanics and engineering, Volume 32 (1982) no. 1-3, pp. 199-259 | DOI | MR | Zbl

[7] Biot, Maurice A. General Theory of Three-Dimensional Consolidation, Journal of Applied Physics, Volume 12 (1941) no. 2, pp. 155-164 | DOI | Zbl

[8] Beckers, Koenraad F; Rangel-Jurado, Nicolás; Chandrasekar, Harish; Hawkins, Adam J; Fulton, Patrick M; Tester, Jefferson W Techno-economic performance of closed-loop geothermal systems for heat production and electricity generation, Geothermics, Volume 100 (2022), 102318 | DOI

[9] Ben-Zion, Yehuda; Sammis, Charles G Shear heating during distributed fracturing and pulverization of rocks, Geology, Volume 41 (2013) no. 2, pp. 139-142 | DOI

[10] Cheng, Alexander H-D Poroelasticity, 27, Springer, 2016

[11] Coussy, Olivier Poromechanics, John Wiley & Sons, 2004

[12] Drucker, D. C.; Prager, W. Soil mechanics and plastic analysis or limit design, Quarterly of Applied Mathematics, Volume 10 (1952) no. 2, pp. 157-165 | DOI | MR | Zbl

[13] Eavor Eavor-Lite,, 2022

[14] Evans, Keith F; Cornet, François H; Hashida, Toshiyuki; Hayashi, Kazuo; Ito, Takatoshi; Matsuki, Koji; Wallroth, Thomas Stress and rock mechanics issues of relevance to HDR/HWR engineered geothermal systems: review of developments during the past 15 years, Geothermics, Volume 28 (1999) no. 4-5, pp. 455-474 | DOI

[15] Franceschini, Andrea; Castelletto, Nicola; Ferronato, Massimiliano Approximate inverse-based block preconditioners in poroelasticity, Computational Geosciences, Volume 25 (2021) no. 2, pp. 701-714 | DOI | MR | Zbl

[16] Frigo, Matteo; Castelletto, Nicola; Ferronato, Massimiliano; White, Joshua A Efficient solvers for hybridized three-field mixed finite element coupled poromechanics, Computers & Mathematics with Applications, Volume 91 (2021), pp. 36-52 | DOI | MR | Zbl

[17] Fang, Yilin; Nguyen, Ba Nghiep; Carroll, Kenneth; Xu, Zhijie; Yabusaki, Steven B; Scheibe, Timothy D; Bonneville, Alain Development of a coupled thermo-hydro-mechanical model in discontinuous media for carbon sequestration, International Journal of Rock Mechanics and Mining Sciences, Volume 62 (2013), pp. 138-147 | DOI

[18] Franklin, John A. Triaxial strength of rock materials, Rock Mechanics Felsmechanik Mecanique des Roches, Volume 3 (1971) no. 2, pp. 86-98 | DOI

[19] Geothermal Technologies Office GeoVision: Harnessing the Heat Beneath Our Feet (2019) (Technical report) | DOI

[20] Gueguen, Y; Bouteca, M Mechanical properties of rocks: pore pressure and scale effects, Oil & Gas Science and Technology, Volume 54 (1999) no. 6, pp. 703-714 | DOI

[21] Gee, Bruce; Gracie, Robert; Dusseault, Maurice B Multiscale short-circuiting mechanisms in multiple fracture enhanced geothermal systems, Geothermics, Volume 94 (2021), 102094 | Zbl

[22] Garipov, TT; Hui, MH Discrete fracture modeling approach for simulating coupled thermo-hydro-mechanical effects in fractured reservoirs, International Journal of Rock Mechanics and Mining Sciences, Volume 122 (2019), 104075 | DOI

[23] Ghassemi, A A review of some rock mechanics issues in geothermal reservoir development, Geotechnical and Geological Engineering, Volume 30 (2012) no. 3, pp. 647-664 | DOI

[24] Geuzaine, Christophe; Remacle, Jean-François Gmsh: A 3-D finite element mesh generator with built-in pre-and post-processing facilities, International journal for numerical methods in engineering, Volume 79 (2009) no. 11, pp. 1309-1331 | DOI | MR | Zbl

[25] Hoek, Evert; Brown, Edwin T Practical estimates of rock mass strength, International journal of rock mechanics and mining sciences, Volume 34 (1997) no. 8, pp. 1165-1186 | DOI

[26] Haagenson, Ryan; Rajaram, Harihar; Allen, Jeffery A generalized poroelastic model using FEniCS with insights into the Noordbergum effect, Computers & Geosciences, Volume 135 (2020), 104399 | DOI

[27] Habera, Michal; Zilian, Andreas dolfiny,, 2022

[28] Itasca Consulting Group, Inc. FLAC3D – Fast Lagrangian Analysis of Continua in Three-Dimensions, Ver. 7.0, Itasca, 2019

[29] Im, Kyungjae; Avouac, Jean-Philippe; Heimisson, Elías R; Elsworth, Derek Ridgecrest aftershocks at Coso suppressed by thermal destressing, Nature, Volume 595 (2021) no. 7865, pp. 70-74

[30] Jung, Hojung; Espinoza, D. Nicolas; Hosseini, Seyyed A. Wellbore injectivity response to step-rate CO2 injection: Coupled thermo-poro-elastic analysis in a vertically heterogeneous formation, International Journal of Greenhouse Gas Control, Volume 102 (2020), 103156 | DOI

[31] Kolditz, Olaf; Bauer, Sebastian; Bilke, Lars; Böttcher, Norbert; Delfs, Jens-Olaf; Fischer, Thomas; Görke, Uwe J; Kalbacher, Thomas; Kosakowski, Georg; McDermott, CI et al. OpenGeoSys: an open-source initiative for numerical simulation of thermo-hydro-mechanical/chemical (THM/C) processes in porous media, Environmental Earth Sciences, Volume 67 (2012) no. 2, pp. 589-599 | DOI

[32] Kohl, T.; Evansi, K.F.; Hopkirk, R.J.; Rybach, L. Coupled hydraulic, thermal and mechanical considerations for the simulation of hot dry rock reservoirs, Geothermics, Volume 24 (1995) no. 3, pp. 345-359 | DOI

[33] Kim, Jihoon Sequential methods for coupled geomechanics and multiphase flow, Stanford University, 2010

[34] Kelkar, S; Lewis, K; Karra, S; Zyvoloski, G; Rapaka, S; Viswanathan, H; Mishra, PK; Chu, S; Coblentz, D; Pawar, R A simulator for modeling coupled thermo-hydro-mechanical processes in subsurface geological media, International Journal of Rock Mechanics and Mining Sciences, Volume 70 (2014), pp. 569-580 | DOI

[35] Kivi, Iman Rahimzadeh; Pujades, Estanislao; Rutqvist, Jonny; Vilarrasa, Víctor Cooling-induced reactivation of distant faults during long-term geothermal energy production in hot sedimentary aquifers, Scientific Reports, Volume 12 (2022) no. 1 | DOI

[36] Livescu, Silviu; Dindoruk, Birol; Schulz, Rebecca; Boul, Peter; Kim, Jihoon; Wu, Kan Geothermal and Electricity Production: Scalable Geothermal Concepts in The Future of Geothermal in Texas: Contemporary Prospects and Perspectives, UT Faculty/Researcher Works (2023)

[37] Lindsay, Alexander D; Gaston, Derek R; Permann, Cody J; Miller, Jason M; Andrš, David; Slaughter, Andrew E; Kong, Fande; Hansel, Joshua; Carlsen, Robert W; Icenhour, Casey et al. 2.0-MOOSE: Enabling massively parallel multiphysics simulation, SoftwareX, Volume 20 (2022), 101202 | DOI

[38] Logg, Anders; Mardal, Kent-Andre; Wells, Garth Automated solution of differential equations by the finite element method: The FEniCS book, 84, Springer Science & Business Media, 2012

[39] Lewis, R. W; Schrefler, B. A The finite element method in the static and dynamic deformation and consolidation of porous media, John Wiley, 1998

[40] Logg, Anders; Wells, Garth N DOLFIN: Automated finite element computing, ACM Transactions on Mathematical Software (TOMS), Volume 37 (2010) no. 2, pp. 1-28 | DOI | MR | Zbl

[41] McTigue, D. F. Thermoelastic response of fluid-saturated porous rock, Journal of Geophysical Research, Volume 91 (1986) no. B9, 9533 | DOI

[42] McLean, Matthew L; Espinoza, D Nicolas Thermal destressing: Implications for short-circuiting in enhanced geothermal systems, Renewable Energy, Volume 202 (2023), pp. 736-755 | DOI

[43] Martínez-Garzón, Patricia; Kwiatek, Grzegorz; Sone, Hiroki; Bohnhoff, Marco; Dresen, Georg; Hartline, Craig Spatiotemporal changes, faulting regimes, and source parameters of induced seismicity: A case study from The Geysers geothermal field, Journal of Geophysical Research: Solid Earth, Volume 119 (2014) no. 11, pp. 8378-8396 | DOI

[44] Mortensen, Jeannette J Hot dry rock: a new geothermal energy source, Energy, Volume 3 (1978) no. 5, pp. 639-644 | DOI

[45] National Research Council et al. The Waste Isolation Pilot Plant: A Potential Solution for the Disposal of Transuranic Waste, National Academies Press, 1996

[46] Nemeth, Kenneth J Southeast Regional Carbon Sequestration Partnership (SECARB) (2004) (Technical report) | DOI

[47] Olivella, Sebastià; Gens, A; Carrera, J; Alonso, EE Numerical formulation for a simulator (CODE_BRIGHT) for the coupled analysis of saline media, Engineering computations, Volume 13 (1996) no. 7, pp. 87-112 | DOI | Zbl

[48] Patton, Franklin Davis Multiple modes of shear failure in rock and related materials, University of Illinois at Urbana-Champaign, 1966

[49] Palciauskas, V. V.; Domenico, P. A. Characterization of drained and undrained response of thermally loaded repository rocks, Water Resources Research, Volume 18 (1982) no. 2, pp. 281-290 | DOI

[50] Pan, Hao; Rui, Hongxing Mixed element method for two-dimensional Darcy-Forchheimer model, Journal of Scientific Computing, Volume 52 (2012), pp. 563-587 | DOI | MR | Zbl

[51] Pandey, SN; Vishal, Vikram; Chaudhuri, A Geothermal reservoir modeling in a coupled thermo-hydro-mechanical-chemical approach: A review, Earth-Science Reviews, Volume 185 (2018), pp. 1157-1169 | DOI

[52] Phillips, Phillip Joseph; Wheeler, Mary F. A coupling of mixed and continuous Galerkin finite element methods for poroelasticity I: the continuous in time case, Computational Geosciences, Volume 11 (2007) no. 2 | DOI | MR | Zbl

[53] Phillips, Phillip Joseph; Wheeler, Mary F A coupling of mixed and continuous Galerkin finite element methods for poroelasticity II: the discrete-in-time case, Computational Geosciences, Volume 11 (2007) no. 2, pp. 145-158 | DOI | MR | Zbl

[54] Phillips, Phillip Joseph; Wheeler, Mary F. Overcoming the problem of locking in linear elasticity and poroelasticity: an heuristic approach, Computational Geosciences, Volume 13 (2008) no. 1, pp. 5-12 | DOI | Zbl

[55] Potts, David M; Zdravković, Lidija; Addenbrooke, Trevor I; Higgins, Kelvin G; Kovačević, Nebojša Finite element analysis in geotechnical engineering: application, 2, Thomas Telford London, 2001

[56] Ramey Jr, Henry J Wellbore heat transmission, Journal of petroleum Technology, Volume 14 (1962) no. 04, pp. 427-435 | DOI

[57] Read, H. E.; Hegemier, G. A. Strain softening of rock, soil and concrete–a review article, Mechanics of materials, Volume 3 (1984) no. 4, pp. 271-294 | DOI

[58] Rutqvist, Jonny Status of the TOUGH-FLAC simulator and recent applications related to coupled fluid flow and crustal deformations, Computers & Geosciences, Volume 37 (2011) no. 6, pp. 739-750 | DOI

[59] Rutqvist, Jonny The geomechanics of CO2 storage in deep sedimentary formations, Geotechnical and Geological Engineering, Volume 30 (2012) no. 3, pp. 525-551 | DOI

[60] Schwartz, Arnold E Failure of rock in the triaxial shear test, The 6th US Symposium on Rock Mechanics (USRMS), OnePetro (1964)

[61] Segall, Paul; Fitzgerald, Shaun D. A note on induced stress changes in hydrocarbon and geothermal reservoirs, Tectonophysics, Volume 289 (1998) no. 1-3, pp. 117-128 | DOI

[62] Streit, Jürgen E; Hillis, Richard R Estimating fault stability and sustainable fluid pressures for underground storage of CO2 in porous rock, Energy, Volume 29 (2004) no. 9-10, pp. 1445-1456 | DOI

[63] Salimzadeh, Saeed; Nick, Hamidreza M; Zimmerman, RW Thermoporoelastic effects during heat extraction from low-permeability reservoirs, Energy, Volume 142 (2018), pp. 546-558 | DOI

[64] Thompson, Nicholas; Andrews, Jamie Stuart; Bjørnarå, Tore Ingvald Assessing Potential Thermo-Mechanical Impacts on Caprock Due to CO2 Injection–A Case Study from Northern Lights CCS, Energies, Volume 14 (2021) no. 16, 5054 | DOI

[65] Ugueto, Gustavo A.; Wojtaszek, Magdalena; Huckabee, Paul T.; Savitski, Alexei A.; Guzik, Artur; Jin, Ge; Chavarria, J. Andres; Haustveit, Kyle An Integrated View of Hydraulic Induced Fracture Geometry in Hydraulic Fracture Test Site 2, 9th Unconventional Resources Technology Conference, American Association of Petroleum Geologists (2021) | DOI

[66] Wilkins, Andy; Green, Christopher P; Ennis-King, Jonathan An open-source multiphysics simulation code for coupled problems in porous media, Computers & Geosciences, Volume 154 (2021), 104820 | DOI

[67] Wood, David Muir Geotechnical modelling, Taylor & Francis, 2004 | DOI

[68] Xia, Yidong; Podgorney, Robert; Huang, Hai Assessment of a hybrid continuous/discontinuous Galerkin finite element code for geothermal reservoir simulations, Rock Mechanics and Rock Engineering, Volume 50 (2017) no. 3, pp. 719-732

[69] Yuan, Wanju; Chen, Zhuoheng; Grasby, Stephen E; Little, Edward; Zhao, Gang Thermodynamic Modeling of the Advanced Geothermal System Using Inclined Well Applications, Applied Thermal Engineering, Volume 220 (2023), 119709 | DOI

Cited by Sources: