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

Classes

struct  ClosureEval
 A, T and I₁ at one depth, from one panel locate. More...
 
struct  FaceFlux
 Result of a face flux evaluation. More...
 
struct  FaceState
 One side of a face after hydrostatic reconstruction. More...
 

Functions

OPENSWMM_KERNEL_FN void closureLocate (const FvClosure &c, double h, int &i, double &t) noexcept
 Locate a uniform depth panel and its clamped local coordinate.
 
OPENSWMM_KERNEL_FN void closureHermite (const FvClosure &c, int i, double t, double &a, double &dadh, double &int_dh) noexcept
 Evaluate one cubic area panel, its derivative and its partial integral.
 
OPENSWMM_KERNEL_FN ClosureEval closureEval (const FvClosure &c, double h) noexcept
 Evaluate area, top width and cumulative hydrostatic integral together.
 
OPENSWMM_KERNEL_FN ClosureEval closureEval (const FvClosure &c, double h, double &radius) noexcept
 Evaluate closure area/width/integral and friction radius at one depth.
 
OPENSWMM_KERNEL_FN double closureArea (const FvClosure &c, double h) noexcept
 Evaluate the closure flow area.
 
OPENSWMM_KERNEL_FN double closureWidth (const FvClosure &c, double h) noexcept
 Evaluate the closure area derivative used as top width.
 
OPENSWMM_KERNEL_FN double closureI1 (const FvClosure &c, double h) noexcept
 Evaluate the closure hydrostatic first moment.
 
OPENSWMM_KERNEL_FN double closureHydRad (const FvClosure &c, double h) noexcept
 Evaluate the friction hydraulic radius.
 
OPENSWMM_KERNEL_FN double closureDepthOfArea (const FvClosure &c, double a) noexcept
 Invert aggregate closure area using the same forward geometry.
 
OPENSWMM_KERNEL_FN double slotRamp (double s) noexcept
 Evaluate the smooth slot-mouth opening fraction.
 
OPENSWMM_KERNEL_FN double slotRampIntegral (double s) noexcept
 Integrate the normalized slot-mouth opening from zero to s.
 
OPENSWMM_KERNEL_FN double areaOfDepth (const FvGeometry &g, double h) noexcept
 Evaluate memoryless slot area at a depth.
 
OPENSWMM_KERNEL_FN double widthOfDepth (const FvGeometry &g, double h) noexcept
 Evaluate memoryless slot top width at a depth.
 
OPENSWMM_KERNEL_FN double hydRadOfDepth (const FvGeometry &g, double h) noexcept
 Evaluate memoryless closure friction radius.
 
OPENSWMM_KERNEL_FN double i1OfDepth (const FvGeometry &g, double h, double area_at_h) noexcept
 Evaluate the memoryless closure hydrostatic area integral.
 
OPENSWMM_KERNEL_FN double depthOfArea (const FvGeometry &g, double a) noexcept
 Invert aggregate area on the memoryless closure.
 
OPENSWMM_KERNEL_FN double celerity (double a, double t) noexcept
 Compute the gravity-wave speed from aggregate area and top width.
 
OPENSWMM_KERNEL_FN void waveSpeeds (const FaceState &L, const FaceState &R, double &sl, double &sr) noexcept
 Estimate left and right signal speeds with dry-front and pressure-bore bounds.
 
OPENSWMM_KERNEL_FN void physicalFlux (const FaceState &S, double &fa, double &fq) noexcept
 Evaluate the conservative Saint-Venant physical flux of one state.
 
OPENSWMM_KERNEL_FN double riemannMassFlux (const FaceState &L, const FaceState &R) noexcept
 Evaluate only the HLL volumetric flux for an algebraic node residual.
 
OPENSWMM_KERNEL_FN FaceFlux riemannFlux (const FaceState &L, const FaceState &R) noexcept
 Evaluate HLL hydraulic flux and the scalar contact-wave speed.
 
OPENSWMM_KERNEL_FN double speciesFlux (const FaceState &L, const FaceState &R, const FaceFlux &f, double phi_l, double phi_r, bool hllc) noexcept
 Evaluate a conservative advected-scalar flux using the hydraulic fan.
 
OPENSWMM_KERNEL_FN double frictionUpdate (double q, double u, double r, double dt, double rough_factor) noexcept
 Apply a semi-implicit Manning discharge sink.
 
OPENSWMM_KERNEL_FN double localLossUpdate (double q, double u, double k, double dx, double dt) noexcept
 Apply a semi-implicit entrance/exit momentum loss over an end cell.
 
OPENSWMM_KERNEL_FN double ufUpdate (double q, double a, double u_old, double k3, double grad_term, double dt) noexcept
 Apply the bounded unsteady-friction acceleration correction.
 
OPENSWMM_KERNEL_FN double tpaDepthOfArea (const FvGeometry &g, double a) noexcept
 Evaluate the signed-pressure TPA area-to-head extension.
 
OPENSWMM_KERNEL_FN double tpaAreaOfDepth (const FvGeometry &g, double h) noexcept
 Evaluate aggregate TPA area on the slot line in either pressure direction.
 
OPENSWMM_KERNEL_FN double tpaI1OfDepth (const FvGeometry &g, double h) noexcept
 Evaluate the TPA pressure integral without numerical slot-storage pressure.
 
OPENSWMM_KERNEL_FN double faceCflDt (double cfl, double dx, double u, double c) noexcept
 Compute a local advective/acoustic Courant timestep bound.
 
OPENSWMM_KERNEL_FN double positivityScale (double vol, double outflow, double dt) noexcept
 Limit exported substep volume to the available donor water.
 

Variables

constexpr double kGravity = 32.2
 
constexpr double kDryDepth = 1.0e-7
 
constexpr double kDryArea = 1.0e-12
 Area floor paired with kDryDepth for the u = Q/A division.
 
constexpr double kEtaDeadband = 1.0e-12
 

Function Documentation

◆ areaOfDepth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::areaOfDepth ( const FvGeometry & g,
double h )
noexcept

Evaluate memoryless slot area at a depth.

Delegates to closureArea; the closure includes the tapered slot.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]hFinite native depth in ft; <=0 is dry and above-crown geometry follows the slot/vertical-wall continuation.
Returns
Aggregate flow area across barrels in ft2.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ celerity()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::celerity ( double a,
double t )
noexcept

Compute the gravity-wave speed from aggregate area and top width.

Guards do not validate NaN, infinity or overflow in positive inputs.

Parameters
[in]aFinite area in ft2; <=kDryArea returns zero.
[in]tFinite top width in ft; <=0 returns zero.
Returns
sqrt(32.2*a/t) in ft/s, or zero for dry/degenerate geometry.
Here is the caller graph for this function:

◆ closureArea()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::closureArea ( const FvClosure & c,
double h )
noexcept

Evaluate the closure flow area.

Uses the same polynomial/cubic or above-crown slot area as closureEval; no table ownership or state changes.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]hFinite depth in ft; <=0 returns a zero/dry result, and >=y_full uses the analytic above-crown continuation.
Returns
Aggregate area in ft2.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closureDepthOfArea()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::closureDepthOfArea ( const FvClosure & c,
double a )
noexcept

Invert aggregate closure area using the same forward geometry.

Polynomial geometry uses a cancellation-resistant quadratic inverse. Tabulated geometry locates the area bracket then performs at most 12 safeguarded Newton/bisection steps on its monotone cubic with 1e-15*y_full depth-step target. Returns the last iterate if that budget is exhausted; no convergence flag/error estimate is provided. Coherent monotone tables, valid LUT panel indices and positive slot width are caller preconditions. No allocation or mutation occurs.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]aFinite aggregate area in ft2; <=0 returns zero. The sub-crown LUT coordinate must be int-representable.
Returns
Depth in ft; above-crown area uses y_full+(a-a_crown)/t_slot.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closureEval() [1/2]

OPENSWMM_KERNEL_FN ClosureEval openswmm::fv::kernels::closureEval ( const FvClosure & c,
double h )
noexcept

Evaluate area, top width and cumulative hydrostatic integral together.

Uses the open polynomial or one Hermite panel below the crown; Hermite width is floored at zero. At/above crown the linear slot/vertical-wall area and its exact integral are used. At h==0 width is zero by the dry convention.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]hFinite depth in ft; <=0 returns a zero/dry result, and >=y_full uses the analytic above-crown continuation.
Returns
Area in aggregate ft2, width in aggregate ft and I1 in aggregate ft3.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closureEval() [2/2]

OPENSWMM_KERNEL_FN ClosureEval openswmm::fv::kernels::closureEval ( const FvClosure & c,
double h,
double & radius )
noexcept

Evaluate closure area/width/integral and friction radius at one depth.

Shares the panel locate while retaining the separate closureEval/closureHydRad arithmetic, including the linear radius interpolation. No persistent cache, allocation or geometry modification; intended for a cell's post-update closure.

Parameters
[in]cInitialized immutable closure, as required by closureEval.
[in]hFinite depth in ft; dry and above-crown conventions are unchanged.
[out]radiusPer-barrel hydraulic radius in ft; must not alias c.
Returns
Aggregate area, width and hydrostatic integral in native units.
Here is the call graph for this function:

◆ closureHermite()

OPENSWMM_KERNEL_FN void openswmm::fv::kernels::closureHermite ( const FvClosure & c,
int i,
double t,
double & a,
double & dadh,
double & int_dh )
noexcept

Evaluate one cubic area panel, its derivative and its partial integral.

Output references must denote distinct storage and must not alias the closure samples. This pure scalar evaluation allocates nothing and reports no finite/monotonicity status.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]iValid panel index in [0,kClosurePanels-1], unchecked.
[in]tDimensionless panel coordinate, normally [0,1]; extrapolation is not clamped.
[out]aCubic area in aggregate ft2.
[out]dadhRaw dA/dh in aggregate ft; no nonnegative clamp.
[out]int_dhIntegral from panel start to t in aggregate ft3, excluding c.I1[i].
Here is the caller graph for this function:

◆ closureHydRad()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::closureHydRad ( const FvClosure & c,
double h )
noexcept

Evaluate the friction hydraulic radius.

At/above crown returns r_full. Polynomial geometry divides aggregate area by aggregate wetted perimeter if positive; tabulated geometry linearly interpolates R rather than using the area cubic.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]hFinite depth in ft; <=0 returns a zero/dry result, and >=y_full uses the analytic above-crown continuation.
Returns
Per-barrel hydraulic radius in ft; zero at/below the invert.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closureI1()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::closureI1 ( const FvClosure & c,
double h )
noexcept

Evaluate the closure hydrostatic first moment.

Delegates to closureEval and returns its cumulative integral, including the analytic slot continuation.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]hFinite depth in ft; <=0 returns a zero/dry result, and >=y_full uses the analytic above-crown continuation.
Returns
Integral of area from invert to h in aggregate ft3.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closureLocate()

OPENSWMM_KERNEL_FN void openswmm::fv::kernels::closureLocate ( const FvClosure & c,
double h,
int & i,
double & t )
noexcept

Locate a uniform depth panel and its clamped local coordinate.

Conversion to int occurs before index clamping, so NaN/infinite/overflowing input is unsupported. Does not access table samples or allocate memory.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]hFinite depth in ft with h*inv_dh representable as int; normally 0<=h<y_full.
[out]iPanel index in [0,kClosurePanels-1].
[out]tDimensionless coordinate within that panel, clamped to [0,1].
Here is the caller graph for this function:

◆ closureWidth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::closureWidth ( const FvClosure & c,
double h )
noexcept

Evaluate the closure area derivative used as top width.

Hermite derivatives are floored at zero; at/above crown returns t_slot. The polynomial derivative is returned directly.

Parameters
[in]cInitialized immutable closure with positive y_full/dh, consistent monotone tables/index map and positive t_slot. Native areas/widths aggregate barrels; radius remains per barrel.
[in]hFinite depth in ft; <=0 returns a zero/dry result, and >=y_full uses the analytic above-crown continuation.
Returns
Aggregate width in ft; zero at/below h=0.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ depthOfArea()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::depthOfArea ( const FvGeometry & g,
double a )
noexcept

Invert aggregate area on the memoryless closure.

