OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
DiffusiveKernels.hpp File Reference

Face law and step bound for MOMENTUM_EQUATION DIFFUSIVE_WAVE (plans/2D_FULL_SWE_SHOCK_CAPTURING_PLAN_2026-09-05.md §2.3). More...

#include <algorithm>
#include <cmath>
Include dependency graph for DiffusiveKernels.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 
namespace  openswmm::twoD::diffusive
 

Macros

#define OPENSWMM_KERNEL_FN   inline
 

Functions

OPENSWMM_KERNEL_FN double openswmm::twoD::diffusive::faceDischarge (double hf, double slope, double nf, double s_eps) noexcept
 
OPENSWMM_KERNEL_FN double openswmm::twoD::diffusive::cellDiffusiveDt (double alpha, double lchar, double h, double n, double slope_abs, double s_eps) noexcept
 

Detailed Description

Face law and step bound for MOMENTUM_EQUATION DIFFUSIVE_WAVE (plans/2D_FULL_SWE_SHOCK_CAPTURING_PLAN_2026-09-05.md §2.3).

The explicit diffusive wave of Hunter et al. (2005) / LISFLOOD-FP: no inertia, the face discharge is the Manning quasi-steady balance of the free-surface slope,

q_f = − h_f^{5/3} · S / (n_f · √max(|S|, S_ε)), S = Δη·inv_dx

with the slope regularised below S_ε so the conductance h^{5/3}/(n√|S|) cannot diverge on a flat surface (the classic explicit-DW failure). The scheme is a nonlinear diffusion ∂h/∂t = ∇·(K∇η), K = h^{5/3}/(n√|S|), so the explicit step is bounded by Δt ≤ L²/(4K) — the Δx² restriction that the local-inertial term exists to remove. It is affordable here only because the tiered LTS lets each cell pay its own Δt.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0

Macro Definition Documentation

◆ OPENSWMM_KERNEL_FN

#define OPENSWMM_KERNEL_FN   inline