Wellbore Genius
Help

Thermo-mechanical-hydraulic (3-D voxel)

shipped
DDM 3-D
Benchmarked
id: thermo-mechanical-hydraulic

Phase 9 T-M-H 3-D voxel: implicit T → P → σ_h with bench-aware E′/α and convective transport.

Today

Phase 9 T-M-H 3-D voxel stepper via `src/lib/reservoir/thermoPoroGrid3D.ts` — segregated implicit-Euler timestepping on a regular voxel grid that solves a TPFA conduction temperature equation (SPD CG via `src/lib/linalg/cg.ts`) with prescribed-T Dirichlet boundary conditions AND volumetric heat sources AND **opt-in convective transport** via `enableConvection: true` on the step input (lagged Darcy face fluxes drive upwind T·v·∇T fluxes on the temperature tridiag; off by default so legacy callers stay byte-identical), then pipes the per-cell ΔT into the existing `stepReservoir` single-phase pressure solve as a thermal-pressure source `q_T = β · ΔT · (φ·c_t·V_b / Δt)` (β = thermalPressureCouplingPsiPerF, configurable per-grid), and finally accumulates a Geertsma-style minimum-horizontal-stress update `Δσ_h = α_B·(1−2ν)/(1−ν)·ΔP + E·α_T/(1−ν)·ΔT` so cooling and depletion both unload σ_h consistently with the existing 2-D poroelastic kernel in §10. **Bench-aware E'/α** via `src/lib/reservoir/benchLayeredProps.ts` broadcasts per-K-layer `{ perBench: [...] }` across (i, j) so stiffer benches yield proportionally larger |Δσ_h| under identical ΔT. **In-Newton wiring LIVE** — `coupledNewtonStep` accepts an opt-in `thermoPoroCoupling: NewtonThermoPoroCoupling` field (`newtonThermoPoroCoupling.ts`) that runs `subStepThermoPoro` AFTER each accepted Newton iterate, advancing the coupled (T, P, σ_h) state by `dtDays / maxIter` using the latest per-DDM-cell q_leak as withdrawal sources on the pressure equation. Chain ordering inside `coupledNewtonStep`: single-phase `reservoirCoupling` → 3-phase `blackOil3PCoupling` → thermo-poro `thermoPoroCoupling` LAST, so thermo-poro pressures always win on the shared `pPorePa[]` (engineer-grade override — thermal drawdown is the strongest signal at the fracture face). The new pore pressure is sampled via `samplePorePressurePaFromThermo` and written into the kernel's per-cell PDL threshold so the NEXT residual evaluation feels the live thermo-elastic drawdown. Result fields `thermoPoroState`, `thermoPoroLinearIterations`, and `thermoPoroMaxFootprintDeltaTF` surface the per-iter ΔT magnitude that drove the thermal-pressure source. Builder UI surfaced via `ThermoPoroInputsCard` on the Solver panel (master enable switch, dt, initial T, β, biot/ν/E/α_T, bulk heat capacity + conductivity, dynamic thermal-BC and volumetric-source tables); results via `ThermoPoroResultsCard` in the Diagnostics tab. Drift-guards: `thermoPoroGrid3D.test.ts` (11), `benchLayeredProps.test.ts` (8), `thermoPoroBuilderStore.test.ts` (5), `thermoPoroResultsPreview.test.ts` (6), `newtonStep.thermoPoroCoupling.test.ts` (2 — absent ≡ null fields, supplied ⇒ state populated + ΔT > 0 + porePressurePa surfaced), `newtonStep.couplingChainOrder.test.ts` (3 — single-phase / BO3P / thermo-poro chain ordering, thermo-poro wins last on pPorePa). Pure module, no external simulator dependency.

Roadmap

All in-loop coupling work CLOSED — thermo-poro now runs inside `coupledNewtonStep` after `blackOil3PCoupling` and wins last on `pPorePa[]`. Remaining: bridge the voxel-grid σ_h field back into the parent-child §10 SHmax-rotation kernel so live cooling near offset wells reorients the child-fracture geometry alongside depletion. Field-validation gating shares the `/projects/$p/workspaces/$w/field-validation` ingest path (DTS gradient surveys + DFIT residuals).

Shipping history
  1. Phase 9
    shipped

    Phase 9 T-M-H 3-D voxel stepper via `src/lib/reservoir/thermoPoroGrid3D.ts` — segregated implicit-Euler timestepping on a regular voxel grid that solves a TPFA conduction temperature equation (SPD CG via `sr

Validation
L∞
0.5 % mass-balance (worst, FI scenarios)
n = 16 · TrustRollupChip aggregate over /numerics-validation SI + FI scenarios
Valid when
MeshRegular voxel grid; TPFA-conduction, CG-SPD
CouplingSegregated implicit-Euler; chained AFTER blackOil3PCoupling
Bench-aware E′/αOpt-in per-K-layer via benchLayeredProps
Failure modes
  • Highly anisotropic conduction (only isotropic k_T today)
  • Phase-change latent heat not in T equation
Basins:
Synthetic 3-D voxel + EGS / cold-injection geometries
Last reviewed 2026-06-01