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

Classes

class  TimestepController
 Static utility class for explicit timestep computation. More...
 

Functions

double aquiferSeepFactor (double depth, double gw_head_rel, double d_c) noexcept
 Compute the signed conductance multiplier for conduit-to-aquifer seepage.
 
double capAquiferGain (double seep_rate, double gain_max) noexcept
 Limit the gaining direction of a signed conduit seepage rate.
 
void applySeepageForcing (const SimulationContext &ctx, std::size_t link, double &seep_rate) noexcept
 Apply the registered host seepage override or addition to a conduit rate.
 

Function Documentation

◆ applySeepageForcing()

void openswmm::hydraulics::applySeepageForcing ( const SimulationContext & ctx,
std::size_t link,
double & seep_rate )
inlinenoexcept

Apply the registered host seepage override or addition to a conduit rate.

Other modes leave the rate unchanged. Does not validate values, enforce donor/gain caps or consume SINGLE forcing; routing invokes it after physical caps. Caller serializes forcing edits and evaluation.

Parameters
[in]ctxBorrowed aligned forcing mode/value vectors, stored in native cfs.
[in]linkZero-based global link slot; out-of-mode-vector range is a no-op.
[in,out]seep_rateSigned native cfs rate, positive out of conduit; OVERRIDE replaces and ADD increments.

◆ aquiferSeepFactor()

double openswmm::hydraulics::aquiferSeepFactor ( double depth,
double gw_head_rel,
double d_c )
inlinenoexcept

Compute the signed conductance multiplier for conduit-to-aquifer seepage.

Does not bound gaining magnitude or reject nonfinite inputs; caller applies donor/gain caps separately. All three lengths may share another consistent unit without changing the dimensionless result.

Parameters
[in]depthConduit water depth, normally native ft.
[in]gw_head_relAquifer table elevation relative to conduit mid-invert in matching length units; negative means below bed.
[in]d_cPositive characteristic bed path length in matching units; nonpositive or NaN selects legacy factor1.
Returns
min((depth-max(gw_head_rel,0))/d_c,1); positive loses conduit water, negative gains it.

◆ capAquiferGain()

double openswmm::hydraulics::capAquiferGain ( double seep_rate,
double gain_max )
inlinenoexcept

Limit the gaining direction of a signed conduit seepage rate.

No finite/nonnegative validation or inventory booking; caller supplies a physically valid cap.

Parameters
[in]seep_rateSigned cfs for one barrel: positive conduit loss, negative aquifer gain.
[in]gain_maxNonnegative available aquifer gain cap in the same cfs/barrel convention.
Returns
max(seep_rate,-gain_max); positive loss is not limited.