From baeee5c57d0c1faf9cb22d9b0c820fd4db3ce932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Petter=20L=C3=B8d=C3=B8en?= Date: Wed, 1 Nov 2023 11:09:40 +0100 Subject: [PATCH] fix: make iteration loops for simplified train consistent (#265) --- .../core/models/compressor/train/simplified_train.py | 5 ----- .../compressor_modelling/test_simplified_compressor_train.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libecalc/core/models/compressor/train/simplified_train.py b/src/libecalc/core/models/compressor/train/simplified_train.py index 8dce01b566..0c231fdefa 100644 --- a/src/libecalc/core/models/compressor/train/simplified_train.py +++ b/src/libecalc/core/models/compressor/train/simplified_train.py @@ -560,11 +560,6 @@ def calculate_maximum_rate_given_outlet_pressure_single_calculation_point( " This should normally not happen. Please contact eCalc support." ) - maximum_actual_volume_rate = maximum_rate_function( - heads=polytropic_head, - extrapolate_heads_below_minimum=False, - ) - return maximum_actual_volume_rate diff --git a/src/tests/libecalc/core/models/compressor_modelling/test_simplified_compressor_train.py b/src/tests/libecalc/core/models/compressor_modelling/test_simplified_compressor_train.py index 2d14757dd5..6f2b19be85 100644 --- a/src/tests/libecalc/core/models/compressor_modelling/test_simplified_compressor_train.py +++ b/src/tests/libecalc/core/models/compressor_modelling/test_simplified_compressor_train.py @@ -194,7 +194,7 @@ def test_calculate_maximum_rate_given_outlet_pressure_all_calculation_points( pressure_ratios = [1, 2, 3, 4, 5, 10, 100, 1000] # These expected max rates are here just to assure stability in the results. They are not assured to be correct! - approx_expected_max_rates = [1116990, 1359255, 1536130, 1052085, 1052085, 1052085, 1052085, 1052085] + approx_expected_max_rates = [1116990, 1359022, 1536130, 1052085, 1052085, 1052085, 1052085, 1052085] for pressure_ratio, approx_expected_max_rate in zip(pressure_ratios, approx_expected_max_rates): calculated_max_rate = ( CompressorTrainSimplifiedKnownStages.calculate_maximum_rate_given_outlet_pressure_all_calculation_points(