Skip to main content

.

Project description

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

PFAS - a package for semi-analytical modeling of PFAS transport in the vadose zone

PFAS Transport Modeling Package

A Python package for modeling the transport of per- and polyfluoroalkyl substances (PFAS) through the unsaturated zone.

Overview

PFAS is a toolkit for simulating the movement and fate of PFAS contaminants in soil and groundwater systems. It provides a flexible, modular framework for constructing transport models with configurable preprocessing steps and analytical solvers. The package is designed for researchers and engineers studying PFAS contamination and remediation.

Features

  • Modular Architecture: Build complex transport models using pluggable preprocessors and solvers.
  • Flexible Configuration: Define simulations using intuitive TOML configuration files or directly in code.
  • Sorption Modeling: Support for linear and non-linear sorption processes to soil particles and Air-Water Interface
  • Vadose Zone Transport: Simulate PFAS movement through the unsaturated zone
  • Soil-Water Content Effects: Account for soil-water characteristic curves in moisture dynamics
  • Grid Generation: Automatic mesh generation for spatial domains
  • Boundary Condition Management: Flexible handling of domain boundaries

Requirements

  • Python >= 3.9
  • NumPy >= 2
  • SciPy
  • Matplotlib
  • Pydantic
  • Marimo (for interactive documentation)

Installation

From PyPI (coming soon)

pip install pfas

From Source

git clone https://github.com/UU-PFAS-Living-Lab/pfas.git
cd pfas
pip install -e .

For Development

Install with additional testing, documentation, and example dependencies:

pip install -e ".[dev]"

Or install individual extras:

pip install -e ".[test]"      # For testing
pip install -e ".[docs]"      # For building documentation
pip install -e ".[examples]"  # For running examples

Quick Start

Here's a minimal example to get started:

from pfas.configuration import read_toml
from pfas.preprocessing import (
    WaterPreprocessor,
    BoundaryPreprocessor,
    GridGenerator,
    SpRetardationPreprocessor,
    SWCAdsorptionPreprocessor,
    SorptionKawiDirectInput,
    SimulationRunner
)
from pfas.model import Model

# Load configuration from file
config = read_toml("examples/data/config.toml")

# Create and configure the model
model = (Model(config)
    .add(WaterPreprocessor, porosity=0.4)
    .add(BoundaryPreprocessor)
    .add(GridGenerator)
    .add(SpRetardationPreprocessor)
    .add(SWCAdsorptionPreprocessor)
    .add(SorptionKawiDirectInput)
    .add(SimulationRunner)
)

# Access results
data = model.generated_data
C_tot = data["C_tot"]  # Total PFAS concentration
grid = data["grid"]    # Grid information

Documentation

Full documentation is available at Read the Docs.

Examples

Several example scripts are provided in the examples/ directory, demonstrating:

  • data_structure.py - Data structure handling
  • initial_value_problem.py - Setting up initial value problems
  • Kd_sorption.py - Linear sorption (Kd) modeling
  • factory.py - Factory patterns for model creation
  • gen_example.py - Configuration generation

To run these examples, you need Marimo.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use PFAS in your research, please cite:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contact

For questions and support, please contact:

Acknowledgments

This package was developed at Utrecht University as part of the PFAS Living Lab initiative.

Project details


Download files

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

Source Distribution

pfas-0.1.0.tar.gz (62.2 kB view details)

Uploaded Source

Built Distribution

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

pfas-0.1.0-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file pfas-0.1.0.tar.gz.

File metadata

  • Download URL: pfas-0.1.0.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for pfas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eec47e82c2750030b67ae48dc16d91d468e71d70e869c107beabf286b4736b1a
MD5 402c3d39e4024b5ebd3c8b094a97d829
BLAKE2b-256 8957d2568059b4ddb78da4691604afddcd37ede50c41ff225a5d9c2c77fd60a6

See more details on using hashes here.

File details

Details for the file pfas-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pfas-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for pfas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f7b2f57e553d1f65491d032a091460ef0d78ce761edc789548271ca0ec5ef43
MD5 c83a8ed0943d902455db1c35106f9256
BLAKE2b-256 97e610f8d6f1a9cbe51fe5f9f607b715c0bcdf5fe63817f9447575b581979051

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page