pyopmspe11.config.config module#

Configuration and runtime settings shared across pyopmspe11 workflows.

Config combines command-line selections, validated TOML input, case-dependent SPE11 properties, and values derived while creating decks and processing OPM Flow results. The object is mutable because grid dimensions, feature locations, and output paths are populated progressively.

class Config(fol, generate, mode, resolution, time_data, dt_data, lower, subfolders, flow, spe11, version, model, grid, dims, x_n, y_n, z_n, temperature, datum, pressure, kzMult, diffusion, dispersion, radius, wellCoord, krw, krn, pcap, s_w, safu, rock, inj, spe11aBC=0, drsdtcon=None, elevation=None, backElevation=None, rockCond=None, widthBuffer=None, rockExtra=None, pvAdded=None, wellCoordF=None, maxelevation=0, cut=0, nxyz=<factory>, boxa=<factory>, boxb=<factory>, boxc=<factory>, sensors=<factory>, sensorijk=<factory>, wellijk=<factory>, wellijkf=<factory>, wellkh=<factory>, pat=PosixPath('/Users/dmar/cssr-tools/pyopmspe11/src/pyopmspe11'), tuning=False, deckfol='output', compact_dx=False)[source]#

Bases: object

Options, TOML input, and runtime settings for a pyopmspe11 operation.

TOML-backed attributes retain the spelling used by existing configuration files. Derived attributes are populated while the input is initialized, grids are built, and output workflows are executed.

Attributes:
fol

Base output directory for the current run.

generate

Benchmark data products requested from the data and plotting workflows.

mode

Workflow stages to execute, such as deck generation, Flow, data, or plotting.

resolution

Reporting-grid resolution supplied as x, y, and z element counts.

time_data

Requested dense-output times in hours for SPE11A or years for SPE11B/C.

dt_data

Sampling interval for sparse and performance data.

lower

Whether only the lower benchmark neighbourhood is modeled.

subfolders

Whether deck, flow, data, and figure files use separate subdirectories.

flow

OPM Flow command and command-line options.

spe11

Benchmark case identifier: spe11a, spe11b, or spe11c.

version

OPM input-template version, such as release or master.

model

Physical model selection, including immiscible, isothermal, convective, or complete.

grid

Grid representation: Cartesian, tensor, or corner-point.

dims

Physical model dimensions along the x, y, and z axes.

x_n, y_n, z_n

Refinement counts used to construct the grid along each axis.

temperature

Reference and boundary temperatures used by the generated deck.

datum

Datum depth used for pressure initialization.

pressure

Pressure specified at the datum depth.

kzMult

Vertical permeability multiplier from the TOML configuration.

diffusion

Molecular diffusion coefficients for the fluid components.

dispersion

Facies-dependent dispersion coefficients.

radius

Well radii for the two injection wells.

wellCoord

Initial coordinates of the two injection wells.

krw, krn, pcap, s_w

Expressions for saturation tables (rel perms and cap pressure).

safu

Facies-dependent saturation-function parameters.

rock

Facies-dependent permeability and porosity values.

inj

Injection periods, rates, controls, and optional TUNING values.

spe11aBC

SPE11A boundary-condition selector from the TOML configuration.

drsdtcon

Optional convective-dissolution parameters for each facies.

elevation, backElevation

SPE11C elevation parameters used to curve and tilt the model.

rockCond

Facies-dependent rock thermal conductivities.

widthBuffer

Width of boundary-buffer cells for SPE11B and SPE11C.

rockExtra

Additional rock heat-capacity and density properties.

pvAdded

Extra boundary pore-volume width used in open-boundary cells.

wellCoordF

Final SPE11C well coordinates at the opposite side of the model.

maxelevation

Vertical SPE11C reference offset used during coordinate conversion.

cut

Height removed when modeling only the lower neighbourhood.

nxyz

Number of grid cells along the x, y, and z axes.

boxa, boxb, boxc

Opposite corners defining the benchmark reporting boxes.

sensors

Physical coordinates of the benchmark pressure sensors.

sensorijk

Zero-based grid indices of the pressure sensors.

wellijk, wellijkf

One-based initial and final grid indices of the injection wells.

wellkh

SPE11C well-layer indices along the sloping well trajectory.

pat

Package root containing templates and reference geometry.

tuning

Whether injection records include OPM TUNING values.

deckfol

Directory in which generated deck and include files are written.

compact_dx

Whether a compact nonuniform DX keyword is generated for a Cartesian grid.

Parameters:
fol: str#
generate: str#
mode: str#
resolution: str#
time_data: str#
dt_data: float#
lower: bool#
subfolders: str#
flow: str#
spe11: str#
version: str#
model: str#
grid: str#
dims: list[float]#
x_n: list[int]#
y_n: list[int]#
z_n: list[int]#
temperature: list[float]#
datum: float#
pressure: float#
kzMult: float#
diffusion: list[float]#
dispersion: list[float]#
radius: list[float]#
wellCoord: list[list[float]]#
krw: str#
krn: str#
pcap: str#
s_w: str#
safu: list[list[float]]#
rock: list[list[float]]#
inj: list[list[float]]#
spe11aBC: float | None#
drsdtcon: list[list[float | str]] | None#
elevation: float | None#
backElevation: float | None#
rockCond: list[float] | None#
widthBuffer: float | None#
rockExtra: list[float] | None#
pvAdded: float | None#
wellCoordF: list[list[float]] | None#
maxelevation: float#
cut: float | None#
nxyz: list[int]#
boxa: list[list[float]]#
boxb: list[list[float]]#
boxc: list[list[float]]#
sensors: list[list[float]]#
sensorijk: list[list[int]]#
wellijk: list[list[int]]#
wellijkf: list[list[int]]#
wellkh: list[int] | None#
pat: Path#
tuning: bool#
deckfol: str#
compact_dx: bool#