Polynomial inversion is direct; tabulated inversion uses up to 12 guarded Newton steps on the same cubic as areaOfDepth. Returns the last iterate without convergence status if the iteration limit is reached. Positive slot width and valid monotone samples/index map are required.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]aFinite aggregate flow area in ft2; <=0 returns zero.
Returns
Depth in ft from closureDepthOfArea.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceCflDt()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::faceCflDt ( double cfl,
double dx,
double u,
double c )
noexcept

Compute a local advective/acoustic Courant timestep bound.

Parameters
[in]cflPositive dimensionless Courant factor.
[in]dxPositive characteristic length in ft.
[in]uFinite advective velocity in ft/s.
[in]cFinite nonnegative wave celerity in ft/s.
Returns
cfl*dx/(abs(u)+c) in seconds when the speed exceeds 1e-12 ft/s, otherwise 1e30 seconds.

◆ frictionUpdate()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::frictionUpdate ( double q,
double u,
double r,
double dt,
double rough_factor )
noexcept

Apply a semi-implicit Manning discharge sink.

For valid nonnegative inputs the denominator is >=1 and does not reverse flow. No finite check or timestep limiter is applied.

Parameters
[in]qCandidate aggregate discharge in ft3/s, either sign.
[in]uConveyance velocity in ft/s; magnitude determines resistance.
[in]rPer-barrel hydraulic radius in ft; <=0 disables the update.
[in]dtNonnegative timestep in seconds.
[in]rough_factorPrecomputed 32.2*(n/1.486)^2 in native Manning units, including any lengthening adjustment; <=0 disables the update.
Returns
q/(1+dt*rough_factor*abs(u)/r^(4/3)) in ft3/s.

◆ hydRadOfDepth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::hydRadOfDepth ( const FvGeometry & g,
double h )
noexcept

Evaluate memoryless closure friction radius.

Delegates to closureHydRad; above-crown radius stays r_full.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]hFinite native depth in ft; <=0 is dry and above-crown geometry follows the slot/vertical-wall continuation.
Returns
Per-barrel hydraulic radius in ft.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ i1OfDepth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::i1OfDepth ( const FvGeometry & g,
double h,
double area_at_h )
noexcept

Evaluate the memoryless closure hydrostatic area integral.

Uses the exact integral of the same panel polynomial/slot continuation as areaOfDepth, ensuring a single-valued pressure closure.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]hFinite native depth in ft; <=0 is dry and above-crown geometry follows the slot/vertical-wall continuation.
[in]area_at_hUnused compatibility value; the integral is computed entirely from the closure and h.
Returns
Integral of aggregate area over depth, in ft3.
Here is the call graph for this function:

◆ localLossUpdate()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::localLossUpdate ( double q,
double u,
double k,
double dx,
double dt )
noexcept

Apply a semi-implicit entrance/exit momentum loss over an end cell.

Parameters
[in]qCandidate aggregate discharge in ft3/s.
[in]uConveyance velocity in ft/s.
[in]kDimensionless local-loss coefficient; <=0 leaves q unchanged.
[in]dxPositive cell length in ft; <=0 leaves q unchanged.
[in]dtNonnegative timestep in seconds.
Returns
q/(1+dt*k*abs(u)/(2*dx)) in ft3/s.

◆ physicalFlux()

OPENSWMM_KERNEL_FN void openswmm::fv::kernels::physicalFlux ( const FaceState & S,
double & fa,
double & fq )
noexcept

Evaluate the conservative Saint-Venant physical flux of one state.

Output references must be distinct and must not alias S; no dry-state correction is applied.

Parameters
[in]SFinite, physically consistent aggregate face state.
[out]faMass/volume flux S.q in ft3/s.
[out]fqMomentum flux S.q*S.u+32.2*S.i1 in ft4/s2.
Here is the caller graph for this function:

◆ positivityScale()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::positivityScale ( double vol,
double outflow,
double dt )
noexcept

Limit exported substep volume to the available donor water.

Returns one if outflow*dt<=max(vol,0), otherwise max(vol,0)/(outflow*dt). Caller must apply the identical scaled face flux to both incident ledgers to preserve conservation; this function does not mutate either state.

Parameters
[in]volFinite available donor volume in ft3; negative volume is treated as zero.
[in]outflowSum of outgoing volume rates in ft3/s; <=0 returns one.
[in]dtSubstep duration in seconds; <=0 returns one.
Returns
Dimensionless factor in [0,1] for finite physical inputs.

