Commit Graph
46 Commits
Author SHA1 Message Date
Kristian Bendiksen c56e921160 #14958 Sim Events: Move PRESSURE_COMPONENTS to WELSPECS
Move Pressure Drop and Length and Depth from the segment collection to
the well path completion settings. PRESSURE_COMPONENTS is now a dated
WELSPECS attribute used for the WELSEGS header at export, and is
rejected on SEGMENT events.
2026-10-19 09:28:29 +02:00
Magne Sjaastad 064ac45da0 ResInsight: Migrate project data model to attribute map 2026-10-17 13:23:22 +02:00
Magne Sjaastad bc62af3bb5 #14878: Fix stale well picks, import errors and overlapping zones 2026-10-08 12:44:14 +02:00
Magne Sjaastad 029759f548 #14878: Guard against deleted formations collection and missing geometry 2026-10-08 12:44:14 +02:00
Magne Sjaastad a6a88eeb21 #14878: Migrate well path formations to project-level collection, add manual import command
RimWellPath and RimWellPathCollection now reference a RimWellFormationsFile in the
project-level well formations collection instead of owning per-well-path formations
geometry directly. Reworked the well-pick import command (renamed
RifWellPathFormationsImporter to RicImportWellFormationsFeature) to create/find the
project-level file and link it to the matching (or newly created) well path.
2026-10-08 12:44:14 +02:00
Magne Sjaastad 91e2e4d575 Make RigWellPathFormations a value type
The object is immutable after construction and small, so reference
counting via cvf::Object adds nothing. Store it by value and use
std::optional where it may be absent.
2026-10-07 13:37:23 +02:00
Kristian Bendiksen 63bcc22485 #14667 Completions: Move MSW settings to segments 2026-09-16 11:35:13 +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
Kristian Bendiksen 2d88be506d #13908 Python: Add API to read well log information
Expose well logs attached to a well path through the Python API. A new
`well_path.well_logs()` returns the list of well logs, and each
`WellLog` gains `channel_names()` and `well_log_data()` for reading
channel names, measured depth, optional TVD MSL/RKB, and channel
values.

The read methods are registered on the abstract `RimWellLog` base
class and use the common `RigWellLogData` interface so they work for
imported, LAS and OSDU well logs alike.
2026-04-23 19:50:05 +02:00
Magne Sjaastad 211ae24241 Auto-update MSW segments on UI changes (opt-in)
Adds an 'Auto Update Segments' toggle (default: on) to the MSW Segment
Visualization group in WellPathCollection. When enabled, MSW segments
are automatically recomputed and redrawn whenever the user modifies:
- Well path geometry or targets
- Perforation intervals
- Fishbone laterals
- Fractures
- Well path fields

The update is triggered via a new updateMswSegmentsForObject()
method, which resolves the top-level well from the changed object, clears
existing segments for all lateral wells in that group, recomputes segments
using updateSegments(), and schedules a full redraw.

