Coverage for C:\src\imod-python\imod\flow\riv.py: 100%
10 statements
« prev ^ index » next coverage.py v7.5.1, created at 2024-05-08 14:15 +0200
« prev ^ index » next coverage.py v7.5.1, created at 2024-05-08 14:15 +0200
1from imod.flow.pkgbase import BoundaryCondition
4class River(BoundaryCondition):
5 """
6 The River package is used to simulate head-dependent flux boundaries. In
7 the River package if the head in the cell falls below a certain threshold,
8 the flux from the river to the model cell is set to a specified lower
9 bound.
11 Parameters
12 ----------
13 stage: float or xr.DataArray of floats
14 is the head in the river (STAGE), dims ``("layer", "y", "x")``.
15 bottom_elevation: float or xr.DataArray of floats
16 is the bottom of the riverbed (RBOT), dims ``("layer", "y", "x")``.
17 conductance: float or xr.DataArray of floats
18 is the conductance of the river, dims ``("layer", "y", "x")``.
19 infiltration_factor: float or xr.DataArray of floats
20 is the infiltration factor, dims ``("layer", "y", "x")``. This factor
21 defines the reduces the conductance for infiltrating water compared to
22 exfiltrating water:
24 ``cond = A / (c * iff)``
26 where ``A`` [L2] is the area where surface water and groundwater
27 interact, ``c`` [L] is the resistance, and ``iff`` is the infiltration
28 factor.
30 The infiltration factor is thus equal or larger than 1.
31 """
33 _pkg_id = "riv"
34 _variable_order = [
35 "conductance",
36 "stage",
37 "bottom_elevation",
38 "infiltration_factor",
39 ]
41 def __init__(
42 self,
43 conductance,
44 stage,
45 bottom_elevation,
46 infiltration_factor,
47 ):
48 super().__init__()
49 self.dataset["conductance"] = conductance
50 self.dataset["stage"] = stage
51 self.dataset["bottom_elevation"] = bottom_elevation
52 self.dataset["infiltration_factor"] = infiltration_factor