File tree 1 file changed +15
-1
lines changed
src/libecalc/domain/infrastructure/energy_components/legacy_consumer/system
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 33
33
assemble_operational_setting_from_model_result_list ,
34
34
get_operational_settings_number_used_from_model_results ,
35
35
)
36
- from libecalc .domain .process .compressor .core .base import CompressorModel
36
+ from libecalc .domain .process .compressor .core .base import CompressorModel , CompressorWithTurbineModel
37
37
from libecalc .domain .process .pump .pump import PumpModel
38
38
from libecalc .expression import Expression
39
39
@@ -354,6 +354,20 @@ def evaluate_consumers(
354
354
"""
355
355
consumer_rates = operational_setting .rates
356
356
357
+ for i , consumer in enumerate (self .consumers ):
358
+ if isinstance (consumer .facility_model , CompressorWithTurbineModel ):
359
+ consumer .facility_model .compressor_model .check_for_undefined_stages (
360
+ rate = np .asarray (consumer_rates [i ]),
361
+ suction_pressure = np .asarray (operational_setting .suction_pressures [i ]),
362
+ discharge_pressure = np .asarray (operational_setting .discharge_pressures [i ]),
363
+ )
364
+ else :
365
+ consumer .facility_model .check_for_undefined_stages (
366
+ rate = np .asarray (consumer_rates [i ]),
367
+ suction_pressure = np .asarray (operational_setting .suction_pressures [i ]),
368
+ discharge_pressure = np .asarray (operational_setting .discharge_pressures [i ]),
369
+ )
370
+
357
371
return [
358
372
CompressorResult (
359
373
name = consumer .name ,
You can’t perform that action at this time.
0 commit comments