[flow] FlowConfig#
TOML section: [flow]
Pydantic model: FlowConfig defined in hydromodpy.physics.flow.flow_config.
Flow-process configuration.
Parameters are declared in param_list (ordered list of ids), and
parameter payloads are stored in param. The 13 flat
runtime_*/vi_*/ts_vi_* Boussinesq knobs are declared on
FlowRuntimeFields and grouped together by the
runtime property as a FlowRuntimeConfig view.
Fields#
runtime_backend
str default = “local” dev experimental source
Optional nonlinear runtime backend hint used by the Boussinesq solver implementation. Other flow solvers may ignore this field.
One of: "local" "scipy" "scipy_sparse" "petsc"
Examples
"local""scipy_sparse"
surface_interaction_model
str default = “auto” dev experimental source
Optional Boussinesq surface-interaction closure selector. ‘regularized_partition’ uses the Marcais-style q_ex = G_r(theta) R(balance) law; ‘complementarity’ uses the mixed PETSc q_ex-perp-(z_top-h) formulation; ‘vi_obstacle’ uses the experimental PETSc head-only VI obstacle formulation; ‘auto’ keeps the historical backend-dependent default.
One of: "auto" "regularized_partition" "complementarity" "vi_obstacle" "ts_vi_obstacle"
Examples
"auto""regularized_partition"
runtime_max_iterations
int | None default = None dev source
Optional override for the nonlinear iteration budget used by the Boussinesq runtime backend.
runtime_tol_residual_inf
float | None default = None dev source
Optional override for the infinity-norm residual tolerance used by the Boussinesq runtime backend.
runtime_tol_state_update_inf
float | None default = None dev source
Optional override for the infinity-norm state-update tolerance used by Boussinesq backends that track it.
vi_substeps_per_period
int default = 1 dev source
Fixed number of Backward-Euler substeps per stress period for the experimental PETSc VI obstacle runtime. Rate-based forcing values are kept unchanged on each substep.
vi_substep_on_failure
bool default = False dev source
When true, retry a failed PETSc VI obstacle stress period with increasing substep counts.
vi_max_adaptive_substeps
int | None default = None dev source
Maximum number of PETSc VI obstacle substeps allowed for adaptive failure retries.
ts_vi_steps_per_period
int default = 4 dev source
Fixed PETSc TS Backward-Euler steps per stress period for the experimental TS VI obstacle runtime.
ts_vi_adapt
bool default = False dev source
Enable experimental PETSc TS adaptivity for the TS VI obstacle runtime.
ts_vi_dt_min_fraction
float default = 0.015625 dev source
Minimum TS VI time-step as a fraction of the stress-period length.
ts_vi_dt_max_fraction
float default = 0.25 dev source
Maximum TS VI time-step as a fraction of the stress-period length.
ts_vi_type
str default = “beuler” dev source
PETSc TS type for the experimental TS VI obstacle runtime.
ts_vi_snes_type
str default = “vinewtonrsls” dev source
PETSc SNES type for the experimental TS VI obstacle runtime.
param_list
list[str] factory user source
Ordered list of flow-parameter identifiers used to build runtime parameters (for example [‘K’, ‘Ss’, ‘Sy’]).
Example: ["K", "Sy", "Ss"]
param
in TOML:
[flow.param.<id>]
dict[str, FlowParam] factory user source
Mapping of flow-parameter identifiers to native FieldParamConfig payloads.
ic
in TOML:
[flow.ic]
FlowInitialConditions factory user source
Validated flow initial-condition structure parsed from [flow.ic]. Stored as FlowInitialConditions(h=FlowInitialCondition).
bc
in TOML:
[flow.bc.<id>]
kind = “dirichlet” | “cauchy” | “robin” factory user source
Mapping of flow boundary-condition payloads parsed from
[flow.bc].Supported TOML sections
[flow.bc.<id>], one block per boundary, keyed by what it is. Canonical ids:drainage,ocean,stream,north_side,south_side,east_side,west_sidea boundary the registry describes entirely needs NO block: listing it in
flow.active_bcis enoughCommon keys
kind: optional, the registry supplies it; write it only to depart from the default, and only within a family (cauchyandrobinmay be swapped, a prescribed head may not)
value: optional on a drainage, where leaving it out derives the conductance from K; required for a prescribed head
application_domain: optional, the registry supplies it, and a value contradicting it is refusedAllowed application_domain values:
top,north side,south side,east side,west side.Default units:
mfor dirichlet,m2/sfor cauchy/robin.Cauchy vs Robin: both map to the same MODFLOW
DRNpackage; the distinction only matters for the Boussinesq solver, which uses two different surface-interaction closures (cauchyfor the linear formulationq = C(h - h_ref),robinfor the regularized partition / complementarity variants selected byflow.surface_interaction_model).Pick a tab below: setting
kindselects the matching schema.
TOML: [flow.bc.<id>] with kind = "dirichlet" – model DirichletBC.
value
float | list[float] | None default = None user source
Boundary-condition value, scalar or one value per stress period. On a drainage boundary it is a conductance in m2/s, and it may be left out: the run then derives it from the conductivity, C = K * cell_area / solver.drain_bed_thickness_m, which keeps the drain proportional to K and makes K/R the quantity a network calibration searches. A zero or negative number selects that same derivation, so it does NOT mean a closed boundary; write a positive conductance to impose one.
data_value
bool default = False dev source
If True, boundary-condition values are sourced from data.
forcing
in TOML:
[flow.bc.<id>.forcing]
mode = “constant” | “csv” default = None dev source
Optional runtime forcing declaration for lateral Dirichlet boundaries. Supported modes: ‘constant’ and ‘csv’. The launcher resolves this payload to boundary.value using [simulation.time].
Pick a tab below: setting
modeselects the matching schema.
TOML: [flow.bc.<id>.forcing] with mode = "constant" – model FlowBoundaryForcingConstantConfig.
units
str | None default = None dev source
Source units of forcing values before runtime conversion.
TOML: [flow.bc.<id>.forcing] with mode = "csv" – model FlowBoundaryForcingCsvConfig.
path_file
Path required dev source
CSV file path containing time-series boundary head values when mode=’csv’.
date_format
str | None default = None dev source
Optional datetime format passed to pandas.to_datetime.
fill_method
str default = “ffill” dev source
Gap-filling policy used when a stress period has no direct sample.
One of: "ffill" "bfill"
units
str | None default = None dev source
Source units of forcing values before runtime conversion.
application_domain
str | None default = None user source
Boundary-application domain. Supported values are: top, north side, south side, east side, west side.
support_label
Optional[str] default = None user source
Optional explicit runtime support label used by unstructured backends to select one target support independently from the canonical boundary id.
TOML: [flow.bc.<id>] with kind = "cauchy" – model CauchyBC.
value
float | list[float] | None default = None user source
Boundary-condition value, scalar or one value per stress period. On a drainage boundary it is a conductance in m2/s, and it may be left out: the run then derives it from the conductivity, C = K * cell_area / solver.drain_bed_thickness_m, which keeps the drain proportional to K and makes K/R the quantity a network calibration searches. A zero or negative number selects that same derivation, so it does NOT mean a closed boundary; write a positive conductance to impose one.
data_value
bool default = False dev source
If True, boundary-condition values are sourced from data.
application_domain
str | None default = None user source
Boundary-application domain. Supported values are: top, north side, south side, east side, west side.
support_label
Optional[str] default = None user source
Optional explicit runtime support label used by unstructured backends to select one target support independently from the canonical boundary id.
TOML: [flow.bc.<id>] with kind = "robin" – model RobinBC.
value
float | list[float] | None default = None user source
Boundary-condition value, scalar or one value per stress period. On a drainage boundary it is a conductance in m2/s, and it may be left out: the run then derives it from the conductivity, C = K * cell_area / solver.drain_bed_thickness_m, which keeps the drain proportional to K and makes K/R the quantity a network calibration searches. A zero or negative number selects that same derivation, so it does NOT mean a closed boundary; write a positive conductance to impose one.
data_value
bool default = False dev source
If True, boundary-condition values are sourced from data.
application_domain
str | None default = None user source
Boundary-application domain. Supported values are: top, north side, south side, east side, west side.
support_label
Optional[str] default = None user source
Optional explicit runtime support label used by unstructured backends to select one target support independently from the canonical boundary id.
sinks_sources
in TOML:
[flow.sinks_sources]
FlowSinksSourcesConfig factory user source
Typed sinks/sources payload (for example pumping wells).
active_sinks_sources
list[str] factory user source
Explicitly activated sink/source names for this flow run. Allowed values: ‘recharge’, ‘wells’, ‘etp’. Boussinesq currently rejects ‘etp’ at solver-contract validation. An empty list means no sink/source package is assembled by the solver.
Examples
["recharge"]["recharge", "wells"]["etp"]
active_bc
list[str] factory user source
Explicitly activated boundary-condition ids for this flow run. Allowed values are the canonical ids declared in the flow boundary-condition registry: ‘ocean’, ‘stream’, ‘north_side’, ‘south_side’, ‘east_side’, ‘west_side’, ‘drainage’, ‘lake’, ‘reservoir’. ‘lake’/’reservoir’ build a MODFLOW 6 LAK advanced package and are only supported by the modflow6 backend. An empty list means no boundary-condition package is assembled by the solver.
Examples
["ocean"]["west_side", "east_side", "drainage"]
flow_regime
str default = “transient” user source
Global flow simulation regime used by solvers consuming [flow] (steady or transient).
One of: "steady" "transient"
Examples
"steady""transient"
first_period_steady
bool default = True user source
For transient flow, mark the first solver stress period as steady-state. Ignored for steady flow, where all solver periods are steady.
Examples
truefalse
restart_from
str | None default = None user source
Optional hotstart: path to a prior simulation Zarr store whose last time step seeds the initial heads (and the lake stage), overriding [flow.ic]. The prior run must share this run’s mesh, so enable [mesh_catchment] cache = true; otherwise the cell count differs and restart is refused. None keeps [flow.ic]. Read only by a backend that declares it can: elsewhere the run is refused rather than started from [flow.ic] without a word. This is one of the four ways to say where a transient starts, next to [flow.ic] type=’steady_state’ (equilibrium under the mean recharge, or under a rate you state with source=’prescribed’), type=’custom’/’top’/’bottom’ (a level you write), and hmp spinup (repeat a representative window until the state stops moving, then point this key at its result).
Starter TOML snippet#
Cases using this section#
Validation gallery cases that reference fields from this section: