66import libecalc .common .fixed_speed_pressure_control
77import libecalc .common .serializable_chart
88import libecalc .dto .fuel_type
9+ from libecalc .common .serializable_chart import ChartCurveDTO , VariableSpeedChartDTO
910from libecalc .domain .infrastructure .energy_components .legacy_consumer .tabulated import TabularConsumerFunction
1011from libecalc .domain .infrastructure .energy_components .legacy_consumer .tabulated .common import VariableExpression
1112from libecalc .domain .infrastructure .energy_components .turbine import Turbine
2223
2324
2425@pytest .fixture
25- def medium_fluid () -> FluidModel :
26+ def fluid_model_medium () -> FluidModel :
2627 return FluidModel (
2728 eos_model = EoSModel .SRK ,
2829 composition = FluidComposition .model_validate (MEDIUM_MW_19P4 ),
2930 )
3031
3132
3233@pytest .fixture
33- def rich_fluid () -> FluidModel :
34+ def fluid_model_rich () -> FluidModel :
3435 return FluidModel (
3536 eos_model = EoSModel .SRK ,
3637 composition = FluidComposition .model_validate (RICH_MW_21P4 ),
3738 )
3839
3940
4041@pytest .fixture
41- def dry_fluid () -> FluidModel :
42+ def fluid_model_dry () -> FluidModel :
4243 return FluidModel (
4344 eos_model = EoSModel .SRK ,
4445 composition = FluidComposition .model_validate (DRY_MW_18P3 ),
@@ -236,10 +237,10 @@ def variable_speed_compressor_chart_dto() -> libecalc.common.serializable_chart.
236237
237238@pytest .fixture
238239def variable_speed_compressor_train_dto (
239- medium_fluid_dto , variable_speed_compressor_chart_dto
240+ fluid_model_medium , variable_speed_compressor_chart_dto
240241) -> dto .VariableSpeedCompressorTrain :
241242 return dto .VariableSpeedCompressorTrain (
242- fluid_model = medium_fluid_dto ,
243+ fluid_model = fluid_model_medium ,
243244 stages = [
244245 dto .CompressorStage (
245246 compressor_chart = variable_speed_compressor_chart_dto ,
@@ -257,10 +258,10 @@ def variable_speed_compressor_train_dto(
257258
258259@pytest .fixture
259260def variable_speed_compressor_train_two_stages_dto (
260- medium_fluid_dto , variable_speed_compressor_chart_dto
261+ fluid_model_medium , variable_speed_compressor_chart_dto
261262) -> dto .VariableSpeedCompressorTrain :
262263 return dto .VariableSpeedCompressorTrain (
263- fluid_model = medium_fluid_dto ,
264+ fluid_model = fluid_model_medium ,
264265 stages = [
265266 dto .CompressorStage (
266267 compressor_chart = variable_speed_compressor_chart_dto ,
@@ -350,3 +351,92 @@ def create_tabular_consumer_function(
350351 )
351352
352353 return create_tabular_consumer_function
354+
355+
356+ @pytest .fixture
357+ def predefined_variable_speed_compressor_chart_dto () -> VariableSpeedChartDTO :
358+ """NOT USED CURRENTLY, KEPT FOR FUTURE REFERENCE"""
359+ return VariableSpeedChartDTO (
360+ curves = [
361+ ChartCurveDTO (
362+ speed_rpm = 7689.0 ,
363+ rate_actual_m3_hour = [2900.0666 , 3503.8068 , 4002.5554 , 4595.0148 ],
364+ polytropic_head_joule_per_kg = [82530.702036 , 78443.25272100001 , 72239.03594100001 , 60107.539661999996 ],
365+ efficiency_fraction = [0.723 , 0.7469 , 0.7449 , 0.7015 ],
366+ ),
367+ ChartCurveDTO (
368+ speed_rpm = 8787.0 ,
369+ rate_actual_m3_hour = [3305.5723 , 4000.1546 , 4499.2342 , 4996.8728 , 5241.9892 ],
370+ polytropic_head_joule_per_kg = [
371+ 107428.875417 ,
372+ 101959.123527 ,
373+ 95230.48671000001 ,
374+ 84305.752866 ,
375+ 78230.827962 ,
376+ ],
377+ efficiency_fraction = [0.7241 , 0.7449 , 0.7464 , 0.722 , 0.7007 ],
378+ ),
379+ ChartCurveDTO (
380+ speed_rpm = 9886.0 ,
381+ rate_actual_m3_hour = [3708.8713 , 4502.2531 , 4993.5959 , 5507.8114 , 5924.3308 ],
382+ polytropic_head_joule_per_kg = [
383+ 135823.185648 ,
384+ 129322.210482 ,
385+ 121892.878719 ,
386+ 110621.46830400001 ,
387+ 98633.21175900001 ,
388+ ],
389+ efficiency_fraction = [0.723 , 0.7473 , 0.748 , 0.7306 , 0.704 ],
390+ ),
391+ ChartCurveDTO (
392+ speed_rpm = 10435.0 ,
393+ rate_actual_m3_hour = [3928.0389 , 4507.4654 , 5002.1249 , 5498.9912 , 6248.5937 ],
394+ polytropic_head_joule_per_kg = [
395+ 151422.09804 ,
396+ 146980.631331 ,
397+ 140775.67978200002 ,
398+ 131074.593345 ,
399+ 109705.500756 ,
400+ ],
401+ efficiency_fraction = [0.7232 , 0.7437 , 0.7453 , 0.7414 , 0.701 ],
402+ ),
403+ ChartCurveDTO (
404+ speed_rpm = 10984.0 ,
405+ rate_actual_m3_hour = [4138.6974 , 5002.4758 , 5494.3704 , 6008.6962 , 6560.148 ],
406+ polytropic_head_joule_per_kg = [
407+ 167543.961912 ,
408+ 159657.01326900002 ,
409+ 151353.646803 ,
410+ 139907.430036 ,
411+ 121474.81477800001 ,
412+ ],
413+ efficiency_fraction = [0.7226 , 0.7462 , 0.7468 , 0.7349 , 0.7023 ],
414+ ),
415+ ChartCurveDTO (
416+ speed_rpm = 11533.0 ,
417+ rate_actual_m3_hour = [4327.9175 , 4998.517 , 5505.8851 , 6027.6167 , 6506.9064 , 6908.2832 ],
418+ polytropic_head_joule_per_kg = [
419+ 185235.416955 ,
420+ 178887.22567200003 ,
421+ 171985.250079 ,
422+ 161764.148295 ,
423+ 147514.415994 ,
424+ 133600.348539 ,
425+ ],
426+ efficiency_fraction = [0.7254 , 0.7444 , 0.745 , 0.7466 , 0.7266 , 0.7019 ],
427+ ),
428+ ChartCurveDTO (
429+ speed_rpm = 10767.0 ,
430+ rate_actual_m3_hour = [4052.9057 , 4500.6637 , 4999.41 , 5492.822 , 6000.6263 , 6439.4876 ],
431+ polytropic_head_joule_per_kg = [
432+ 161345.07 ,
433+ 157754.61000000002 ,
434+ 152506.26 ,
435+ 143618.4 ,
436+ 131983.74000000002 ,
437+ 117455.13 ,
438+ ],
439+ efficiency_fraction = [0.724 , 0.738 , 0.7479 , 0.74766 , 0.7298 , 0.7014 ],
440+ ),
441+ ],
442+ )
0 commit comments