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

Edge flux computation, gradient calculation, and slope limiting. More...

Include dependency graph for SurfaceFluxCalculator.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
 

Functions

void openswmm::twoD::computeUnlimitedGradients (const MeshData &mesh, SurfaceStateData &state, int nthreads=1)
 Compute unlimited gradients for all triangles via Green-Gauss theorem.
 
void openswmm::twoD::computeLimitedGradients (const MeshData &mesh, SurfaceStateData &state, double epsilon, int nthreads=1)
 Apply Jawahar-Kamath slope limiter (Eq. [23]–[24]).
 
double openswmm::twoD::evapSink (double rate, double depth, double dry_depth) noexcept
 Depth-limited evaporation sink rate (m/s) for one cell.
 
double openswmm::twoD::infilSink (double rate, double depth, double dry_depth) noexcept
 Depth-limited infiltration sink rate (m/s) for one cell (plan §5.5).
 
double openswmm::twoD::computeBoundaryEdgeFlux (const MeshData &mesh, const SurfaceStateData &state, const SolverOptions2D &opts, double dh_eps, int i, int idx) noexcept
 Boundary-edge flux for cell i across flat mesh edge slot idx (m³/s, inflow-positive). Exported wrapper over the file-local boundary kernel so non-DW solvers (the explicit marcher) evaluate the identical 5-type boundary math per substep.
 
void openswmm::twoD::computeCellContinuity (const MeshData &mesh, SurfaceStateData &state, const SolverOptions2D &opts, double dt)
 Compute the per-cell continuity residual (local mass-balance check).
 
void openswmm::twoD::computeFaceVelocity (const MeshData &mesh, SurfaceStateData &state, const SolverOptions2D &opts)
 Reconstruct cell-centred velocity (vx, vy) from edge fluxes (RT0).
 

Detailed Description

Edge flux computation, gradient calculation, and slope limiting.

Implements the second-order finite volume flux computation:

  • Unlimited gradients via Green-Gauss (Eq. [25]–[26])
  • Slope limiter (Jawahar-Kamath, Eq. [23]–[24])
  • Edge flux with upwind selection (Eq. [15a], [22])
See also
TWO_DIMENSIONAL_SURFACE_ROUTING_IMPLEMENTATION_STRATEGY.md §3, §10
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0