exerpy 0.0.2__py3-none-any.whl → 0.0.4__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.
- exerpy/__init__.py +2 -4
- exerpy/analyses.py +849 -304
- exerpy/components/__init__.py +3 -0
- exerpy/components/combustion/base.py +53 -35
- exerpy/components/component.py +8 -8
- exerpy/components/heat_exchanger/base.py +188 -121
- exerpy/components/heat_exchanger/condenser.py +98 -62
- exerpy/components/heat_exchanger/simple.py +237 -137
- exerpy/components/heat_exchanger/steam_generator.py +46 -41
- exerpy/components/helpers/cycle_closer.py +61 -34
- exerpy/components/helpers/power_bus.py +117 -0
- exerpy/components/nodes/deaerator.py +176 -58
- exerpy/components/nodes/drum.py +50 -39
- exerpy/components/nodes/flash_tank.py +218 -43
- exerpy/components/nodes/mixer.py +249 -69
- exerpy/components/nodes/splitter.py +173 -0
- exerpy/components/nodes/storage.py +130 -0
- exerpy/components/piping/valve.py +311 -115
- exerpy/components/power_machines/generator.py +105 -38
- exerpy/components/power_machines/motor.py +111 -39
- exerpy/components/turbomachinery/compressor.py +214 -68
- exerpy/components/turbomachinery/pump.py +215 -68
- exerpy/components/turbomachinery/turbine.py +182 -74
- exerpy/cost_estimation/__init__.py +65 -0
- exerpy/cost_estimation/turton.py +1260 -0
- exerpy/data/cost_correlations/cepci_index.json +135 -0
- exerpy/data/cost_correlations/component_mapping.json +450 -0
- exerpy/data/cost_correlations/material_factors.json +428 -0
- exerpy/data/cost_correlations/pressure_factors.json +206 -0
- exerpy/data/cost_correlations/turton2008.json +726 -0
- exerpy/data/cost_correlations/turton2008_design_analysis_synthesis_components_tables.pdf +0 -0
- exerpy/data/cost_correlations/turton2008_design_analysis_synthesis_components_theory.pdf +0 -0
- exerpy/functions.py +389 -264
- exerpy/parser/from_aspen/aspen_config.py +57 -48
- exerpy/parser/from_aspen/aspen_parser.py +373 -280
- exerpy/parser/from_ebsilon/__init__.py +2 -2
- exerpy/parser/from_ebsilon/check_ebs_path.py +15 -19
- exerpy/parser/from_ebsilon/ebsilon_config.py +328 -226
- exerpy/parser/from_ebsilon/ebsilon_functions.py +205 -38
- exerpy/parser/from_ebsilon/ebsilon_parser.py +392 -255
- exerpy/parser/from_ebsilon/utils.py +16 -11
- exerpy/parser/from_tespy/tespy_config.py +33 -1
- exerpy/parser/from_tespy/tespy_parser.py +151 -0
- {exerpy-0.0.2.dist-info → exerpy-0.0.4.dist-info}/METADATA +43 -2
- exerpy-0.0.4.dist-info/RECORD +57 -0
- exerpy-0.0.2.dist-info/RECORD +0 -44
- {exerpy-0.0.2.dist-info → exerpy-0.0.4.dist-info}/WHEEL +0 -0
- {exerpy-0.0.2.dist-info → exerpy-0.0.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,8 +2,7 @@ import logging
|
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
|
-
from exerpy.components.component import Component
|
|
6
|
-
from exerpy.components.component import component_registry
|
|
5
|
+
from exerpy.components.component import Component, component_registry
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
@component_registry
|
|
@@ -88,7 +87,7 @@ class Compressor(Component):
|
|
|
88
87
|
r"""Initialize compressor component with given parameters."""
|
|
89
88
|
super().__init__(**kwargs)
|
|
90
89
|
self.P = None
|
|
91
|
-
self.Z_costs = kwargs.get(
|
|
90
|
+
self.Z_costs = kwargs.get("Z_costs", 0.0) # Investment cost rate in currency/h
|
|
92
91
|
|
|
93
92
|
def calc_exergy_balance(self, T0: float, p0: float, split_physical_exergy) -> None:
|
|
94
93
|
r"""
|
|
@@ -107,13 +106,19 @@ class Compressor(Component):
|
|
|
107
106
|
Flag indicating whether physical exergy is split into thermal and mechanical components.
|
|
108
107
|
|
|
109
108
|
"""
|
|
110
|
-
# Get power flow
|
|
111
|
-
if
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
# Get power flow
|
|
110
|
+
if (
|
|
111
|
+
1 in self.inl
|
|
112
|
+
and self.inl[1] is not None
|
|
113
|
+
and self.inl[1].get("kind") == "power"
|
|
114
|
+
and "energy_flow" in self.inl[1]
|
|
115
|
+
):
|
|
116
|
+
self.P = self.inl[1]["energy_flow"]
|
|
117
|
+
else:
|
|
118
|
+
self.P = self.outl[0]["m"] * (self.outl[0]["h"] - self.inl[0]["h"])
|
|
114
119
|
|
|
115
120
|
# First, check for the invalid case: outlet temperature smaller than inlet temperature.
|
|
116
|
-
if self.inl[0][
|
|
121
|
+
if self.inl[0]["T"] > self.outl[0]["T"]:
|
|
117
122
|
logging.warning(
|
|
118
123
|
f"Exergy balance of compressor '{self.name}' where outlet temperature ({self.outl[0]['T']}) "
|
|
119
124
|
f"is smaller than inlet temperature ({self.inl[0]['T']}) is not implemented."
|
|
@@ -122,32 +127,36 @@ class Compressor(Component):
|
|
|
122
127
|
self.E_F = np.nan
|
|
123
128
|
|
|
124
129
|
# Case 1: Both temperatures above ambient
|
|
125
|
-
elif round(self.inl[0][
|
|
126
|
-
self.E_P = self.outl[0][
|
|
130
|
+
elif round(self.inl[0]["T"], 5) >= T0 and round(self.outl[0]["T"], 5) > T0:
|
|
131
|
+
self.E_P = self.outl[0]["m"] * (self.outl[0]["e_PH"] - self.inl[0]["e_PH"])
|
|
127
132
|
self.E_F = abs(self.P)
|
|
128
133
|
|
|
129
134
|
# Case 2: Inlet below, outlet above ambient
|
|
130
|
-
elif round(self.inl[0][
|
|
135
|
+
elif round(self.inl[0]["T"], 5) < T0 and round(self.outl[0]["T"], 5) > T0:
|
|
131
136
|
if split_physical_exergy:
|
|
132
|
-
self.E_P =
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
self.E_P = self.outl[0]["m"] * self.outl[0]["e_T"] + self.outl[0]["m"] * (
|
|
138
|
+
self.outl[0]["e_M"] - self.inl[0]["e_M"]
|
|
139
|
+
)
|
|
140
|
+
self.E_F = abs(self.P) + self.inl[0]["m"] * self.inl[0]["e_T"]
|
|
135
141
|
else:
|
|
136
|
-
logging.warning(
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
logging.warning(
|
|
143
|
+
"While dealing with compressor below ambient, "
|
|
144
|
+
"physical exergy should be split into thermal and mechanical components!"
|
|
145
|
+
)
|
|
146
|
+
self.E_P = self.outl[0]["m"] * (self.outl[0]["e_PH"] - self.inl[0]["e_PH"])
|
|
139
147
|
self.E_F = abs(self.P)
|
|
140
148
|
|
|
141
149
|
# Case 3: Both temperatures below ambient
|
|
142
|
-
elif round(self.inl[0][
|
|
150
|
+
elif round(self.inl[0]["T"], 5) < T0 and round(self.outl[0]["T"], 5) <= T0:
|
|
143
151
|
if split_physical_exergy:
|
|
144
|
-
self.E_P = self.outl[0][
|
|
145
|
-
self.E_F = abs(self.P) + self.inl[0][
|
|
146
|
-
self.outl[0]['e_T'])
|
|
152
|
+
self.E_P = self.outl[0]["m"] * (self.outl[0]["e_M"] - self.inl[0]["e_M"])
|
|
153
|
+
self.E_F = abs(self.P) + self.inl[0]["m"] * (self.inl[0]["e_T"] - self.outl[0]["e_T"])
|
|
147
154
|
else:
|
|
148
|
-
logging.warning(
|
|
149
|
-
|
|
150
|
-
|
|
155
|
+
logging.warning(
|
|
156
|
+
"While dealing with compressor below ambient, "
|
|
157
|
+
"physical exergy should be split into thermal and mechanical components!"
|
|
158
|
+
)
|
|
159
|
+
self.E_P = self.outl[0]["m"] * (self.outl[0]["e_PH"] - self.inl[0]["e_PH"])
|
|
151
160
|
self.E_F = abs(self.P)
|
|
152
161
|
|
|
153
162
|
# Invalid case: outlet temperature smaller than inlet
|
|
@@ -165,37 +174,36 @@ class Compressor(Component):
|
|
|
165
174
|
|
|
166
175
|
# Log the results
|
|
167
176
|
logging.info(
|
|
168
|
-
f"Compressor
|
|
177
|
+
f"Exergy balance of Compressor {self.name} calculated: "
|
|
169
178
|
f"E_P={self.E_P:.2f} W, E_F={self.E_F:.2f} W, E_D={self.E_D:.2f} W, "
|
|
170
179
|
f"Efficiency={self.epsilon:.2%}"
|
|
171
180
|
)
|
|
172
181
|
|
|
173
|
-
|
|
174
182
|
def aux_eqs(self, A, b, counter, T0, equations, chemical_exergy_enabled):
|
|
175
183
|
"""
|
|
176
184
|
Auxiliary equations for the compressor.
|
|
177
|
-
|
|
185
|
+
|
|
178
186
|
This function adds rows to the cost matrix A and the right-hand-side vector b to enforce
|
|
179
187
|
the following auxiliary cost relations:
|
|
180
|
-
|
|
188
|
+
|
|
181
189
|
(1) Chemical exergy cost equation (if enabled):
|
|
182
190
|
1/E_CH_in * C_CH_in - 1/E_CH_out * C_CH_out = 0
|
|
183
191
|
- F-principle: specific chemical exergy costs equalized between inlet/outlet
|
|
184
|
-
|
|
192
|
+
|
|
185
193
|
(2) Thermal/Mechanical exergy cost equations (based on temperature conditions):
|
|
186
|
-
|
|
194
|
+
|
|
187
195
|
Case 1 (T_in > T0, T_out > T0):
|
|
188
196
|
1/dET * C_T_out - 1/dET * C_T_in - 1/dEM * C_M_out + 1/dEM * C_M_in = 0
|
|
189
197
|
- P-principle: relates inlet/outlet thermal and mechanical exergy costs
|
|
190
|
-
|
|
198
|
+
|
|
191
199
|
Case 2 (T_in ≤ T0, T_out > T0):
|
|
192
200
|
1/E_T_out * C_T_out - 1/dEM * C_M_out + 1/dEM * C_M_in = 0
|
|
193
201
|
- P-principle: relates outlet thermal and inlet/outlet mechanical exergy costs
|
|
194
|
-
|
|
202
|
+
|
|
195
203
|
Case 3 (T_in ≤ T0, T_out ≤ T0):
|
|
196
204
|
1/E_T_out * C_T_out - 1/E_T_in * C_T_in = 0
|
|
197
205
|
- F-principle: specific thermal exergy costs equalized between inlet/outlet
|
|
198
|
-
|
|
206
|
+
|
|
199
207
|
Parameters
|
|
200
208
|
----------
|
|
201
209
|
A : numpy.ndarray
|
|
@@ -210,7 +218,7 @@ class Compressor(Component):
|
|
|
210
218
|
Data structure for storing equation labels.
|
|
211
219
|
chemical_exergy_enabled : bool
|
|
212
220
|
Flag indicating whether chemical exergy auxiliary equations should be added.
|
|
213
|
-
|
|
221
|
+
|
|
214
222
|
Returns
|
|
215
223
|
-------
|
|
216
224
|
A : numpy.ndarray
|
|
@@ -225,9 +233,17 @@ class Compressor(Component):
|
|
|
225
233
|
# --- Chemical equality equation (row added only if enabled) ---
|
|
226
234
|
if chemical_exergy_enabled:
|
|
227
235
|
# Set the chemical cost equality:
|
|
228
|
-
A[counter, self.inl[0]["CostVar_index"]["CH"]] = (
|
|
229
|
-
|
|
230
|
-
|
|
236
|
+
A[counter, self.inl[0]["CostVar_index"]["CH"]] = (
|
|
237
|
+
(1 / self.inl[0]["E_CH"]) if self.inl[0]["e_CH"] != 0 else 1
|
|
238
|
+
)
|
|
239
|
+
A[counter, self.outl[0]["CostVar_index"]["CH"]] = (
|
|
240
|
+
(-1 / self.outl[0]["E_CH"]) if self.outl[0]["e_CH"] != 0 else 1
|
|
241
|
+
)
|
|
242
|
+
equations[counter] = {
|
|
243
|
+
"kind": "aux_equality",
|
|
244
|
+
"objects": [self.name, self.inl[0]["name"], self.outl[0]["name"]],
|
|
245
|
+
"property": "c_CH",
|
|
246
|
+
}
|
|
231
247
|
chem_row = 1
|
|
232
248
|
else:
|
|
233
249
|
chem_row = 0
|
|
@@ -236,7 +252,7 @@ class Compressor(Component):
|
|
|
236
252
|
# Compute differences in thermal and mechanical exergy:
|
|
237
253
|
dET = self.outl[0]["E_T"] - self.inl[0]["E_T"]
|
|
238
254
|
dEM = self.outl[0]["E_M"] - self.inl[0]["E_M"]
|
|
239
|
-
|
|
255
|
+
|
|
240
256
|
# The row for the thermal/mechanical equation:
|
|
241
257
|
row_index = counter + chem_row
|
|
242
258
|
if self.inl[0]["T"] > T0 and self.outl[0]["T"] > T0:
|
|
@@ -245,50 +261,180 @@ class Compressor(Component):
|
|
|
245
261
|
A[row_index, self.outl[0]["CostVar_index"]["T"]] = 1 / dET
|
|
246
262
|
A[row_index, self.inl[0]["CostVar_index"]["M"]] = 1 / dEM
|
|
247
263
|
A[row_index, self.outl[0]["CostVar_index"]["M"]] = -1 / dEM
|
|
248
|
-
equations[row_index] =
|
|
264
|
+
equations[row_index] = {
|
|
265
|
+
"kind": "aux_p_rule",
|
|
266
|
+
"objects": [self.name, self.inl[0]["name"], self.outl[0]["name"]],
|
|
267
|
+
"property": "c_T, c_M",
|
|
268
|
+
}
|
|
249
269
|
else:
|
|
250
270
|
logging.warning("Case where thermal or mechanical exergy difference is zero is not implemented.")
|
|
251
271
|
elif self.inl[0]["T"] <= T0 and self.outl[0]["T"] > T0:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
272
|
+
# Case 2: Inlet at/below ambient, outlet above ambient
|
|
273
|
+
# Handle potential zero values for robustness
|
|
274
|
+
if self.outl[0]["e_T"] != 0 and dEM != 0:
|
|
275
|
+
A[row_index, self.outl[0]["CostVar_index"]["T"]] = 1 / self.outl[0]["E_T"]
|
|
276
|
+
A[row_index, self.inl[0]["CostVar_index"]["M"]] = 1 / dEM
|
|
277
|
+
A[row_index, self.outl[0]["CostVar_index"]["M"]] = -1 / dEM
|
|
278
|
+
equations[row_index] = {
|
|
279
|
+
"kind": "aux_p_rule",
|
|
280
|
+
"objects": [self.name, self.inl[0]["name"], self.outl[0]["name"]],
|
|
281
|
+
"property": "c_T, c_M",
|
|
282
|
+
}
|
|
283
|
+
else:
|
|
284
|
+
logging.warning(
|
|
285
|
+
f"Compressor '{self.name}' Case 2: outlet thermal exergy or mechanical exergy "
|
|
286
|
+
"difference is zero, auxiliary equation may be degenerate."
|
|
287
|
+
)
|
|
288
|
+
# Fallback: set identity equation for thermal cost
|
|
289
|
+
A[row_index, self.outl[0]["CostVar_index"]["T"]] = 1
|
|
290
|
+
equations[row_index] = {
|
|
291
|
+
"kind": "aux_p_rule",
|
|
292
|
+
"objects": [self.name, self.inl[0]["name"], self.outl[0]["name"]],
|
|
293
|
+
"property": "c_T",
|
|
294
|
+
}
|
|
256
295
|
else:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
296
|
+
# Case 3: Both temperatures at or below ambient - apply F-rule for thermal exergy
|
|
297
|
+
# Handle zero thermal exergy cases to avoid division by zero
|
|
298
|
+
if self.inl[0]["e_T"] != 0 and self.outl[0]["e_T"] != 0:
|
|
299
|
+
A[row_index, self.inl[0]["CostVar_index"]["T"]] = -1 / self.inl[0]["E_T"]
|
|
300
|
+
A[row_index, self.outl[0]["CostVar_index"]["T"]] = 1 / self.outl[0]["E_T"]
|
|
301
|
+
elif self.inl[0]["e_T"] == 0 and self.outl[0]["e_T"] != 0:
|
|
302
|
+
# Inlet thermal exergy is zero, constrain C_T_in = 0
|
|
303
|
+
A[row_index, self.inl[0]["CostVar_index"]["T"]] = 1
|
|
304
|
+
elif self.inl[0]["e_T"] != 0 and self.outl[0]["e_T"] == 0:
|
|
305
|
+
# Outlet thermal exergy is zero, constrain C_T_out = 0
|
|
306
|
+
A[row_index, self.outl[0]["CostVar_index"]["T"]] = 1
|
|
307
|
+
else:
|
|
308
|
+
# Both thermal exergies are zero, set identity equation
|
|
309
|
+
A[row_index, self.inl[0]["CostVar_index"]["T"]] = 1
|
|
310
|
+
A[row_index, self.outl[0]["CostVar_index"]["T"]] = -1
|
|
311
|
+
equations[row_index] = {
|
|
312
|
+
"kind": "aux_f_rule",
|
|
313
|
+
"objects": [self.name, self.inl[0]["name"], self.outl[0]["name"]],
|
|
314
|
+
"property": "c_T",
|
|
315
|
+
}
|
|
316
|
+
|
|
261
317
|
# Set the right-hand side entry for the thermal/mechanical row to zero.
|
|
262
318
|
b[row_index] = 0
|
|
263
319
|
|
|
264
320
|
# Update the counter accordingly.
|
|
265
|
-
if chemical_exergy_enabled
|
|
266
|
-
new_counter = counter + 2
|
|
267
|
-
else:
|
|
268
|
-
new_counter = counter + 1
|
|
321
|
+
new_counter = counter + 2 if chemical_exergy_enabled else counter + 1
|
|
269
322
|
|
|
270
323
|
return A, b, new_counter, equations
|
|
271
324
|
|
|
272
|
-
def exergoeconomic_balance(self, T0):
|
|
273
|
-
"""
|
|
274
|
-
Perform exergoeconomic balance
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
325
|
+
def exergoeconomic_balance(self, T0, chemical_exergy_enabled=False):
|
|
326
|
+
r"""
|
|
327
|
+
Perform exergoeconomic cost balance for the compressor.
|
|
328
|
+
|
|
329
|
+
The general exergoeconomic balance equation is:
|
|
330
|
+
|
|
331
|
+
.. math::
|
|
332
|
+
\dot{C}^{\mathrm{T}}_{\mathrm{in}}
|
|
333
|
+
+ \dot{C}^{\mathrm{M}}_{\mathrm{in}}
|
|
334
|
+
- \dot{C}^{\mathrm{T}}_{\mathrm{out}}
|
|
335
|
+
- \dot{C}^{\mathrm{M}}_{\mathrm{out}}
|
|
336
|
+
+ \dot{Z}
|
|
337
|
+
= 0
|
|
338
|
+
|
|
339
|
+
In case the chemical exergy of the streams is known:
|
|
340
|
+
|
|
341
|
+
.. math::
|
|
342
|
+
\dot{C}^{\mathrm{CH}}_{\mathrm{in}} =
|
|
343
|
+
\dot{C}^{\mathrm{CH}}_{\mathrm{out}}
|
|
344
|
+
|
|
345
|
+
This method computes cost rates for product and fuel, and derives
|
|
346
|
+
exergoeconomic indicators. The compressor consumes power (fuel) to increase
|
|
347
|
+
the exergy of the working fluid (product).
|
|
348
|
+
|
|
349
|
+
**Case 1: Both inlet and outlet above ambient temperature**
|
|
350
|
+
|
|
351
|
+
Both inlet and outlet satisfy :math:`T \geq T_0`:
|
|
352
|
+
|
|
353
|
+
.. math::
|
|
354
|
+
\dot{C}_{\mathrm{P}}
|
|
355
|
+
= \dot{C}^{\mathrm{PH}}_{\mathrm{out}}
|
|
356
|
+
- \dot{C}^{\mathrm{PH}}_{\mathrm{in}}
|
|
357
|
+
|
|
358
|
+
.. math::
|
|
359
|
+
\dot{C}_{\mathrm{F}}
|
|
360
|
+
= \dot{C}^{\mathrm{TOT}}_{\mathrm{power,in}}
|
|
361
|
+
|
|
362
|
+
**Case 2: Inlet at or below and outlet above ambient temperature**
|
|
363
|
+
|
|
364
|
+
Inlet satisfies :math:`T \leq T_0` and outlet :math:`T > T_0`:
|
|
365
|
+
|
|
366
|
+
.. math::
|
|
367
|
+
\dot{C}_{\mathrm{P}}
|
|
368
|
+
= \dot{C}^{\mathrm{T}}_{\mathrm{out}}
|
|
369
|
+
+ \bigl(\dot{C}^{\mathrm{M}}_{\mathrm{out}}
|
|
370
|
+
- \dot{C}^{\mathrm{M}}_{\mathrm{in}}\bigr)
|
|
371
|
+
|
|
372
|
+
.. math::
|
|
373
|
+
\dot{C}_{\mathrm{F}}
|
|
374
|
+
= \dot{C}^{\mathrm{TOT}}_{\mathrm{power,in}}
|
|
375
|
+
+ \dot{C}^{\mathrm{T}}_{\mathrm{in}}
|
|
376
|
+
|
|
377
|
+
**Case 3: Both inlet and outlet at or below ambient temperature**
|
|
378
|
+
|
|
379
|
+
Both inlet and outlet satisfy :math:`T \leq T_0`:
|
|
380
|
+
|
|
381
|
+
.. math::
|
|
382
|
+
\dot{C}_{\mathrm{P}}
|
|
383
|
+
= \dot{C}^{\mathrm{M}}_{\mathrm{out}}
|
|
384
|
+
- \dot{C}^{\mathrm{M}}_{\mathrm{in}}
|
|
385
|
+
|
|
386
|
+
.. math::
|
|
387
|
+
\dot{C}_{\mathrm{F}}
|
|
388
|
+
= \dot{C}^{\mathrm{TOT}}_{\mathrm{power,in}}
|
|
389
|
+
+ \bigl(\dot{C}^{\mathrm{T}}_{\mathrm{in}}
|
|
390
|
+
- \dot{C}^{\mathrm{T}}_{\mathrm{out}}\bigr)
|
|
391
|
+
|
|
392
|
+
**Calculated exergoeconomic indicators:**
|
|
393
|
+
|
|
394
|
+
.. math::
|
|
395
|
+
c_{\mathrm{F}} = \frac{\dot{C}_{\mathrm{F}}}{\dot{E}_{\mathrm{F}}}
|
|
396
|
+
|
|
397
|
+
.. math::
|
|
398
|
+
c_{\mathrm{P}} = \frac{\dot{C}_{\mathrm{P}}}{\dot{E}_{\mathrm{P}}}
|
|
399
|
+
|
|
400
|
+
.. math::
|
|
401
|
+
\dot{C}_{\mathrm{D}} = c_{\mathrm{F}} \cdot \dot{E}_{\mathrm{D}}
|
|
402
|
+
|
|
403
|
+
.. math::
|
|
404
|
+
r = \frac{c_{\mathrm{P}} - c_{\mathrm{F}}}{c_{\mathrm{F}}}
|
|
405
|
+
|
|
406
|
+
.. math::
|
|
407
|
+
f = \frac{\dot{Z}}{\dot{Z} + \dot{C}_{\mathrm{D}}}
|
|
408
|
+
|
|
283
409
|
Parameters
|
|
284
410
|
----------
|
|
285
411
|
T0 : float
|
|
286
|
-
Ambient temperature
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
412
|
+
Ambient temperature (K).
|
|
413
|
+
chemical_exergy_enabled : bool, optional
|
|
414
|
+
If True, chemical exergy is considered in the calculations.
|
|
415
|
+
Default is False.
|
|
416
|
+
|
|
417
|
+
Attributes Set
|
|
418
|
+
--------------
|
|
419
|
+
C_P : float
|
|
420
|
+
Cost rate of product (currency/time).
|
|
421
|
+
C_F : float
|
|
422
|
+
Cost rate of fuel (currency/time).
|
|
423
|
+
c_P : float
|
|
424
|
+
Specific cost of product (currency/energy).
|
|
425
|
+
c_F : float
|
|
426
|
+
Specific cost of fuel (currency/energy).
|
|
427
|
+
C_D : float
|
|
428
|
+
Cost rate of exergy destruction (currency/time).
|
|
429
|
+
r : float
|
|
430
|
+
Relative cost difference (dimensionless).
|
|
431
|
+
f : float
|
|
432
|
+
Exergoeconomic factor (dimensionless).
|
|
433
|
+
|
|
434
|
+
Raises
|
|
435
|
+
------
|
|
436
|
+
ValueError
|
|
437
|
+
If no inlet power stream is found.
|
|
292
438
|
"""
|
|
293
439
|
# Retrieve the cost of power from the inlet stream of kind "power"
|
|
294
440
|
power_cost = None
|