imod.evaluate.stability_constraint_wel#

imod.evaluate.stability_constraint_wel(wel, top_bot, porosity=0.3, R=1.0)[source]#

Computes sink/source stability constraint as applied in MT3D for adaptive timestepping (Zheng & Wang, 1999 p54).

\[\Delta t \leq \frac{R\theta }{\left | q_{s} \right |}\]

For the WEL package, a flux is known beforehand, so we can evaluate beforehand if a flux assigned to a cell will necessitate a small timestap, thereby slowing down calculations.

Returns a ipf DataFrame that includes a column for the specific discharge and resulting minimum timestep.

Parameters
  • wel (pd.DataFrame) – pd.DataFrame that defines a WEL package. Minimally includes x, y, layer and Q column.

  • top_bot (xr.Dataset of floats, containing 'top', 'bot' and optionally) – ‘dz’ of layers. Dimensions must be exactly ("layer", "y", "x").

  • porosity (float or xr.DataArray of floats, optional (default 0.3)) – If xr.DataArray, dimensions must be exactly ("layer", "y", "x").

  • R (Retardation factor, optional (default)) – Only when sorption is a factor.

Returns

wel – dt (minimum timestep) columns

Return type

pd.DataFrame containing addition qs (specific discharge) and