From 8649e5b5f9754cb91b3f926445f485c676c275f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ant=C3=A3o?= Date: Fri, 5 Jul 2024 16:05:13 -0300 Subject: [PATCH] Configure the three phase physics option; PWPA-1971 --- .../test_convert_alfacase/test_create_alfacase.alfacase | 2 +- .../test_create_alfacase_with_operation.alfacase | 2 +- src/alfasim_score/converter/alfacase/convert_alfacase.py | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase.alfacase index 1d41d99..4a3c87a 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase.alfacase @@ -1,6 +1,6 @@ name: Teste Térmico physics: - hydrodynamic_model: hydrodynamic_model_4_fields + hydrodynamic_model: hydrodynamic_model_3_layers_gas_oil_water simulation_regime: simulation_regime_transient energy_model: no_model solids_model: no_model diff --git a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_with_operation.alfacase b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_with_operation.alfacase index dd069b3..72e71dd 100644 --- a/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_with_operation.alfacase +++ b/src/alfasim_score/converter/alfacase/_tests/test_convert_alfacase/test_create_alfacase_with_operation.alfacase @@ -1,6 +1,6 @@ name: Teste Térmico physics: - hydrodynamic_model: hydrodynamic_model_4_fields + hydrodynamic_model: hydrodynamic_model_3_layers_gas_oil_water simulation_regime: simulation_regime_transient energy_model: no_model solids_model: no_model diff --git a/src/alfasim_score/converter/alfacase/convert_alfacase.py b/src/alfasim_score/converter/alfacase/convert_alfacase.py index 91ef4d9..f900c39 100644 --- a/src/alfasim_score/converter/alfacase/convert_alfacase.py +++ b/src/alfasim_score/converter/alfacase/convert_alfacase.py @@ -8,6 +8,7 @@ from alfasim_sdk import EnvironmentPropertyDescription from alfasim_sdk import FormationDescription from alfasim_sdk import FormationLayerDescription +from alfasim_sdk import HydrodynamicModelType from alfasim_sdk import MassInflowSplitType from alfasim_sdk import MassSourceNodePropertiesDescription from alfasim_sdk import MassSourceType @@ -18,6 +19,7 @@ from alfasim_sdk import NodeDescription from alfasim_sdk import OpenHoleDescription from alfasim_sdk import PackerDescription +from alfasim_sdk import PhysicsDescription from alfasim_sdk import PipeEnvironmentHeatTransferCoefficientModelType from alfasim_sdk import PipeThermalModelType from alfasim_sdk import PipeThermalPositionInput @@ -250,6 +252,10 @@ def _convert_casings(self) -> CasingDescription: open_holes=self._convert_open_hole_list(), ) + def build_physics(self) -> PhysicsDescription: + """Create the description for the physics data.""" + return PhysicsDescription(hydrodynamic_model=HydrodynamicModelType.ThreeLayersGasOilWater) + def build_nodes(self) -> List[NodeDescription]: """Create the description for the node list.""" nodes = [ @@ -315,6 +321,7 @@ def build_case_description(self) -> CaseDescription: """ "Create the description for the alfacase.""" return CaseDescription( name=self.general_data["case_name"], + physics=self.build_physics(), nodes=self.build_nodes(), wells=[self.build_well()], materials=self._convert_materials(),