OpenPinch
OpenPinch is an open-source Python toolkit for advanced Pinch Analysis and Total Site Integration. It supports direct and indirect heat integration targeting, graph interpretation, Heat Pump and refrigeration screening, exergy and cogeneration post-processing, heat exchanger network synthesis, multi-period analysis, stream piece-wise linearisation (for variable heat capacity and phase change streams), and file-backed or schema-first workflows.
Full documentation is available at https://openpinch.readthedocs.io/en/latest/.
Install
Install the base package for validation, targeting, summaries, and schema-first Python workflows:
python -m pip install openpinch
Install optional extras only for the workflows that need them:
python -m pip install "openpinch[notebook]" # Jupyter, Plotly graphs, Excel I/O
python -m pip install "openpinch[dashboard]" # Streamlit dashboard
python -m pip install "openpinch[synthesis]" # HEN synthesis, then run: idaes get-extensions
python -m pip install "openpinch[brayton_cycle]" # TESPy-backed Brayton-cycle tooling
python -m pip install "openpinch[full]" # all optional surfaces, including synthesis
OpenPinch currently requires Python >=3.14.2.
Both synthesis and full install the IDAES/Pyomo synthesis stack. Complete
the IDAES installation before running solver-backed workflows:
idaes get-extensions
First Solve
OpenPinch exposes two package-root workflow classes. Use PinchProblem for one
case and PinchWorkspace for named cases and scenarios.
from OpenPinch import PinchProblem
problem = PinchProblem(
{
"streams": [
{
"name": "Hot feed",
"zone": "Process",
"t_supply": 180.0,
"t_target": 80.0,
"heat_flow": 1000.0,
},
{
"name": "Cold feed",
"zone": "Process",
"t_supply": 20.0,
"t_target": 120.0,
"heat_flow": 800.0,
},
],
"utilities": [],
},
project_name="First solve",
)
problem.validate()
problem.target.all_heat_integration()
print(problem.summary_frame())
Analysis is explicit: named methods execute work, while summaries, reports, plots, and exports consume prepared or cached state.
Packaged Resources
OpenPinch ships maintained sample cases and notebook workflows. The resource helpers below are useful repository tooling, but are not compatibility protected:
from OpenPinch.resources import (
list_notebooks,
list_sample_cases,
notebook_metadata,
sample_case_metadata,
)
print(list_sample_cases())
print(sample_case_metadata("basic_pinch.json").description)
print(list_notebooks())
print(notebook_metadata("01_first_solve_and_core_curves.ipynb").title)
Copy the notebook series from the CLI:
openpinch notebook -o notebooks
The eighteen-notebook series progresses from first solve through multiperiod HPR, cogeneration, HEN synthesis, and publication workflows.
The CLI intentionally copies notebooks only. Solves, validation, graph export, Excel export, dashboards, and advanced targeting happen through Python.
Documentation Map
- Getting started: https://openpinch.readthedocs.io/en/latest/getting-started.html
- Workflow choice: https://openpinch.readthedocs.io/en/latest/overview/workflow-map.html
- Guides: https://openpinch.readthedocs.io/en/latest/guides/index.html
- API reference: https://openpinch.readthedocs.io/en/latest/api/index.html
Testing
Run the test suite locally:
python -m pip install -e .
python -m pip install --group dev
ruff check .
coverage run --branch --source=OpenPinch -m pytest --hypothesis-seed=20260715 -m "not solver"
coverage report --fail-under=95
python scripts/build_docs.py
python scripts/build_dist.py
Ubuntu runs the complete CI suite. Windows and macOS install the generated
wheel and verify the core import, CLI, and packaged resources. Tests marked
solver require external solver binaries and remain a manual pre-release
check in a solver-enabled environment: pytest -m solver.
Release Process
- Merge a change only after the required CI checks pass.
- Confirm
pyproject.tomlanduv.lockcontain the intended release version. - Run the solver-marked tests in a solver-enabled environment.
- Create a signed or annotated
vX.Y.Ztag at the intended commit and push it. - Approve the protected
pypienvironment after TestPyPI publication succeeds.
The publish workflow rejects malformed tags and tags that do not exactly match
the project version. Pull-request automation updates versions with --no-tag;
maintainers always create release tags explicitly.
Build the documentation locally:
uv run scripts/build_docs.py
History and Citation
OpenPinch started in 2011 as an Excel workbook with macros. The Python implementation began in 2021 to make the workflows scriptable and testable.
In publications and forks, please cite and link the foundational article and this repository:
Timothy Gordon Walmsley, 2026. OpenPinch: An Open-Source Python Library for Advanced Pinch Analysis and Total Site Integration. Process Integration and Optimization for Sustainability. https://doi.org/10.1007/s41660-026-00729-6
Contributors
Founder: Tim Walmsley, University of Waikato
Stephen Burroughs, Benjamin Lincoln, Alex Geary, Harrison Whiting, Khang Tran, Roger Padulles, Jasper Walden, Caleb Archer
License
OpenPinch is released under the MIT License. See LICENSE for details.
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 openpinch-0.6.0.tar.gz.
File metadata
- Download URL: openpinch-0.6.0.tar.gz
- Upload date:
- Size: 458.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b3d2bfc6704edced2fa5031fc5e9374c7b6221ea2c660452d0ece0b8c787684
|
|
| MD5 |
b6a9fc67da1d4db705ebcb2461fec3ae
|
|
| BLAKE2b-256 |
d99f44bc5eaa3dd6933278f5d07bc5bee9ecf5d625790adac2abed628b82aa54
|
Provenance
The following attestation bundles were made for openpinch-0.6.0.tar.gz:
Publisher:
ci-publish.yml on waikato-ahuora-smart-energy-systems/OpenPinch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openpinch-0.6.0.tar.gz -
Subject digest:
5b3d2bfc6704edced2fa5031fc5e9374c7b6221ea2c660452d0ece0b8c787684 - Sigstore transparency entry: 2661339199
- Sigstore integration time:
-
Permalink:
waikato-ahuora-smart-energy-systems/OpenPinch@0a82bb4844cb8a50da8cce1252abfa4e5333a0c0 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/waikato-ahuora-smart-energy-systems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-publish.yml@0a82bb4844cb8a50da8cce1252abfa4e5333a0c0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openpinch-0.6.0-py3-none-any.whl.
File metadata
- Download URL: openpinch-0.6.0-py3-none-any.whl
- Upload date:
- Size: 637.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
611c7b8b6ff9fe4776920a1bab2e2305dbd44a41178539d0fc81bd540636e79a
|
|
| MD5 |
10c7d000fdf374565c0070480100d491
|
|
| BLAKE2b-256 |
188d95303018c6c3637aa551b2920da954593a1133daa7f6dd00672f67c534b0
|
Provenance
The following attestation bundles were made for openpinch-0.6.0-py3-none-any.whl:
Publisher:
ci-publish.yml on waikato-ahuora-smart-energy-systems/OpenPinch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openpinch-0.6.0-py3-none-any.whl -
Subject digest:
611c7b8b6ff9fe4776920a1bab2e2305dbd44a41178539d0fc81bd540636e79a - Sigstore transparency entry: 2661339229
- Sigstore integration time:
-
Permalink:
waikato-ahuora-smart-energy-systems/OpenPinch@0a82bb4844cb8a50da8cce1252abfa4e5333a0c0 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/waikato-ahuora-smart-energy-systems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-publish.yml@0a82bb4844cb8a50da8cce1252abfa4e5333a0c0 -
Trigger Event:
push
-
Statement type: