ogs5py API

Purpose

ogs5py is A python-API for the OpenGeoSys 5 scientific modeling package.

The following functionalities are directly provided on module-level.

Subpackages

fileclasses ogs5py subpackage providing the file classes.
reader ogs5py subpackage providing reader for the ogs5 output.
tools ogs5py subpackage providing tools.

Classes

OGS model Base Class

Class to setup an ogs model

OGS([task_root, task_id, output_dir]) Class for an OGS5 model.

File Classes

Classes for all OGS5 Files. See: ogs5py.fileclasses

ASC(**OGS_Config) Class for the ogs ASC file.
BC(**OGS_Config) Class for the ogs BOUNDARY CONDITION file.
CCT(**OGS_Config) Class for the ogs COMMUNICATION TABLE file.
DDC(**OGS_Config) Class for the ogs MPI DOMAIN DECOMPOSITION file.
FCT(**OGS_Config) Class for the ogs FUNCTION file.
GEM(**OGS_Config) Class for the ogs GEOCHEMICAL THERMODYNAMIC MODELING COUPLING file.
GEMinit([lst_name, dch, ipm, dbr, …]) Class for GEMS3K input file.
GLI([gli_dict]) Class for the ogs GEOMETRY file.
GLIext([typ, data, name, file_ext, …]) Class for an external definition for the ogs GEOMETRY file.
IC(**OGS_Config) Class for the ogs INITIAL_CONDITION file.
RFR([variables, data, units, headers, name, …]) Class for the ogs RESTART file, if the DIS_TYPE in IC is set to RESTART.
KRC(**OGS_Config) Class for the ogs KINETRIC REACTION file.
MCP(**OGS_Config) Class for the ogs COMPONENT_PROPERTIES file.
MFP(**OGS_Config) Class for the ogs FLUID PROPERTY file.
MMP(**OGS_Config) Class for the ogs MEDIUM_PROPERTIES file.
MPD([name, file_ext]) Class for the ogs MEDIUM_PROPERTIES_DISTRIBUTED file.
MSH([mesh_list]) Class for a multi layer mesh file that contains multiple ‘#FEM_MSH’ Blocks.
MSP(**OGS_Config) Class for the ogs SOLID_PROPERTIES file.
NUM(**OGS_Config) Class for the ogs NUMERICS file.
OUT(**OGS_Config) Class for the ogs OUTPUT file.
PCS(**OGS_Config) Class for the ogs PROCESS file.
PCT([data, s_flag, task_root, task_id]) Class for the ogs Particle file, if the PCS TYPE is RANDOM_WALK.
PQC(**OGS_Config) Class for the ogs PHREEQC interface file.
PQCdat(**OGS_Config) Class for the ogs PHREEQC dat file.
REI(**OGS_Config) Class for the ogs REACTION_INTERFACE file.
RFD(**OGS_Config) Class for the ogs USER DEFINED TIME CURVES file.
ST(**OGS_Config) Class for the ogs SOURCE_TERM file.
TIM(**OGS_Config) Class for the ogs TIME_STEPPING file.

Functions

Geometric

Geometric routines

hull_deform(x_in, y_in, z_in[, niv_top, …]) Providing a transformation function to deform a given mesh.

Searching

Routine to search for a valid ogs id in a directory

search_task_id(task_root[, search_ext]) Search for OGS model names in the given path.

Formatting

Routines to format/generate data in the right way for the input

by_id(array[, ids]) Return a flattend array side-by-side with the array-element ids.
specialrange(val_min, val_max, steps[, typ]) Calculation of special point ranges.
generate_time(time_array[, time_start, …]) Return a dictionary for the “.tim” file.

Downloading

Routine to download OGS5.

download_ogs([version, system, path, name, …]) Download the OGS5 executable.
add_exe(ogs_exe[, dest_name]) Add an OGS5 exe to OGS5PY_CONFIG.
reset_download() Reset all downloads in OGS5PY_CONFIG.
OGS5PY_CONFIG Standard config path for ogs5py.

Plotting

Routine to download OGS5.

show_vtk(vtkfile[, log_scale]) Display a given mesh colored by its material ID.

Information

OGS_EXT all ogs file extensions
PCS_TYP PCS types
PRIM_VAR_BY_PCS primary variables per PCS