Commit Graph
57 Commits
Author SHA1 Message Date
Magne Sjaastad c323846ec5 #13475: Unified LGR completion export tables and single WELSPECL entry per well
* Export LGR completions in single COMPDATL, WPIMULTL and COMPLMPL tables
* Export only first WELSPECL entry per well
* Move LGR test well path to subfolder and format test
2026-10-15 15:25:49 +02:00
Kristian Bendiksen f3d9d04281 #14870 Schedule export: export multilateral wells once per well name
Wells sharing an export name now produce one WELSPECS/COMPORD record,
one set of MSW keywords, and no duplicate COMPDAT/COMPLUMP connections.
Events on any well in the group trigger the group's keywords.

Connections in cells shared by several well paths of a group are combined
into one record. MSW keywords are exported for the well tree of the first
group member selected for MSW export.

Fixes #14870
2026-10-12 18:47:03 +02:00
Magne Sjaastad 56e98ba1c4 #14476 ApplicationLibCode: Replace CVF_ASSERT with CAF_ASSERT
Migrate all assert macros in ApplicationLibCode to CAF_ASSERT and remove every
use of cvfAssert.h.

CVF_ASSERT is replaced one to one. CVF_TIGHT_ASSERT is also replaced by
CAF_ASSERT, which is semantically exact: CVF_ENABLE_TIGHT_ASSERTS is 1 only
under _DEBUG, and that is what CAF_ASSERT now does. The two CVF_FAIL_MSG sites
become CAF_ASSERT( false && "message" ), preserving the message with the idiom
already used elsewhere in the code base.

Counts before and after: CVF_ASSERT 1044 to 0, CVF_TIGHT_ASSERT 66 to 0,
CVF_FAIL_MSG 2 to 0, cvfAssert.h references 154 to 0.

Include handling: files that included cvfAssert.h directly now include
cafAssert.h instead, includes left dead by the migration are removed, and files
that were relying on cvfAssert.h transitively get an explicit cafAssert.h. Files
that reach cafAssert.h through another caf header are left unchanged; a missing
include here is a compile error, not a silently disabled assert.

ResultStatisticsCache links only LibCore and therefore had no path to
cafAssert.h. Add the cafPdmCore directory as a private include path rather than
linking the library, since cafAssert.h is header only.

