Skip to content

Commit f102a5d

Browse files
committed
Update rips module and proto files
1 parent e0930c6 commit f102a5d

9 files changed

Lines changed: 626 additions & 53 deletions

File tree

docs/rips/PythonExamples/experimental/well_event_schedule_orion.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
3. Well keyword events: WCONHIST and WELTARG (with attribute translation) and
1717
WRFTPLT (generic Eclipse well keyword pass-through)
1818
4. SCHEDULE-level keyword events not tied to a well: RPTRST, GRUPTREE, TUNING
19-
5. Generating Eclipse schedule text from the resulting timeline
19+
5. REPORT dates, passed to generate_schedule_text(additional_dates=...) so
20+
they appear as bare DATES keywords (summary-report triggers)
21+
6. Generating Eclipse schedule text from the resulting timeline
2022
2123
The ORIONEVENTS text is built inline with the name of the first well path in
2224
the project (like well_event_schedule.py, which uses wells[0]), so the example
@@ -72,8 +74,13 @@ def build_orion_text(well_name, with_filter):
7274
# Schedule-level keywords (not tied to a well)
7375
SCHEDULE
7476
@STARTUP RPTRST BASIC=2 FREQ=1
75-
@STARTUP GRUPTREE CHILD=OP PARENT=FIELD
77+
@STARTUP GRUPTREE CHILD_GROUP=OP PARENT_GROUP=FIELD
7678
@STARTUP TUNING TSINIT=1 TSMAXZ=30 TMAXWC=1 NEWTMX=12 NEWTMN=1 LITMAX=50 LITMIN=1 MXWSIT=50 MXWPIT=50
79+
80+
# Report dates: emitted as bare DATES keywords so Eclipse/Flow writes a
81+
# summary report at these dates even though no events fall on them.
82+
REPORT 2024-07-01
83+
REPORT STARTUP + 365
7784
"""
7885

7986

@@ -114,6 +121,7 @@ def main():
114121
)
115122
print(f" Events applied: {report.events_applied}")
116123
print(f" Events skipped: {report.events_skipped}")
124+
print(f" Report dates: {report.report_dates}")
117125
for warning in report.warnings:
118126
print(f" WARNING: {warning}")
119127
for error in report.errors:
@@ -139,8 +147,12 @@ def main():
139147
if case is None:
140148
print(" No Eclipse case loaded - skipping schedule generation.")
141149
return
150+
# REPORT dates from the ORIONEVENTS text become bare DATES keywords
151+
# (summary-report triggers) via additional_dates.
142152
schedule_text = timeline.generate_schedule_text(
143-
eclipse_case=case, export_msw_for_wells=[well_path]
153+
eclipse_case=case,
154+
export_msw_for_wells=[well_path],
155+
additional_dates=report.report_dates,
144156
)
145157
if schedule_text:
146158
print(f" Generated schedule text ({len(schedule_text)} characters)")

docs/rips/PythonExamples/wells_and_fractures/well_event_schedule.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ def main():
184184
event_date="2024-01-01",
185185
keyword_name="GRUPTREE",
186186
keyword_data={
187-
"CHILD": "OP",
188-
"PARENT": "FIELD",
187+
"CHILD_GROUP": "OP",
188+
"PARENT_GROUP": "FIELD",
189189
},
190190
)
191191
print(" Added GRUPTREE event on 2024-01-01 (group tree definition)")
@@ -251,8 +251,12 @@ def main():
251251

252252
# Generate schedule text. Pass the wells that should get multi-segment-well
253253
# keywords (WELSEGS, COMPSEGS, WSEGVALV, WSEGAICD); an empty list omits them.
254+
# additional_dates are emitted as bare DATES keywords even when no events
255+
# fall on them - in Eclipse/Flow a DATES entry ensures a summary report.
254256
schedule_text = timeline.generate_schedule_text(
255-
eclipse_case=case, export_msw_for_wells=[well_path]
257+
eclipse_case=case,
258+
export_msw_for_wells=[well_path],
259+
additional_dates=["2024-07-01"],
256260
)
257261

258262
# Generate the same schedule with align_columns=True, which adds a "--"-prefixed

docs/rips/generated/generated_classes.py

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,45 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
15821582
if View.__custom_init__ is not None:
15831583
View.__custom_init__(self, pb2_object=pb2_object, channel=channel)
15841584

1585+
def set_polygon_visible(self, polygon: Optional[Polygon]=None, visible: bool=True) -> None:
1586+
"""
1587+
Set polygon visibility in this view
1588+
1589+
Arguments:
1590+
polygon (Optional[Polygon]):
1591+
visible (bool):
1592+
Returns:
1593+
1594+
"""
1595+
self._call_pdm_method_void("set_polygon_visible", polygon=polygon, visible=visible)
1596+
1597+
1598+
def set_surface_property(self, surface: Optional[SurfaceInterface]=None, property_name: str="") -> None:
1599+
"""
1600+
Set the surface property shown in this view
1601+
1602+
Arguments:
1603+
surface (Optional[SurfaceInterface]):
1604+
property_name (str):
1605+
Returns:
1606+
1607+
"""
1608+
self._call_pdm_method_void("set_surface_property", surface=surface, property_name=property_name)
1609+
1610+
1611+
def set_surface_visible(self, surface: Optional[SurfaceInterface]=None, visible: bool=True) -> None:
1612+
"""
1613+
Set surface visibility in this view
1614+
1615+
Arguments:
1616+
surface (Optional[SurfaceInterface]):
1617+
visible (bool):
1618+
Returns:
1619+
1620+
"""
1621+
self._call_pdm_method_void("set_surface_visible", surface=surface, visible=visible)
1622+
1623+
15851624
class GeoMechView(View):
15861625
"""
15871626
The Geomechanical 3d View
@@ -4079,7 +4118,7 @@ def events(self) -> List[WellEvent]:
40794118
return self.children("Events", WellEvent)
40804119

40814120

4082-
def generate_schedule(self, eclipse_case: Optional[Reservoir]=None, export_msw_for_wells: List[WellPath]=[], first_date_as_comment: bool=True, align_columns: bool=False) -> DataContainerString:
4121+
def generate_schedule(self, eclipse_case: Optional[Reservoir]=None, export_msw_for_wells: List[WellPath]=[], first_date_as_comment: bool=True, align_columns: bool=False, additional_dates: List[str]=[]) -> DataContainerString:
40834122
"""
40844123
Generate Eclipse schedule text for all wells in the collection
40854124
@@ -4088,10 +4127,11 @@ def generate_schedule(self, eclipse_case: Optional[Reservoir]=None, export_msw_f
40884127
export_msw_for_wells (List[WellPath]): Wells for which multi-segment-well keywords (WELSEGS, COMPSEGS, WSEGVALV, WSEGAICD) are exported
40894128
first_date_as_comment (bool): Emit the first (simulation-start) date as a comment instead of a DATES keyword
40904129
align_columns (bool): Emit a column-header comment and right-aligned, fixed-width columns instead of the compact form
4130+
additional_dates (List[str]): Additional dates (YYYY-MM-DD or full ISO timestamp) emitted as DATES keywords, e.g. to force summary reports at those dates
40914131
Returns:
40924132
DataContainerString
40934133
"""
4094-
return self._call_pdm_method_return_value("GenerateSchedule", DataContainerString, eclipse_case=eclipse_case, export_msw_for_wells=export_msw_for_wells, first_date_as_comment=first_date_as_comment, align_columns=align_columns)
4134+
return self._call_pdm_method_return_value("GenerateSchedule", DataContainerString, eclipse_case=eclipse_case, export_msw_for_wells=export_msw_for_wells, first_date_as_comment=first_date_as_comment, align_columns=align_columns, additional_dates=additional_dates)
40954135

40964136

40974137
def set_timestamp(self, timestamp: str="2024-01-01") -> None:

0 commit comments

Comments
 (0)