When auto-update is disabled, an 'Update Segments' button is shown
instead, allowing manual control.
2026-03-17 20:15:07 +01:00
Kristian Bendiksen 334ccc3a66 #13682 Fix Unity build: add missing Color3f scripting include to RimWellPath
RimWellPath.cpp has a scriptable cvf::Color3f field but was missing the
Color3f IOHandler specialization header. In Unity builds, this caused
the primary template to be instantiated, conflicting with the
specialization in cafPdmScripting.lib.
2026-03-12 08:30:52 +01:00
Kristian Bendiksen 576c2179da #13682 Python: Add API for well path color
Make m_wellPathColor scriptable so it is accessible via the Python API
as well_path_color (hex string). Add a test and update the
import_well_paths_and_logs example to demonstrate setting colors.
2026-03-12 08:30:52 +01:00
JJ 24be78f105 Tie-in valve improvements (#13661)
Support (bool, something) pairs as tuples on python side.
Support custom outlet valve md
Add python test for custom outlet valve md
Use tie-in depth as default for custom valve md
Standalone valve creation and display updates
Update MSW valve export
Add valve open/shut flag.
Add python examples
2026-03-06 12:01:14 +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
Kristian Bendiksen 160cb71168 Python: Update well log import API to accept measured depth and multiple channels
- Updated Python API to accept measured_depth list and channel_data dictionary
- Modified C++ GRPC implementation to handle CSV-formatted channel mappings
- Replaced single values parameter with dictionary of channels
- Added comprehensive validation for all input parameters
- Updated parameter name from channel_keys_json to channel_keys_csv
- Enhanced tests to cover 16 different scenarios including edge cases
- Updated example to demonstrate new dictionary-based API functionality
2025-09-04 09:04:56 +02:00
Magne Sjaastad 377d300767 #12719 Allow import of same well multiple times
Also exposes the well path collection object through the project object, and updates examples.
2025-08-08 08:56:15 +02:00
jonjenssen da683bed9e Move Rig well related things to subfolder and update include statements 2024-10-31 15:08:59 +01:00
Kristian Bendiksen 4aadf6e801 Correct or remove ssihub references. 2024-07-29 12:24:58 +02:00
Kristian Bendiksen 80f269715b Refactor: register keyword aliases for WellLogFile. 2024-06-17 22:22:35 +02:00
Kristian Bendiksen 7125670d8c Review fixes. 2024-06-14 17:31:22 +02:00
Kristian Bendiksen 10ad053c30 Osdu Well Log: make it possible to add Osdu well logs to plot. 2024-06-14 17:31:22 +02:00
Kristian Bendiksen 0477371e0d Refactor: use new base class WellLog where possible. 2024-06-14 17:31:22 +02:00
Kristian Bendiksen c1aba471f2 Refactor: rename WellLogFileChannel to WellLogChannel. 2024-05-28 10:44:44 +02:00
Magne Sjaastad ce513be638 Remove all use of .uiCapability()->setUiTreeHidden( true ); 2024-02-05 10:15:36 +01:00
Kristian Bendiksen a8c719b289 #10663 WBS Plot: Import well log from CSV file.
Also compute SH_MK_MIN/EXP/MAX and FG_MK_MIN/EXP results.
2024-01-29 15:05:08 +01:00
Magne Sjaastad b1d1c397d4 Make RimWellPathCompletionSettings scriptable
Support scripting of wellNameForExport, GroupNameForExport, MswLinerDiameter, MswRoutghness, Preferred Fluid Phase scriptable
2023-11-06 09:43:24 +01:00
Kristian Bendiksen db77ea5762 Perforation Interval: make properties scriptable from Python. 2023-10-09 08:35:42 +02:00
Kristian Bendiksen 8df4dd42eb Refactor: rename RimWellLogFile to RimWellLogLasFile 2023-10-02 16:04:53 +02:00
Magne Sjaastad f18eb29552 Add optional measured depth labels to well path 2023-09-13 08:29:15 +02:00
Kristian Bendiksen 5bf2c2a89d #10367 Janitor: Remove unneccessary 'this' pointers 2023-08-07 13:38:27 +02:00
Magne Sjaastad 59ca0b943c Add readability-simplify-boolean-expr
* Add readability-simplify-boolean-expr
* Fixes based on review
2023-06-26 13:12:41 +02:00
Jørgen Herje b83fe73395 Displacement curves fault faces (#10243) 2023-05-22 11:37:57 +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 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 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 70bb221162 Janitor issues
* Remove obsolete code
* Fix path modification of a relative folder
Replace start token '.' with file path to the project file to make sure that the path './wells/a-1h.dev' can be imported correctly.
* Add more logging when keywords are missing from import
2023-02-15 07:56:17 +01:00
Magne Sjaastad 4cd38d7daf Simplify access to RimMainPlotCollection
* Add current() to RimMainPlotCollection to avoid include of RimProject
* Remove "segment" prefix
* Reload data when RftCase changes
2022-08-19 14:30:25 +02:00
Magne Sjaastad c74701b687 Rename several child() and children() functions 2022-05-31 15:05:07 +02:00
Magne Sjaastad f0ce04597d Merge pull request #8985 from OPM/8926-remove-useoptionsonly
AppFwk : Remove obsolete useOptionsOnly
2022-05-29 13:01:27 +02:00
Magne Sjaastad 4a1a2fe2be #8634 Improve performance when deleting multiple wells
Disable general framework delete function, and use special well path delete function
2022-05-26 20:43:25 +02:00
jonjenssen a3ad9d2c1e Merge pull request #8524 from OPM/tree_filter
Add Project Tree filter support
2022-02-04 15:49:22 +01:00
Magne Sjaastad 2a65636ba3 #8250 Use variadic macros and remove obsolete parameters 2021-11-14 15:26:09 +01:00
Jon Jenssen be59eedd18 Update Well IA and Fault RA processing workflows to work with updated tree UI hidden/visible logic changes. 2021-10-25 18:25:41 +02:00
jonjenssen a5b80c649b Merge pull request #7960 from OPM/geomech_WIA4
GeoMech: Well Integrity Analysis
2021-09-09 17:34:27 +02:00
Magne Sjaastad 8dbb1d5ccd Improve well path modeling
* Improve handling of MD at first target
* When sea level well target is disabled, update MD of first target
* Show well target spheres by default, allow toggling of spheres
* Activate well target modifiers when clicking on well targets
* Remove selection update causing an unstable 3D view
* Improve display and handling of multiple locations
* Add special 3D target for tie in well target
* Add slider to tie in MD input field
* Show MD in well path target table
* Delete all well path laterals when deleting a well path

* Python : Add lateral to parent well
* Python : Add perforation interval
2021-08-13 16:48:33 +02:00
jonjenssen ca0433ca3a Move well related pdm files into subfolders to clean up a bit 2021-07-15 13:47:16 +02:00