-
Notifications
You must be signed in to change notification settings - Fork 101
13425 well events schedule #13538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
13425 well events schedule #13538
Conversation
c2cccd4 to
c93d8a5
Compare
Implement timeline-based event system for managing temporal changes in well completions, perforations, valves, and production controls. Features: - Event timeline container with date-based querying - Six event types: PERF, VALVE, TUBING, WSTATE, WTYPE, WCONTROL - Schedule keyword generation (DATES, COMPDAT, WELSEGS, WCONPROD, WCONINJE) - Multi-well schedule generation support - Python GRPC API for event management - YAML configuration file support - Comprehensive test suite Implementation: - New directory: ApplicationLibCode/ProjectDataModel/WellEvents/ - Event classes inherit from RimWellEvent base class - RimWellEventTimeline integrated into RimWellPath - RicScheduleDataGenerator for multi-well schedule export - Python API: event_timeline(), add_perf_event(), add_valve_event(), etc. - Tests verify all event types and YAML config parsing #13425 Add date tracking to valves and diameter/roughness intervals Add creation date fields to RimWellPathValve and RimDiameterRoughnessInterval to support filtering objects by date during completion data export. - Add m_useCustomStartDate and m_startDate fields - Add enableCustomStartDate(), setCustomStartDate(), isActiveOnDate() methods - Set creation dates when applying valve and tubing events in RimWellEventTimeline #13425 Add date-based filtering for schedule data export Add optional export date parameter to MSW data collection functions to filter valves and perforations based on their creation dates during schedule export. - Add exportDate parameter to collectWsegvalvData, collectWsegAicdData, collectWsegSicdData, and collectCompsegData functions - Filter valves by checking isActiveOnDate() on the associated RimWellPathValve - Add RimPerforationInterval reference to RicMswPerforation for date filtering - Pass export date from RicScheduleDataGenerator through the extraction chain This ensures segment numbers reflect the full model while only including objects active on the export date in output keywords. Add test to prove compsegs changes over time. #13425 Fix mypy type checking errors in well_events.py - Add type annotations to all function parameters - Fix generic type hints (dict -> Dict[str, Any]) - Import Any type for proper type safety - Add type: ignore for method reassignment - All 31 tests pass #13425 Add schedule-level keyword events for non-well-specific keywords Add a new event type called "Keyword Event" for schedule-level Eclipse keywords (RPTRST, GRUPTREE, RPTSCHED, etc.) that are NOT tied to a specific well path. This complements the existing RimWellEventKeyword which operates at the well level. - Add RimKeywordEvent class inheriting from RimWellEvent with null wellPath - Add SCHEDULE_KEYWORD enum value to EventType - Add addKeywordEvent() method to RimWellEventTimeline - Add AddKeywordEvent Python API method to RimcWellEventTimeline - Update RicScheduleDataGenerator to output global keywords after well sections - Add Python wrapper add_keyword_event() with type inference - Add tests and examples for RPTRST, GRUPTREE keywords
…vent dates Tubing event diameter/roughness values were leaking into earlier date sections in the generated schedule. The WELSEGS collection functions did not filter intervals by export date, unlike COMPSEGS and other keywords which already received the exportDate parameter. Thread exportDate through collectWelsegsData, collectWelsegsDataRecursively, and collectWelsegsSegment. Add date-aware overloads of getDiameterAtMD and getRoughnessAtMD that use isActiveOnDate to filter intervals. Update test to verify tubing values only appear at their scheduled dates.
ICD valves now produce WSEGVALV and AICD valves now produce WSEGAICD in the generated schedule. Three root causes were fixed: - Create per-event valve templates with proper parameters instead of reusing default templates that lack orifice diameter and AICD fields - Use perforation interval range for ICD/AICD valve positioning so valveLocations() returns non-empty results for the accumulator - Add 5 AICD parameter fields to the Python API and event classes
c93d8a5 to
1704dc3
Compare
magnesj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good structure and easy to read code.
Consider using a factory pattern to create Opm::DeckItem from RimKeywordEvent objects. This will make sure that all objects deriving from RimWellEvents are not depending on opm-common.
| //-------------------------------------------------------------------------------------------------- | ||
| /// | ||
| //-------------------------------------------------------------------------------------------------- | ||
| Opm::DeckKeyword RimKeywordEvent::toDeckKeyword() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving opm-common dependent code into a separate file.
| //-------------------------------------------------------------------------------------------------- | ||
| /// | ||
| //-------------------------------------------------------------------------------------------------- | ||
| QString RimWellEventControl::generateScheduleKeyword( const QString& wellName ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move opm-common related code to a separate file
| //-------------------------------------------------------------------------------------------------- | ||
| /// | ||
| //-------------------------------------------------------------------------------------------------- | ||
| RimWellEventTimeline::RimWellEventTimeline() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is independent to opm-common, which is good design.
| void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; | ||
|
|
||
| private: | ||
| Opm::DeckKeyword toDeckKeyword() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid dependency on opm-common here.
| m_wellMeasurements = new RimWellMeasurementCollection; | ||
|
|
||
| CAF_PDM_InitScriptableFieldNoDefault( &m_eventTimeline, "EventTimeline", "Event Timeline" ); | ||
| m_eventTimeline = new RimWellEventTimeline; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should RimWellEventTimeline be serialized?
| #include "RimStimPlanModel.h" | ||
| #include "RimThermalFractureTemplate.h" | ||
| #include "RimTools.h" | ||
| #include "RimWellEventTimeline.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this include required?
| #include "RiaApplication.h" | ||
| #include "RiaKeyValueStoreUtil.h" | ||
|
|
||
| #include "RimWellEventTimeline.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this include required?
No description provided.