pyopmnearwell.utils.writefile module
Utility functions for necessary files and variables to run OPM Flow.
- pyopmnearwell.utils.writefile.create_3dgrid(dic)
Function to handle the first part of the 3d grids
- Args:
dic (dict): Global dictionary with required parameters
- Returns:
dic (dict): Global dictionary with new added parameters
- pyopmnearwell.utils.writefile.d3_grids(dic, dxarray)
Function to handle the second part of the 3d grids
- Args:
dic (dict): Global dictionary with required parameters dxarray (list): String with the size of the grid cells
- Returns:
dic (dict): Global dictionary with new added parameters
- pyopmnearwell.utils.writefile.handle_core(dic)
Function to handle the core geometry
- Args:
dic (dict): Global dictionary with required parameters
- Returns:
dic (dict): Global dictionary with new added parameters
- pyopmnearwell.utils.writefile.manage_grid(dic)
Function to handle the grid
- Args:
dic (dict): Global dictionary with required parameters
- Returns:
dic (dict): Global dictionary with new added parameters
- pyopmnearwell.utils.writefile.manage_sections(dic)
Function to write the include files in the input deck
- Args:
dic (dict): Global dictionary with required parameters
- pyopmnearwell.utils.writefile.manage_tables(dic)
Function to write the saturation function tables
- Args:
dic (dict): Global dictionary with required parameters
- pyopmnearwell.utils.writefile.map_zcords(dic)
Generate the z array with the grid face locations
- pyopmnearwell.utils.writefile.reservoir_files(dic, **kwargs)
Function to write opm-related files by running mako templates
- Args:
dic (dict): Global dictionary with required parameters **kwargs: Possible kwargs are:
- recalc_grid (bool): Whether to recalculate the ``GRID.INC``file. Intended
for ensemble runs, where the saturation functions/geography/etc. do not need to be recalculated for each ensemble member. Defaults to True.
- recalc_tables (bool): Whether to recalculate the ``TABLES.INC``file.
Defaults to True.
- recalc_sections (bool): Whether to recalculate the
GEOLOGY.INC
and REGIONS.INC
files. Defaults to True.
- recalc_sections (bool): Whether to recalculate the
- inc_folder (pathlib.Path): If any of the mentioned files is not
recalculated, they are taken from this folder. Defaults to
pathlib.Path("")
.
- Note:
All of the
recalc_*
options only work for
co2store no_disgas_no_diffusion
on acake
grid so far. - For other models or grids there will be errors.- Returns:
dic (dict): Global dictionary with new added parameters