Skip to content

Commit fce8e00

Browse files
committed
Update rips module and Python examples
1 parent d4dba92 commit fce8e00

File tree

6 files changed

+209
-191
lines changed

6 files changed

+209
-191
lines changed

docs/rips/PythonExamples/wells_and_fractures/fixed_trajectory_well_path.py renamed to docs/rips/PythonExamples/wells_and_fractures/well_path_from_points.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""
22
Example demonstrating how to create well paths from XYZ coordinates
3-
using the import_fixed_trajectory_well_path API.
3+
using the import_well_path_from_points API.
44
"""
55

6-
import sys
7-
import os
86
import rips
97

108

@@ -57,7 +55,7 @@ def create_norne_well():
5755
)
5856

5957
# Create the well path using the new API
60-
well_path = well_path_coll.import_fixed_trajectory_well_path(
58+
well_path = well_path_coll.import_well_path_from_points(
6159
name=name, coordinates=coordinates
6260
)
6361

docs/rips/generated/generated_classes.py

Lines changed: 150 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -740,144 +740,6 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
740740
if Fishbones.__custom_init__ is not None:
741741
Fishbones.__custom_init__(self, pb2_object=pb2_object, channel=channel)
742742

743-
class WellPath(PdmObjectBase):
744-
"""
745-
A ResInsight Well Path
746-
747-
Attributes:
748-
name (str): Name
749-
"""
750-
__custom_init__ = None #: Assign a custom init routine to be run at __init__
751-
752-
def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
753-
self.name: str = ""
754-
PdmObjectBase.__init__(self, pb2_object, channel)
755-
if WellPath.__custom_init__ is not None:
756-
WellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
757-
758-
def add_fracture(self, measured_depth: float=0.000000000000000e+00, stim_plan_fracture_template: Optional[StimPlanFractureTemplate]=None, align_dip: bool=False, eclipse_case: Optional[Reservoir]=None) -> WellPathFracture:
759-
"""
760-
Add StimPlan Fracture
761-
762-
Arguments:
763-
measured_depth (float):
764-
stim_plan_fracture_template (Optional[StimPlanFractureTemplate]): StimPlan Fracture Template
765-
align_dip (bool):
766-
eclipse_case (Optional[Reservoir]): Eclipse Case
767-
Returns:
768-
WellPathFracture
769-
"""
770-
return self._call_pdm_method_return_value("AddFracture", WellPathFracture, measured_depth=measured_depth, stim_plan_fracture_template=stim_plan_fracture_template, align_dip=align_dip, eclipse_case=eclipse_case)
771-
772-
773-
def add_thermal_fracture(self, measured_depth: float=0.000000000000000e+00, fracture_template: Optional[ThermalFractureTemplate]=None, place_using_template_data: bool=True) -> WellPathFracture:
774-
"""
775-
Add Thermal Fracture
776-
777-
Arguments:
778-
measured_depth (float):
779-
fracture_template (Optional[ThermalFractureTemplate]): Thermal Fracture Template
780-
place_using_template_data (bool):
781-
Returns:
782-
WellPathFracture
783-
"""
784-
return self._call_pdm_method_return_value("AddThermalFracture", WellPathFracture, measured_depth=measured_depth, fracture_template=fracture_template, place_using_template_data=place_using_template_data)
785-
786-
787-
def append_fishbones(self, sub_locations: List[float]=[], drilling_type: str="STANDARD") -> Optional[Fishbones]:
788-
"""
789-
Append Fishbones
790-
791-
Arguments:
792-
sub_locations (List[float]):
793-
drilling_type (str): One of [STANDARD, EXTENDED, ACID_JETTING]
794-
Returns:
795-
FishbonesMultipleSubs
796-
"""
797-
return self._call_pdm_method_return_optional_value("AppendFishbones", Fishbones, sub_locations=sub_locations, drilling_type=drilling_type)
798-
799-
800-
def append_perforation_interval(self, start_md: float=0.000000000000000e+00, end_md: float=0.000000000000000e+00, diameter: float=0.000000000000000e+00, skin_factor: float=0.000000000000000e+00) -> Perforation:
801-
"""
802-
Append Perforation Interval
803-
804-
Arguments:
805-
start_md (float): Start Measured Depth
806-
end_md (float): End Measured Depth
807-
diameter (float): Diameter
808-
skin_factor (float): Skin Factor
809-
Returns:
810-
Perforation
811-
"""
812-
return self._call_pdm_method_return_value("AppendPerforationInterval", Perforation, start_md=start_md, end_md=end_md, diameter=diameter, skin_factor=skin_factor)
813-
814-
815-
def completion_settings(self) -> Optional[WellPathCompletionSettings]:
816-
"""Completion Settings
817-
818-
Returns:
819-
WellPathCompletionSettings
820-
"""
821-
children = self.children("CompletionSettings", WellPathCompletionSettings)
822-
return children[0] if len(children) > 0 else None
823-
824-
825-
def completions(self) -> Optional[WellPathCompletions]:
826-
"""Completions
827-
828-
Returns:
829-
WellPathCompletions
830-
"""
831-
children = self.children("Completions", WellPathCompletions)
832-
return children[0] if len(children) > 0 else None
833-
834-
835-
def extract_well_path_properties_internal(self, resampling_interval: float=1.000000000000000e+01, coordinate_x: str="", coordinate_y: str="", coordinate_z: str="", measured_depth: str="", azimuth: str="", inclination: str="", dogleg: str="") -> None:
836-
"""
837-
Extract Well Path Properties
838-
839-
Arguments:
840-
resampling_interval (float):
841-
coordinate_x (str):
842-
coordinate_y (str):
843-
coordinate_z (str):
844-
measured_depth (str):
845-
azimuth (str):
846-
inclination (str):
847-
dogleg (str):
848-
Returns:
849-
850-
"""
851-
self._call_pdm_method_void("ExtractWellPathPropertiesInternal", resampling_interval=resampling_interval, coordinate_x=coordinate_x, coordinate_y=coordinate_y, coordinate_z=coordinate_z, measured_depth=measured_depth, azimuth=azimuth, inclination=inclination, dogleg=dogleg)
852-
853-
854-
def msw_settings(self, ) -> Optional[MswSettings]:
855-
"""
856-
Multi Segment Well Settings
857-
858-
Arguments:
859-
860-
Returns:
861-
RimMswCompletionParameters
862-
"""
863-
return self._call_pdm_method_return_optional_value("MswSettings", MswSettings)
864-
865-
866-
class FixedTrajectoryWellPath(WellPath):
867-
"""
868-
FixedTrajectoryWellPath
869-
870-
Attributes:
871-
trajectory_points (List[List[float]]): Trajectory Points
872-
"""
873-
__custom_init__ = None #: Assign a custom init routine to be run at __init__
874-
875-
def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
876-
self.trajectory_points: List[List[float]] = []
877-
WellPath.__init__(self, pb2_object, channel)
878-
if FixedTrajectoryWellPath.__custom_init__ is not None:
879-
FixedTrajectoryWellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
880-
881743
class FractureSurface(SurfaceInterface):
882744
__custom_init__ = None #: Assign a custom init routine to be run at __init__
883745

@@ -1088,6 +950,129 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
1088950
if IntersectionCollection.__custom_init__ is not None:
1089951
IntersectionCollection.__custom_init__(self, pb2_object=pb2_object, channel=channel)
1090952

953+
class WellPath(PdmObjectBase):
954+
"""
955+
A ResInsight Well Path
956+
957+
Attributes:
958+
name (str): Name
959+
"""
960+
__custom_init__ = None #: Assign a custom init routine to be run at __init__
961+
962+
def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
963+
self.name: str = ""
964+
PdmObjectBase.__init__(self, pb2_object, channel)
965+
if WellPath.__custom_init__ is not None:
966+
WellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
967+
968+
def add_fracture(self, measured_depth: float=0.000000000000000e+00, stim_plan_fracture_template: Optional[StimPlanFractureTemplate]=None, align_dip: bool=False, eclipse_case: Optional[Reservoir]=None) -> WellPathFracture:
969+
"""
970+
Add StimPlan Fracture
971+
972+
Arguments:
973+
measured_depth (float):
974+
stim_plan_fracture_template (Optional[StimPlanFractureTemplate]): StimPlan Fracture Template
975+
align_dip (bool):
976+
eclipse_case (Optional[Reservoir]): Eclipse Case
977+
Returns:
978+
WellPathFracture
979+
"""
980+
return self._call_pdm_method_return_value("AddFracture", WellPathFracture, measured_depth=measured_depth, stim_plan_fracture_template=stim_plan_fracture_template, align_dip=align_dip, eclipse_case=eclipse_case)
981+
982+
983+
def add_thermal_fracture(self, measured_depth: float=0.000000000000000e+00, fracture_template: Optional[ThermalFractureTemplate]=None, place_using_template_data: bool=True) -> WellPathFracture:
984+
"""
985+
Add Thermal Fracture
986+
987+
Arguments:
988+
measured_depth (float):
989+
fracture_template (Optional[ThermalFractureTemplate]): Thermal Fracture Template
990+
place_using_template_data (bool):
991+
Returns:
992+
WellPathFracture
993+
"""
994+
return self._call_pdm_method_return_value("AddThermalFracture", WellPathFracture, measured_depth=measured_depth, fracture_template=fracture_template, place_using_template_data=place_using_template_data)
995+
996+
997+
def append_fishbones(self, sub_locations: List[float]=[], drilling_type: str="STANDARD") -> Optional[Fishbones]:
998+
"""
999+
Append Fishbones
1000+
1001+
Arguments:
1002+
sub_locations (List[float]):
1003+
drilling_type (str): One of [STANDARD, EXTENDED, ACID_JETTING]
1004+
Returns:
1005+
FishbonesMultipleSubs
1006+
"""
1007+
return self._call_pdm_method_return_optional_value("AppendFishbones", Fishbones, sub_locations=sub_locations, drilling_type=drilling_type)
1008+
1009+
1010+
def append_perforation_interval(self, start_md: float=0.000000000000000e+00, end_md: float=0.000000000000000e+00, diameter: float=0.000000000000000e+00, skin_factor: float=0.000000000000000e+00) -> Perforation:
1011+
"""
1012+
Append Perforation Interval
1013+
1014+
Arguments:
1015+
start_md (float): Start Measured Depth
1016+
end_md (float): End Measured Depth
1017+
diameter (float): Diameter
1018+
skin_factor (float): Skin Factor
1019+
Returns:
1020+
Perforation
1021+
"""
1022+
return self._call_pdm_method_return_value("AppendPerforationInterval", Perforation, start_md=start_md, end_md=end_md, diameter=diameter, skin_factor=skin_factor)
1023+
1024+
1025+
def completion_settings(self) -> Optional[WellPathCompletionSettings]:
1026+
"""Completion Settings
1027+
1028+
Returns:
1029+
WellPathCompletionSettings
1030+
"""
1031+
children = self.children("CompletionSettings", WellPathCompletionSettings)
1032+
return children[0] if len(children) > 0 else None
1033+
1034+
1035+
def completions(self) -> Optional[WellPathCompletions]:
1036+
"""Completions
1037+
1038+
Returns:
1039+
WellPathCompletions
1040+
"""
1041+
children = self.children("Completions", WellPathCompletions)
1042+
return children[0] if len(children) > 0 else None
1043+
1044+
1045+
def extract_well_path_properties_internal(self, resampling_interval: float=1.000000000000000e+01, coordinate_x: str="", coordinate_y: str="", coordinate_z: str="", measured_depth: str="", azimuth: str="", inclination: str="", dogleg: str="") -> None:
1046+
"""
1047+
Extract Well Path Properties
1048+
1049+
Arguments:
1050+
resampling_interval (float):
1051+
coordinate_x (str):
1052+
coordinate_y (str):
1053+
coordinate_z (str):
1054+
measured_depth (str):
1055+
azimuth (str):
1056+
inclination (str):
1057+
dogleg (str):
1058+
Returns:
1059+
1060+
"""
1061+
self._call_pdm_method_void("ExtractWellPathPropertiesInternal", resampling_interval=resampling_interval, coordinate_x=coordinate_x, coordinate_y=coordinate_y, coordinate_z=coordinate_z, measured_depth=measured_depth, azimuth=azimuth, inclination=inclination, dogleg=dogleg)
1062+
1063+
1064+
def msw_settings(self, ) -> Optional[MswSettings]:
1065+
"""
1066+
Multi Segment Well Settings
1067+
1068+
Arguments:
1069+
1070+
Returns:
1071+
RimMswCompletionParameters
1072+
"""
1073+
return self._call_pdm_method_return_optional_value("MswSettings", MswSettings)
1074+
1075+
10911076
class ModeledWellPath(WellPath):
10921077
"""
10931078
A Well Path created interactively in ResInsight
@@ -1271,6 +1256,21 @@ def perforations(self) -> List[Perforation]:
12711256
return self.children("Perforations", Perforation)
12721257

