Processforge
A lightweight Python framework for process simulation, coupling hydraulic, thermal, and reactor workflows.
Install
Install the pf command-line tool with uv:
uv tool install processforge
For CoolProp-backed units:
uv tool install "processforge[coolprop]"
Optional solver backends:
uv tool install "processforge[eo]"
uv tool install "processforge[eo-casadi]"
uv tool install "processforge[modelica]"
Quick start
-
Install the tool
uv tool install processforge
-
Download an example flowsheet
curl -O https://raw.githubusercontent.com/urjanova/processforge/master/flowsheets/hydraulic-chain.json
-
Initialize, plan, and apply
pf init flowsheets/hydraulic-chain.json pf plan flowsheets/hydraulic-chain.json pf apply flowsheets/hydraulic-chain.json
planvalidates the flowsheet (schema, DOF, units) without running the solver;applysolves it and stores a snapshot. -
Look at the output
pf apply(andpf run) write a single unified archive underoutputs/:outputs/<base>.pfarchive/— the unified store for a flowsheet's solved state and outputs:snapshots/— Zarr store of converged state vectors (one group per successfulpf apply), each withx/x_deltaarrays and config/var-name/metadata attributes, plus alatestpointer (powers warm-start, drift detection, and homotopy).runs/<run_id>.json— the run manifest: every stream and unit engine output (values, units, dtypes, shapes) and run provenance (backend, version, flowsheet hash).outputs/streams/<name>.json— per-stream timeseries from the solve.artifacts.json— content-addressed registry of all output artifacts (local + remote URIs).index.json—field_name → occurrencesindex for fast cross-run lookups.latest_run— plain-text pointer to the most recent run.
outputs/<base>_divergence.json— written only when both direct and homotopy solves fail onpf apply, capturing drifted params, solver stats, and top residual violators.
For dynamic flowsheets with Tank units, use
pf run(notpf apply, which is steady-state EO only) to solve with the dynamic engine.
Python API
from processforge import EOFlowsheet, validate_flowsheet
config = validate_flowsheet("flowsheets/hydraulic-chain.json")
fs = EOFlowsheet(config, backend="scipy")
results = fs.run()
Usage
See the usage guide for CLI commands and workflows.
Individual providers (e.g. FESTIM, OpenMC) can be run via Docker images using the provider image contract.
Flowsheets
The core of Processforge is the flowsheet JSON format, which defines materials, units, and recycle rules. See below for more information on the formats and example flowsheets.
- docs/flowsheets.md : flowsheet JSON format, materials, units, and recycle rules
- flowsheets/ : example flowsheets shipped with the repo
License
BSD 3-Clause License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file processforge-0.5.1.tar.gz.
File metadata
- Download URL: processforge-0.5.1.tar.gz
- Upload date:
- Size: 244.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af9e280a67b84908fbfbff80a8e2b7af908ae20762a63e2a79bf4239f02b1fe4
|
|
| MD5 |
58d2386b7eb92645962f93d21b997d42
|
|
| BLAKE2b-256 |
25154df1e42469ed45228afda5defcd04307371a0beaa5f6d22029337f0ba926
|
File details
Details for the file processforge-0.5.1-py3-none-any.whl.
File metadata
- Download URL: processforge-0.5.1-py3-none-any.whl
- Upload date:
- Size: 249.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1bbc8a6583dbbcd15fa30b690abefd333fa145d176e60e5883a49ab4ff7aa2
|
|
| MD5 |
01e31020fbc3e2d228a2520cb8b53136
|
|
| BLAKE2b-256 |
87c0bb48c17dfd94aef340fe7cc34e53f8ad83bcb156ffbcd6dca3ee33d86979
|