34#ifndef OPENSWMM_ENGINE_2D_SURFACE_FLUX_CALCULATOR_HPP
35#define OPENSWMM_ENGINE_2D_SURFACE_FLUX_CALCULATOR_HPP
101inline double evapSink(
double rate,
double depth,
double dry_depth)
noexcept {
102 if (rate <= 0.0 || depth <= 0.0)
104 if (depth >= dry_depth)
106 double t = depth / dry_depth;
107 return rate * t * t * (3.0 - 2.0 * t);
133inline double infilSink(
double rate,
double depth,
double dry_depth)
noexcept {
134 if (rate <= 0.0 || depth <= 0.0)
136 if (depth >= dry_depth)
138 double t = depth / dry_depth;
139 return rate * t * t * (3.0 - 2.0 * t);
165 const SolverOptions2D& opts,
double dh_eps,
int i,
int idx)
noexcept;
194 const SolverOptions2D& opts,
double dt);
218 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 ExchangeLaw.hpp:60
void computeFaceVelocity(const MeshData &mesh, SurfaceStateData &state, const SolverOptions2D &opts)
Reconstruct diagnostic cell velocity from wetted-edge normal velocities.
Definition SurfaceFluxCalculator.cpp:404
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:133
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:366
void computeLimitedGradients(const MeshData &mesh, SurfaceStateData &state, double epsilon, int nthreads)
Apply Jawahar-Kamath slope limiter (Eq. [23]–[24]).
Definition SurfaceFluxCalculator.cpp:279
void computeUnlimitedGradients(const MeshData &mesh, SurfaceStateData &state, int nthreads)
Compute unlimited gradients for all triangles via Green-Gauss theorem.
Definition SurfaceFluxCalculator.cpp:243
double evapSink(double rate, double depth, double dry_depth) noexcept
Depth-limited evaporation sink rate (m/s) for one cell.
Definition SurfaceFluxCalculator.hpp:101
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:496
SoA storage for 2D mixed triangle/quad mesh geometry and topology.
Definition MeshData.hpp:65
Definition SurfaceStateData.hpp:64