Skip to content

Commit

Permalink
fix: make sure default pressure control is set for all trains
Browse files Browse the repository at this point in the history
Default pressure control was added to variable speed train, but
forgotten for single speed and multiple streams.
  • Loading branch information
jsolaas committed Sep 26, 2024
1 parent 58c04a7 commit b233444
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libecalc/presentation/yaml/mappers/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _pressure_control_mapper(
YamlVariableSpeedCompressorTrainMultipleStreamsAndPressures,
],
) -> FixedSpeedPressureControl:
return FixedSpeedPressureControl(model_config.pressure_control.value) # TODO: Could this be none previously?
return FixedSpeedPressureControl(model_config.pressure_control.value)


def _get_curve_data_from_resource(resource: Resource, speed: float = 0.0):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class YamlSingleSpeedCompressorTrain(YamlCompressorTrainBase):
title="COMPRESSOR_TRAIN",
)
pressure_control: YamlPressureControl = Field(
None,
YamlPressureControl.DOWNSTREAM_CHOKE,
description="Method for pressure control",
title="PRESSURE_CONTROL",
)
Expand Down Expand Up @@ -173,7 +173,7 @@ class YamlVariableSpeedCompressorTrainMultipleStreamsAndPressures(YamlCompressor
title="STAGES",
)
pressure_control: YamlPressureControl = Field(
None,
YamlPressureControl.DOWNSTREAM_CHOKE,
description="Method for pressure control",
title="PRESSURE_CONTROL",
)
Expand Down

0 comments on commit b233444

Please sign in to comment.