Commit Graph
464 Commits
Author SHA1 Message Date
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
Magne Sjaastad d3cf618f0c Improve MSW variable names
Align MSW variable names with opm-common
2025-11-06 11:39:51 +01:00
JJ 3b24586c61 Speed up cell search tree building in case of large LGRs (#13134)
* Speed up cell search tree building for larger LGRs by pre-calculating information needed
2025-11-06 07:05:17 +01:00
Magne Sjaastad 7e7e7e0528 #13124 Show SWAT/SGAS instead of Saturation 2025-11-05 09:06:53 +01:00
Magne Sjaastad 186992ebb6 Improves relative permeability plot display
Enhances the relative permeability plot by:

- Adding support for SATNUM and IMBNUM result display in cell reference information.
- Disabling the imbibition curve selection by default and enabling it dynamically based on the IMBNUM value.
- Removing the `satnum` argument from `calculateRelPermCurves` as it's no longer needed.
2025-11-03 16:07:40 +01:00
Magne Sjaastad 597cfd4d30 Improves geometry tools robustness and accuracy
* Replace asserts with alternatives
* Refactors GeometryTools for improved robustness
2025-11-03 16:06:58 +01:00
Magne Sjaastad fd5bdc96d2 Enables experimental MSW export to new folder
Adds a feature keyword to enable an experimental MSW export
to a separate folder, facilitating testing of a new data
extraction approach.
2025-11-03 13:40:46 +01:00
Kristian Bendiksen 788e054734 Export sector model: Set opernum in regdims. 2025-11-03 09:56:19 +01:00
Kristian Bendiksen 1a09ac0560 OPERNUM: fix size of result vector. 2025-11-03 09:56:19 +01:00
magnesj 11fc64871a Fixes by cmake-format 2025-10-31 08:11:19 +01:00
Magne Sjaastad ab1f053449 Rename and move Rig files 2025-10-31 08:11:19 +01:00
Magne Sjaastad 8b9d6aa42c Adds support for MSW completion data
Introduces structures and classes to represent and manage data from MSW completion tables (WELSEGS, COMPSEGS, WSEGVALV, WSEGAICD).
2025-10-31 08:11:19 +01:00
Magne Sjaastad b521e979be Adds imbibition relative permeability curves
Adds support for imbibition relative permeability curves to the reservoir simulation.

The changes introduce a new enum `CurveSet` to distinguish between drainage and imbibition curves. The solver interface is updated to request both drainage and imbibition curves from the OPM solver. The curve names are updated to include an "I" prefix for imbibition curves.
2025-10-28 19:02:36 +01:00
jonjenssen e0893cfa6f Add extra checks for result indexes and update opm-common with dual poro fixes 2025-10-28 06:37:21 +01:00
Magne Sjaastad 91192a671c Use opm-flowdiagnostics-applications as submodule
* Deletes the copy of the code in ThirdPary folder
* Replace code with opm-flowdiagnostics-applications as submodule
* Refactors ECL data handling for flow diagnostics
Updates flow diagnostics to utilize ECL init data consistently.
This change streamlines the passing and usage of initialization
data within the flow diagnostics routines, enhancing code
clarity and maintainability. Removes redundant passing of grid
data, simplifying function signatures.
2025-10-27 14:09:57 +01:00
Kristian Bendiksen d137281066 Refactor CSV parser: modernize parser to use std::expected. 2025-10-17 07:52:42 +02:00
Magne Sjaastad a75c10252d Build cell aabb search tree when required
This is a follow-up to the fix where the assert was removed in 9a71abd8af.

This fix will make sure that the search tree always is created when findIntersectingCells() is called.
2025-10-16 14:08:38 +02:00
Jon Jenssen 9a71abd8af Crash fix, do not assert, return empty list 2025-10-14 13:43:25 +02:00
Kristian Bendiksen a81229bad8 Introduce type-safe cell index for active reservoir cell index. 2025-10-13 16:17:03 +02:00
Kristian Bendiksen fd56ae3e4d Generate OPERNUM for entire result vector. 2025-10-13 14:14:44 +02:00
Kristian Bendiksen dd689aec50 #12950 Sector Model: Add BCCON keyword. 2025-10-13 14:14:44 +02:00
Magne Sjaastad 77c3548f24 Fixes active index usage for radial LGR grids
Ensures that active cell indexing is always used for temporary local grid refinements (LGRs) of radial multi-grids.

The  TestCase_Completions_Export loads a grid with several LGRs. This test case failed due to the changes for radial grids.
2025-10-09 15:08:41 +02:00
Magne Sjaastad 62188fa9f2 Improve naming of cell related result names
Use radial/theta when required for GUI
Hide DX/DY from the list of available results
2025-10-08 16:03:56 +02:00
Magne Sjaastad b771421087 #12994 Radial model: Freeze when selecting cell result INDEX_IJK
When a LGR is created to be able to show the radial grid, the active index usage when computing INDEX_IJK was wrong.

wip
2025-10-08 16:03:56 +02:00
Kristian Bendiksen 5c48383d71 Refactor: Improve interface for characteristicCellSize() 2025-10-06 09:10:58 +02:00
Magne Sjaastad ec3e1b59cd Uses unique_ptr instead of cvf::ref 2025-10-03 08:37:24 +02:00
Magne Sjaastad a73999323a Move defines into separate file 2025-10-03 08:37:24 +02:00
Magne Sjaastad 6b7d93e2da Refactor import of radial grid
* Add radial display mode to preferences
* Adds isRadial to grid
* Improve mesh lines for radial cells
For temporary radial LGRs, show mesh outline based on the aggregated geometry of all LGRs of the parent cell clicked on.
* Improve warning message
* Modify cell selection in pick event handler
2025-09-29 11:46:28 +02:00
Kristian Bendiksen 4421536349 Refactor: add BORDNUM and OPERNUM to RiaResultNames. 2025-09-26 15:28:29 +02:00
Kristian Bendiksen fdbb07b8cd Sector Export: add OPERNUM result. 2025-09-26 15:28:29 +02:00
Magne Sjaastad b07e49258e Improve radial grid import
* Remove unused includes
* Use designated initializers struct members
* Add warning for active cell opm grid reader
* Moves radial grid import to file readers
* Adapts cell range filter labels for radial grids
2025-09-26 10:26:43 +02:00
JJ d56722782a Well Completion tables - Python interface (#12910) 2025-09-25 12:23:40 +02:00
Kristian Bendiksen 88799eb7cc Sector export: find best pillar top and bottom coordinate.
Choose the corner where top and bottom is furthest apart to
ensure better handling of pinched cells.
2025-09-25 10:56:04 +02:00
Magne Sjaastad 6ef5db2530 Support radial grids as cylindrical cells
* Add minimum angular count to system preferences
* Refactors grid view updates and radial grid handling
* Improves radial grid handling and LGR creation
2025-09-24 09:46:00 +02:00
Jon Jenssen 4c0d4b3d1d Support generating border result based on current visibility 2025-09-19 15:22:17 +02:00
Kristian Bendiksen 3150d5df16 #12900 Add method for padding ijk bounding box. 2025-09-18 12:53:07 +02:00
Kristian Bendiksen f6c5285e26 #12900 Compute IJK bounding box based on selected simulation wells. 2025-09-18 12:53:07 +02:00
Kristian Bendiksen 5133ae620b Refactor: simplify API for configuring cell counts in IJK.
The old API was based on "grid points", but it was always used to
specify number of cells in each direction.
2025-09-18 11:46:57 +02:00
Magne SjaastadandKristian Bendiksen 5269ba665f Export zcorn/coord to grdecl.
Changes:
- Refactors data writing to allow configurable row length
- Adds documentation describing the Eclipse grid format (COORD and ZCORN)

Co-Authored-By: Kristian Bendiksen <kristian.bendiksen@gmail.com>
2025-09-12 08:38:43 +02: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
Kristian Bendiksen 8089739add Python: Add API for importing well log data
Implement comprehensive Python API for importing well log data into ResInsight
well paths using lists of float values.

Core implementation:
- RigImportedWellLogData: Data storage class inheriting from RigWellLogData
- RimImportedWellLog: Scriptable model class for Python GRPC interface
- RimcWellPath_addWellLogInternal: GRPC method using key-value store for data transfer
- well_path.add_well_log(): Python API with validation and error handling

Features:
- Simple API: well_path.add_well_log(name='LogName', values=[1.0, 2.0, 3.0])
- Comprehensive input validation and type checking
- Efficient data transfer via key-value store mechanism
- Proper error handling with cleanup on failure
- Integration with existing well path functionality

Testing:
- 10 comprehensive unit tests covering all functionality
- Validation of input types, error conditions, and edge cases
- Integration testing with well path creation

Usage example included in PythonExamples directory demonstrating
import of gamma ray, porosity, and permeability log data.
2025-09-04 09:04:56 +02:00
Kristian Bendiksen 4a8af2ff9d Add [[nodiscard]] to new api. 2025-09-03 14:21:19 +02:00
Kristian Bendiksen 10182e99a7 Refactor: Change RigGridBase::cellCornerVertices to return std::array
Refactored RigGridBase::cellCornerVertices to return std::array<cvf::Vec3d, 8> by value instead of taking a reference to std::array as an output parameter. This change improves code readability and leverages modern C++ return value optimizations.

Updated all call sites across the codebase to reflect the new function signature.
2025-09-03 14:21:19 +02:00
Kristian Bendiksen da69eef72b #1584 Replace cvf::vec3d[8] with std::array<cvf::vec3d, 8> 2025-09-03 14:21:19 +02:00
Magne Sjaastad 7b34d7f103 Compute measured depth if not present on file (#12872)
* Refactors RigWellPathGeometryTools to namespace
* Refactors measured depth calculation to utility.
* Calculates MD if missing from well path data
2025-09-03 12:59:15 +02:00
Magne Sjaastad 7653bd80f3 Exclude inactive cells from contour map calculations
* Adds safety check for value index
* Filters inactive cells from contour map calculation
2025-08-29 16:33:34 +02:00
Magne Sjaastad 4135a743fe Release preparations
* Adds a bounds check on the node index to prevent accessing invalid memory locations.
This prevents potential crashes caused by out-of-bounds access when retrieving summary variable values.
* Updates warning message for incomplete deltas
* Plot based on a single realization from a file set ensemble is not restored correctly on project load
* Populate result addresses if no addresses are present
* Adds CNV_ (convergence) result name
* Avoid include of RiaResultNames.h in header file
2025-08-27 14:22:11 +02:00
magnesj 727fac7e0e Fixes by clang-tidy 2025-08-20 08:47:58 +02:00
Magne Sjaastad acb582ab07 Extracts unit system from VFP data file
Modifies the VFP table extraction process to retrieve the unit system defined in the data file.

Convert ALQ values from SI to raw values
2025-08-19 14:06:33 +02:00
Kristian Bendiksen 464dd46ea9 #12568 Python: Add support for reading XYZ coords and inc, azi and dogleg 2025-08-08 08:58:31 +02:00