MODFLOW 6 and PHREEQC Reactive Transport Modeling
Benchmarks
Benchmark comparing model results against PHT3D are in benchmark/. Each folder contains a Jupyter notebook to write and execute an MF6RTM model via the MUP3D class. Additionally, PHT3D files are provided in the corresponding pht3d directory for each example.
Considerations
The current version is intended to work with structured grids (dis object in MF6), unstructured grids (disv) and one MF6 simulation that includes the flow and transport solutions. No support is currently provided for a 'flow then transport scheme,' meaning that advanced packages cannot be incorporated yet.
On the PHREEQC side, the following have been included:
- Solution
- Equilibrium phases
- Cation Exchange
- Surface Complexation
- Kinetic Phases
Most options for each phreeqc block can be passed by adding list with options. However, not all options had been tested, so please create an issue if any option is not working or crashing the model.
Software requirements
All dependencies and executables are included in this repo. This package extensively uses modflowapi and phreeqcrm
Installation
Quick Start with pip
The package can be installed via pip:
pip install mf6rtm
Installing MODFLOW 6 executables
After installing mf6rtm, install the MODFLOW 6 executables:
pip install modflow-devtools
get-modflow --subset mf6,libmf6,gridgen :python
Once installed, the executables in envs/[env-name]/bin will be automatically invoked whenever mf6rtm runs within the environment.
Custom MODFLOW Versions
If you need custom or older versions of mf6 (e.g., for running PESTPP on an HPC cluster), place them in a separate directory and use the provided utility to bring them to the model working directory:
from mf6rtm import utils
utils.prep_bins(model_dir, src_path=path_to_bins)
Running the benchmark notebooks
We have provided some benchmarks in the form of Jupyter notebooks. We have also included the executables needed to run them out of the box. Nevertheless, they can also be run using the executables downloaded with modflow-devtools.
Developing
With Pixi
For development, we use pixi for fast, reproducible environments:
# Fork and clone the repository
git clone https://github.com/YOUR-USERNAME/mf6rtm.git
cd mf6rtm
# Install development environment with all dependencies
pixi install
# Run tests
pixi run test
# Run tests with coverage
pixi run test-cov
# Run linting
pixi run lint
# Test with specific Python version
pixi run -e py311 test
Documentation
The documentation is available in mf6rtm - read the docs
Funding
The developing of mf6rtm was kindly supported by INTERA, Inc.
Metadata
Release files for mf6rtm 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mf6rtm-0.5.2.tar.gz | 92.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mf6rtm-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 190.7 kB
Release files / mf6rtm-0.5.2.tar.gz
| Download URL | mf6rtm-0.5.2.tar.gz |
|---|---|
| Size | 92.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8202e80280e3ce8963b469846020daecc0dbb69eb3c61c89574056e0bdbfc461
|
|
BLAKE2b-256 checksum How to use checksums |
26963730192b82e6422d08d99d73701c17f0cd43a66148f6fb5c26d11c3ed7bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.
Transparency logRelease files / mf6rtm-0.5.2-py3-none-any.whl
| Download URL | mf6rtm-0.5.2-py3-none-any.whl |
|---|---|
| Size | 98.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d2a219d6fff819b201a8a28a3267b91a9402559512a94125b12c0d2e153b824
|
|
BLAKE2b-256 checksum How to use checksums |
b677368e2089754759f1815a365c1d124a25b7a69f92042d524405eb6c759840
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.
Transparency log