PyPinch

PyPinch is a lightweight Python module that applies Pinch Technology principles, analysing a given set of stream data to find the Maximum Energy Recovery (MER) target.

A live version of a Jupyter Notebook using the code is available via MyBinder.

Input:

A CSV set of stream data including:

  • Stream Enthalpy CP (kW / ºC)
  • Stream Supply Temperature (TS)
  • Stream Target Temperature (TT)

And a minimum temperature difference ∆Tmin

Output:

Currently, PyPinch can calculate, plot, and export as CSV the following:

  • The Temperature Interval Diagram
  • The Problem Table
  • The Heat Cascade
  • The Minimum Cold Utility QCmin and the Minimum Hot Utility QHmin
  • The Pinch Point Tpinch
  • The Shifted Temperature-Enthalpy Composite Diagram
  • The Temperature-Enthalpy Composite Diagram
  • The Grand Composite Curve

Usage

An example code:

from PyPinch import PyPinch

pinch = PyPinch('streams/streams.csv')
options = {'draw'}
pinch.solve(options)

That’s it. As simple as that.

The options available are:

  • ‘draw’: draw Matplotlib-based plots
  • ‘csv’: export the calculated data as CSV files
  • ‘debug’: print the raw calculated data

Pinch Analysis or Heat Integration

Pinch analysis is a methodology for systematically finding optimum energy targets for a chemical plant. It analyses thermodynamically feasible maximum energy recovery (MER) targets for the available streams in a given plant, achieving them by optimising heat exchanger networks, energy supply methods and process operating conditions (Kemp, Ian, Pinch Analysis and Process Integration, 2nd Edition, 2016).

It is based on the idea that all streams in a chemical plant can be combined based on their temperature intervals into composite curves: one for the hot streams (the ones that lose heat) and one for the cold streams (the ones that gain heat). These composite curves provide insight into the point of closest approach (the pinch point) and the intervals available for heat exchange. Hence the required extra heating and cooling utilities can be found.