# fronts.D.richards¶

fronts.D.richards(C, kr, Ks=None, k=None, nu=1e-06, g=9.81)

Return a moisture diffusivity function for a Richards equation problem.

Given K_S and the functions C and $$k_r$$ of S (where S is either water content or saturation), returns the function:

$D(S) = \frac{K_S k_r(S)}{C(S)}$

This function helps transform problems of the horizontal Richards equation (for which $$K_S$$, $$k_r$$, and C are known parameters) into problems of the moisture diffusivity equation that can be solved with this library.

Parameters
• C (callable) – Capillary capacity function (also known as hydraulic capacity function). A twice-differentiable function that maps values of S to positive values. It can be called as C(S) to evaluate it at S. It can also be called as C(S, n) with n equal to 1 or 2, in which case the first n derivatives of the function evaluated at the same S are included (in order) as additional return values. While mathematically a scalar function, C operates in a vectorized fashion with the same semantics when S is a numpy.ndarray.

• kr (callable) – $$k_r$$, the relative permeability function (also known as relative conductivity function). A twice-differentiable function that maps values of S to positive values (usually between 0 and 1). It can be called as kr(S) to evaluate it at S. It can also be called as kr(S, n) with n equal to 1 or 2, in which case the first n derivatives of the function evaluated at the same S are included (in order) as additional return values. While mathematically a scalar function, kr operates in a vectorized fashion with the same semantics when S is a numpy.ndarray.

• Ks (float, optional) – $$K_S$$, the saturated hydraulic conductivity. Must be positive. If neither Ks nor k are given, the saturated hydraulic conductivity is assumed to be 1.

• k (float, optional) – Intrinsic permeability of the porous medium. Can be given in place of Ks, which results in the saturated hydraulic conductivity being computed using $$K_S = kg/\nu$$. Must be positive.

• nu (float, optional) – $$\nu$$, the kinematic viscosity of the wetting fluid. Only used if k is passed instead of Ks. Must be positive. Defaults to 1e-6, approximately the kinematic viscosity of water at 20°C in SI units.

• g (float, optional) – Magnitude of the gravitational acceleration. Only used if k is passed instead of Ks. Must be positive. Defaults to 9.81, the gravity of Earth in SI units.

Returns

D – Twice-differentiable function that maps values of S in the domains of both kr and C to positive values. It can be called as D(S) to evaluate it at S. It can also be called as D(S, n) with n equal to 1 or 2, in which case the first n derivatives of the function evaluated at the same S are included (in order) as additional return values. While mathematically a scalar function, D operates in a vectorized fashion with the same semantics when S is a numpy.ndarray.

Return type

callable