pyheatintegration reference documentation

pyheatintegrationは プロセス設計 で必要なヒートインテグレーションを支援するパッケージです。グランドコンポジットカーブの作成、TQ線図の作成、必要な熱交換器数の導出を行うことができます。

Installation

pip install pyheatintegration

Examples

Quick Start

import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection

from pyheatintegration import PinchAnalyzer, Stream, extract_x, y_range

# 熱交換を行う流体を準備
streams = [
    Stream(40.0, 90.0, 150.0),
    Stream(80.0, 110.0, 180.0),
    Stream(125.0, 80.0, 180.0),
    Stream(100.0, 60.0, 160.0)
]

# 最小接近温度差を指定し、作成した流体のリストとともにPinchAnalyzerのインスタンスを得る。
minimum_approach_temperature_difference = 10.0
analyzer = PinchAnalyzer(streams, minimum_approach_temperature_difference)

# グランドコンポジットカーブ
heats, temps = analyzer.create_grand_composite_curve()
fig, ax = plt.subplots(1, 1)
ax.set_xlabel("Q [kW]")
ax.set_ylabel("Shifted Temperature [℃]")
ax.plot(heats, temps)
fig.savefig("path/to/grand_composite_curve.png")

# TQ線図
hot_lines, cold_lines = analyzer.create_tq()
ymin, ymax = y_range(hot_lines + cold_lines)
heats = extract_x(hot_lines + cold_lines)
fig, ax = plt.subplots(1, 1)
ax.set_xlabel("Q [kW]")
ax.set_ylabel("T [℃]")
ax.add_collection(LineCollection(hot_lines, colors="#ff7f0e"))
ax.add_collection(LineCollection(cold_lines, colors="#1f77b4"))
ax.vlines(heats, ymin=ymin, ymax=ymax, linestyles=':', colors='k')
ax.autoscale()
fig.savefig("path/to/tq_diagram.png")
  • グランドコンポジットカーブ

https://raw.githubusercontent.com/tarao1006/pyheatintegration/develop/examples/simple/grand_composite_curve.png
  • TQ線図

https://raw.githubusercontent.com/tarao1006/pyheatintegration/develop/examples/simple/tq_diagram.png

より詳しい説明は Getting Started を確認してください。

Indices and tables