Combined Cycle Power Plant¶
This tutorial demonstrates how to perform an exergy analysis of a combined cycle power plant using ExerPy. The analysis is carried out with:
Ebsilon
Aspen Plus
tespy
The flowsheet of the system is shown below.
Figure: Flowsheet of the CCPP model¶
Figure: Flowsheet of the CCPP model¶
Note
The tespy based flowsheet has slight deviations from the show flowsheet, due to not using the identical component definitions. For example, while Ebsilon provides turbines, which can have multiple outlets, in tespy users have to add a splitter downstream of the turbine and then connect the splitter to the components behind that. Similarly, Ebsilon provides a component incorporating drum, recirculation pump and evaporator in a single part, while these are individual components in tespy.
The import of the exerpy dependency is the same for all simulators:
Import Necessary Modules
from exerpy import ExergyAnalysis
Download the Ebsilon simulation model here:
ccpp.ebs
Initialize the Exergy Analysis
Create an instance of the ExergyAnalysis class using the from_ebsilon method.
Since there is a combustion process in the power plant, it is necessary to specify
the chemical exergy library to use. In this case, we will use the Ahrendts library.
You can decided weather to split the physical exergy into its mechanical and thermal shares
by setting the split_physical_exergy parameter to True or False.
model_path = 'ccpp.ebs'
ean = ExergyAnalysis.from_ebsilon(model_path, chemExLib='Ahrendts', split_physical_exergy=False)
Define the exergy flows crossing the system boundaries
ExerPy requires you to specify the fuel (E_F), product
(E_P), and loss (E_L) exergy streams in your system.
These are defined using dictionaries with "inputs" and "outputs"
keys, containing lists of connection IDs from your Ebsilon model.
fuel = {
"inputs": ['1', '3'],
"outputs": []
}
product = {
"inputs": ['ETOT', 'H1'],
"outputs": []
}
loss = {
"inputs": ['8', '15'],
"outputs": ['14']
}
For this power plant, the exergetic fuel of the system (E_F) is the
methane flow (1) and air flow (3), which are the inputs to the combustion process.
The exergetic product of the system (E_P) is the net power output (E_TOT)
and the exergy flow related to the heat flow extracted from the steam cycle (H1).
The exhaust stream (8) and the difference between the exergy values of the outlet
(15) and the inlet cooling water stream (14) represent the exergy losses of the system
(E_L).
Note
The dictionary labels must exactly match the connection labels defined in the Ebsilon simulation model. By default, Ebsilon assigns generic names to streams (e.g., “water”, “water_1”). It is strongly recommended to rename the stream labels in Ebsilon using consistent and meaningful labels.
For example: use “1”, “2”, “3” for material connections and “E1”, “E2”, “E3” for electrical connections, “H1”, “H2”, “H3” for heat connections, etc.
Full Example Code:
from exerpy import ExergyAnalysis
model_path = 'ccpp.ebs'
ean = ExergyAnalysis.from_ebsilon(model_path, chemExLib='Ahrendts', split_physical_exergy=False)
fuel = {
"inputs": ['1', '3'],
"outputs": []
}
product = {
"inputs": ['ETOT', 'H1'],
"outputs": []
}
loss = {
"inputs": ['8', '15'],
"outputs": ['14']
}
ean.analyse(E_F=fuel, E_P=product, E_L=loss)
ean.exergy_results()
For the tespy model we have prepared the code to run the simulation in the dropdown below. To learn how to set up tespy models and what things to be aware of when working with tespy, we kindly refer to the online documentation of tespy.
Code of the tespy model
Initialize the Exergy Analysis
After setting up the model, we set up the ExergyAnalysis
instances using the from_tespy method. It takes the
converged tespy.Network object along with ambient state and
(optionally) the chemical exergy library as inputs.
Tip
TESPy can handle the splitting of physical exergy into its mechanical
and thermal shares, therefore split_phyiscal_exergy can
always be set to True when using tespy. In this instance it is
set to False because ASPEN cannot handle this, and we wanted to
cross validate the results of the examples for all three simulators.
Define the exergy flows crossing the system boundaries
For this power plant, the exergetic fuel of the system (E_F) is
the methane flow (1) and air flow (3), which are the
inputs to the combustion process. The exhaust stream (8) and
the difference between the exergy values of the outlet (15) and
the inlet cooling water stream (14) represent the exergy losses
of the system (E_L). The product exergy (E_P) is the
sum of the electrical energy E_TOT and the exergy of the heat
H1.
Download the Aspen simulation model here:
ccpp.bkp
Initialize the Exergy Analysis
Create an instance of the ExergyAnalysis class using the from_aspen method.
Since there is a combustion process in the power plant, it is necessary to specify
the chemical exergy library to use. In this case, we will use the Ahrendts library.
Note
At the moment, it is not possible to split the physical exergy into its mechanical and thermal shares
when using Aspen Plus. Therefore, the split_physical_exergy parameter should be always set to False
when using the from_aspen method.
model_path = 'ccpp.bkp'
ean = ExergyAnalysis.from_aspen(model_path, chemExLib='Ahrendts', split_physical_exergy=False)
Define the exergy flows crossing the system boundaries
ExerPy requires you to specify the fuel (E_F), product
(E_P), and loss (E_L) exergy streams in your system.
These are defined using dictionaries with "inputs" and "outputs"
keys, containing lists of connection IDs from your Aspen model.
fuel = {
"inputs": ['1', '3'],
"outputs": []
}
product = {
"inputs": ['ETOT', 'HC_HEAT'],
"outputs": []
}
loss = {
"inputs": ['8', '15'],
"outputs": ['14']
}
For this power plant, the exergetic fuel of the system (E_F) is the
methane flow (1) and air flow (3), which are the inputs to the combustion process.
The exergetic product of the system (E_P) is the net power output (E_TOT)
and the exergy flow related to the heat flow extracted from the steam cycle (HC_HEAT).
The exhaust stream (8) and the difference between the exergy values of the outlet
(15) and the inlet cooling water stream (14) represent the exergy losses of the system
(E_L).
Note
The dictionary labels must exactly match the connection labels defined in the Aspen simulation model. It is strongly recommended to rename the stream labels in Aspen using consistent and meaningful labels.
For example: use “1”, “2”, “3” for material connections and “E1”, “E2”, “E3” for electrical connections, “H1”, “H2”, “H3” for heat connections, etc.
Full Example Code:
from exerpy import ExergyAnalysis
model_path = 'ccpp.bkp'
ean = ExergyAnalysis.from_aspen(model_path, chemExLib='Ahrendts', split_physical_exergy=False)
fuel = {
"inputs": ['1', '3'],
"outputs": []
}
product = {
"inputs": ['ETOT', 'HC_HEAT'],
"outputs": []
}
loss = {
"inputs": ['8', '15'],
"outputs": ['14']
}
ean.analyse(E_F=fuel, E_P=product, E_L=loss)
ean.exergy_results()
Running the exergy analysis and working with the results is now independant for all simulators.
Perform the Exergy Analysis
Run the analysis by invoking the analyse
method on the ExergyAnalysis instance, passing the defined fuel, product,
and loss exergy streams.
ean.analyse(E_F=fuel, E_P=product, E_L=loss)
Retrieve and Display Results
After the analysis is complete,
retrieve the results using the exergy_results method.
# Retrieve and display the results
df_components, df_material_connections, df_non_material_connections = ean.exergy_results()
# Print the components exergy results
print(df_components)
# Optionally, save the results to CSV files
df_components.to_csv('components_exergy_results.csv')
df_material_connections.to_csv('material_connections_exergy_results.csv')
df_non_material_connections.to_csv('non_material_connections_exergy_results.csv')