Dependencies

The standard workflows run serially. Install optional components only when your selected model needs them.

What you need

Component

Required for

Installation

MATLAB

Core examples; R2021a or newer

Your MATLAB installation and license

MRST

All simulation workflows

Pinned Git submodule; initialized by startupH2sim

PhreeqcMatlab

Included chemistry integration tools

Pinned Git submodule

IPhreeqcCOM

The two sequential PHREEQC backends

Platform-specific COM setup; see installation

h2_biogeochemistry.dat

Selected PHREEQC examples

Bundled under h2-biochem/database

Parallel Computing Toolbox

Optional parallel pressure flashes

Optional; serial is the default

AMGCL and a supported C++ compiler

Optional acceleration of large compositional cases

MRST linear-solver MEX gateway; no Parallel Computing Toolbox needed

Internet access to NIST

Pure-component table-generation scripts

Needed when fetching data, not for the compact notebooks

Reference validation

The PHREEQC validation case additionally uses a separate UGFACT checkout. Pass its root directory as ugfactRoot to runPhreeqcValidation. All selected examples and the reference run use serial execution.

Without Parallel Computing Toolbox

Leave phreeqcReflashParallel=false (the default). The selected models and notebooks do not call parpool or require worker processes.

summary = exampleSequentialBiochemistryPhreeqc1D( ...
    'maximumFlowSteps', 2, 'phreeqcReflashParallel', false);

If parallel pressure flashes are explicitly requested but the toolbox or its license is unavailable, H2sim reports the fallback and uses the serial loop. Parallel execution is an optional optimization, not a different model.

Dependency revisions

Git records the exact MRST and PhreeqcMatlab revisions used by the checkout:

git submodule status
git submodule update --init --recursive

H2sim’s acetate component parameters live in its own helper; no local edit to MRST’s property table is required. Avoid recursively adding an entire MRST checkout to MATLAB’s path. Its startup and module manager select the needed paths.

Platform requirements

The core black-oil, compositional bacterial, and thermodynamic workflows do not depend on the Windows COM interface. The two sequential PHREEQC backends currently use IPhreeqcCOM; their platform requirement and setup check are documented in Installation.

Database source

h2_biogeochemistry.dat is an unmodified copy of the database distributed with UGFACT, developed by Ahmadreza Shojaee at Heriot-Watt University. H2sim changes only its filename. The exact source revision is recorded alongside the checksum in h2-biochem/database/README.md. The original USGS PHREEQC database credits are preserved. Cite UGFACT’s framework publication when using this database.