Commit Graph
72 Commits
Author SHA1 Message Date
jonjenssen edc6bdc841 Fixes by clang-format 2026-10-19 10:15:53 +00:00
Jon Jenssen d9d7507bcd Preferences framework
Add preferences for HPC/Batch scheduler
Add slurm and LSF support
Add batch job monitor
Support launcher specific user settings
Use internal timer, not global view timer
Add some more options to batch monitor
Improve naming
Add tests for job lists
2026-10-19 12:09:52 +02:00
Magne Sjaastad 95bee61f91 Replace tree item tags attribute with virtual PdmUiObjectHandle::treeItemTags() 2026-10-17 13:23:22 +02:00
Magne Sjaastad 064ac45da0 ResInsight: Migrate project data model to attribute map 2026-10-17 13:23:22 +02:00
Magne Sjaastad 2f7de9469f #13568 MSW export: Optionally export ISEG in COMPSEGS
Fixes #13568.
2026-10-12 19:12:08 +02:00
JJ e0c1f23e6e Support for ensemble jobs (#14773)
Initial support for running well planning opm flow jobs for ensembles
2026-09-17 14:03:54 +02:00
Kristian Bendiksen 2462170647 #14683 Share OPM parser for keyword lookups 2026-09-07 18:58:05 +02:00
Kristian Bendiksen 30254df9e9 #14683 Avoid building an Opm::Parser per keyword in schedule generation
Constructing an Opm::Parser populates the complete keyword database (2774
keywords, measured at 2.4 ms per construction) and this was done once per
keyword event in RifEventKeywordFormatter::buildKeyword, and twice more per
keyword in the column-aligned serialisation in RimKeywordFactory. Schedule
generation was therefore completely dominated by parser construction and grew
directly with the number of events on the timeline. Use a single shared parser
instance instead, since the parser is stateless once constructed.

Also compute the events for a date once in generateDateSection and pass them to
the per-well helpers, instead of calling RimWellEventTimeline::getEventsAtDate
four times per well and date, which scaled as dates x wells x events.

Generating a schedule for a production data set with 1737 events over 490 dates
goes from 4.2 s to 0.1 s, and 21000 events over 14 wells now complete in 0.5 s.
2026-09-07 18:58:05 +02:00
Kristian Bendiksen c08323c65e #14630 Orion Events: Merge aligned keyword records 2026-09-01 11:56:59 +02:00
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
jonjenssen 6b7f87e260 Make sure to add, not merge, WELSEGS and COMPSEGS keywords 2026-07-10 16:30:18 +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
Magne Sjaastad 071d6cc19e #14050 CMake: Remove dead variable definitions and references
* CMake: Remove dead CODE_HEADER_FILES variable
* CMake: Remove dead COMMAND_CODE_HEADER_FILES and COMMAND_MOC_SOURCE_FILES
* CMake: Remove dead MOC_SOURCE_FILES and FORM_FILES_CPP references
* CMake: Remove dead HEADER_FILES reference
* CMake: Delete unused CustomPCH.cmake superseded by target_precompile_headers
2026-05-26 13:10:20 +02:00
Magne Sjaastad 4feca2b920 RimJobCollection: Forward-declare RimGenericJob in header
Move the RimGenericJob include from the header to the .cpp now that
PdmObjectCollection<T> permits forward-declared template parameters.
2026-05-11 13:42:13 +02:00
Kristian Bendiksen ddd413cb0b Refactor: migrate five collections to caf::PdmObjectCollection<T>
RimEnsembleFileSetCollection, RimJobCollection, RimQuickAccessCollection,
RimRefinementRegionCollection and RimFractureTemplateCollection now inherit
from the templated caf::PdmObjectCollection<T> base, reusing the shared
add/insert/delete/items plumbing introduced for RimValveTemplateCollection.

XML field keywords are preserved on every collection so existing project
files continue to load.
2026-05-11 13:42:13 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +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
JJ f1923333af Job improvements (#13895)
* Add job wait/queued state
* Add support for limiting number of jobs running
* Add job queue for jobs waiting to run
2026-04-17 19:55:50 +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 1f42f70d26 OpmFlowDeck: avoid swallowing error messages when loading deck. 2026-03-16 12:53:49 +01:00
Magne Sjaastad 9f30c981bc Remove unused cafPdmUiPushButtonEditor.h includes
Follow-up cleanup after switching from bool PdmField push buttons to cafPdmUiButton.
2026-03-04 09:52:17 +01:00
Kristian Bendiksen 561006c60c Refactor: Use export date instead of time step for MSW export. 2026-02-12 08:15:22 +01: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
Magne Sjaastad de3758cf60 Set PdmUiButton default alignment to right
Removed manual setAlignment(Qt::AlignRight) calls for UI buttons,
as PdmUiButton now defaults to right alignment. Also removed
unused cafPdmUiButton.h includes from several files.
2026-01-27 13:37:26 +01:00
JJ 3e06a61ed5 Popup window placement improvements (#13464)
* Improve parent settings for message boxes and progress info
2026-01-21 19:11:41 +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 13f7ee039a Clean up default name handling in Opm Flow jobs (#13291)
* Clean up default name handling
2025-12-07 03:43:48 +01:00
Kristian Bendiksen 51162df799 BCPROP: change fixed X/Y/Z data type to int for better UI. 2025-12-05 13:06:29 +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 6cb4907180 Add more parameters to bcprop keyword 2025-12-01 18:27:30 +01:00
JJ 6689000d85 New Sector Model Export user interface (#13247)
* Add sector model export wizard
* GUI cleanup
* Use job name as deck name for simulation runs
* Remove new things from old export GUI
* Use radio-buttons for enum dropdowns
2025-11-28 16:43:51 +01:00
JJ 569d4dfc93 Fix build for Qt6.10.1 and add Windows build for Qt 6.10 2025-11-28 12:36:56 +01:00
jonjenssen 839e85a166 Adjust default values 2025-11-18 02:23:58 +01:00
jonjenssen d559baca97 Try to use a parameter file if we have many command line options for opm flow. 2025-11-18 02:23:58 +01:00
jonjenssen 81c0d688c5 Add tolerance command line options for opm flow 2025-11-17 08:31:02 +01:00
jonjenssen df8fbfe458 Adjust wsegdims values based on MSW data 2025-11-14 23:19:41 +01:00
JJ 7c8aadcd60 Update OPM Flow Job Preferences (#13172)
* Add job settings, with default settings in preferences.
* Move opm flow settings to separate preferences tab
* Add warning/error detection add display count next to progress
* Adjust size of preference window
2025-11-14 12:56:23 +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
magnesj 64f2cd6c14 Fixes by clang-tidy 2025-10-31 08:15:21 +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