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.
History
OpenPinch started in 2011 as Excel Workbook with macros. Since its inception, the workbook was developed in multiple directions, including Total Site Heat Integration, multiple utility targeting, retrofit targeting, cogeneration targeting, and more. The latest version of the Excel Workbook is free-to-use and available in the "Excel Version" folder on the OpenPinch github repository.
In 2021, a Python implementation of OpenPinch began, bringing the capabilities of the long-running Excel workbook into a modern Python API. The goal is to provide a sound basis for research, development and application. It is also freely available for integrating with other software tools and projects, and embeding results into wider optimisation workflows.
Citation
In publications and forks, please cite and link the foundational open-access article and this github 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
Highlights
- Multi-scale targeting: unit operation, process, site, community, and regional zones
- Direct heat integration targeting and indirect heat integration targeting (via the utility system)
- Multiple utility targeting (isothermal and non-isothermal)
- Grand composite curve (GCC) manipulation and visualisation helpers
- Excel template for importing data
- Visualisation via a Streamlit web application
- Pydantic schema models for validated programmatic workflows
Installation
Install the latest published release from PyPI:
python -m pip install openpinch
Quickstart
The high-level service accepts Excel data input via the template format. Copy and edit the Excel template (identical to the OpenPinch Excel Workbook) to input stream and utility data.
from pathlib import Path
from OpenPinch import PinchProblem
pp = PinchProblem()
pp.load(Path("[location]/[filname].xlsb"))
pp.target()
pp.export_to_Excel(Path("results"))
Alteratively, one can define each individual stream following the defined schema.
from OpenPinch import PinchProblem
from OpenPinch.lib.schema import TargetInput, StreamSchema, UtilitySchema
from OpenPinch.lib.enums import StreamType
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,
)
]
input_data = TargetInput(streams=streams, utilities=utilities)
pp = PinchProblem()
pp.load(input_data)
pp.target()
pp.export_to_Excel(Path("results"))
Visualisation through Streamlit
A Streamlit app provides a simple way to explore OpenPinch analysis results. In streamlit_app.py, a user can define the path to the stream and utility data for the problem.
Run with
streamlit run streamlit_app.py
to load a case and launch the interactive dashboard defined in
OpenPinch/streamlit_webviewer/web_graphing.py.
"""
Documentation
Full documentation (getting started, guides, and API reference) is available:
https://openpinch.readthedocs.io/en/latest/
Please note: the reference guide, like the repository, is under development. Errors are likely due the research nature of the project.
Testing
Install the project in editable mode along with any optional test dependencies, then run the test suite with:
python -m pip install -e .
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! Please open a discussion if you have questions about data formats or feature ideas. When submitting code, aim for:
- Typed interfaces and clear docstring
- Small methods with singular purpose
- Pytests covering new behaviour
- Updated documentation 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.13.tar.gz.
File metadata
- Download URL: openpinch-0.1.13.tar.gz
- Upload date:
- Size: 81.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4afbffc86d8ea24515c08c7d2911872053a8758dfc5f85115b124b8949e5b88f
|
|
| MD5 |
ba040ecf11b5ccf392ad999830dc16ba
|
|
| BLAKE2b-256 |
9095a9015590cdd15bc1ba2199ecbe30fe858792251e1035c481b16d4e5b5a9a
|
Provenance
The following attestation bundles were made for openpinch-0.1.13.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.13.tar.gz -
Subject digest:
4afbffc86d8ea24515c08c7d2911872053a8758dfc5f85115b124b8949e5b88f - Sigstore transparency entry: 1257615044
- Sigstore integration time:
-
Permalink:
waikato-ahuora-smart-energy-systems/OpenPinch@a33f06d4e016a1a1f8f0cde16fc03806b69afb4e -
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@a33f06d4e016a1a1f8f0cde16fc03806b69afb4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file openpinch-0.1.13-py3-none-any.whl.
File metadata
- Download URL: openpinch-0.1.13-py3-none-any.whl
- Upload date:
- Size: 63.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
856d5092d8aea72c99f966fcaad9a1d663b223abbc568683e4a62d718ec70b1d
|
|
| MD5 |
d69ecc31ed65effbca0a2dc880b99449
|
|
| BLAKE2b-256 |
96fe801efb3b7bce97ec55c6855c8aeafbebb77a4742498880e7f6d025dcaf2f
|
Provenance
The following attestation bundles were made for openpinch-0.1.13-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.13-py3-none-any.whl -
Subject digest:
856d5092d8aea72c99f966fcaad9a1d663b223abbc568683e4a62d718ec70b1d - Sigstore transparency entry: 1257615108
- Sigstore integration time:
-
Permalink:
waikato-ahuora-smart-energy-systems/OpenPinch@a33f06d4e016a1a1f8f0cde16fc03806b69afb4e -
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@a33f06d4e016a1a1f8f0cde16fc03806b69afb4e -
Trigger Event:
push
-
Statement type: