34#ifndef OPENSWMM_ENGINE_2D_SURFACE_FLUX_CALCULATOR_HPP
35#define OPENSWMM_ENGINE_2D_SURFACE_FLUX_CALCULATOR_HPP
68 double epsilon,
int nthreads = 1);
83inline double evapSink(
double rate,
double depth,
double dry_depth)
noexcept {
84 if (rate <= 0.0 || depth <= 0.0)
return 0.0;
85 if (depth >= dry_depth)
return rate;
86 double t = depth / dry_depth;
87 return rate * t * t * (3.0 - 2.0 * t);
111inline double infilSink(
double rate,
double depth,
double dry_depth)
noexcept {
112 if (rate <= 0.0 || depth <= 0.0)
return 0.0;
113 if (depth >= dry_depth)
return rate;
114 double t = depth / dry_depth;
115 return rate * t * t * (3.0 - 2.0 * t);
125 const SurfaceStateData& state,
126 const SolverOptions2D& opts,
127 double dh_eps,
int i,
int idx)
noexcept;
151 const SolverOptions2D& opts,
double dt);
169 const SolverOptions2D& opts);
Structure-of-Arrays (SoA) storage for 2D triangular mesh geometry.
Configuration options for the 2D surface routing solver.
Structure-of-Arrays (SoA) storage for 2D surface routing state.
Definition NodeCoupling.cpp:16
void computeFaceVelocity(const MeshData &mesh, SurfaceStateData &state, const SolverOptions2D &opts)
Reconstruct cell-centred velocity (vx, vy) from edge fluxes (RT0).
Definition SurfaceFluxCalculator.cpp:344
double infilSink(double rate, double depth, double dry_depth) noexcept
Depth-limited infiltration sink rate (m/s) for one cell (plan §5.5).
Definition SurfaceFluxCalculator.hpp:111
void computeCellContinuity(const MeshData &mesh, SurfaceStateData &state, const SolverOptions2D &opts, double dt)
Compute the per-cell continuity residual (local mass-balance check).
Definition SurfaceFluxCalculator.cpp:302
void computeLimitedGradients(const MeshData &mesh, SurfaceStateData &state, double epsilon, int nthreads)
Apply Jawahar-Kamath slope limiter (Eq. [23]–[24]).
Definition SurfaceFluxCalculator.cpp:219
void computeUnlimitedGradients(const MeshData &mesh, SurfaceStateData &state, int nthreads)
Compute unlimited gradients for all triangles via Green-Gauss theorem.
Definition SurfaceFluxCalculator.cpp:181
double evapSink(double rate, double depth, double dry_depth) noexcept
Depth-limited evaporation sink rate (m/s) for one cell.
Definition SurfaceFluxCalculator.hpp:83
double 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)....
Definition SurfaceFluxCalculator.cpp:398
SoA storage for 2D mixed triangle/quad mesh geometry and topology.
Definition MeshData.hpp:67
Definition SurfaceStateData.hpp:59