Getting started
Install the package, then write and run a first transport model from its governing equation to its profile.
Flow, solute and reactive transport, cement chemistry and poromechanics — on finite volume and finite element backends, differentiable with respect to material parameters.

PoroMechanics.jl simulates coupled phenomena in porous media — flow, solute and reactive transport, cement chemistry, and poromechanics — on two numerical backends: finite volumes for transport, finite elements for coupled mechanics.
A physics model is a plain Julia struct holding its material parameters. Multiple dispatch on that struct selects the constitutive behavior, so a model file stays a description of its own equations and knows nothing about time stepping or assembly. Jacobians are never written by hand: the finite volume callbacks are differentiated automatically with ForwardDiff.jl.
Unsaturated flow — Richards' equation (Richards, 1931) with Van Genuchten retention (van Genuchten, 1980) and Mualem relative permeability (Mualem, 1976).
Solute and multi-ionic transport — Fick diffusion, Nernst-Planck transport with an electroneutrality constraint, effective diffusivity from the Oh-Jang tortuosity model (Oh and Jang, 2004).
Non-isothermal drying — liquid water, dry air and heat, coupled through a modified Kelvin equation and an entropy balance, with latent-heat transport by vapor (Philip and de Vries, 1957).
Poromechanics — Biot poroelasticity (Biot, 1941) on unstructured meshes.
Reactive transport in cementitious materials — operator splitting in the style of TOUGHREACT (Xu et al., 2006), with thermodynamic equilibrium from cemdata18 (Lothenbach et al., 2019) through ChemistryLab.jl, Friedel's salt binding, and surface complexation on C-S-H (Tran et al., 2018).
The profile regression suite covers Fick, Darcy, Richards 1D, non-isothermal drying and Biot consolidation. Analytical benchmarks additionally check poroelasticity and Gardner flow, including mesh or time refinement. Richards 2D and the chloride transport profiles are not covered by that regression suite.
Reactive transport remains experimental. Examples 3 and 4 use a certified OPC initial equilibrium, checked against the original element totals. The legacy interior-point solver retains an expected failing mass-action test and is still used during transient chemistry steps. A certified initial condition does not validate those transient results. The solid-solution examples The previously reported solid-solution state-construction failures in tran2018.jl and m100_ternary.jl were not reproduced in the 0.13.0 versus 0.14.2 migration checks with the current examples. This checks construction only; their full hydration and transport histories still need numerical validation.
Parameter sensitivities are tested for constitutive laws and selected solves. The 2D homogenization backend uses Float64 assembly and a finite-difference macroscopic tangent; it is not currently differentiable end to end with respect to material parameters.
PoroMechanics.jl is today a chemo-poro-mechanics code: next to transport and mechanics it carries chemistry of its own — surface complexation on C-S-H (double layer model), mineral dissolution and precipitation kinetics, and the physico-chemical data tables the reactive examples read.
That is a transitional state, not a design choice. Thermodynamic equilibrium is already delegated to ChemistryLab.jl, which owns the databases, the speciation and the Gibbs minimization. The rest is meant to follow it upstream, leaving this package to describe transport and mechanics and to call ChemistryLab.jl for everything chemical.
The transport models NernstPlanck and EquilibratedTransport now live in the package. The optional ChemistryLab extension translates conserved totals and certified equilibrium results; it implements no equilibrium solver. The double-layer and AFm prototypes remain in the examples pending migration of their chemical laws to ChemistryLab. See Reactive transport.
| Problem class | Library |
|---|---|
| Transport, diffusion, flow | VoronoiFVM.jl |
| Coupled mechanics | Ferrite.jl |
using Pkg
Pkg.add("PoroMechanics")The examples additionally need ExtendableGrids for their grids, and the reactive ones that solve chemical equilibria need ChemistryLab.jl, DynamicQuantities.jl and OptimaSolver.jl. ChemistryLab and DynamicQuantities are optional dependencies; loading them activates the equilibrium adapter. using OptimaSolver enables ChemistryLab's certified solver. Pure ionic transport requires none of them.