dycove.sim.engines.ANUGA_baptist.Baptist_operator
- class dycove.sim.engines.ANUGA_baptist.Baptist_operator(domain, veg_diameter=None, veg_density=None, veg_height=None, drag=1.0, bed_friction_const=65.0, description=None, label=None, logging=False, verbose=False)[source]
Applies vegetation-induced flow drag based on the Baptist formulation.
This operator modifies the local flow field in ANUGA simulations to account for emergent and submerged vegetation effects. The vegetation-adjusted Chezy coefficient \(C_v\) is computed as:
\[C_v = \left( C_b^{-2} + \frac{C_d m D}{2 g} \min(h, h_v) \right)^{-0.5} + \frac{\sqrt{g}}{k} \ln\left( \frac{\max(h, h_v)}{h_v} \right)\]where:
\(C_v\) — vegetated Chezy coefficient
\(C_b\) — bed Chezy coefficient
\(C_d\) — drag coefficient
\(m\) — stem density \([m^{-2}]\)
\(D\) — stem diameter \([m]\)
\(g\) — gravitational acceleration \([m/s^2]\)
\(h\) — flow depth \([m]\)
\(h_v\) — vegetation height \([m]\)
\(k\) — von Kármán constant
For computational efficiency, some terms are precomputed in the initializer, giving:
\[C_v = (a_1 + a_2 C_d \min(h, h_v))^{-0.5} + a_3 \ln\left( \frac{\max(h, h_v)}{h_v} \right)\]The operator updates momentum explicitly using:
\[\frac{\partial (uh)}{\partial t} = - g \frac{uh \sqrt{u^2 + v^2}}{C_v^2 h^2}\]- Parameters:
domain (anuga.Domain) – ANUGA domain instance.
veg_diameter (float or numpy.ndarray) – Vegetation stem diameter [m]. Either a single constant applied everywhere or an array with one value per cell centroid.
veg_density (float or numpy.ndarray) – Vegetation stem density [#/m²]. Either a single constant applied everywhere or an array with one value per cell centroid.
veg_height (float or numpy.ndarray) – Vegetation stem height [m]. Either a single constant applied everywhere or an array with one value per cell centroid.
bed_friction_const (float or numpy.ndarray, optional) – Bed friction Chezy coefficient. Default is 65. Either a single constant applied everywhere or an array with one value per cell centroid.
- __init__(domain, veg_diameter=None, veg_density=None, veg_height=None, drag=1.0, bed_friction_const=65.0, description=None, label=None, logging=False, verbose=False)[source]
Methods
__init__(domain[, veg_diameter, ...])If Operator is applied independently on each cell and so is parallel safe.
set_veg_quantity(name, values)Register vegetation quantity and set values in the domain.
set_vegetation([veg_diameter, veg_density, ...])Set vegetation characteristics, either for the first time or as an update.
timestepping_statistics()Recompute Baptist coefficients after vegetation update.
update_quantities(inds)Calculate drag that vegetation imparts on flow, then update momentum quantities.
- __call__()[source]
Get the current water depth and vegetated cell indicies, then update Chezy values accordingly.