Skip to main content

MODFLOW 6 and PHREEQC Reactive Transport Modeling

mf6rtm logo

Main branch: CI Linux CI macOS Docs Coverage Status

Develop branch: CI Linux CI macOS Docs Coverage Status

PyPI License PyPI Version PyPI Versions DOI Platforms

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mf6rtm-0.5.0.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mf6rtm-0.5.0-py3-none-any.whl (94.7 kB view details)

Uploaded Python 3

File details

Details for the file mf6rtm-0.5.0.tar.gz.

File metadata

  • Download URL: mf6rtm-0.5.0.tar.gz
  • Upload date:
  • Size: 89.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mf6rtm-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a2f85aaaaed38a09854094eea0beeca7e0e0f481475b453cd19a7f98bda65c69
MD5 9dde90756cbd9a4861e42108e415e0e8
BLAKE2b-256 39088aa90e106122ed63ee8992d2dc1d9400a4967190fc2a583993fb7b604f4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mf6rtm-0.5.0.tar.gz:

Publisher: python-publish.yml on p-ortega/mf6rtm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mf6rtm-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mf6rtm-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 94.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mf6rtm-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad23a0fb15a026d0c23aec96b55e81edf7bd6513ce6bc76ff587f7ce48ddc93e
MD5 d3c1cdc5337b5cb2aa1fcbdc477340fa
BLAKE2b-256 e04a8728428f5b2ab6a76193e83ed5d0f520baa7db9a3444eba028c984cec29e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mf6rtm-0.5.0-py3-none-any.whl:

Publisher: python-publish.yml on p-ortega/mf6rtm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.2

2 files

0.5.1

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page