Chapter 07
Reservoir sandbox
Everything in the previous six chapters, running at once. A geothermal doublet in plan view: cold water goes down the injector, sweeps the reservoir, and comes back up the producer. Pressure responds in hours, temperature in decades, and the rock answers both with stress changes that reach far beyond the cooled volume.
Two-dimensional THM solver — drag the wells, change the field
What is actually being solved
Three coupled fields on a finite-difference grid, marched in time. Nothing is pre-computed and nothing is interpolated from a stored solution — the sliders change the equations, not the picture.
Pressure
$S_\varepsilon\,\partial_t p = \nabla\!\cdot\!\big(\tfrac{k}{\mu}\nabla p\big) + q_w$, backward Euler, solved each step by red–black Gauss–Seidel warm-started from the previous step. Constant-pressure far field.
Temperature
$(\rho c)_m\partial_t T + (\rho c)_f\,\vec q\!\cdot\!\nabla T = \nabla\!\cdot\!(\lambda\nabla T)$, first-order upwind for the advection, explicit diffusion, sub-stepped under a CFL condition. The injector holds its cell at the injection temperature.
Displacement
Plane-strain Navier equations with poroelastic and thermoelastic body forces, $\nabla\!\cdot\!(\ten{C}\!:\!\boldsymbol\varepsilon) = \alpha\nabla p + 3K\alpha_T\nabla T$, solved by SOR. Stresses and the Coulomb failure function are formed from the converged displacement field.
Things worth trying
Watch the two front speeds
Switch the field to pressure and note that it reaches steady state within the first frames of the run. Switch to temperature and watch the cold plume creep. The ratio of those two timescales — four or five orders of magnitude — is the single most important fact about coupled reservoir behaviour.
Find the stress halo
Switch to Coulomb stress change. There is a positive lobe around the injector from the pressure itself, and a second, growing one around the cooled volume from thermal contraction. The thermal contribution starts small and eventually dominates — which is why induced seismicity at geothermal sites often arrives years after injection begins.
Move the producer
Drag the wells apart and the breakthrough time grows roughly with the square of the spacing, because the swept volume does. Drag them together and you get more flow for less pressure — and a much shorter life.
Break it deliberately
Push the injection rate up until the pressure at the injector exceeds the minimum principal stress. In a real reservoir that is the hydraulic-fracturing threshold, and the model — which knows nothing about fractures — will keep happily computing. Every simulator has an edge like this; knowing where it is is the expertise.
This is a teaching model, and it simplifies in ways a design study could not. It is two-dimensional, so the vertical sweep and any gravity segregation are absent. The reservoir is homogeneous — real ones channel, and channelling shortens thermal breakthrough dramatically. Fluid properties are held constant rather than tracked with temperature. Displacement is fixed on the outer boundary, which stiffens the far field. And the rock stays elastic no matter what the Coulomb function says. Every one of those is a deliberate trade for interactivity; each is also a real modelling decision someone has to defend in practice.