diff --git a/docs/rips/generated/RiaVersionInfo.py b/docs/rips/generated/RiaVersionInfo.py index e9d85387a..27cf7117d 100644 --- a/docs/rips/generated/RiaVersionInfo.py +++ b/docs/rips/generated/RiaVersionInfo.py @@ -17,7 +17,7 @@ # Just sets version constants RESINSIGHT_MAJOR_VERSION : str = "2024" -RESINSIGHT_MINOR_VERSION : str = "09" +RESINSIGHT_MINOR_VERSION : str = "12" RESINSIGHT_PATCH_VERSION : str = "0" PYTHON_GRPC_PROTOC_VERSION : str = "libprotoc 23.4" diff --git a/docs/rips/generated/generated_classes.py b/docs/rips/generated/generated_classes.py index 8a608d7a5..fb116ea3a 100644 --- a/docs/rips/generated/generated_classes.py +++ b/docs/rips/generated/generated_classes.py @@ -394,7 +394,7 @@ class FaciesInitialPressureConfig(PdmObjectBase): Attributes: facies_name (str): Facies facies_value (int): Value - fraction (float): ? Pressure Fraction + fraction (float): Δ Pressure Fraction """ __custom_init__ = None #: Assign a custom init routine to be run at __init__ @@ -767,6 +767,18 @@ def completions(self) -> Optional[WellPathCompletions]: return children[0] if len(children) > 0 else None + def msw_settings(self, ) -> Optional[MswSettings]: + """ + Multi Segment Well Settings + + Arguments: + + Returns: + RimMswCompletionParameters + """ + return self._call_pdm_method_return_optional_value("MswSettings", MswSettings) + + class ModeledWellPath(WellPath): """ A Well Path created interactively in ResInsight @@ -1211,6 +1223,37 @@ def create_statistics_case(self, ) -> RimStatisticalCalculation: return self._call_pdm_method_return_value("create_statistics_case", RimStatisticalCalculation) +class MswSettings(PdmObjectBase): + """ + Multi Segment Well Completion Settings + + Attributes: + custom_values_for_lateral (bool): Custom Values for Lateral + enforce_max_segment_length (bool): Enforce Max Segment Length + length_and_depth (str): One of [INC, ABS] + liner_diameter (float): Liner Inner Diameter + max_segment_length (float): Max Segment Length + pressure_drop (str): One of [H--, HF-, HFA] + reference_md_type (str): One of [GridEntryPoint, UserDefined] + roughness_factor (float): Roughness Factor + user_defined_reference_md (float): User Defined Reference MD + """ + __custom_init__ = None #: Assign a custom init routine to be run at __init__ + + def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None: + self.custom_values_for_lateral: bool = False + self.enforce_max_segment_length: bool = False + self.length_and_depth: str = "ABS" + self.liner_diameter: float = 0.152 + self.max_segment_length: float = 200 + self.pressure_drop: str = "HF-" + self.reference_md_type: str = "GridEntryPoint" + self.roughness_factor: float = 1e-05 + self.user_defined_reference_md: float = 0 + PdmObjectBase.__init__(self, pb2_object, channel) + if MswSettings.__custom_init__ is not None: + MswSettings.__custom_init__(self, pb2_object=pb2_object, channel=channel) + class MudWeightWindowParameters(PdmObjectBase): __custom_init__ = None #: Assign a custom init routine to be run at __init__ @@ -2125,18 +2168,34 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: class WellPathCompletionSettings(PdmObjectBase): """ Attributes: + allow_well_cross_flow (bool): Allow Well Cross-Flow + auto_well_shut_in (str): One of [SHUT, STOP] + drainage_radius_for_pi (str): Drainage Radius for PI + fluid_in_place_region (int): Fluid In-Place Region + gas_inflow_eq (str): One of [STD, R-G, P-P, GPP] group_name_for_export (str): Group Name + hydrostatic_density (str): One of [SEG, AVG] msw_liner_diameter (float): MSW Liner Diameter msw_roughness (float): MSW Roughness + reference_depth_for_export (str): Reference Depth for BHP + well_bore_fluid_pvt_table (int): Wellbore Fluid PVT table well_name_for_export (str): Well Name well_type_for_export (str): One of [OIL, GAS, WATER, LIQUID] """ __custom_init__ = None #: Assign a custom init routine to be run at __init__ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None: + self.allow_well_cross_flow: bool = True + self.auto_well_shut_in: str = "STOP" + self.drainage_radius_for_pi: str = "0.0" + self.fluid_in_place_region: int = 0 + self.gas_inflow_eq: str = "STD" self.group_name_for_export: str = "" + self.hydrostatic_density: str = "SEG" self.msw_liner_diameter: float = 0.152 self.msw_roughness: float = 1e-05 + self.reference_depth_for_export: str = "" + self.well_bore_fluid_pvt_table: int = 0 self.well_name_for_export: str = "" self.well_type_for_export: str = "OIL" PdmObjectBase.__init__(self, pb2_object, channel) @@ -2340,6 +2399,7 @@ def class_dict() -> Dict[str, Type[PdmObjectBase]]: classes['IntersectionCollection'] = IntersectionCollection classes['MeshFractureTemplate'] = MeshFractureTemplate classes['ModeledWellPath'] = ModeledWellPath + classes['MswSettings'] = MswSettings classes['MudWeightWindowParameters'] = MudWeightWindowParameters classes['NamedObject'] = NamedObject classes['NonNetLayers'] = NonNetLayers diff --git a/docs/rips/tests/test_create_well_path.py b/docs/rips/tests/test_create_well_path.py index 2cc866e05..36fbff133 100644 --- a/docs/rips/tests/test_create_well_path.py +++ b/docs/rips/tests/test_create_well_path.py @@ -64,3 +64,48 @@ def test_add_well_path_targets(rips_instance, initialize_test): assert target.use_fixed_azimuth == False assert target.azimuth == 0.0 assert target.inclination == 25.6 + + +def test_add_well_path_completions(rips_instance, initialize_test): + well_path_coll = rips_instance.project.descendants(rips.WellPathCollection)[0] + + well_path = well_path_coll.add_new_object(rips.ModeledWellPath) + well_path.name = "test" + well_path.update() + + # Update the completion settings + completions_settings = well_path.completion_settings() + completions_settings.msw_roughness = 12.34 + completions_settings.msw_liner_diameter = 0.2123 + completions_settings.well_name_for_export = "file name" + completions_settings.group_name_for_export = "msj" + completions_settings.well_type_for_export = "GAS" + completions_settings.update() # Commit updates back to ResInsight + + completions_settings_updated = well_path.completion_settings() + assert completions_settings_updated.msw_roughness == 12.34 + assert completions_settings_updated.msw_liner_diameter == 0.2123 + assert completions_settings_updated.well_name_for_export == "file name" + assert completions_settings_updated.group_name_for_export == "msj" + assert completions_settings_updated.well_type_for_export == "GAS" + + msw_settings = well_path.msw_settings() + msw_settings.custom_values_for_lateral = True + msw_settings.enforce_max_segment_length = True + msw_settings.liner_diameter = 20.0 + msw_settings.max_segment_length = 123.05 + msw_settings.pressure_drop = "HFA" + msw_settings.reference_md_type = "UserDefined" + msw_settings.roughness_factor = 1.3 + msw_settings.user_defined_reference_md = 1234.56 + msw_settings.update() + + msw_settings_updated = well_path.msw_settings() + assert msw_settings_updated.custom_values_for_lateral == True + assert msw_settings_updated.enforce_max_segment_length == True + assert msw_settings_updated.liner_diameter == 20.0 + assert msw_settings_updated.max_segment_length == 123.05 + assert msw_settings_updated.pressure_drop == "HFA" + assert msw_settings_updated.reference_md_type == "UserDefined" + assert msw_settings_updated.roughness_factor == 1.3 + assert msw_settings_updated.user_defined_reference_md == 1234.56