Commit Graph
187 Commits
Author SHA1 Message Date
Magne Sjaastad 961243c0f4 Adds completion export tests
Introduces tests for well completion exports, validating both unified and split-by-well file formats, enhancing the
reliability of this functionality.

Includes a normalization function to exclude file paths and headers from comparisons, focusing on relevant completion data.

Updates test models with completion export reference files.
2025-10-27 09:41:49 +01:00
Magne Sjaastad b704f1f607 Adjusts grid indices to be 1-based
Updates grid indices in Welspecs and Compdat to use 1-based indexing.
2025-10-14 12:51:17 +02:00
Magne Sjaastad 9a55976c86 Enables completion data for all well path types
Refactors the code to retrieve completion data regardless of the well path implementation. Previously, only modeled well paths were supported.
2025-10-14 12:51:17 +02:00
Kristian Bendiksen 8e6a96da00 #12950 Add api for export cell visibility for a given view. 2025-10-13 14:14:44 +02:00
Magne Sjaastad bb89699fb5 Update tree view when lateral is connected to well
Update example for appending lateral from geometry
2025-10-03 08:20:14 +02:00
magnesj b04a813275 Python code linting changes detected by black 2025-10-02 09:58:21 +02:00
Magne Sjaastad 519a28d583 #12970 Make sure append_lateral functions have unique names 2025-10-02 09:39:41 +02:00
Magne Sjaastad 96f953b4ff #12958 Check if executable exists before trying to launch ResInsight 2025-10-01 08:10:03 +02:00
JJ d56722782a Well Completion tables - Python interface (#12910) 2025-09-25 12:23:40 +02:00
Kristian Bendiksen 1271d6942d #12487 Python: add export from eclipse case to corner point grid.
Exports to zcorn, coords and actnum arrays.

Fixes #12487.
2025-09-25 10:56:04 +02:00
Magne Sjaastad 88cbcb5be0 #12930 Avoid pinning for grpc-related packages 2025-09-18 14:13:56 +02:00
Magne Sjaastad 01ad456a3b Add support for connecting a lateral to a parent well from Python (#12613)
* Updates well path connection logic.

Refactors well path connection to ensure tie-in location is updated correctly after connecting to a parent well. This ensures the visualization and data consistency are maintained.

* Updates connected editors after target manipulation

Ensures that connected editors are updated whenever the target is manipulated through the 3D manipulator.

* #12613 Adds functionality to append lateral well paths
2025-09-08 15:33:16 +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 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 880da0bb9d Updates .gitignore and removes obsolete file 2025-09-02 10:14:03 +02:00
Kristian Bendiksen d8566b679f Rename RimFixedTrajectoryWellPath to RimPointBasedWellPath
- Renamed class from RimFixedTrajectoryWellPath to RimPointBasedWellPath
- Updated header and implementation files
- Changed PDM object display name to "Point-Based Well Path"
- Updated script keyword from "FixedTrajectoryWellPath" to "PointBasedWellPath"
- Modified CMakeLists_files.cmake to reference new filenames
- Updated all includes and instantiation references
- Applied clang-format-19 to modified C++ files
- Updated Python docstring to reflect new return type

The new name better describes the class purpose of creating well paths
from XYZ coordinate points. All tests continue to pass.
2025-08-29 16:28:30 +02:00
Kristian Bendiksen d2bed679e1 Rename wellpath_collection.import_fixed_trajectory_well_path() to import_well_path_from_points()
- Updated C++ GRPC interface method names and class names
- Renamed Python method in well_path_collection.py
- Updated all test functions and file names
- Renamed example file to match new method name
- All tests pass with the new method name

The method signature and functionality remain unchanged - only the name
has been updated to be more descriptive.
2025-08-29 16:28:30 +02:00
Kristian Bendiksen a2473af644 #12848 Python: fix unexpected returned well path when importing.
Fixes #12848.
2025-08-29 15:31:47 +02:00
Kristian Bendiksen 83ae9fb7ac #12569 Python: Add API for creating well paths from XYZ coordinates
Add import_fixed_trajectory_well_path() method to WellPathCollection that enables
creation of well paths from coordinate lists in Python. Implements feature request
for programmatic well path creation without file-based imports.

- Add RimFixedTrajectoryWellPath class for coordinate-based well paths
- Add GRPC interface for coordinate data transfer via key-value store
- Add comprehensive Python API with input validation and error handling
- Add example script importing well on Norne.
- Add 7 unit tests covering all functionality and edge cases

The API allows creating well paths like:
well_path = collection.import_fixed_trajectory_well_path(
    name="MyWell",
    coordinates=[[x1,y1,z1], [x2,y2,z2], ...]
)
2025-08-25 13:27:31 +02:00
Magne 3caa1b26d5 clang-format: Reduce ColumnLimit to avoid long lines 2025-08-21 11:11:43 +02:00
Kristian Bendiksen b0483172b1 #12718 Add diameter and roughness specification for MD intervals
Implements interval-based diameter and roughness configuration for MSW completions
while maintaining backward compatibility with existing single-value approach.

- Add RimDiameterRoughnessInterval class for individual MD intervals
- Add RimDiameterRoughnessIntervalCollection for managing interval collections
- Extend RimMswCompletionParameters with interval-specific mode support
- Support both metric and field unit systems
- Provide validation and overlap detection for intervals
2025-08-21 08:48:43 +02:00
JJ ea1c4b4a85 Python: get accumulated well perforation length for a simulation well (#12798)
* Add support for getting the perforation length of a well from Python
* Fix issue with sub grid pointers in LGR grids when using active cell opm reader
2025-08-21 08:11:51 +02:00
Magne Sjaastad 7bbee82d17 Move valve example into wells_and_fractures 2025-08-19 11:25:14 +02:00
Kristian Bendiksen e58a8cd8cd #12773 Python: Add API for creating valve templates
- Add RimcValveTemplateCollection GRPC command with add_template method
- Support ICD, ICV, and AICD valve types with custom parameters
- Add setter methods for orifice diameter and flow coefficient
- Include Python tests and example demonstrating usage
- API: valve_templates.add_template(completion_type='AICD', orifice_diameter=7.3, flow_coefficient=0.2)
2025-08-19 08:35:45 +02:00
Kristian Bendiksen 34ef2a14a3 #12609 RimWellPathAicdParameters: add field migration.
QString to std::optional<double> where applicable.
2025-08-15 18:57:35 +02:00
Kristian Bendiksen 13f6a57782 #12609 Python: Add functions to build valves from Python 2025-08-15 18:57:35 +02:00
Magne Sjaastad ed246bb1fc #12758 Updates spacing field to double in proto
Updates spacing field to double in proto and add pytest test_create_multiple_fractures
2025-08-15 16:04:16 +02:00
Kristian Bendiksen 4397da9114 #12568 Python: Add example for extracting properties along well. 2025-08-08 08:58:31 +02:00
Kristian Bendiksen e539170884 #12568 Python: add API for sampling given positions in a grid case 2025-08-08 08:58:31 +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
Kristian Bendiksen f98399dff2 Python: add api for remove values from key-value store. 2025-08-08 08:58:31 +02:00
Kristian Bendiksen 90d1555de3 Python: add api for getting values back from key-value store. 2025-08-08 08:58:31 +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
Magne Sjaastad b74c711b11 #12689 Enables scripting for Non-Darcy perforation parameters 2025-08-06 08:45:58 +02:00
jonjenssen 7e95a1f8cd Python code linting changes detected by black 2025-08-04 15:25:05 +02:00
jonjenssen 09f180ee53 Add support for duplicating editable well paths from python 2025-08-04 15:25:05 +02:00
Magne Sjaastad 309c4af07e #12593 Simplify object methods exposed to Python 2025-06-16 11:05:00 +02:00
Magne 54cb841046 reorganize 2025-06-08 19:39:42 +02:00
Magne Sjaastad 7fe06ac06b Make the function parameters available for Sphinx 2025-06-08 14:23:33 +02:00
Magne Sjaastad eb284304ff #12542 Make sure case is open before accessing cell data
* Make sure case is open before accessing cell data
* Add Python example to compute average value for a set of cells
2025-06-01 10:45:38 +02:00
Kristian Bendiksen 1a55fa11c3 #12459 Add regular surface domain object. 2025-05-20 20:39:07 +02:00
Kristian Bendiksen 25f312e117 Python: use python version from mypy.ini (bumped to 3.11). 2025-05-20 20:39:07 +02:00
Magne Sjaastad 37041ad0a6 clang-19-tidy and clang-19-format fixes 2025-05-19 14:31:30 +02:00
Kristian Bendiksen 7899736f05 Python ruff fixes
* Python: Clean up imports.
* Python: Clean up error handling example.
* Python: Remove unused local variables
* Python: Avoid comparing against True/False.
* Python: Remove unused name variable.
* Python: Reuse class definition type variable.
* Python: Fix more unused imports
* Black fixes
2025-05-16 15:46:45 +02:00
Kristian Bendiksen 752d4efc42 Update error handling in Rimc* classes. 2025-05-12 17:31:48 +02:00
Kristian Bendiksen 135695fcb5 #5556 Refactor python error handling. 2025-05-12 17:31:48 +02:00
Kristian Bendiksen 82206e6ae5 Janitor: fix test name. 2025-05-07 12:07:31 +02:00
Kristian Bendiksen e5dc280ce0 Add python api for creating corner point grid. 2025-05-07 12:07:31 +02:00