Exergoeconomic Analysis¶
Warning
Development Status: Beta
The exergoeconomic analysis functionality is currently in development and undergoing testing. Methods, interfaces, and results may change in future versions. While we strive for accuracy, users should validate results independently for critical applications. We welcome feedback and bug reports to help improve this feature.
In the actual implementation of the exergoeconomic analysis, the exergy of the material streams is split into thermal, mechanical and chemical parts. Therefore, split_physical_exergy should be set to True. This makes the exergoeconomic analysis not applicable to models simulated with Aspen. For some components, such as combustion chambers, the chemical exergy is necessary as well.
Exergoeconomic analysis provides a systematic methodology to quantify both the thermodynamic performance and the associated economic costs of energy‐conversion systems. Building upon exergy analysis, which accounts for irreversibilities and the quality of energy, exergoeconomics introduces cost formulation rules to allocate monetary values to all exergy streams entering and leaving each component [3]. This approach enables the identification of cost‐intensive inefficiencies, guiding optimal design and operation decisions to minimize total exergy consumption and expenses. The theory described in this section follows the Specific Exergy Costing (SPECO) method as presented by Lazzaretto and Tsatsaronis (2006) [12].
Fundamentals of exergoeconomic analysis¶
Exergoeconomic analysis couples the first and second laws of thermodynamics with cost accounting principles. Each exergy stream—whether associated with material, work, or heat transfer—is assigned a cost rate, and cost balances are formulated for every component.
In this framework, we define:
\(\dot{C}_{i}\) and \(\dot{C}_{e}\) as the cost rates associated with exergy streams entering and exiting a component, respectively,
\(\dot{C}_{w}\) as the cost rate associated with work flow,
\(\dot{C}_{q}\) as the cost rate associated with heat transfer.
The component cost balance [3]:
\[\sum_i \dot{C}_{i,k} + \dot{C}_{q,k} + \dot{Z}_k = \sum_e \dot{C}_{e,k} + \dot{C}_{w,k}\]
where \(Z_k\) represents the total charges due to capital investment and operating & maintenance costs.
Two fundamental principles govern the auxiliary costing equations [12]:
F principle: For each exergy removal from a fuel stream, the unit cost remains equal to the average cost at which that exergy was supplied by upstream components.
P principle: All exergy added to product streams is assigned the same unit cost, denoted \(c_P\), determined from the component cost balance and F equations.
Terminology¶
The definitions and symbols used in exergoeconomic analysis are summarized below:
Variable |
Name |
Symbol |
Description |
|---|---|---|---|
|
(specific) inlet cost |
\(c_i\), \(\dot{C}_i\) |
(specific) cost flow rate of an entering exergy stream |
|
(specific) outlet cost |
\(c_e\), \(\dot{C}_e\) |
(specific) cost flow rate of an exiting exergy stream |
|
(specific) work cost |
\(c_w\), \(\dot{C}_w\) |
(specific) cost rate associated with work flow |
|
(specific) heat cost |
\(c_q\), \(\dot{C}_q\) |
(specific) cost rate associated with heat transfer |
|
(specific) product cost |
\(c_P\), \(\dot{C}_P\) |
(specific) cost rate of the product exergy stream |
|
(specific) fuel cost |
\(c_F\), \(\dot{C}_F\) |
(specific) cost rate of the fuel exergy stream |
|
cost of exergy destruction |
\(\dot{C}_D\) |
cost rate associated with exergy destruction |
|
cost of exergy loss |
\(\dot{C}_L\) |
cost rate associated with exergy loss |
|
exergoeconomic factor |
\(f_k\) |
ratio of non-thermodynamic costs to total component cost |
|
relative cost difference |
\(r_k\) |
normalized increase of product over fuel unit cost |
|
charges |
\(\dot{Z}\) |
sum of capital and O&M cost rates |
Note
The auxiliary costing equations derived from the F and P principles, together with the component cost balance, form a solvable linear system that yields the cost rates for all exergy streams in the system.
Exergoeconomic metrics and indicators¶
After solving the SPECO equations for all cost rates, several exergoeconomic indicators are computed to assess the economic impact of irreversibilities in each component. Three key metrics are:
Cost rate of exergy destruction
The cost associated with thermodynamic inefficiencies in component k is
\[\dot{C}_{\mathrm{D},k} = c_{\mathrm{F},k}\,\dot{E}_{\mathrm{D},k}\]
where \(c_{\mathrm{F},k}\) is the specific cost of the fuel exergy of component k and \(\dot{E}_{\mathrm{D},k}\) its exergy destruction rate [3].
Exergoeconomic factor
The fraction of a component’s total cost arising from investment and O&M (non-thermodynamic) charges is
\[f_k = \frac{\dot{Z}_k}{\dot{Z}_k + \dot{C}_{\mathrm{D},k}}\]
A high \(f_k\) indicates that capital and O&M dominate the cost, suggesting focus on reducing \(\dot{Z}_k\). A low \(f_k\) signals that inefficiencies (exergy destruction) are the primary cost drivers [3].
Relative cost difference
The relative increase in specific cost from fuel to product exergy for component k is
\[r_k = \frac{c_{\mathrm{P},k} - c_{\mathrm{F},k}}{c_{\mathrm{F},k}}\]
where \(c_{P,k}\) and \(c_{F,k}\) are the specific product and fuel costs. Lowering \(r_k\) through efficiency improvements is recommended for cost optimization [3].
Getting started with exergoeconomic analysis¶
Prerequisites¶
Before performing an exergoeconomic analysis, you need:
1. A completed exergy analysis with the split of the physical exergy into thermal and mechanical
parts (split_physical_exergy=True)
2. Chemical exergy enabled (recommended for systems with combustion)
3. Component investment cost rates and input stream specific costs
Note
The exergoeconomic analysis is not applicable to models parsed from Aspen Plus, as Aspen does not provide the thermal and mechanical exergy splitting. In future version, we plan to implement an alternative costing approach that does not require this splitting.
Workflow overview¶
The exergoeconomic analysis in ExerPy follows four steps:
Perform the exergy analysis with physical exergy splitting enabled:
from exerpy import ExergyAnalysis, ExergoeconomicAnalysis
ean = ExergyAnalysis.from_json(model_path, chemExLib="Ahrendts", split_physical_exergy=True)
fuel = {"inputs": ["1", "10"], "outputs": []}
product = {"inputs": ["E1", "9"], "outputs": ["8"]}
loss = {"inputs": ["7"], "outputs": []}
ean.analyse(E_F=fuel, E_P=product, E_L=loss)
Create the exergoeconomic analysis instance:
eco = ExergoeconomicAnalysis(ean)
Define costs and run the analysis:
costs = {
# Component investment cost rates [EUR/h]
"AC_Z": 80,
"CC_Z": 30,
"EXP_Z": 100,
"GEN_Z": 40,
# 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
}
eco.run(costs)
View results:
eco.exergoeconomic_results()
eco.evaluate_results()
Cost input format¶
The cost dictionary passed to run() requires two types of entries:
Key format |
Type |
Unit |
Description |
|---|---|---|---|
|
Component cost |
currency/h |
Investment and O&M cost rate for each component |
|
Stream cost |
currency/GJ |
Specific cost for each input stream crossing the system boundary |
Mandatory costs:
All components must have a
_Zcost (exceptCycleCloserandPowerBus, which are helper components)All material and power/heat streams entering the system boundary must have a
_ccost
Examples:
"COMP_Z": 80.0— compressor investment cost of 80 EUR/h"1_c": 0.0— ambient air enters the system at zero cost"10_c": 25.0— natural gas enters the system at 25 EUR/GJ
Interpreting results¶
After running the analysis, use exergoeconomic_results() to display the full results,
and evaluate_results() to identify the components with the highest cost improvement potential.
# Display all results (4 DataFrames)
df_comp, df_mat_props, df_mat_costs, df_non_mat = eco.exergoeconomic_results()
# Identify top components for optimization
eco.evaluate_results(sort_by="C_D+Z", top_n=5)
The component results table includes these key indicators:
\(\dot{C}_F\), \(\dot{C}_P\) — cost rates of fuel and product
\(\dot{C}_D\) — cost of exergy destruction
\(\dot{Z}\) — investment and O&M cost rate
\(\dot{C}_D + \dot{Z}\) — total cost rate (primary optimization target)
- \(f\) — exergoeconomic factor:
High \(f\) (close to 1): capital costs dominate — consider cheaper equipment or less material
Low \(f\) (close to 0): inefficiency costs dominate — consider improving component efficiency
\(r\) — relative cost difference: indicates how much the specific cost increases from fuel to product
The evaluate_results() method accepts the following sort_by options:
"C_D+Z" (default), "C_D", "Z", "r", "f".
To verify the integrity of the solution, use check_cost_balance():
balances = eco.check_cost_balance(tol=1e-3)
for name, (residual, is_balanced) in balances.items():
print(f"{name}: residual={residual:.6f}, balanced={is_balanced}")
Troubleshooting¶
Singular matrix error
If the cost matrix is singular, the system of equations cannot be solved uniquely. To diagnose the issue:
eco.print_dependency_report()
This reports zero rows/columns, colinear equations, and SVD null-space analysis. Common causes include missing auxiliary equations for a component or redundant cost specifications.
As a workaround, you can use a least-squares solver:
eco.run(costs, allow_singular=True)
Warning
The least-squares solution may not be physically consistent. Always verify the results
with check_cost_balance() when using allow_singular=True.
Missing cost error
If you see ValueError: ... mandatory but not provided, ensure that:
Every component (except CycleCloser and PowerBus) has a
"<name>_Z"entryEvery input stream crossing the system boundary has a
"<name>_c"entry
split_physical_exergy requirement
The exergoeconomic analysis requires split_physical_exergy=True in the preceding exergy
analysis. If you see ValueError: split_physical_exergy must be True, recreate the
ExergyAnalysis instance with this parameter enabled.