◆ riemannFlux()

OPENSWMM_KERNEL_FN FaceFlux openswmm::fv::kernels::riemannFlux ( const FaceState & L,
const FaceState & R )
noexcept

Evaluate HLL hydraulic flux and the scalar contact-wave speed.

Both dry returns a zero result. Supersonic flow selects one physical flux. A straddling fan uses HLL for the two hydraulic equations; contact speed is supplied only for advected scalar selection, with HLL-average fallback for a near-zero contact denominator. No hydrostatic side correction, positivity scaling, gate or culvert limit is applied here; callers apply those consistently afterward.

Parameters
[in]LFinite left reconstructed face state; area ft2, discharge ft3/s, velocity/celerity ft/s and integral ft3.
[in]RFinite right reconstructed state in the same aggregate geometry and left-to-right orientation.
Returns
Aggregate volumetric flux in ft3/s, momentum flux in ft4/s2 and signal/contact speeds in ft/s.
Here is the call graph for this function:

◆ riemannMassFlux()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::riemannMassFlux ( const FaceState & L,
const FaceState & R )
noexcept

Evaluate only the HLL volumetric flux for an algebraic node residual.

Uses the same wave speeds and expression as riemannFlux.mass, including wet supersonic branches. Valid states must yield a nonzero fan width when the fan straddles zero; no separate degeneracy/error status is returned.

Parameters
[in]LFinite left reconstructed face state; area ft2, discharge ft3/s, velocity/celerity ft/s and integral ft3.
[in]RFinite right reconstructed state in the same aggregate geometry and left-to-right orientation.
Returns
Mass flux in ft3/s, positive left-to-right; zero when both areas are dry.
Here is the call graph for this function:

◆ slotRamp()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::slotRamp ( double s)
noexcept

Evaluate the smooth slot-mouth opening fraction.

C1 continuous at both endpoints; no units, allocation or state.

Parameters
[in]sFinite normalized depth (h-y_crown)/(y_full-y_crown).
Returns
Zero for s<=0, one for s>=1, otherwise s*s*(3-2*s).

◆ slotRampIntegral()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::slotRampIntegral ( double s)
noexcept

Integrate the normalized slot-mouth opening from zero to s.

Multiply by slot width times taper height to obtain aggregate slot area in ft2.

Parameters
[in]sFinite normalized depth; negative values are treated as dry.
Returns
Zero for s<=0, s^3-s^4/2 in (0,1), and s-0.5 above the taper.

◆ speciesFlux()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::speciesFlux ( const FaceState & L,
const FaceState & R,
const FaceFlux & f,
double phi_l,
double phi_r,
bool hllc )
noexcept

Evaluate a conservative advected-scalar flux using the hydraulic fan.

HLL uses the physical-state discharges on supersonic branches. For a dry/dry result with zero signal speeds its left branch returns L.q*phi_l, so callers must supply zero discharge for dry states. No concentration clamp or positivity correction is performed here.

Parameters
[in]LFinite left reconstructed face state; area ft2, discharge ft3/s, velocity/celerity ft/s and integral ft3.
[in]RFinite right reconstructed state in the same aggregate geometry and left-to-right orientation.
[in]fHydraulic FaceFlux computed from the same L/R states; required for consistent water/scalar transport.
[in]phi_lFinite left scalar concentration in the caller chosen species units.
[in]phi_rFinite right concentration in the same units.
[in]hllcTrue selects contact-speed upwind times f.mass; false uses the HLL scalar fan.
Returns
Scalar flux in concentration-units*ft3/s, positive left-to-right.

◆ tpaAreaOfDepth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::tpaAreaOfDepth ( const FvGeometry & g,
double h )
noexcept

Evaluate aggregate TPA area on the slot line in either pressure direction.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]hFinite piezometric depth in ft; no invert/crown clamp.
Returns
a_crown+t_slot*(h-y_full) in ft2; can become negative for inadmissibly low head.

◆ tpaDepthOfArea()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::tpaDepthOfArea ( const FvGeometry & g,
double a )
noexcept

Evaluate the signed-pressure TPA area-to-head extension.

