zoomy_core.model.models.malpasset

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#

MalpassetSWE

Viscous wetting/drying SWE with state [b, h, hu, hv] and aux [hinv], dissipation closed by closures. The pressure g h^2/2 is a separate operator so the well-balanced Riemann solvers can reconstruct it.

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.SWE

Viscous wetting/drying SWE with state [b, h, hu, hv] and aux [hinv], dissipation closed by closures. The pressure g h^2/2 is a separate operator so the well-balanced Riemann solvers can reconstruct it.

Initialization

Build the model.

Args

  • eps: wet/dry depth threshold (declared as wet_dry_eps).

  • h_friction_floor: depth floor in the Manning h^(-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) u via the bounded hinv, without pressure.

hydrostatic_pressure()#

Hydrostatic pressure g h^2/2 on the momentum diagonal, added by the positive nonconservative Riemann solvers.

nonconservative_matrix()#

Bed-slope product g h d_d b only; the pressure must not be folded in here.

source()#

Bed-friction momentum sink rate * u_i, with rate summed over the bottom closures; zero at rest.

diffusion_matrix_explicit()#

Explicit eddy-viscosity tensor of div(D h grad u) (D summed over the horizontal closures), diagonal on the momentum rows plus a cross term on h.

update_variables()#

Cap hu and hv to max(h - wet_dry_eps, 0) * U_MAX; b and h are 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 bounded hinv, 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): equals 1/h for h >= eps and tends to zero as h -> 0.

References

  • Kurganov & Petrova 2007, https://doi.org/10.4310/CMS.2007.v5.n1.a6