pofff.config.config module#
Configuration and runtime settings shared across pofff workflows.
The data classes combine raw command-line selections, validated TOML input,
FluidFlower geometry, OPM deck arrays, history-matching options, and values
derived while grids, simulations, and benchmark products are created.
PofffConfig is mutable because paths, cell indices, properties, and runtime
flags are populated progressively.
- class pofff.config.config.CliConfig(fol: Path, deck: Path, jobs: Path, experiment: str, times: str, msat: str, mcon: str, mode: str, figures: str, location: str, use: str)[source]#
Bases:
objectStore command-line values before TOML normalization.
- Attributes:
- fol
Base output directory.
- deck
Directory used for generated OPM deck files.
- jobs
Directory used for generated ERT and Everest job scripts.
- experiment
FluidFlower experimental realization, normalized as
run1throughrun5.- times
Comma-separated benchmark evaluation times in hours.
- msat
Minimum gas-saturation threshold used for segmentation.
- mcon
Minimum dissolved-CO2 concentration threshold used for segmentation.
- mode
Selected simulation, file-generation, history-matching, or FAIR workflow.
- figures
Figure mode:
all,basic, ornone.- location
Directory containing comparison or precomputed benchmark data.
- use
Whether precomputed Wasserstein distances may be used.
- class pofff.config.config.PofffConfig(path: Path, fol: Path = PosixPath('output'), deck: Path = PosixPath('output'), jobs: Path = PosixPath('output'), experiment: str = 'run2', times: str = '0.25', msat: str = '1e-2', mcon: str = '1e-1', mode: str = 'single', figures: str = 'basic', location: str = '', use: str = '1', flow: str = 'flow', grid: str = 'corner-point', thickness: str = 'final', mult_thickness: float = 1.0, x: list[int] = <factory>, z: list[int] = <factory>, temperature: list[float] = <factory>, pressure: float = 0.0, diffusion: ndarray = <factory>, sources: list[list[float]] = <factory>, inj: list[list[Any]] = <factory>, krw: str = '(max(0, (sw - swi) / (1 - swi))) ** nkrw', krn: str = '(max(0, (1 - sw - sni) / (1 - sni))) ** nkrn', cap: str = 'pen * ((sw-swi) / (1-swi)) ** (-(1.0 / npen))', cores: int | None = None, maxtime: float | None = None, delete: bool | None = None, ertargs: str | None = None, ensembles: int | None = None, enkf_alpha: float | None = None, errors: ndarray | None = None, random_seed: int | None = None, min_realizations_success: int | None = None, max_function_evaluations: int | None = None, max_batch_num: int | None = None, args: tuple[~typing.Any, ...] | None=None, strategy: str | None = None, maxiter: int | None = None, popsize: int | None = None, tol: float | None = None, mutation: float | tuple[float, float] | None=None, recombination: float | None = None, rng: Any | None = None, callback: Callable | None = None, disp: bool | None = None, polish: bool | None = None, init: str | None = None, atol: float | None = None, updating: str | None = None, workers: int | None = None, constraints: Iterable[Any] | None = None, x0: Sequence[float] | None = None, integrality: Sequence[bool] | None = None, vectorized: bool | None = None, facies: list[int] = <factory>, fluxnum: list[str] = <factory>, fipnum: list[str] = <factory>, porv: list[str] = <factory>, multpv: list[str] = <factory>, dx: list | None = <factory>, dz: list | None = <factory>, dims: list[float] = <factory>, sensors: list[list[float]] = <factory>, sensor_ik: list[list[int]] = <factory>, source_ik: list[list[int]] = <factory>, boxa: list[list[float]] = <factory>, boxb: list[list[float]] = <factory>, boxc: list[list[float]] = <factory>, hm: dict[str, ~typing.Any]=<factory>, monotonic: bool = False, hascellmaps: bool = False, everert: bool = False, tuning: bool = False, para: dict[str, ~typing.Any]=<factory>, nxz: list[int] = <factory>, data: str | None = None)[source]#
Bases:
objectStore TOML input, CLI options, and derived pofff runtime state.
TOML-backed attributes retain the spelling used by existing configuration files. Derived arrays, grid dimensions, feature indices, paths, and history-matching flags are populated while input is normalized and model files are generated.
- Attributes:
- path
Package root containing geology, templates, jobs, and benchmark resources.
- fol, deck, jobs
Base output, generated deck, and generated job-script directories.
- experiment, times, msat, mcon
Experimental realization, evaluation times [h], and segmentation thresholds.
- mode, figures, location, use
Workflow, figure selection, comparison-data location, and reuse selection.
- flow
OPM Flow command and command-line options.
- grid
Grid representation:
cartesian,tensor, orcorner-point.- thickness
initialorfinalthickness map, or a positive physical thickness [m].- mult_thickness
Positive multiplier applied to the selected thickness map.
- x, z
Horizontal and vertical refinement counts.
- temperature
Initial and boundary temperatures used by the deck.
- pressure
Positive reference pressure used for initialization and boundary properties.
- diffusion
Two molecular diffusion coefficients, converted from m²/s to m²/day.
- sources
Two injection-source coordinates as
[x, z]rows [m].- inj
Injection rows containing times, rates, and optional TUNING text.
- krw, krn, cap
Python expressions used to generate saturation-function tables.
- cores, maxtime, delete
Shared ERT/Everest resources, run timeout, and cleanup selection.
- ertargs, ensembles, enkf_alpha, errors, random_seed
ERT command options, ensemble controls, observation errors, and random seed.
- min_realizations_success, max_function_evaluations, max_batch_num
Shared success requirement and Everest evaluation limits.
- strategy, maxiter, popsize, tol, mutation, recombination
Differential-evolution strategy and convergence settings.
- rng, callback, disp, polish, init, atol, updating, workers
Additional differential-evolution options passed to Everest.
- constraints, x0, integrality, vectorized
Optional differential-evolution constraints and evaluation controls.
- facies, fluxnum, fipnum, porv, multpv, dx, dz
Generated facies, region, pore-volume, and grid-size arrays for OPM input.
- dims
FluidFlower dimensions in x, y, and z order [m].
- sensors, sensor_ik
Sensor coordinates [m] and zero-based grid indices.
- source_ik
One-based grid indices of the two injection sources.
- boxa, boxb, boxc
Opposite
[x, z]corners of the benchmark reporting boxes [m].- hm, para
History-matching definitions and fixed facies properties.
- monotonic, hascellmaps, everert, tuning
Derived workflow and file-generation flags.
- nxz
Numbers of simulation cells in x and z order.
- data
Uppercase OPM deck base name derived from the output directory.