Commit Graph
25 Commits
Author SHA1 Message Date
Kristian Bendiksen db1c1f1f13 #14554 Orion Events: Add WELLSPEC event 2026-08-20 11:02:55 +02:00
Kristian Bendiksen a362f868c3 Orion Events: Generate COMPORD for new wells 2026-08-20 11:02:55 +02:00
Kristian Bendiksen 8bfbe00056 #14136 Event Timeline: Use shorter column headers in exported schedule file
Shorten long OPM parser item names (e.g. CONNECTION_TRANSMISSIBILITY_FACTOR) in the aligned keyword output by truncating underscore-separated tokens until the header fits the data width, so headers no longer pad data rows past the 132-character line limit enforced by some simulators.
2026-08-12 15:35:06 +02:00
Kristian Bendiksen cbae501a13 #14111 Preserve time-of-day in exported DATES keyword
The Event Timeline stores event timestamps with full time-of-day precision, but the exported SCHEDULE deck only emitted DAY/MONTH/YEAR in the DATES keyword, dropping any sub-day precision the user had set.

Emit the optional TIME field (HH:MM:SS[.SSS]) in datesKeyword() whenever the timestamp is non-midnight, formatting with millisecond precision when present. Date-only events keep their previous DAY/MONTH/YEAR-only output. The first-date comment in the schedule generator mirrors the same time so it stays consistent with the keyword.
2026-06-05 16:21:01 +02:00
Kristian Bendiksen 19c547cc2e Well Event: Add opt-in column-aligned schedule output
Add an align_columns option to schedule generation. When enabled, each
keyword is serialized with a '--'-prefixed column-header comment and data
rows right-aligned into fixed-width columns, instead of the compact default
form. The default output is unchanged.

A new RimKeywordFactory::deckKeywordToAlignedString introspects the OPM deck
model and renders each item in its own column (consecutive defaults are not
collapsed into 'N*'). The flag is threaded through RicScheduleDataGenerator
and exposed on the GenerateSchedule scriptable method as align_columns in the
Python generate_schedule_text wrapper.
2026-06-01 15:45:03 +02:00
Kristian Bendiksen 0c949f2dc3 #13854 Sector export: Shift BCCON Z-face K indices when pad model is enabled
Pad-model extension assumed OPM-style "Z+" for the positive-Z exterior face,
but ResInsight emits "Z" (OPM-Flow short form). The K1/K2 shift never fired,
leaving the bottom boundary face at the original NZ instead of the new
padded NZ. Match both "Z" and "Z+" so the extension applies.

Adds a regression test verifying that with BCCON_BCPROP and padding the "Z"
exterior face is shifted by nzUpper + nzLower while the "Z-" face remains
at K=1, and documents the exterior-face semantics of the direction mapping.
2026-04-23 19:50:19 +02:00
Kristian Bendiksen 3067823e71 #12957 Sector Model Export: introduce RigRefinement interface hierarchy
Replace the monolithic RigNonUniformRefinement class with a proper
polymorphic hierarchy: RigRefinement (abstract base), RigNoRefinement
(identity), RigUniformRefinement (O(1) uniform), and
RigNonUniformRefinement (per-cell custom fractions).

Ownership uses std::unique_ptr<RigRefinement>, consumers receive
const RigRefinement&. This eliminates the misleading class name,
removes effectiveRefinement() indirection, and gives each refinement
mode an appropriately optimized implementation.
2026-03-30 11:24:56 +02:00
Kristian Bendiksen 4aa0910db3 #12957 Sector Model Export: add non-uniform refinement support to faults code path
Add RigNonUniformRefinement overloads for extractFaults and faultsKeyword,
following the existing dual-overload pattern. The Vec3st overloads now
delegate via fromUniform() to preserve backward compatibility. Update
addFaultsToDeckFile to call effectiveRefinement() instead of refinement().
2026-03-30 11:24:56 +02:00
Kristian Bendiksen a4dad97024 #13425 Add time-dependent well events and schedule data generation
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
2026-02-12 08:15:22 +01:00
JJ 94c3059fd8 Add support for SICD valves (#13496)
* Add SICD parameters
* Add wsegsicd valves to completion export
* Add python method to read template info from valve
* Update tests
2026-01-29 11:16:05 +01:00
Kristian Bendiksen 1c9c5a85ad #13333 Simulation Input: Add EDITNNC export functionality for sector models 2026-01-12 17:19:38 +01:00
Kristian Bendiksen 5c273c0130 Simulation Input: Flip direction of BCCON boundaries.
"X" becomes "X-" and so on.
2025-12-11 12:07:21 +01:00
JJ 9f17dd81ff Add support for COMPLUMP keyword (#13273)
* Add support for COMPLUMP keyword, both in python interface, file export and opm flow jobs
* Add support for WPIMULT kw in opm flow jobs
* Always provide per connection dFactors in COMPDAT kw (negative value)
* Include LGR support in COMPLUMP file export
2025-12-04 19:25:41 +01:00
jonjenssen df8fbfe458 Adjust wsegdims values based on MSW data 2025-11-14 23:19:41 +01:00
Kristian Bendiksen ba92dfb825 BCPROP: add correct number of times to properties table.
Also improved defaults.
2025-11-12 08:39:20 +01:00
Kristian Bendiksen b1646d9a1f #12950 Generate BCCON/BCPROP for simulation input. 2025-11-12 08:39:20 +01:00
jonjenssen a5d4e358ae Clean up keyword generators 2025-11-07 14:46:35 +01:00
JJ 6286a34297 Wellplanning: use updated MSW table data api (#13142)
* Update to use new table variable names aligned with opm common naming.
2025-11-07 10:05:53 +01:00
Kristian Bendiksen 2e363e4d73 Update OPERNUM correctly. 2025-11-03 09:56:19 +01:00
jonjenssen 503de1ed81 Make sure we check for valid case data before trying to create well completion data 2025-10-31 00:13:55 +01:00
JJ 948d6d82a6 Well planning: prepare for improved MSW handling (#13096)
* Refactor MSW data handling in opm flow job
2025-10-30 11:57:22 +01:00
Kristian Bendiksen 4e736a8cc0 Refactor: move opm-flow deck keyword generation to factory. 2025-10-24 19:33:35 +02:00
Kristian Bendiksen 04dfa4ecba Janitor: use static method. 2025-10-24 19:33:35 +02:00
Kristian Bendiksen 2a82ee4670 Simulation Input Export: handle faults. 2025-10-24 19:33:35 +02:00
JJ 991e693f4d WELSPECS and COMPDAT export improvements (#13068)
* Generate keywords directly.
* Make sure ensemble settings in duplicated job is reset.
* Use same sort as file export
2025-10-24 11:10:25 +02:00