diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 77c9bbc3..84811a06 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -66,6 +66,8 @@ History * Add emulsion relative viscosity tuning factor; +* Fix ``automatic_profile_frequency`` and ``automatic_trend_frequency`` parameters being ignored in ``convert_alfacase_to_description``; + 0.13.0 (2022-04-19) =================== diff --git a/docs/source/alfacase/alfacase.example.rst b/docs/source/alfacase/alfacase.example.rst index ac755b8a..7eb5fcb2 100644 --- a/docs/source/alfacase/alfacase.example.rst +++ b/docs/source/alfacase/alfacase.example.rst @@ -273,6 +273,8 @@ and ``profiles``. curve_names: - oil mass flow rate + automatic_trend_frequency: true + trend_frequency: value: 0.1 unit: s @@ -283,6 +285,8 @@ and ``profiles``. curve_names: - pressure + automatic_profile_frequency: true + profile_frequency: value: 0.1 unit: s @@ -332,6 +336,8 @@ and imported by the application. curve_names: - oil mass flow rate + automatic_trend_frequency: true + trend_frequency: value: 0.1 unit: s @@ -342,6 +348,8 @@ and imported by the application. curve_names: - pressure + automatic_profile_frequency: true + profile_frequency: value: 0.1 unit: s diff --git a/docs/source/alfacase/case_description.example.rst b/docs/source/alfacase/case_description.example.rst index e2b5609c..f44593bd 100644 --- a/docs/source/alfacase/case_description.example.rst +++ b/docs/source/alfacase/case_description.example.rst @@ -281,6 +281,7 @@ and ``profiles``. ) ] ), + automatic_trend_frequency=True, trend_frequency=Scalar(0.1, "s"), profiles=[ ProfileOutputDescription( @@ -289,6 +290,7 @@ and ``profiles``. location=OutputAttachmentLocation.Main, ) ], + automatic_profile_frequency=True, profile_frequency=Scalar(0.1, "s"), ), ) @@ -392,6 +394,7 @@ Description with a project configuration and being converted to a ``.alfacase`` ) ] ), + automatic_trend_frequency=True, trend_frequency=Scalar(0.1, "s"), profiles=[ ProfileOutputDescription( @@ -400,6 +403,7 @@ Description with a project configuration and being converted to a ``.alfacase`` location=OutputAttachmentLocation.Main, ) ], + automatic_profile_frequency=True, profile_frequency=Scalar(0.1, "s"), ), ) diff --git a/src/alfasim_sdk/_internal/alfacase/alfacase_to_case.py b/src/alfasim_sdk/_internal/alfacase/alfacase_to_case.py index 01eed90c..a21dea3d 100644 --- a/src/alfasim_sdk/_internal/alfacase/alfacase_to_case.py +++ b/src/alfasim_sdk/_internal/alfacase/alfacase_to_case.py @@ -1592,8 +1592,10 @@ def load_case_output_description( ) -> case_description.CaseOutputDescription: alfacase_to_case_description = { "profiles": load_profile_output_description, + "automatic_profile_frequency": load_value, "profile_frequency": get_scalar_loader(from_unit="s"), "trends": load_trends_output_description, + "automatic_trend_frequency": load_value, "trend_frequency": get_scalar_loader(from_unit="s"), } case_values = to_case_values(document, alfacase_to_case_description) diff --git a/tests/common_testing/alfasim_sdk_common_testing/filled_case_descriptions.py b/tests/common_testing/alfasim_sdk_common_testing/filled_case_descriptions.py index 48475267..fe105606 100644 --- a/tests/common_testing/alfasim_sdk_common_testing/filled_case_descriptions.py +++ b/tests/common_testing/alfasim_sdk_common_testing/filled_case_descriptions.py @@ -441,8 +441,10 @@ ) CASE_OUTPUT_DESCRIPTION = case_description.CaseOutputDescription( trends=TRENDS_OUTPUT_DESCRIPTION, + automatic_trend_frequency=True, trend_frequency=Scalar(0.1, "s"), profiles=[PROFILE_OUTPUT_DESCRIPTION], + automatic_profile_frequency=True, profile_frequency=Scalar(0.1, "s"), ) CASING_DESCRIPTION = case_description.CasingDescription(