12731258

1259+
class PointBasedWellPath(WellPath):
1260+
"""
1261+
PointBasedWellPath
1262+
1263+
Attributes:
1264+
trajectory_points (List[List[float]]): Trajectory Points
1265+
"""
1266+
__custom_init__ = None #: Assign a custom init routine to be run at __init__
1267+
1268+
def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
1269+
self.trajectory_points: List[List[float]] = []
1270+
WellPath.__init__(self, pb2_object, channel)
1271+
if PointBasedWellPath.__custom_init__ is not None:
1272+
PointBasedWellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
1273+
12741274
class Polygon(NamedObject):
12751275
"""
12761276
Attributes:
@@ -3005,31 +3005,31 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
30053005
if WellPathCollection.__custom_init__ is not None:
30063006
WellPathCollection.__custom_init__(self, pb2_object=pb2_object, channel=channel)
30073007

3008-
def import_fixed_trajectory_well_path_internal(self, name: str="", coordinate_x_key: str="", coordinate_y_key: str="", coordinate_z_key: str="") -> FixedTrajectoryWellPath:
3008+
def import_well_path(self, file_name: str="") -> WellPath:
30093009
"""
30103010
30113011
30123012
Arguments:
3013-
name (str):
3014-
coordinate_x_key (str):
3015-
coordinate_y_key (str):
3016-
coordinate_z_key (str):
3013+
file_name (str):
30173014
Returns:
3018-
FixedTrajectoryWellPath
3015+
WellPathBase
30193016
"""
3020-
return self._call_pdm_method_return_value("ImportFixedTrajectoryWellPathInternal", FixedTrajectoryWellPath, name=name, coordinate_x_key=coordinate_x_key, coordinate_y_key=coordinate_y_key, coordinate_z_key=coordinate_z_key)
3017+
return self._call_pdm_method_return_value("ImportWellPath", WellPath, file_name=file_name)
30213018

30223019

3023-
def import_well_path(self, file_name: str="") -> WellPath:
3020+
def import_well_path_from_points_internal(self, name: str="", coordinate_x_key: str="", coordinate_y_key: str="", coordinate_z_key: str="") -> PointBasedWellPath:
30243021
"""
30253022
30263023
30273024
Arguments:
3028-
file_name (str):
3025+
name (str):
3026+
coordinate_x_key (str):
3027+
coordinate_y_key (str):
3028+
coordinate_z_key (str):
30293029
Returns:
3030-
WellPathBase
3030+
PointBasedWellPath
30313031
"""
3032-
return self._call_pdm_method_return_value("ImportWellPath", WellPath, file_name=file_name)
3032+
return self._call_pdm_method_return_value("ImportWellPathFromPointsInternal", PointBasedWellPath, name=name, coordinate_x_key=coordinate_x_key, coordinate_y_key=coordinate_y_key, coordinate_z_key=coordinate_z_key)
30333033

30343034

30353035
def well_paths(self) -> List[FileWellPath]:
@@ -3076,7 +3076,6 @@ def class_dict() -> Dict[str, Type[PdmObjectBase]]:
30763076
classes['FileWellPath'] = FileWellPath
30773077
classes['Fishbones'] = Fishbones
30783078
classes['FishbonesCollection'] = FishbonesCollection
3079-
classes['FixedTrajectoryWellPath'] = FixedTrajectoryWellPath
30803079
classes['Fracture'] = Fracture
30813080
classes['FractureSurface'] = FractureSurface
30823081
classes['FractureTemplate'] = FractureTemplate
@@ -3105,6 +3104,7 @@ def class_dict() -> Dict[str, Type[PdmObjectBase]]:
31053104
classes['Plot'] = Plot
31063105
classes['PlotCurve'] = PlotCurve
31073106
classes['PlotWindow'] = PlotWindow
3107+
classes['PointBasedWellPath'] = PointBasedWellPath
31083108
classes['Polygon'] = Polygon
31093109
classes['PolygonCollection'] = PolygonCollection
31103110
classes['PressureTable'] = PressureTable

0 commit comments

Comments
 (0)