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

Above-rim pond of a 2D-coupled junction: a C¹ surface-area ramp, its closed-form volume and inverse, and the head-equalisation cap. More...

#include <cmath>
Include dependency graph for PondModel.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::pond
 

Macros

#define OPENSWMM_POND_HD   inline
 

Functions

OPENSWMM_POND_HD double openswmm::twoD::pond::area (double x, double a_eq, double band)
 Pond surface area at depth x above the rim.
 
OPENSWMM_POND_HD double openswmm::twoD::pond::volume (double x, double a_eq, double band)
 Pond volume held between the rim and depth x above it.
 
OPENSWMM_POND_HD double openswmm::twoD::pond::depthForVolume (double v, double a_eq, double band)
 Depth above the rim at which the pond holds v (inverse of volume()).
 
OPENSWMM_POND_HD double openswmm::twoD::pond::equalizeCap (double dh, double window, double a1)
 Head-equalisation cap on one exchange (the generalised Rubinato Eq. 10 limiter). The 1D head is frozen for the coupling window T while the 2D cell is re-evaluated every substep against its live head, so the only head an exchange can carry past the other within the window is the 1D node's: |Q| ≤ |Δh|·A1/T. (The first form also charged the coupling cell for the whole window, |Δh|/(T(1/A1 + 1/A2)); that scaled the cap with the cell's area and choked the exchange wherever cells are smaller than the structure, while the drain/spill churn it removes is the 1D side's.) Returns the largest admissible |Q|; +∞ when the area or window is unknown.
 

Detailed Description

Above-rim pond of a 2D-coupled junction: a C¹ surface-area ramp, its closed-form volume and inverse, and the head-equalisation cap.

x is the water depth above the rim (any length unit; areas in the same unit squared). The pond area rises from 0 at the rim to A_eq over the band [0, δ] with the Hermite smoothstep and stays A_eq beyond, so dh/dt = ΣQ / A_s has no jump at the rim. The band lies entirely ABOVE the rim: the dynamic wave books a junction's volume below the rim as zero, so storage below it would vanish (plans/1D2D_FINE_SCALE_COUPLING_PLAN §0R R8). δ = 0 is the legacy step (A_eq from the first wet millimetre).

area(x) = A·S(x/δ), S(t) = 3t² − 2t³ volume(x) = A·δ·(t³ − t⁴/2), t = x/δ (x ≤ δ) = A·(x − δ/2) (x > δ)

Header-only and host/device callable, like ExchangeLaw.hpp.

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

Macro Definition Documentation

◆ OPENSWMM_POND_HD

#define OPENSWMM_POND_HD   inline