CGAM Process (Exergoeconomic Analysis)¶
This tutorial demonstrates how to perform an exergoeconomic analysis using ExerPy with manually defined component and stream costs.
Note
This tutorial builds upon the CGAM Process exergy analysis example and uses data imported from a previously saved JSON file. Make sure you understand how to set up exergy analysis from JSON data before proceeding.
Exergy Analysis (Prerequisite)
Perform the exergy analysis. Note that the JSON example file already contains pre-computed
thermal and mechanical exergy values, so split_physical_exergy defaults to True:
# ----------------------------------------------------------------------------------------------------------------------
# 1. Import model from JSON
# ----------------------------------------------------------------------------------------------------------------------
model_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "example.json"))
# ----------------------------------------------------------------------------------------------------------------------
# 2. Exergy analysis
# ----------------------------------------------------------------------------------------------------------------------
ean = ExergyAnalysis.from_json(model_path)
fuel = {"inputs": ["10", "1", "8"], "outputs": []}
product = {"inputs": ["E1", "9"], "outputs": []}
loss = {"inputs": ["7"], "outputs": []}
ean.analyse(E_F=fuel, E_P=product, E_L=loss)
ean.exergy_results()
Define Costs and Run the Exergoeconomic Analysis
Create the ExergoeconomicAnalysis instance and define all required costs
directly in a dictionary:
# ----------------------------------------------------------------------------------------------------------------------
# 3. Exergoeconomic analysis
# ----------------------------------------------------------------------------------------------------------------------
exergoeco_analysis = ExergoeconomicAnalysis(ean)
all_costs = {
# Component investment cost rates [EUR/h]
"AC_Z": 80, # Air compressor
"CC_Z": 30, # Combustion chamber
"EXP_Z": 100, # Gas turbine (expander)
"GEN_Z": 40, # Generator
"APH_Z": 50, # Air preheater
"EV_Z": 60, # Evaporator
"PH_Z": 35, # Preheater / economizer
# Input stream specific costs [EUR/GJ]
"1_c": 0.0, # Ambient air (free)
"10_c": 10.0, # Natural gas fuel
"8_c": 0.5, # Feedwater
}
exergoeco_analysis.run(all_costs)
The cost dictionary requires two types of entries:
Component investment costs (
<name>_Z): the cost rate in EUR/h for each component. These represent the annualized capital investment plus operating and maintenance costs.Input stream costs (
<name>_c): the specific cost in EUR/GJ for each stream entering the system boundary. Ambient air is typically assigned a cost of 0.0.
Display and Evaluate Results
exergoeco_analysis.exergoeconomic_results()
exergoeco_analysis.evaluate_results()
The evaluate_results() method ranks components by their total cost rate
(\(\dot{C}_D + \dot{Z}\)) to identify the most promising targets for optimization.
You can sort by different criteria using the sort_by parameter:
# Sort by cost of exergy destruction only
eco.evaluate_results(sort_by="C_D", top_n=3)
# Sort by exergoeconomic factor
eco.evaluate_results(sort_by="f", top_n=3)