Skip to content

Commit bfb12b5

Browse files
committed
Update rips for 2024.12
1 parent af8f3ed commit bfb12b5

File tree

3 files changed

+107
-2
lines changed

3 files changed

+107
-2
lines changed

docs/rips/generated/RiaVersionInfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Just sets version constants
1818

1919
RESINSIGHT_MAJOR_VERSION : str = "2024"
20-
RESINSIGHT_MINOR_VERSION : str = "09"
20+
RESINSIGHT_MINOR_VERSION : str = "12"
2121
RESINSIGHT_PATCH_VERSION : str = "0"
2222

2323
PYTHON_GRPC_PROTOC_VERSION : str = "libprotoc 23.4"

docs/rips/generated/generated_classes.py

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ class FaciesInitialPressureConfig(PdmObjectBase):
394394
Attributes:
395395
facies_name (str): Facies
396396
facies_value (int): Value
397-
fraction (float): ? Pressure Fraction
397+
fraction (float): Δ Pressure Fraction
398398
"""
399399
__custom_init__ = None #: Assign a custom init routine to be run at __init__
400400

@@ -767,6 +767,18 @@ def completions(self) -> Optional[WellPathCompletions]:
767767
return children[0] if len(children) > 0 else None
768768

769769

770+
def msw_settings(self, ) -> Optional[MswSettings]:
771+
"""
772+
Multi Segment Well Settings
773+
774+
Arguments:
775+
776+
Returns:
777+
RimMswCompletionParameters
778+
"""
779+
return self._call_pdm_method_return_optional_value("MswSettings", MswSettings)
780+
781+
770782
class ModeledWellPath(WellPath):
771783
"""
772784
A Well Path created interactively in ResInsight
@@ -1211,6 +1223,37 @@ def create_statistics_case(self, ) -> RimStatisticalCalculation:
12111223
return self._call_pdm_method_return_value("create_statistics_case", RimStatisticalCalculation)
12121224

12131225

1226+
class MswSettings(PdmObjectBase):
1227+
"""
1228+
Multi Segment Well Completion Settings
1229+
1230+
Attributes:
1231+
custom_values_for_lateral (bool): Custom Values for Lateral
1232+
enforce_max_segment_length (bool): Enforce Max Segment Length
1233+
length_and_depth (str): One of [INC, ABS]
1234+
liner_diameter (float): Liner Inner Diameter
1235+
max_segment_length (float): Max Segment Length
1236+
pressure_drop (str): One of [H--, HF-, HFA]
1237+
reference_md_type (str): One of [GridEntryPoint, UserDefined]
1238+
roughness_factor (float): Roughness Factor
1239+
user_defined_reference_md (float): User Defined Reference MD
1240+
"""
1241+
__custom_init__ = None #: Assign a custom init routine to be run at __init__
1242+
1243+
def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
1244+
self.custom_values_for_lateral: bool = False
1245+
self.enforce_max_segment_length: bool = False
1246+
self.length_and_depth: str = "ABS"
1247+
self.liner_diameter: float = 0.152
1248+
self.max_segment_length: float = 200
1249+
self.pressure_drop: str = "HF-"
1250+
self.reference_md_type: str = "GridEntryPoint"
1251+
self.roughness_factor: float = 1e-05
1252+
self.user_defined_reference_md: float = 0
1253+
PdmObjectBase.__init__(self, pb2_object, channel)
1254+
if MswSettings.__custom_init__ is not None:
1255+
MswSettings.__custom_init__(self, pb2_object=pb2_object, channel=channel)
1256+
12141257
class MudWeightWindowParameters(PdmObjectBase):
12151258
__custom_init__ = None #: Assign a custom init routine to be run at __init__
12161259

@@ -2125,18 +2168,34 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
21252168
class WellPathCompletionSettings(PdmObjectBase):
21262169
"""
21272170
Attributes:
2171+
allow_well_cross_flow (bool): Allow Well Cross-Flow
2172+
auto_well_shut_in (str): One of [SHUT, STOP]
2173+
drainage_radius_for_pi (str): Drainage Radius for PI
2174+
fluid_in_place_region (int): Fluid In-Place Region
2175+
gas_inflow_eq (str): One of [STD, R-G, P-P, GPP]
21282176
group_name_for_export (str): Group Name
2177+
hydrostatic_density (str): One of [SEG, AVG]
21292178
msw_liner_diameter (float): MSW Liner Diameter
21302179
msw_roughness (float): MSW Roughness
2180+
reference_depth_for_export (str): Reference Depth for BHP
2181+
well_bore_fluid_pvt_table (int): Wellbore Fluid PVT table
21312182
well_name_for_export (str): Well Name
21322183
well_type_for_export (str): One of [OIL, GAS, WATER, LIQUID]
21332184
"""
21342185
__custom_init__ = None #: Assign a custom init routine to be run at __init__
21352186

