pedon.soilmodel module¶
- class pedon.soilmodel.Brooks(k_s: float, theta_r: float, theta_s: float, h_b: float, l: float)¶
Bases:
objectBrooks and Corey Soil Model
Brooks, R.H. and Corey, A.T. (1964) - Hydraulic Properties of Porous Media
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- h_b: float¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- l: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_r: float¶
- theta_s: float¶
- class pedon.soilmodel.Fredlund(k_s: float, theta_s: float, a: float, n: float, m: float)¶
Bases:
objectFredlund and Xing Soil Model
Fredlund, D.G. and Xing, A. (1994) - Equations for the soil-water characteristic curve
- a: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- m: float¶
- n: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_s: float¶
- class pedon.soilmodel.Gardner(k_s: float, theta_s: float, m: float, c: float)¶
Bases:
objectGardner(-Kozeny) Soil Model
Gardner, W.H. (1958) - Some steady-state solutions of the unsaturated moisture flow equation with application to evaporation from soils Bakker and Nieber (2009) - Damping of Sinusoidal Surface Flux Fluctuations with Soil Depth
- c: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- m: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_s: float¶
- class pedon.soilmodel.Genuchten(k_s: float, theta_r: float, theta_s: float, alpha: float, n: float, l: float = 0.5)¶
Bases:
objectMualem-van Genuchten Soil Model
van Genuchten, M. Th. (1980) - A Closed-form Equation for Predicting the Hydraulic Conductivity of Unsaturated Soil
- alpha: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- l: float = 0.5¶
- m: float¶
- n: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_r: float¶
- theta_s: float¶
- class pedon.soilmodel.GenuchtenGardner(k_s: float, theta_r: float, theta_s: float, alpha: float, n: float, c: float)¶
Bases:
objectCombination soil model using the van Genuchten soil water retention curve and the Gardner hydraulic conductivity function.
Gardner, W.H. (1958) - Some steady-state solutions of the unsaturated moisture flow equation with application to evaporation from soils van Genuchten, M. Th. (1970) - A Closed-form Equation for Predicting the Hydraulic Conductivity of Unsaturated Soil
- alpha: float¶
- c: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- m: float¶
- n: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_r: float¶
- theta_s: float¶
- class pedon.soilmodel.Haverkamp(k_s: float, theta_r: float, theta_s: float, alpha: float, beta: float, a: float)¶
Bases:
objectHaverkamp Soil Model
Haverkamp, R., Vauclin, M., Touma, J., Wierenga, P. J., & Vachaud, G. (1977). A comparison of numerical simulation models for one-dimensional infiltration.
- a: float¶
- alpha: float¶
- beta: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_r: float¶
- theta_s: float¶
- class pedon.soilmodel.Panday(k_s: float, theta_r: float, theta_s: float, alpha: float, beta: float, brook: float, h_b: float = 0.0, ss: float = 1e-06)¶
Bases:
objectPanday Soil Model (MODFLOW-USG)
Panday, S. - USG-Transport: Transport and other Enhancements to MODFLOW-USG
- alpha: float¶
- beta: float¶
- brook: float¶
- gamma: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- h_b: float = 0.0¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- sr: float¶
- ss: float = 1e-06¶
- sy: float¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_r: float¶
- theta_s: float¶
- class pedon.soilmodel.Rucker(k_s: float, theta_r: float, theta_s: float, m: float, c: float)¶
Bases:
objectGardner(-Rucker) Soil Model
Gardner, W.H. (1958) - Some steady-state solutions of the unsaturated moisture flow equation with application to evaporation from soils Rucker, D. F., Warrick, A. W., & Ferré, T. P. (2005). Parameter equivalence for the Gardner and van Genuchten soil hydraulic conductivity functions for steady vertical flow with inclusions.
- c: float¶
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- k_s: float¶
- m: float¶
- plot(ax: Axes | None = None) Axes¶
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
- theta_r: float¶
- theta_s: float¶
- class pedon.soilmodel.SoilModel(*args, **kwargs)¶
Bases:
ProtocolProtocol for soil models
This protocol defines the interface for custom soil models. To create a custom soil model, implement all methods defined below. Your class will automatically conform to this protocol.
Example
>>> @dataclass ... class CustomModel: ... k_s: float ... theta_s: float ... theta_r: float ... ... def theta(self, h: FloatArray) -> FloatArray: ... # Calculate soil moisture content from pressure head ... return ... ... ... def s(self, h: FloatArray) -> FloatArray: ... # Calculate effective saturation from pressure head ... return (self.theta(h) - self.theta_r) / (self.theta_s - self.theta_r) ... ... def k_r(self, h: FloatArray, s: FloatArray | None = None) -> FloatArray: ... # Calculate relative permeability from pressure head or saturation ... return ... ... ... def k(self, h: FloatArray, s: FloatArray | None = None) -> FloatArray: ... # Calculate hydraulic conductivity from pressure head or saturation ... return self.k_s * self.k_r(h=h, s=s) ... ... def h(self, theta: FloatArray) -> FloatArray: ... # Inverse of theta method ... return ... ... ... def plot(self, ax: plt.Axes | None = None) -> plt.Axes: ... # Plot the soil water retention curve by calling `plot_swrc` ... return plot_swrc(self, ax=ax)
- h(theta: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
Calculate pressure head h from soil moisture content (inverse of theta).
- k(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
Calculate hydraulic conductivity from pressure head h or saturation s.
- k_r(h: float | ndarray[tuple[Any, ...], dtype[float64]], s: float | ndarray[tuple[Any, ...], dtype[float64]] | None = None) float | ndarray[tuple[Any, ...], dtype[float64]]¶
Calculate relative permeability (or relative hydraulic conductivity). Relative permeability is normalized between 0 (dry) and 1 (saturated). Can be calculated from either pressure head h or saturation s.
- plot(ax: Axes | None = None) Axes¶
Plot the soil water retention curve by calling plot_swrc.
- s(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
Calculate effective saturation from pressure head h. Effective saturation is normalized between 0 (dry) and 1 (saturated).
- theta(h: float | ndarray[tuple[Any, ...], dtype[float64]]) float | ndarray[tuple[Any, ...], dtype[float64]]¶
Calculate soil moisture content (water content) from pressure head h.
- pedon.soilmodel.get_soilmodel(soilmodel_name: Literal['Genuchten', 'GenuchtenGardner', 'Brooks', 'Panday', 'Gardner', 'Rucker', 'Haverkamp', 'Fredlund']) Type[SoilModel]¶