OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::transport::fvkernels Namespace Reference

Classes

struct  NetworkMeshData
 SoA mesh geometry and topology for the FV network solver. More...
 
struct  NetworkStateData
 Mutable solver state — the conserved variables and the node volumes. More...
 
struct  SpeciesKernelView
 Non-owning view over everything the species kernels read and write. More...
 

Enumerations

enum class  Limiter
 Slope limiter used by the second-order (MUSCL) reconstruction. More...
 
enum class  ScalarScheme
 Reconstruction used for the advected scalar field. More...
 

Functions

void reconstructScalars (const SpeciesKernelView &v, double dt)
 
void limitSpeciesFluxes (const SpeciesKernelView &v, int species, double dt)
 Assemble the face species fluxes and limit them (Zalesak FCT).
 
void dispersionSolve (const SpeciesKernelView &v, double dt)
 
double limitSlope (double a, double b, Limiter lim)
 

Enumeration Type Documentation

◆ Limiter

enum class openswmm::fv::Limiter : int
strong

Slope limiter used by the second-order (MUSCL) reconstruction.

◆ ScalarScheme

enum class openswmm::fv::ScalarScheme : int
strong

Reconstruction used for the advected scalar field.

Function Documentation

◆ dispersionSolve()

void openswmm::transport::fvkernels::dispersionSolve ( const SpeciesKernelView & v,
double dt )

Implicit longitudinal dispersion (decision D-FV1): one Thomas tridiagonal solve per cell chain per species; unconditionally stable, removes the Δx²/(2·D_L) explicit constraint. E3: honours v.cell_dispersion when set (per-conduit / FISCHER coefficients); scalar v.dispersion otherwise.

Cell coefficient under either model. E3 bitwise-preservation note: each face uses 0.5*(D_i + D_j). With cd == nullptr both operands are v.dispersion, and 0.5*(D + D) == D EXACTLY in binary floating point (the ×2 and ×0.5 are exponent shifts), so the face coefficient — and therefore every downstream product in the same evaluation order — is bit-identical to the pre-E3 v.dispersion * … expression. The FV solver passes cd == nullptr and keeps its bitwise contract (E0 gate).

Here is the call graph for this function:

◆ limitSlope()

double openswmm::transport::fvkernels::limitSlope ( double a,
double b,
Limiter lim )
inline

Slope limiters for the second-order scalar reconstruction. All three are TVD; superbee is the sharpest and can artificially steepen smooth profiles, minmod the most diffusive and most robust. (Moved verbatim from ExplicitFvSolver.cpp; also used by the solver's hydrodynamic reconstructState.)

Here is the caller graph for this function:

◆ limitSpeciesFluxes()

void openswmm::transport::fvkernels::limitSpeciesFluxes ( const SpeciesKernelView & v,
int species,
double dt )

Assemble the face species fluxes and limit them (Zalesak FCT).

Bracketing the reconstructed FACE value between its two cells is necessary but NOT sufficient for the discrete maximum principle: under reversing, unsteady flow with the cell areas evolving underneath the scalar, a face value legitimately inside its bracket can still drain more solute than its donor cell holds. Measured: QUICKEST-ULTIMATE produced −1.3e-3 on a step-function advection case with wall reflections, which is not acceptable in a water-quality model.

The fix has to limit the FLUX, not the result. Clipping the updated concentration would enforce the bound but destroy exact solute conservation (§6.11c) — the two properties trade off, and Zalesak (1979) is the construction that keeps both: blend each face's high-order flux back toward first-order upwind by the largest factor that no incident cell's bound rejects. The SAME limited flux updates both incident cells, so conservation is untouched.

Assemble the face species fluxes and limit them (Zalesak FCT). See the implementation notes: limits the FLUX, not the result, so the discrete maximum principle and exact solute conservation hold together.

The flux record with the positivity-scaled mass flux substituted in, so the species rides on exactly the water the hydrodynamic update moved. (Formerly ExplicitFvSolver::adjustedFlux.)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reconstructScalars()

void openswmm::transport::fvkernels::reconstructScalars ( const SpeciesKernelView & v,
double dt )

Scalar reconstruction — the anti-diffusion layer (FV plan §3.2). Computes limited face values for every species and calls limitSpeciesFluxes to assemble/limit the face species fluxes into f_phi_flux.

Here is the call graph for this function: