Skip to content

Commit

Permalink
Merge pull request #252 from ESSS/fb-ASIM-4691-alfacase-import-export…
Browse files Browse the repository at this point in the history
…-not-respecting-automatic-params

Add missing automatic_{profile,trend}_frequency parameter
  • Loading branch information
cauebs authored Jun 21, 2022
2 parents c34ec96 + 613b3e9 commit eb3a99d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
===================

Expand Down
8 changes: 8 additions & 0 deletions docs/source/alfacase/alfacase.example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ and ``profiles``.
curve_names:
- oil mass flow rate
automatic_trend_frequency: true
trend_frequency:
value: 0.1
unit: s
Expand All @@ -283,6 +285,8 @@ and ``profiles``.
curve_names:
- pressure
automatic_profile_frequency: true
profile_frequency:
value: 0.1
unit: s
Expand Down Expand Up @@ -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
Expand All @@ -342,6 +348,8 @@ and imported by the application.
curve_names:
- pressure
automatic_profile_frequency: true
profile_frequency:
value: 0.1
unit: s
Expand Down
4 changes: 4 additions & 0 deletions docs/source/alfacase/case_description.example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ and ``profiles``.
)
]
),
automatic_trend_frequency=True,
trend_frequency=Scalar(0.1, "s"),
profiles=[
ProfileOutputDescription(
Expand All @@ -289,6 +290,7 @@ and ``profiles``.
location=OutputAttachmentLocation.Main,
)
],
automatic_profile_frequency=True,
profile_frequency=Scalar(0.1, "s"),
),
)
Expand Down Expand Up @@ -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(
Expand All @@ -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"),
),
)
Expand Down
2 changes: 2 additions & 0 deletions src/alfasim_sdk/_internal/alfacase/alfacase_to_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit eb3a99d

Please sign in to comment.