An advanced pinch analysis and total site integration toolkit
Project description
OpenPinch
OpenPinch is an open-source toolkit for advanced Pinch Analysis and Total Site Integration. It supports direct and indirect heat integration targeting, multi-utility studies, graph generation, Excel-based workflows, and programmatic analysis in Python.
Install
Install the published package from PyPI:
python -m pip install openpinch
OpenPinch currently requires Python >=3.14.
Notebook Workflow
OpenPinch ships with a notebook series for distinct outputs and workflows. Copy them into your working directory with:
openpinch notebook -o notebooks
The packaged notebook series currently includes:
01_basic_pinch_and_dtcont_sensitivity.ipynb02_total_site_targets_and_sugcc.ipynb03_carnot_hpr_comparison.ipynb
These notebooks are intended to be the main learning path for new users.
Python Workflow
For script and notebook usage, the main front door is PinchProblem.
from pathlib import Path
from OpenPinch import PinchProblem
problem = PinchProblem(problem_filepath=Path("basic_pinch.json"))
problem.run()
summary = problem.summary_frame()
print(summary)
problem.export_excel("results")
problem.export_graphs("graphs", graph_type="gcc")
You can also build a payload directly from the validated schema models:
from OpenPinch import pinch_analysis_service
from OpenPinch.lib.enums import StreamType
from OpenPinch.lib.schema import StreamSchema, TargetInput, UtilitySchema
streams = [
StreamSchema(
zone="Process Unit",
name="Reboiler Vapor",
t_supply=200.0,
t_target=120.0,
heat_flow=8000.0,
dt_cont=10.0,
htc=1.5,
),
StreamSchema(
zone="Process Unit",
name="Feed Preheat",
t_supply=40.0,
t_target=160.0,
heat_flow=6000.0,
dt_cont=10.0,
htc=1.2,
),
]
utilities = [
UtilitySchema(
name="Cooling Water",
type=StreamType.Cold,
t_supply=25.0,
t_target=35.0,
heat_flow=120000.0,
dt_cont=5.0,
htc=0.8,
price=12.0,
)
]
payload = TargetInput(streams=streams, utilities=utilities)
result = pinch_analysis_service(payload, project_name="Example")
Graphing and Dashboard
For graph generation in Python:
figure = problem.plot_grand_composite_curve()
figure.show()
To launch the Streamlit dashboard after solving:
problem.show_dashboard()
Highlights
- Multi-scale targeting for unit operation, process, site, community, and regional studies
- Direct heat integration and indirect integration through utility systems
- Multiple utility targeting, including non-isothermal utilities
- Composite-curve and grand-composite-curve graph generation
- Excel workbook import and Excel summary export
- Packaged sample cases and notebook workflows
- Pydantic schema models for validated programmatic usage
Documentation
Full documentation is available at:
https://openpinch.readthedocs.io/en/latest/
The documentation is organized around install, sample workflows, notebooks, graphing, and the public API.
History
OpenPinch started in 2011 as an Excel workbook with macros. Since then it has expanded into Total Site Heat Integration, multiple utility targeting, retrofit targeting, cogeneration targeting, and related workflows. The Python implementation began in 2021 to bring those capabilities into a scriptable and testable package interface.
Citation
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
Testing
To run the test suite locally:
python -m pip install -e . pytest build "hatchling>=1.26"
pytest
Contributors
Founder: Dr Tim Walmsley, University of Waikato
Stephen Burroughs, Benjamin Lincoln, Alex Geary, Harrison Whiting, Khang Tran, Roger Padullés, Jasper Walden
Contributing
Issues and pull requests are welcome. When submitting code, aim for:
- typed interfaces and clear docstrings
- small methods with singular purpose
- pytest coverage for new user-facing behaviour
- updated docs and notebooks where relevant
License
OpenPinch is released under the MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
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.1.17.tar.gz.
File metadata
- Download URL: openpinch-0.1.17.tar.gz
- Upload date:
- Size: 174.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16a194271b3d7c7508d4bcfd128b5e098615995ceda44b7aef9152e6ebd7bc90
|
|
| MD5 |
ac6e94f0c542f8488d06b0e7e7d2eb19
|
|
| BLAKE2b-256 |
8972a66072e66bf1e2807795201f876fd1f574e20ec610774a92bb97a7b46b5e
|
Provenance
The following attestation bundles were made for openpinch-0.1.17.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.1.17.tar.gz -
Subject digest:
16a194271b3d7c7508d4bcfd128b5e098615995ceda44b7aef9152e6ebd7bc90 - Sigstore transparency entry: 1446307368
- Sigstore integration time:
-
Permalink:
waikato-ahuora-smart-energy-systems/OpenPinch@2e14fa74aa83f6f3ae7b8448dea2a1679b2c05b1 -
Branch / Tag:
refs/heads/main - 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@2e14fa74aa83f6f3ae7b8448dea2a1679b2c05b1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openpinch-0.1.17-py3-none-any.whl.
File metadata
- Download URL: openpinch-0.1.17-py3-none-any.whl
- Upload date:
- Size: 216.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e4b17c9f8dcf3f7145cd275d878a0966eab1b68bc025439be9834f5023f002b
|
|
| MD5 |
1b3720862f2fb1827cbf50785ce75b88
|
|
| BLAKE2b-256 |
7eeec6a7e302655e8fcd43d2a2fd9ca25fb60fbe15d6539fff0b09eaf2a279d9
|
Provenance
The following attestation bundles were made for openpinch-0.1.17-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.1.17-py3-none-any.whl -
Subject digest:
9e4b17c9f8dcf3f7145cd275d878a0966eab1b68bc025439be9834f5023f002b - Sigstore transparency entry: 1446307484
- Sigstore integration time:
-
Permalink:
waikato-ahuora-smart-energy-systems/OpenPinch@2e14fa74aa83f6f3ae7b8448dea2a1679b2c05b1 -
Branch / Tag:
refs/heads/main - 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@2e14fa74aa83f6f3ae7b8448dea2a1679b2c05b1 -
Trigger Event:
push
-
Statement type: