exerpy 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. exerpy/__init__.py +2 -4
  2. exerpy/analyses.py +597 -297
  3. exerpy/components/__init__.py +3 -0
  4. exerpy/components/combustion/base.py +157 -114
  5. exerpy/components/component.py +8 -8
  6. exerpy/components/heat_exchanger/base.py +593 -256
  7. exerpy/components/heat_exchanger/condenser.py +353 -166
  8. exerpy/components/heat_exchanger/simple.py +575 -225
  9. exerpy/components/heat_exchanger/steam_generator.py +153 -123
  10. exerpy/components/helpers/cycle_closer.py +61 -34
  11. exerpy/components/helpers/power_bus.py +117 -0
  12. exerpy/components/nodes/deaerator.py +221 -102
  13. exerpy/components/nodes/drum.py +50 -39
  14. exerpy/components/nodes/flash_tank.py +218 -43
  15. exerpy/components/nodes/mixer.py +296 -115
  16. exerpy/components/nodes/splitter.py +173 -0
  17. exerpy/components/nodes/storage.py +130 -0
  18. exerpy/components/piping/valve.py +351 -139
  19. exerpy/components/power_machines/generator.py +105 -38
  20. exerpy/components/power_machines/motor.py +111 -39
  21. exerpy/components/turbomachinery/compressor.py +181 -63
  22. exerpy/components/turbomachinery/pump.py +182 -63
  23. exerpy/components/turbomachinery/turbine.py +182 -74
  24. exerpy/functions.py +388 -263
  25. exerpy/parser/from_aspen/aspen_config.py +57 -48
  26. exerpy/parser/from_aspen/aspen_parser.py +373 -280
  27. exerpy/parser/from_ebsilon/__init__.py +2 -2
  28. exerpy/parser/from_ebsilon/check_ebs_path.py +15 -19
  29. exerpy/parser/from_ebsilon/ebsilon_config.py +329 -227
  30. exerpy/parser/from_ebsilon/ebsilon_functions.py +205 -38
  31. exerpy/parser/from_ebsilon/ebsilon_parser.py +392 -255
  32. exerpy/parser/from_ebsilon/utils.py +16 -11
  33. exerpy/parser/from_tespy/tespy_config.py +32 -1
  34. exerpy/parser/from_tespy/tespy_parser.py +151 -0
  35. {exerpy-0.0.1.dist-info → exerpy-0.0.3.dist-info}/METADATA +45 -4
  36. exerpy-0.0.3.dist-info/RECORD +48 -0
  37. exerpy-0.0.1.dist-info/RECORD +0 -44
  38. {exerpy-0.0.1.dist-info → exerpy-0.0.3.dist-info}/WHEEL +0 -0
  39. {exerpy-0.0.1.dist-info → exerpy-0.0.3.dist-info}/licenses/LICENSE +0 -0
@@ -4,10 +4,13 @@ from .heat_exchanger.condenser import Condenser
4
4
  from .heat_exchanger.simple import SimpleHeatExchanger
5
5
  from .heat_exchanger.steam_generator import SteamGenerator
6
6
  from .helpers.cycle_closer import CycleCloser
7
+ from .helpers.power_bus import PowerBus
7
8
  from .nodes.deaerator import Deaerator
8
9
  from .nodes.drum import Drum
9
10
  from .nodes.flash_tank import FlashTank
10
11
  from .nodes.mixer import Mixer
12
+ from .nodes.splitter import Splitter
13
+ from .nodes.storage import Storage
11
14
  from .piping.valve import Valve
12
15
  from .power_machines.generator import Generator
13
16
  from .power_machines.motor import Motor
@@ -1,9 +1,6 @@
1
1
  import logging
2
2
 
3
- import numpy as np
4
-
5
- from exerpy.components.component import Component
6
- from exerpy.components.component import component_registry
3
+ from exerpy.components.component import Component, component_registry
7
4
 
8
5
 
9
6
  @component_registry
@@ -16,12 +13,6 @@ class CombustionChamber(Component):
16
13
  The exergy product is defined based on thermal and mechanical exergy differences,
17
14
  while the exergy fuel is based on chemical exergy differences.
18
15
 
19
- Parameters
20
- ----------
21
- **kwargs : dict
22
- Arbitrary keyword arguments passed to parent class.
23
- Optional parameter 'Z_costs' (float): Investment cost rate of the component in currency/h.
24
-
25
16
  Attributes
26
17
  ----------
27
18
  E_F : float
@@ -38,79 +29,92 @@ class CombustionChamber(Component):
38
29
  Dictionary containing outlet stream data with mass flows and specific exergies.
39
30
  Z_costs : float
40
31
  Investment cost rate of the component in currency/h.
32
+ C_P : float
33
+ Cost of product stream :math:`\dot{C}_P` in currency/h.
34
+ C_F : float
35
+ Cost of fuel stream :math:`\dot{C}_F` in currency/h.
36
+ C_D : float
37
+ Cost of exergy destruction :math:`\dot{C}_D` in currency/h.
38
+ c_P : float
39
+ Specific cost of product stream (currency per unit exergy).
40
+ c_F : float
41
+ Specific cost of fuel stream (currency per unit exergy).
42
+ r : float
43
+ Relative cost difference, :math:`(c_P - c_F)/c_F`.
44
+ f : float
45
+ Exergoeconomic factor, :math:`\dot{Z}/(\dot{Z} + \dot{C}_D)`.
46
+ Ex_C_col : dict
47
+ Custom cost coefficients collection passed via `kwargs`.
41
48
 
42
49
  Notes
43
50
  -----
44
- The exergy analysis considers the following definitions:
45
-
46
- .. math::
47
- \dot{E}_\mathrm{P} &= \sum_{out} \dot{m}_{out} \cdot e^\mathrm{T}_{out}
48
- + \sum_{out} \dot{m}_{out} \cdot e^\mathrm{M}_{out}
49
- - \sum_{in} \dot{m}_{in} \cdot e^\mathrm{T}_{in}
50
- - \sum_{in} \dot{m}_{in} \cdot e^\mathrm{M}_{in}
51
-
52
- .. math::
53
- \dot{E}_\mathrm{F} &= \sum_{in} \dot{m}_{in} \cdot e^\mathrm{CH}_{in}
54
- - \sum_{out} \dot{m}_{out} \cdot e^\mathrm{CH}_{out}
55
-
56
- The exergetic efficiency is calculated as:
57
-
58
- .. math::
59
- \varepsilon = \frac{\dot{E}_\mathrm{P}}{\dot{E}_\mathrm{F}}
60
-
61
- The exergy destruction follows from the exergy balance:
62
-
63
- .. math::
64
- \dot{E}_\mathrm{D} = \dot{E}_\mathrm{F} - \dot{E}_\mathrm{P}
51
+ This component requires the calculation of both physical and chemical exergy.
65
52
  """
66
53
 
67
54
  def __init__(self, **kwargs):
68
- r"""Initialize combustion chamber component with given parameters."""
55
+ r"""
56
+ Initialize the combustion chamber component.
57
+
58
+ Parameters
59
+ ----------
60
+ **kwargs : dict
61
+ Arbitrary keyword arguments. Recognized keys:
62
+ - Ex_C_col (dict): custom cost coefficients, default {}
63
+ - Z_costs (float): investment cost rate (currency/h), default 0.0
64
+ """
69
65
  super().__init__(**kwargs)
70
66
  # Initialize additional attributes if necessary
71
- self.Ex_C_col = kwargs.get('Ex_C_col', {})
72
- self.Z_costs = kwargs.get('Z_costs', 0.0) # Cost rate in currency/h
67
+ self.Ex_C_col = kwargs.get("Ex_C_col", {})
68
+ self.Z_costs = kwargs.get("Z_costs", 0.0) # Cost rate in currency/h
73
69
 
74
70
  def calc_exergy_balance(self, T0: float, p0: float, split_physical_exergy) -> None:
75
71
  r"""
76
- Calculate the exergy balance of the combustion chamber.
72
+ Compute the exergy balance of the combustion chamber.
73
+
74
+ .. math::
75
+ \dot{E}_P = \dot{E}^{\mathrm{PH}}_{\text{out}}
76
+ - \bigl(\dot{E}^{\mathrm{PH}}_{\text{in},1}
77
+ + \dot{E}^{\mathrm{PH}}_{\text{in},2}\bigr)
77
78
 
78
- Performs exergy balance calculations considering both physical and chemical
79
- exergy flows. The exergy product is based on physical exergy differences,
80
- while the exergy fuel is based on chemical exergy differences.
79
+ .. math::
80
+ \dot{E}_F = \dot{E}^{\mathrm{CH}}_{\text{in},1}
81
+ + \dot{E}^{\mathrm{CH}}_{\text{in},2}
82
+ - \dot{E}^{\mathrm{CH}}_{\text{out}}
81
83
 
82
84
  Parameters
83
85
  ----------
84
86
  T0 : float
85
- Ambient temperature in :math:`\mathrm{K}`.
87
+ Ambient temperature (K).
86
88
  p0 : float
87
- Ambient pressure in :math:`\mathrm{Pa}`.
89
+ Ambient pressure (Pa).
90
+ split_physical_exergy : bool
91
+ Whether to split thermal and mechanical exergy.
88
92
 
89
93
  Raises
90
94
  ------
91
95
  ValueError
92
- If the required inlet and outlet streams are not properly defined.
96
+ If fewer than two inlets or no outlets are defined.
93
97
  """
94
98
  # Check for necessary inlet and outlet data
95
- if not hasattr(self, 'inl') or not hasattr(self, 'outl') or len(self.inl) < 2 or len(self.outl) < 1:
99
+ if not hasattr(self, "inl") or not hasattr(self, "outl") or len(self.inl) < 2 or len(self.outl) < 1:
96
100
  msg = "CombustionChamber requires at least two inlets (air and fuel) and one outlet (exhaust)."
97
101
  logging.error(msg)
98
102
  raise ValueError(msg)
99
103
 
100
104
  # Calculate total physical exergy of outlets
101
- total_E_P_out = sum(outlet['m'] * outlet['e_PH'] for outlet in self.outl.values())
105
+ total_E_P_out = sum(outlet["m"] * outlet["e_PH"] for outlet in self.outl.values())
102
106
 
103
107
  # Calculate total physical exergy of inlets
104
- total_E_P_in = sum(inlet['m'] * inlet['e_PH'] for inlet in self.inl.values())
108
+ total_E_P_in = sum(inlet["m"] * inlet["e_PH"] for inlet in self.inl.values())
105
109
 
106
110
  # Exergy Product (E_P)
107
111
  self.E_P = total_E_P_out - total_E_P_in
108
112
 
109
113
  # Calculate total chemical exergy of inlets
110
- total_E_F_in = sum(inlet['m'] * inlet['e_CH'] for inlet in self.inl.values())
114
+ total_E_F_in = sum(inlet["m"] * inlet["e_CH"] for inlet in self.inl.values())
111
115
 
112
116
  # Calculate total chemical exergy of outlets
113
- total_E_F_out = sum(outlet['m'] * outlet['e_CH'] for outlet in self.outl.values())
117
+ total_E_F_out = sum(outlet["m"] * outlet["e_CH"] for outlet in self.outl.values())
114
118
 
115
119
  # Exergy Fuel (E_F)
116
120
  self.E_F = total_E_F_in - total_E_F_out
@@ -123,126 +127,165 @@ class CombustionChamber(Component):
123
127
 
124
128
  # Log the results
125
129
  logging.info(
126
- f"CombustionChamber exergy balance calculated: "
130
+ f"Exergy balance of CombustionChamber {self.name} calculated: "
127
131
  f"E_P={self.E_P:.2f}, E_F={self.E_F:.2f}, E_D={self.E_D:.2f}, "
128
132
  f"Efficiency={self.epsilon:.2%}"
129
133
  )
130
134
 
131
-
132
135
  def aux_eqs(self, A, b, counter, T0, equations, chemical_exergy_enabled):
133
- """
134
- Auxiliary equations for the combustion chamber.
135
-
136
- This function adds rows to the cost matrix A and the right-hand-side vector b to enforce
137
- the following auxiliary cost relations:
138
-
139
- (1) For mechanical exergy:
140
- - When all streams have non-zero mechanical exergy:
141
- c_M(outlet)/E_M(outlet) = weighted average of inlet specific mechanical exergy costs
142
- - When pressure can only decrease: c_M(outlet) is directly set
143
-
144
- (2) For chemical exergy:
145
- - When all streams have non-zero chemical exergy:
146
- c_CH(outlet)/E_CH(outlet) = weighted average of inlet specific chemical exergy costs
147
- - When an inlet has zero chemical exergy: its specific cost is directly set
148
-
136
+ r"""
137
+ Add auxiliary cost equations for the combustion chamber.
138
+
139
+ This method appends two rows to the cost matrix to enforce:
140
+
141
+ 1. F rule for mechanical exergy:
142
+
143
+ .. math::
144
+ -\frac{1}{\dot{E}^{\mathrm{M}}_{\text{out}}}\,\dot{C}^{\mathrm{M}}_{\text{out}}
145
+ + \frac{\dot m_{1}}{\dot m_{1} + \dot m_{2}}
146
+ \frac{1}{\dot{E}^{\mathrm{M}}_{\text{in},1}}\,\dot{C}^{\mathrm{M}}_{\text{in},1}
147
+ + \frac{\dot m_{2}}{\dot m_{1} + \dot m_{2}}
148
+ \frac{1}{\dot{E}^{\mathrm{M}}_{\text{in},2}}\,\dot{C}^{\mathrm{M}}_{\text{in},2}
149
+ = 0
150
+
151
+ 2. F rule for chemical exergy:
152
+
153
+ .. math::
154
+ -\frac{1}{\dot{E}^{\mathrm{CH}}_{\text{out}}}\,\dot{C}^{\mathrm{CH}}_{\text{out}}{}
155
+ + \frac{\dot m_{1}}{\dot m_{1} + \dot m_{2}}
156
+ \frac{1}{\dot{E}^{\mathrm{CH}}_{\text{in},1}}\,\dot{C}^{\mathrm{CH}}_{\text{in},1}
157
+ + \frac{\dot m_{2}}{\dot m_{1} + \dot m_{2}}
158
+ \frac{1}{\dot{E}^{\mathrm{CH}}_{\text{in},2}}\,\dot{C}^{\mathrm{CH}}_{\text{in},2}
159
+ = 0
160
+
149
161
  Parameters
150
162
  ----------
151
163
  A : numpy.ndarray
152
- The current cost matrix.
164
+ Current cost matrix.
153
165
  b : numpy.ndarray
154
- The current right-hand-side vector.
166
+ Current RHS vector.
155
167
  counter : int
156
- The current row index in the matrix.
168
+ Starting row index.
157
169
  T0 : float
158
170
  Ambient temperature.
159
171
  equations : dict or list
160
- Data structure for storing equation labels.
172
+ Structure for equation labels.
161
173
  chemical_exergy_enabled : bool
162
- Flag indicating whether chemical exergy is enabled.
163
-
174
+ Must be True to include chemical exergy mixing.
175
+
164
176
  Returns
165
177
  -------
166
178
  A : numpy.ndarray
167
- The updated cost matrix.
179
+ Updated cost matrix.
168
180
  b : numpy.ndarray
169
- The updated right-hand-side vector.
181
+ Updated RHS vector.
170
182
  counter : int
171
- The updated row index (counter + 2).
183
+ Updated row index.
172
184
  equations : dict or list
173
- Updated structure with equation labels.
174
-
185
+ Updated labels.
186
+
175
187
  Raises
176
188
  ------
177
189
  ValueError
178
- If chemical exergy is not enabled, which is mandatory for combustion chambers.
190
+ If chemical_exergy_enabled is False.
179
191
  """
180
192
  # For the combustion chamber, chemical exergy is mandatory.
181
193
  if not chemical_exergy_enabled:
182
- raise ValueError("Chemical exergy is mandatory for the combustion chamber!",
183
- "Please make sure that your exergy analysis consider the chemical exergy.")
194
+ raise ValueError(
195
+ "Chemical exergy is mandatory for the combustion chamber!",
196
+ "Please make sure that your exergy analysis consider the chemical exergy.",
197
+ )
184
198
 
185
199
  # Convert inlet and outlet dictionaries to lists for ordered access.
186
200
  inlets = list(self.inl.values())
187
201
  outlets = list(self.outl.values())
188
202
 
189
203
  # --- Mechanical cost auxiliary equation ---
190
- if (outlets[0]["e_M"] != 0 and inlets[0]["e_M"] != 0 and inlets[1]["e_M"] != 0):
204
+ if outlets[0]["e_M"] != 0 and inlets[0]["e_M"] != 0 and inlets[1]["e_M"] != 0:
191
205
  A[counter, outlets[0]["CostVar_index"]["M"]] = -1 / outlets[0]["E_M"]
192
- A[counter, inlets[0]["CostVar_index"]["M"]] = (1 / inlets[0]["E_M"]) * inlets[0]["m"] / (inlets[0]["m"] + inlets[1]["m"])
193
- A[counter, inlets[1]["CostVar_index"]["M"]] = (1 / inlets[1]["E_M"]) * inlets[1]["m"] / (inlets[0]["m"] + inlets[1]["m"])
206
+ A[counter, inlets[0]["CostVar_index"]["M"]] = (
207
+ (1 / inlets[0]["E_M"]) * inlets[0]["m"] / (inlets[0]["m"] + inlets[1]["m"])
208
+ )
209
+ A[counter, inlets[1]["CostVar_index"]["M"]] = (
210
+ (1 / inlets[1]["E_M"]) * inlets[1]["m"] / (inlets[0]["m"] + inlets[1]["m"])
211
+ )
194
212
  else: # pressure can only decrease in the combustion chamber (case with p_inlet = p0 and p_outlet < p0 NOT considered)
195
213
  A[counter, outlets[0]["CostVar_index"]["M"]] = 1
196
214
  equations[counter] = f"aux_mixing_mech_{self.outl[0]['name']}"
215
+ equations[counter] = {
216
+ "kind": "aux_mixing",
217
+ "objects": [self.name, self.inl[0]["name"], self.inl[1]["name"], self.outl[0]["name"]],
218
+ "property": "c_M",
219
+ }
197
220
 
198
221
  # --- Chemical cost auxiliary equation ---
199
- if (outlets[0]["e_CH"] != 0 and inlets[0]["e_CH"] != 0 and inlets[1]["e_CH"] != 0):
200
- A[counter+1, outlets[0]["CostVar_index"]["CH"]] = -1 / outlets[0]["E_CH"]
201
- A[counter+1, inlets[0]["CostVar_index"]["CH"]] = (1 / inlets[0]["E_CH"]) * inlets[0]["m"] / (inlets[0]["m"] + inlets[1]["m"])
202
- A[counter+1, inlets[1]["CostVar_index"]["CH"]] = (1 / inlets[1]["E_CH"]) * inlets[1]["m"] / (inlets[0]["m"] + inlets[1]["m"])
222
+ if outlets[0]["e_CH"] != 0 and inlets[0]["e_CH"] != 0 and inlets[1]["e_CH"] != 0:
223
+ A[counter + 1, outlets[0]["CostVar_index"]["CH"]] = -1 / outlets[0]["E_CH"]
224
+ A[counter + 1, inlets[0]["CostVar_index"]["CH"]] = (
225
+ (1 / inlets[0]["E_CH"]) * inlets[0]["m"] / (inlets[0]["m"] + inlets[1]["m"])
226
+ )
227
+ A[counter + 1, inlets[1]["CostVar_index"]["CH"]] = (
228
+ (1 / inlets[1]["E_CH"]) * inlets[1]["m"] / (inlets[0]["m"] + inlets[1]["m"])
229
+ )
203
230
  elif inlets[0]["e_CH"] == 0:
204
- A[counter+1, inlets[0]["CostVar_index"]["CH"]] = 1
231
+ A[counter + 1, inlets[0]["CostVar_index"]["CH"]] = 1
205
232
  elif inlets[1]["e_CH"] == 0:
206
- A[counter+1, inlets[1]["CostVar_index"]["CH"]] = 1
207
- equations[counter+1] = f"aux_mixing_chem_{self.outl[0]['name']}"
233
+ A[counter + 1, inlets[1]["CostVar_index"]["CH"]] = 1
234
+ equations[counter] = {
235
+ "kind": "aux_mixing",
236
+ "objects": [self.name, self.inl[0]["name"], self.inl[1]["name"], self.outl[0]["name"]],
237
+ "property": "c_CH",
238
+ }
208
239
 
209
240
  # Set the right-hand side entries to zero.
210
- b[counter] = 0
211
- b[counter+1] = 0
241
+ b[counter] = 0
242
+ b[counter + 1] = 0
212
243
 
213
244
  return [A, b, counter + 2, equations]
214
245
 
215
- def exergoeconomic_balance(self, T0):
216
- """
217
- Perform exergoeconomic balance calculations for the combustion chamber.
218
-
219
- This method calculates various exergoeconomic parameters including:
220
- - Cost rates of product (C_P) and fuel (C_F)
221
- - Specific cost of product (c_P) and fuel (c_F)
222
- - Cost rate of exergy destruction (C_D)
223
- - Relative cost difference (r)
224
- - Exergoeconomic factor (f)
225
-
246
+ def exergoeconomic_balance(self, T0, chemical_exergy_enabled=False):
247
+ r"""
248
+ Perform exergoeconomic cost balance for the combustion chamber.
249
+
250
+ .. math::
251
+ \dot{C}^{\mathrm{PH}}_{\text{in},1} + \dot{C}^{\mathrm{CH}}_{\text{in},1}
252
+ + \dot{C}^{\mathrm{CH}}_{\text{in},2} + \dot{C}^{\mathrm{PH}}_{\text{in},2}
253
+ - \dot{C}^{\mathrm{PH}}_{\text{out}} - \dot{C}^{\mathrm{CH}}_{\text{out}}
254
+ + \dot{Z} = 0
255
+
256
+ This method computes cost coefficients and ratios:
257
+
258
+ .. math::
259
+ \dot{C}_P = \dot{C}^{\mathrm{T}}_{\text{out}}
260
+ - \bigl(\dot{C}^{\mathrm{T}}_{\text{in},1}
261
+ + \dot{C}^{\mathrm{T}}_{\text{in},2}\bigr)
262
+
263
+ .. math::
264
+ \dot{C}_F = \dot{C}^{\mathrm{CH}}_{\text{in},1}
265
+ + \dot{C}^{\mathrm{CH}}_{\text{in},2}
266
+ - \dot{C}^{\mathrm{CH}}_{\text{out}}
267
+ + \dot{C}^{\mathrm{M}}_{\text{in},1}
268
+ + \dot{C}^{\mathrm{M}}_{\text{in},2}
269
+ - \dot{C}^{\mathrm{M}}_{\text{out}}
270
+
226
271
  Parameters
227
272
  ----------
228
273
  T0 : float
229
- Ambient temperature
230
-
231
- Notes
232
- -----
233
- The exergoeconomic balance considers thermal (T), chemical (CH),
234
- and mechanical (M) exergy components for the inlet and outlet streams.
274
+ Ambient temperature (K).
275
+ chemical_exergy_enabled : bool, optional
276
+ If True, chemical exergy is considered in the calculations.
235
277
  """
236
- self.C_P = self.outl[0]["C_T"] - (
237
- self.inl[0]["C_T"] + self.inl[1]["C_T"]
238
- )
278
+ self.C_P = self.outl[0]["C_T"] - (self.inl[0]["C_T"] + self.inl[1]["C_T"])
239
279
  self.C_F = (
240
- self.inl[0]["C_CH"] + self.inl[1]["C_CH"] -
241
- self.outl[0]["C_CH"] + self.inl[0]["C_M"] +
242
- self.inl[1]["C_M"] - self.outl[0]["C_M"]
280
+ self.inl[0]["C_CH"]
281
+ + self.inl[1]["C_CH"]
282
+ - self.outl[0]["C_CH"]
283
+ + self.inl[0]["C_M"]
284
+ + self.inl[1]["C_M"]
285
+ - self.outl[0]["C_M"]
243
286
  )
244
287
  self.c_F = self.C_F / self.E_F
245
288
  self.c_P = self.C_P / self.E_P
246
289
  self.C_D = self.c_F * self.E_D
247
290
  self.r = (self.c_P - self.c_F) / self.c_F
248
- self.f = self.Z_costs / (self.Z_costs + self.C_D)
291
+ self.f = self.Z_costs / (self.Z_costs + self.C_D)
@@ -20,7 +20,7 @@ class Component:
20
20
  Base class for all ExerPy components.
21
21
 
22
22
  This class serves as the parent class for all exergy analysis components. It provides
23
- the basic structure and methods for exergy analysis calculations including the
23
+ the basic structure and methods for exergy analysis calculations including the
24
24
  calculation of exergetic efficiency and exergy balance.
25
25
 
26
26
  Parameters
@@ -41,7 +41,7 @@ class Component:
41
41
 
42
42
  Notes
43
43
  -----
44
- The exergetic efficiency is calculated as the ratio of exergy product to
44
+ The exergetic efficiency is calculated as the ratio of exergy product to
45
45
  exergy fuel:
46
46
 
47
47
  .. math::
@@ -84,14 +84,14 @@ class Component:
84
84
  r"""
85
85
  Calculate the exergetic efficiency of the component.
86
86
 
87
- The exergetic efficiency is defined as the ratio of exergy product to
88
- exergy fuel. If the exergy fuel is zero, the function returns NaN to
87
+ The exergetic efficiency is defined as the ratio of exergy product to
88
+ exergy fuel. If the exergy fuel is zero, the function returns NaN to
89
89
  avoid division by zero.
90
90
 
91
91
  Returns
92
92
  -------
93
93
  float or nan
94
- Exergetic efficiency :math:`\varepsilon = \frac{\dot{E}_\mathrm{P}}{\dot{E}_\mathrm{F}}`
94
+ Exergetic efficiency :math:`\varepsilon = \frac{\dot{E}_\mathrm{P}}{\dot{E}_\mathrm{F}}`
95
95
  or NaN if :math:`\dot{E}_\mathrm{F} = 0`.
96
96
 
97
97
  Notes
@@ -106,9 +106,8 @@ class Component:
106
106
  return np.nan
107
107
  else:
108
108
  return self.E_P / self.E_F
109
-
110
109
 
111
- def exergoeconomic_balance(self, T0):
110
+ def exergoeconomic_balance(self, T0, chemical_exergy_enabled=False):
112
111
  r"""
113
112
  Placeholder method for exergoeconomic balance.
114
113
 
@@ -121,6 +120,7 @@ class Component:
121
120
  ----------
122
121
  T0 : float
123
122
  Ambient temperature in :math:`\mathrm{K}`.
123
+ chemical_exergy_enabled : bool, optional
124
+ If True, chemical exergy is considered in the calculations.
124
125
  """
125
126
  return
126
-