21362187
def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
2188+
self.allow_well_cross_flow: bool = True
2189+
self.auto_well_shut_in: str = "STOP"
2190+
self.drainage_radius_for_pi: str = "0.0"
2191+
self.fluid_in_place_region: int = 0
2192+
self.gas_inflow_eq: str = "STD"
21372193
self.group_name_for_export: str = ""
2194+
self.hydrostatic_density: str = "SEG"
21382195
self.msw_liner_diameter: float = 0.152
21392196
self.msw_roughness: float = 1e-05
2197+
self.reference_depth_for_export: str = ""
2198+
self.well_bore_fluid_pvt_table: int = 0
21402199
self.well_name_for_export: str = ""
21412200
self.well_type_for_export: str = "OIL"
21422201
PdmObjectBase.__init__(self, pb2_object, channel)
@@ -2340,6 +2399,7 @@ def class_dict() -> Dict[str, Type[PdmObjectBase]]:
23402399
classes['IntersectionCollection'] = IntersectionCollection
23412400
classes['MeshFractureTemplate'] = MeshFractureTemplate
23422401
classes['ModeledWellPath'] = ModeledWellPath
2402+
classes['MswSettings'] = MswSettings
23432403
classes['MudWeightWindowParameters'] = MudWeightWindowParameters
23442404
classes['NamedObject'] = NamedObject
23452405
classes['NonNetLayers'] = NonNetLayers

docs/rips/tests/test_create_well_path.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,48 @@ def test_add_well_path_targets(rips_instance, initialize_test):
6464
assert target.use_fixed_azimuth == False
6565
assert target.azimuth == 0.0
6666
assert target.inclination == 25.6
67+
68+
69+
def test_add_well_path_completions(rips_instance, initialize_test):
70+
well_path_coll = rips_instance.project.descendants(rips.WellPathCollection)[0]
71+
72+
well_path = well_path_coll.add_new_object(rips.ModeledWellPath)
73+
well_path.name = "test"
74+
well_path.update()
75+
76+
# Update the completion settings
77+
completions_settings = well_path.completion_settings()
78+
completions_settings.msw_roughness = 12.34
79+
completions_settings.msw_liner_diameter = 0.2123
80+
completions_settings.well_name_for_export = "file name"
81+
completions_settings.group_name_for_export = "msj"
82+
completions_settings.well_type_for_export = "GAS"
83+
completions_settings.update() # Commit updates back to ResInsight
84+
85+
completions_settings_updated = well_path.completion_settings()
86+
assert completions_settings_updated.msw_roughness == 12.34
87+
assert completions_settings_updated.msw_liner_diameter == 0.2123
88+
assert completions_settings_updated.well_name_for_export == "file name"
89+
assert completions_settings_updated.group_name_for_export == "msj"
90+
assert completions_settings_updated.well_type_for_export == "GAS"
91+
92+
msw_settings = well_path.msw_settings()
93+
msw_settings.custom_values_for_lateral = True
94+
msw_settings.enforce_max_segment_length = True
95+
msw_settings.liner_diameter = 20.0
96+
msw_settings.max_segment_length = 123.05
97+
msw_settings.pressure_drop = "HFA"
98+
msw_settings.reference_md_type = "UserDefined"
99+
msw_settings.roughness_factor = 1.3
100+
msw_settings.user_defined_reference_md = 1234.56
101+
msw_settings.update()
102+
103+
msw_settings_updated = well_path.msw_settings()
104+
assert msw_settings_updated.custom_values_for_lateral == True
105+
assert msw_settings_updated.enforce_max_segment_length == True
106+
assert msw_settings_updated.liner_diameter == 20.0
107+
assert msw_settings_updated.max_segment_length == 123.05
108+
assert msw_settings_updated.pressure_drop == "HFA"
109+
assert msw_settings_updated.reference_md_type == "UserDefined"
110+
assert msw_settings_updated.roughness_factor == 1.3
111+
assert msw_settings_updated.user_defined_reference_md == 1234.56

0 commit comments

Comments
 (0)