Caller must select TPA-flagged closed cells and enforce admissible state; regime history is not read here.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]aFinite aggregate area in ft2; no dry or lower-area clamp.
Returns
y_full+(a-a_crown)/t_slot in ft; may lie below the crown or invert.

◆ tpaI1OfDepth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::tpaI1OfDepth ( const FvGeometry & g,
double h )
noexcept

Evaluate the TPA pressure integral without numerical slot-storage pressure.

Intentionally omits the quadratic slot-area pressure term; this is not the integral of tpaAreaOfDepth.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]hFinite signed piezometric depth in ft; no clamp.
Returns
i1_crown+a_crown*(h-y_full) in aggregate ft3.

◆ ufUpdate()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::ufUpdate ( double q,
double a,
double u_old,
double k3,
double grad_term,
double dt )
noexcept

Apply the bounded unsteady-friction acceleration correction.

Returns q unchanged if both old and candidate velocities are below 0.01 ft/s. Otherwise folds local acceleration implicitly, adds the explicit gradient term, then caps the total discharge change to half abs(q). q==0 therefore remains zero. No neighboring state is read or changed by this scalar kernel.

Parameters
[in]qCandidate aggregate discharge in ft3/s.
[in]aAggregate flow area in ft2; <=0 disables the update.
[in]u_oldConsistent old-snapshot velocity in ft/s.
[in]k3Nonnegative dimensionless unsteady-friction coefficient; <=0 disables the update.
[in]grad_termOld-snapshot celerity*sign(u_old)*abs(dV/dx), in ft/s2.
[in]dtNonnegative substep duration in seconds.
Returns
Corrected aggregate discharge in ft3/s.

◆ waveSpeeds()

OPENSWMM_KERNEL_FN void openswmm::fv::kernels::waveSpeeds ( const FaceState & L,
const FaceState & R,
double & sl,
double & sr )
noexcept

Estimate left and right signal speeds with dry-front and pressure-bore bounds.

Both dry gives zero speeds; one wet side uses its rarefaction tail u±2c. Wet/wet uses Davis bounds, narrowed by a Rankine-Hugoniot bore estimate at interior slot/free interfaces (press 0 versus 1). press==2 node ghosts are excluded from that narrowing. Inputs must carry physically consistent area/discharge/velocity and nonnegative celerity; no validation occurs.

Parameters
[in]LFinite left reconstructed face state; area ft2, discharge ft3/s, velocity/celerity ft/s and integral ft3.
[in]RFinite right reconstructed state in the same aggregate geometry and left-to-right orientation.
[out]slLeft signal speed in ft/s.
[out]srRight signal speed in ft/s.
Here is the caller graph for this function:

◆ widthOfDepth()

OPENSWMM_KERNEL_FN double openswmm::fv::kernels::widthOfDepth ( const FvGeometry & g,
double h )
noexcept

Evaluate memoryless slot top width at a depth.

Delegates to closureWidth; at/above the crown returns the slot or open-section continuation width.

Parameters
[in]gBorrowed initialized geometry with valid closure table, positive full depth/slot width and monotone samples; no pointer is retained.
[in]hFinite native depth in ft; <=0 is dry and above-crown geometry follows the slot/vertical-wall continuation.
Returns
Aggregate dA/dh in ft, zero at/below the invert.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ kDryArea

double openswmm::fv::kernels::kDryArea = 1.0e-12
inlineconstexpr

Area floor paired with kDryDepth for the u = Q/A division.

◆ kDryDepth

double openswmm::fv::kernels::kDryDepth = 1.0e-7
inlineconstexpr

Depth below which a cell is treated as dry: no velocity, no flux, no celerity contribution. The threshold is 1e-7 ft; the separate area floor guards Q/A divisions in callers.

◆ kEtaDeadband

double openswmm::fv::kernels::kEtaDeadband = 1.0e-12
inlineconstexpr

Free-surface difference below which a face is treated as exactly level. Without it the momentum update integrates 1-ulp closure round-trip noise; 1e-12 ft is far below any physical head.

◆ kGravity

double openswmm::fv::kernels::kGravity = 32.2
inlineconstexpr

Gravity in internal units. Matches constants::GRAVITY — spelled here so the header stays dependency-free for the plugin build.