Note that this stops these asserts from firing in Release and RelWithDebInfo,
where CVF_ASSERT was previously active.
2026-08-07 15:05:57 +02:00
Magne Sjaastad 2ac1948abe #14245 Remove gsl functions and ThirdParty/gsl folder 2026-06-24 18:47:04 +02:00
Magne Sjaastad 91fed8e48c #14020 Use perforation interval cell filter to limit COMPDAT and MSW export
* Completions: Apply perforation cell filter to COMPDAT and MSW export
* PerforationInterval: Limit Cell Filter dropdown to case-level filters
* PerforationInterval: Prefix Cell Filter entries with case name when multiple cases
* Completions: Use std::format for cell filter suppression log messages
2026-05-20 16:04:40 +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 bb0afbf962 #13126 RiaLogging: Extract errorInMessageBox to RiuMessageDialog
Move the QMessageBox-displaying helper out of the logging utility into a
dedicated UI class. RiaLogging.h no longer pulls QMessageBox/QWidget into
the ~270 files that include it. Behavior is preserved: showError displays
the dialog when running interactively (and not under regression tests),
then forwards the text to RiaLogging::error.
2026-05-08 10:11:09 +02:00
Magne Sjaastad c82ba05c1b #13876 WellPathGeometry: Return default values instead of assert and crash 2026-04-16 16:43:36 +02:00
Kristian Bendiksen a0dbbf6cb1 Remove deprecated size_t overloads from RigActiveCellInfo
Migrate all callers to use type-safe ReservoirCellIndex and
ActiveCellIndex wrappers, then remove the deprecated isActive(size_t),
cellResultIndex(size_t), and setCellResultIndex(size_t, size_t) methods.
2026-03-31 12:32:05 +02:00
Magne Sjaastad 05623a3fc6 Refactor: Extract RicTransmissibilityCalculator from completion export
Move transmissibility calculation logic (TransmissibilityData,
connection factor computation, non-Darcy flow calculations) from
RicWellPathExportCompletionDataFeatureImpl into a dedicated
RicTransmissibilityCalculator class. Add unit tests for the
extracted calculator.
2026-02-20 09:27:20 +01:00
Magne Sjaastad d52f595c41 Refactor: Rename RiaStatisticsTools to RigStatisticsTools
Replaced all references to RiaStatisticsTools with RigStatisticsTools across the codebase, including header includes, static method calls, and test files. Updated CMake configuration to remove RiaStatisticsTools and add RigStatisticsTools. Renamed and updated related unit tests. No changes to logic or algorithms; this is a namespace and organizational refactor for consistency. Also added ApplicationLibCode include directories as PRIVATE to relevant targets.
2026-02-18 09:22:39 +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
Magne Sjaastad 4f53c2692e #13295 Always use grid local IJ for WELSPECS/WELSPECL 2025-12-08 15:22:00 +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
Magne Sjaastad a23599cb5d Completion export cleanup
Use MSW as postfix to base name
Drop "Unified" for individual well export
Remove export option Individually/Combined
Remove SPLIT_ON_WELL_AND_COMPLETION_TYPE
2025-12-02 16:03:56 +01:00
Magne Sjaastad 0b74a4accc Removes addOneBasedCellIndex function 2025-11-17 19:45:14 +01: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
JJ d56722782a Well Completion tables - Python interface (#12910) 2025-09-25 12:23:40 +02:00
Magne Sjaastad 91e628da24 #12670 Skip completions with negative or invalid transmissibility 2025-08-05 15:26:46 +02:00
Magne Sjaastad 04dd18389d #12670 Skip completions with negative transmissibility 2025-07-25 15:01:28 +02:00
Magne Sjaastad 6b332269b4 Add scripting to fishbones (#12286)
* Improve python code generation tests
* Add setValveLocations
* Move code into RimFishbonesDefines
* Add scripting to fishbones
* Add scripting methods for fishbones
* Add example and test
2025-03-25 08:31:08 +01:00
Magne Sjaastad 28d3050433 #11871 Remove simulation well fractures and completion export 2025-02-03 18:19:03 +01:00
jonjenssen da683bed9e Move Rig well related things to subfolder and update include statements 2024-10-31 15:08:59 +01:00
Magne Sjaastad d0b5c8d9cb #11134 Export completions: Call ensureReservoirCaseIsOpen before export
This change will enable export without any open views.
2024-01-30 14:34:33 +01:00
Magne Sjaastad 68a4d54af2 #10754: Exclude COMPDAT for de-activated laterals 2023-11-13 09:17:30 +01:00
Kristian Bendiksen 8e5788bb24 Reveal: dump StimPlan XML for debugging thermal completions. 2023-09-25 09:33:37 +02:00
Magne Sjaastad 0c90f67dcc Change API for PdmObjectHandle and PdmFieldHandle
* Refactor interface to PdmObjectHandle and PdmFieldHandle
Return objects instead of passing in structures as parameters

* Add nodiscard to several functions
* Remove redundant this->
* Rename to ptrReferencedObjectsByType
2023-05-12 21:41:34 +02:00
Magne Sjaastad 5ee764af48 Refactor result definition 2023-05-11 08:37:58 +02:00
Magne Sjaastad 6f6dc80bc6 Added more clang-tidy checks
Improved GitHub Action to run clang-format as part of clang-tidy

* Simplify clang-tidy workflow
* Added modernize-use-using, modernize-redundant-void-arg, readability-static-accessed-through-instance
* Add nolint for libecl typedefs
2023-04-14 14:07:45 +02:00
Magne Sjaastad 952e766c2f Update clang-format.yml (#10068)
* Update to clang-format-15
Removed two custom .clang-format files in subfolders of AppFwk

* Fixes by clang-format
2023-04-13 07:05:53 +02:00
Magne Sjaastad 39d011b1e6 #9742 Set default value 1* for KH 2023-03-02 14:16:36 +01:00
Magne Sjaastad f8c5cf389f clang-format: Set column width to 140
* Set column width to 140
* Use c++20
* Remove redundant virtual
2023-02-26 10:48:40 +01:00
Magne Sjaastad d91e8ccb56 Avoid throwing exception when opening a file for export 2023-02-13 15:03:42 +01:00
Magne Sjaastad 6ad42817c6 Always use export folder if defined
Rename to m_customFileNameIncludingPath, and split into folder and file name for export object
2023-02-13 15:03:42 +01:00
Magne Sjaastad 93614ef272 Merge pull request #8791 from OPM/8790-rename-to-group
Rename summary references to "Group"
2022-04-07 21:06:40 +02:00
Magne Sjaastad 54a4f35588 #8142 Preferences : Move system settings into separate file 2021-10-13 12:52:02 +02:00
Magne Sjaastad 0f87c9760d #7862 Export Completion: Add ResInsight project file to file header 2021-09-29 09:42:04 +02:00
Magne Sjaastad 0e0bd751f6 #7973 Export Completions : Further improvements
Fix typo
Make sure compdat export works for custom file name
2021-09-09 15:16:34 +02:00
Magne Sjaastad acdcbe44b4 Merge pull request #7975 from OPM/7973-custom-export-filename
Export Completions : Custom export file name fails in some cases
2021-09-09 10:16:37 +02:00
Magne Sjaastad b9362386bc #7450 Well Completion: Allocation of User defined D-factor to perforation connection factors
If the user defined a D-factor for the perforation interval, distribute the D-factor based on

D_cell = D_well * Sum_Tran_cells / Tran_cell
2021-06-07 09:28:57 +02:00
Magne Sjaastad 33ac79d856 #7727 Performance : Reduce amount of work
Use objectsWithReferringPtrFields to find tieIn wells
Avoid using descendantsOfType
2021-05-27 12:52:57 +02:00
Magne Sjaastad afb293db52 #7727 Well Path : Simplify access to all well paths 2021-05-27 12:52:57 +02:00
Magne Sjaastad 78e4e1cd5c Janitor : Use enum class 2021-05-18 16:22:05 +02:00
Magne Sjaastad b518acada6 Janitor : Use enum class 2021-05-18 16:22:05 +02:00
Magne Sjaastad 827cf75207 #7049 MLW: Improve calculations of diameter, skin factor and direction
Diameter and skin factor : Compute weighted average based on transmissibility
Use the direction of the completion with the highest transmissibility
2021-05-18 16:22:05 +02:00
Magne Sjaastad 226876dc0a #7049 MLW: Aggregate of completion data for all laterals
Simplify the progress bar
2021-05-18 16:22:05 +02:00
Magne Sjaastad d002ee1d6e #6878 Export Completion: Allow suffix in custom file name 2021-05-03 14:15:43 +02:00
Magne Sjaastad 3fa4986f37 #6878 Export Completion: Add custom file name 2021-05-03 14:15:43 +02:00
Magne Sjaastad 1cf1eef048 #7632 Preferences : Add separate tab Eclipse Summary
Remove obsolete includes
2021-04-28 14:10:23 +02:00