def four_stream(): # Four stream example from # Pinch Analysis and Process Integration: # A User Guide On Process Integration for the Efficient Use of Energy, # Second edition, Ian C. Kemp, page 4 param_dict = dict(PLOT_PARAMS) param_dict["title"] = "Four stream example" min_temp_diff = 10 default_temp_shift = min_temp_diff / 2 streams = [ make_stream(-230, 20, 135), make_stream(330, 170, 60), make_stream(-240, 80, 140), make_stream(180, 150, 30), ] analyzer = PinchAnalyzer(default_temp_shift) analyzer.add_streams(*streams) print(param_dict["title"]) print(describe(analyzer)) fig, ax = plot_results(analyzer, param_dict) plt.show()
def multiple_pinches(): # A made-up example with multiple pinches param_dict = dict(PLOT_PARAMS) param_dict["title"] = "Multiple pinches" min_temp_diff = 10 default_temp_shift = min_temp_diff / 2 cold_1 = make_stream(-360, 30, 150) hot_1 = make_segmented_stream( [20, 140, 100], [90, 100, 100], # A latent segment to model condensation [30, 100, 60], ) # The PinchAnalyzer's default temp_shift will be ignored for this stream. cold_2 = make_stream(-20, 5, 20, temp_shift=2) hot_2 = make_stream(160, 60, 20) analyzer = PinchAnalyzer(default_temp_shift) analyzer.add_streams(cold_1, hot_1, cold_2, hot_2) print(param_dict["title"]) print(describe(analyzer)) fig, ax = plot_results(analyzer, param_dict) plt.show()
def aromatics_plant(): # Aromatics plant from # Pinch Analysis and Process Integration: # A User Guide On Process Integration for the Efficient Use of Energy, # Second edition, Ian C. Kemp, page 330 param_dict = dict(PLOT_PARAMS) param_dict.update({ "title": "Aromatics plant", "hcc_ccc_xlabel": "Heat flow [ttc/h]", "gcc_xlabel": "Net heat flow [ttc/h]", }) min_temp_diff = 10 default_temp_shift = min_temp_diff / 2 # Some of the streams consist of multiple segments with individual heat # capacities streams = [ make_segmented_stream([-13.9, 102, 229], [-8.3, 229, 327]), make_segmented_stream([13.9, 327, 174], [9, 174, 92], [4.2, 92, 50]), make_stream(-9, 35, 164), make_segmented_stream([-7.2, 140, 176], [-25.2, 176, 367], [-16.4, 367, 500]), make_stream(25.2, 495, 307), make_segmented_stream([7.2, 220, 160], [3.3, 160, 144], [4.1, 144, 125], [11.6, 125, 59]), make_stream(-3.3, 80, 123), make_stream(-6.8, 59, 169), make_segmented_stream([6.8, 220, 130], [3.8, 130, 67]), make_stream(-4.1, 85, 125), make_stream(-32.5, 480, 500), ] analyzer = PinchAnalyzer(default_temp_shift) analyzer.add_streams(*streams) print(param_dict["title"]) print(describe(analyzer)) plot_results(analyzer, param_dict) plt.show()
from matplotlib import pyplot as plt from pina import PinchAnalyzer, make_stream # Arguments: heat flow, supply temperature, target temperature cold_1 = make_stream(-230, 20, 135) hot_1 = make_stream(330, 170, 60) cold_2 = make_stream(-240, 80, 140) hot_2 = make_stream(180, 150, 30) min_temp_diff = 10 temp_shift = min_temp_diff / 2 analyzer = PinchAnalyzer(temp_shift) analyzer.add_streams(cold_1, hot_1, cold_2, hot_2) print("Heating demand: {}\n" "Cooling demand: {}\n" "Hot utility target: {}\n" "Cold utility target: {}\n" "Heat recovery target: {}\n" "Pinch temperature(s): {}".format( analyzer.heating_demand, analyzer.cooling_demand, analyzer.hot_utility_target, analyzer.cold_utility_target, analyzer.heat_recovery_target, analyzer.pinch_temps, )) fig, ax = plt.subplots(1, 2, figsize=(16, 7))
def evaporator_dryer_plant(): # Evaporator/dryer plant from # Pinch Analysis and Process Integration: # A User Guide On Process Integration for the Efficient Use of Energy, # Second edition, Ian C. Kemp, page 351 param_dict = dict(PLOT_PARAMS) param_dict["title"] = "Evaporator/dryer plant" min_temp_diff = 5.5 default_temp_shift = min_temp_diff / 2 # Some of the streams have equal supply and target temperatures, meaning # that they transfer latent heat evaporator_streams = [ make_stream(-183, 10, 70), make_stream(-198, 37.8, 87.8), make_stream(-1005.5, 79.4, 79.4), make_stream(1039, 79.4, 79.4), make_stream(232, 86.9, 10), make_stream(-643, 48.8, 48.8), make_stream(714, 43.3, 43.3), make_segmented_stream([-6.5, 48.8, 54.4], [-263.5, 54.4, 93.3]), make_stream(260, 43.3, 43.3), make_stream(57, 43.3, 10), ] dryer_streams = [ make_stream(-93.5, 55, 55), make_stream(-254, 41, 41), make_stream(-124, 60, 60), # Some optional streams # make_stream(149, 41, 13), # make_stream(140, 60, 13), # make_stream(189, 55, 13), ] analyzer = PinchAnalyzer(default_temp_shift) analyzer.add_streams(*evaporator_streams) analyzer.add_streams(*dryer_streams) print(param_dict["title"]) print(describe(analyzer)) fig, ax = plot_results(analyzer, param_dict) plt.show()