Project
- class rips.Project(pb2_object: PdmObject | None = None, channel: Channel | None = None)
Bases:
PdmObjectBaseThe ResInsight Project
Methods Summary
case(case_id)Get a specific grid case from the provided case Id
cases()Get a list of all grid cases in the project
close()Close the current project (and open new blank project)
Get the project's color legend collection
create()create_corner_point_grid(name, nx, ny, nz, ...)Creates a corner point grid from given parameters.
create_grid_case_group(case_paths)Create a Grid Case Group from a list of cases
create_grid_from_key_values([name, nx, ny, ...])Create Grid From Key Values
export_multi_case_snapshots(grid_list_file)Export snapshots for a set of cases
export_snapshots([snapshot_type, prefix, ...])Export all snapshots of a given type
export_well_paths([well_paths, md_step_size])Export a set of well paths
grid_case_group(group_id)Get a particular grid case group belonging to a project
Get a list of all grid case groups in the project
import_formation_names([formation_files])Import formation names into project
import_summary_case([file_name])Import Summary Case
import_well_log_files([well_log_files, ...])Import well log files into project
import_well_paths([well_path_files, ...])Import well paths into project
key_values(key)Get float values for a given key.
key_values_async(key)Get float values for a given key.
load_case(path[, grid_only])Load a new grid case from the given file path
open(path)Open a new project from the given path
plot(view_id)Get a particular plot by providing view id
plots()Get a list of all plots belonging to a project
remove_key_values(key)Remove the values for a given key in the key-value store.
replace_source_cases(grid_list_file[, ...])Replace all source grid cases within a case group
save([path])Save the project to the existing project file, or to a new file
scale_fracture_template(template_id, ...)Scale fracture template parameters
Get a list of all grid cases selected in the project tree
set_fracture_containment(template_id, ...)Set fracture template containment parameters
set_key_values(key, values)Sets values for a given key in the key-value store.
summary_case([case_id])Find Summary Case
Get a list of all summary cases in the Project
surface_folder([folder_name])Get Surface Folder
Get Valve Template Collection
view(view_id)Get a particular view belonging to a case by providing view id
views()Get a list of views belonging to a project
well_path_by_name(well_path_name)Get a specific well path by name from the project
Get Well Path Collection
Get a list of all well paths in the project
Methods Documentation
- case(case_id: int) Reservoir | None
Get a specific grid case from the provided case Id
- Parameters:
id (int) -- case id
- Returns:
rips.generated.resinsight_classes.Case
- cases() List[Reservoir]
Get a list of all grid cases in the project
- Returns:
A list of
rips.generated.generated_classes.Case
- close() None
Close the current project (and open new blank project)
- color_legend_collection() ColorLegendCollection | None
Get the project's color legend collection
- create_corner_point_grid(name: str, nx: int, ny: int, nz: int, coord: List[float], zcorn: List[float], actnum: List[int])
Creates a corner point grid from given parameters.
- Parameters:
name (str) -- Name of the grid.
nx (int) -- Number of cells in x direction
ny (int) -- Number of cells in y direction
nz (int) -- Number of cells in z direction
coord (list[float]) -- Coordinate lines as COORD keyword in Eclipse. Each coordinate line is defined by two points (top and bottom). Size: (nx+1) * (ny+1) * 2 * 3. Points are ordered as in Eclipse.
zcorn (list[float]) -- Corner depths as defined by the Eclipse keyword ZCORN. Size: nx * ny * nz * 8
actnum (list[int]) -- Active cell info: cells with values > 0 are active. Size: nx * ny * nz
- create_grid_case_group(case_paths)
Create a Grid Case Group from a list of cases
- Parameters:
case_paths (list) -- list of file path strings
- Returns:
rips.generated.resinsight_classes.GridCaseGroup
- create_grid_from_key_values(name: str = '', nx: int = 0, ny: int = 0, nz: int = 0, coord_key: str = '', zcorn_key: str = '', actnum_key: str = '') CornerPointCase
Create Grid From Key Values
- Parameters:
name (str)
nx (int)
ny (int)
nz (int)
coord_key (str)
zcorn_key (str)
actnum_key (str)
- Returns:
CornerPointCase
- export_multi_case_snapshots(grid_list_file)
Export snapshots for a set of cases
- Parameters:
grid_list_file (str) -- Path to a file containing a list of grids to export snapshot for
- export_snapshots(snapshot_type='ALL', prefix='', plot_format='PNG')
Export all snapshots of a given type
- Parameters:
snapshot_type (str) -- Enum string ('ALL', 'VIEWS' or 'PLOTS')
prefix (str) -- Exported file name prefix
plot_format (str) -- Enum string, 'PNG' or 'PDF'
- export_well_paths(well_paths=None, md_step_size=5.0)
Export a set of well paths
- Parameters:
well_paths (list) -- List of strings of well paths. If none, export all.
md_step_size (double) -- resolution of the exported well path
- grid_case_group(group_id)
Get a particular grid case group belonging to a project
- Parameters:
groupId (int) -- group id
- Returns:
- grid_case_groups()
Get a list of all grid case groups in the project
- Returns:
- import_formation_names(formation_files=None)
Import formation names into project
- Parameters:
formation_files (list) -- list of files to import
- import_summary_case(file_name: str = '') FileSummaryCase
Import Summary Case
- Parameters:
file_name (str)
- Returns:
FileSummaryCase
- import_well_log_files(well_log_files=None, well_log_folder='')
Import well log files into project
- Parameters:
well_log_files (list) -- List of file paths to import
well_log_folder (str) -- A folder path containing files to import
- Returns:
A list of well path names (strings) that had logs imported
- import_well_paths(well_path_files=None, well_path_folder='')
Import well paths into project
- Parameters:
well_path_files (list) -- List of file paths to import
well_path_folder (str) -- A folder path containing files to import
- Returns:
- key_values(key)
Get float values for a given key. Synchronous: returns a list. `
- Parameters:
key (str) -- The key to get.
- Returns:
A list of float values
- key_values_async(key)
Get float values for a given key. Async: returns an iterator.
- Parameters:
key (str) -- The key to get.
- Returns:
An iterator to a chunk object containing an array of float values Loop through the chunks and then the values within the chunk to get all values.
- load_case(path: str, grid_only: bool = False) Reservoir
Load a new grid case from the given file path
- Parameters:
path (str) -- file path to case
- Returns:
- open(path)
Open a new project from the given path
- Parameters:
path (str) -- path to project file
- plot(view_id)
Get a particular plot by providing view id
- Parameters:
view_id (int) -- view id
- Returns:
- plots()
Get a list of all plots belonging to a project
- Returns:
- remove_key_values(key)
Remove the values for a given key in the key-value store.
- Parameters:
key (str) -- The key.
- replace_source_cases(grid_list_file, case_group_id=0)
Replace all source grid cases within a case group
- Parameters:
grid_list_file (str) -- path to file containing a list of cases
case_group_id (int) -- id of the case group to replace
- save(path='')
Save the project to the existing project file, or to a new file
- Parameters:
path (str) -- File path to the file to save the project to. If empty, saves to the active project file
- scale_fracture_template(template_id, half_length, height, d_factor, conductivity)
Scale fracture template parameters
- Parameters:
template_id (int) -- ID of fracture template
half_length (double) -- Half Length scale factor
height (double) -- Height scale factor
d_factor (double) -- D-factor scale factor
conductivity (double) -- Conductivity scale factor
- selected_cases() List[Case]
Get a list of all grid cases selected in the project tree
- Returns:
A list of
rips.generated.generated_classes.Case
- set_fracture_containment(template_id, top_layer, base_layer)
Set fracture template containment parameters
- Parameters:
template_id (int) -- ID of fracture template
top_layer (int) -- Top layer containment
base_layer (int) -- Base layer containment
- set_key_values(key, values)
Sets values for a given key in the key-value store.
- Parameters:
key (str) -- The key (should be unique).
values (list) -- a list of double precision floating point numbers
- summary_case(case_id: int = -1) FileSummaryCase | None
Find Summary Case
- Parameters:
case_id (int)
- Returns:
FileSummaryCase
- summary_cases()
Get a list of all summary cases in the Project
Returns: A list of
rips.generated.resinsight_classes.SummaryCase
- surface_folder(folder_name: str = '') SurfaceCollection
Get Surface Folder
- Parameters:
folder_name (str)
- Returns:
SurfaceCollection
- valve_templates() ValveTemplateCollection
Get Valve Template Collection
Arguments:
- Returns:
ValveTemplateCollection
- view(view_id)
Get a particular view belonging to a case by providing view id
- Parameters:
view_id (int) -- view id
- Returns:
- views()
Get a list of views belonging to a project
- well_path_by_name(well_path_name)
Get a specific well path by name from the project
- well_path_collection() WellPathCollection
Get Well Path Collection
Arguments:
- Returns:
WellPaths
- well_paths()
Get a list of all well paths in the project
- Returns: