zoomy_core.model.models.malpasset#
Viscous wet/dry SWE with Manning friction (the Malpasset variant), derived from
SWE. Used by the Firedrake dam-break and Malpasset cases;
SystemModel.from_model picks its operators up by name.
Module Contents#
Classes#
Viscous wetting/drying SWE with state |
API#
- class zoomy_core.model.models.malpasset.MalpassetSWE(*, g=9.81, n=0.033, nu=1.0, eps=0.01, h_friction_floor=0.5, ev_gate=True, closures=None, **kw)#
Bases:
zoomy_core.model.models.swe.SWEViscous wetting/drying SWE with state
[b, h, hu, hv]and aux[hinv], dissipation closed byclosures. The pressureg h^2/2is a separate operator so the well-balanced Riemann solvers can reconstruct it.Initialization
Build the model.
Args
eps: wet/dry depth threshold (declared aswet_dry_eps).h_friction_floor: depth floor in the Manningh^(-1/3).ev_gate: zero the eigenvalues of dry cells (default on).closures: bottom / horizontal closures; default Manning friction + eddy viscosity.
- variables#
[‘b’, (‘h’, ‘nonnegative’), ‘hu’, ‘hv’]
- parameters#
None
- U_MAX#
30.0
- flux()#
Convective momentum flux
hu (x) uvia the boundedhinv, without pressure.
- hydrostatic_pressure()#
Hydrostatic pressure
g h^2/2on the momentum diagonal, added by the positive nonconservative Riemann solvers.
- nonconservative_matrix()#
Bed-slope product
g h d_d bonly; the pressure must not be folded in here.
- source()#
Bed-friction momentum sink
rate * u_i, withratesummed over thebottomclosures; zero at rest.
- diffusion_matrix_explicit()#
Explicit eddy-viscosity tensor of
div(D h grad u)(Dsummed over thehorizontalclosures), diagonal on the momentum rows plus a cross term onh.
- update_variables()#
Cap
huandhvtomax(h - wet_dry_eps, 0) * U_MAX;bandhare never modified.
- update_variables_jacobian_wrt_variables()#
Zero Jacobian of
update_variables(the cap is not differentiated).
- eigenvalues()#
Eigenvalues
[0, un, un -/+ c]from the boundedhinv, with an optional wet/dry gate (ev_gate).
- update_aux_variables()#
Desingularised inverse depth
hinv = sqrt(2) h / sqrt(h^4 + max(h, eps)^4): equals1/hforh >= epsand tends to zero ash -> 0.References
Kurganov & Petrova 2007, https://doi.org/10.4310/CMS.2007.v5.n1.a6