environmentaltools.processes.water_elevation
- environmentaltools.processes.water_elevation(type_='rectangular')[source]
Generate objective function for water depth calculation using Manning’s equation.
Creates and returns a function that computes the residual between observed discharge and Manning’s equation prediction for different channel geometries. Used for iterative water depth calculation given discharge.
- Parameters:
type (str, optional) – Channel cross-section type. Options: - ‘rectangular’ : Rectangular channel - ‘trapezoidal’ : Trapezoidal channel - ‘triangular’ : Triangular channel - ‘circular’ : Circular pipe/culvert - ‘parabolic’ : Parabolic channel Default: ‘rectangular’
- Returns:
Objective function f(h, Q, channel_params) that returns the absolute residual between actual discharge Q and Manning’s equation prediction. Used with numerical solvers to find water depth h.
- Return type:
callable
- Raises:
ValueError – If channel section type is not implemented
Notes
Manning’s equation: Q = (1/n) * A * R^(2/3) * S^(1/2)
where:
Q : Discharge (m³/s)
n : Manning’s roughness coefficient
A : Wetted area (m²)
R : Hydraulic radius (m)
S : Channel slope (m/m)
The returned function should be minimized (e.g., using scipy.optimize.minimize_scalar) to find the water depth that produces the given discharge.
channel_params dictionary should contain:
n : Manning’s roughness coefficient
w : Channel width or bottom width (m)
S : Channel bed slope (m/m)
z : Side slope (for trapezoidal/triangular, horizontal:vertical)
D : Diameter (for circular)
T : Top width (for parabolic)
theta : Central angle (for circular)