Native infiltration kernels with caller-managed accepted-step state. These methods mutate the supplied state immediately and provide no rollback, finite-input validation or failure status. Call once per accepted source step, or evaluate a private state copy for a trial. Internal rates/depths are ft/s/ft; initialization alone accepts project input units. Serialize shared state use.
More...
|
| void | horton_init (HortonState &state, double f0, double fmin, double decay, double regen, double Fmax, const SimulationOptions &opts) |
| | Convert authored Horton parameters and reset ordinary Horton history.
|
| |
| double | horton_getInfil (HortonState &state, double precip, double depth, double dt) |
| | Integrate exponential Horton capacity over one step with dry recovery.
|
| |
| double | modHorton_getInfil (HortonState &state, double precip, double depth, double dt) |
| | Advance the linear excess-infiltration Modified Horton model.
|
| |
| void | grnampt_init (GreenAmptState &state, double S, double Ks, double IMD, const SimulationOptions &opts) |
| | Convert authored Green-Ampt parameters and initialize the upper zone.
|
| |
| double | grnampt_getInfil (GreenAmptState &state, double precip, double depth, double dt, InfilModel model_type=InfilModel::GREEN_AMPT, double infil_factor=1.0, double recovery_factor=1.0) |
| | Advance saturated/unsaturated Green-Ampt history and compute actual infiltration.
|
| |
| void | curvenum_init (CurveNumState &state, double CN, double regen) |
| | Initialize Curve Number retention and all event-history fields.
|
| |
| double | curvenum_getInfil (CurveNumState &state, double precip, double depth, double dt, double recovery_factor=1.0) |
| | Advance SCS Curve Number event retention with ponded-water continuation.
|
| |
| double | constant_getInfil (double rate_ftsec, double precip, double depth, double dt) |
| | Return a stateless capacity bounded by available water.
|
| |
Native infiltration kernels with caller-managed accepted-step state. These methods mutate the supplied state immediately and provide no rollback, finite-input validation or failure status. Call once per accepted source step, or evaluate a private state copy for a trial. Internal rates/depths are ft/s/ft; initialization alone accepts project input units. Serialize shared state use.
◆ constant_getInfil()
| double openswmm::infil::constant_getInfil |
( |
double | rate_ftsec, |
|
|
double | precip, |
|
|
double | depth, |
|
|
double | dt ) |
Return a stateless capacity bounded by available water.
- Parameters
-
| rate_ftsec | Finite authored capacity ft/s, normally nonnegative. |
| precip | Finite incoming rate ft/s, normally nonnegative. |
| depth | Finite nonnegative available ponded feet. |
| dt | Finite positive seconds; unchecked division occurs even if capacity is zero. |
- Returns
- max(0,min(rate_ftsec,precip+depth/dt)) ft/s. No state is read/modified and no finite-value/error handling is added. This model has no legacy input token.
◆ curvenum_getInfil()
| double openswmm::infil::curvenum_getInfil |
( |
CurveNumState & | state, |
|
|
double | precip, |
|
|
double | depth, |
|
|
double | dt, |
|
|
double | recovery_factor = 1.0 ) |
Advance SCS Curve Number event retention with ponded-water continuation.
- Parameters
-
| [in,out] | state | Initialized finite CN retention/history; updates event P/F, remaining S/Se, inter-event T and previous rate f immediately. |
| precip | Finite nonnegative rainfall ft/s; caller determines runon inclusion. |
| depth | Finite nonnegative ponded feet. During no rain, depth>0.004167 ft can continue the preceding rate while retention remains. |
| dt | Finite positive seconds, unchecked. |
| recovery_factor | Finite nonnegative multiplier on dry capacity regeneration; zero suppresses that recovery. Applied after regen*Smax*dt in legacy arithmetic order. |
- Returns
- Nonnegative supply-limited ft/s for valid inputs. New rainfall after Tmax resets event totals using current retention; positive regen depletes S with infiltration, otherwise it remains unchanged. No numeric validation/status/rollback.
◆ curvenum_init()
| void openswmm::infil::curvenum_init |
( |
CurveNumState & | state, |
|
|
double | CN, |
|
|
double | regen ) |
Initialize Curve Number retention and all event-history fields.
- Parameters
-
| [out] | state | Replaced with initialized Smax/S/Se/P/F/f/regen/T/Tmax values. |
| CN | Finite authored curve number, clamped to [10,99] before the retention formula (1000/CN-10)/12 feet. Does not reject nonfinite input explicitly. |
| regen | Drying time days (despite the parameter name); positive becomes 1/(days*86400), otherwise zero. Tmax=0.06/regen when positive, else 1e10 seconds. No project-unit conversion is needed for this empirical inch-based formula. |
◆ grnampt_getInfil()
Advance saturated/unsaturated Green-Ampt history and compute actual infiltration.
- Parameters
-
| [in,out] | state | Initialized unscaled Ks/Lu/suction/moisture state. Updates T, F, Fu, IMD and saturated status; base Ks/Lu are not scaled in place. Caller provides physically valid finite state and owns trial/accepted-step copying. |
| precip | Finite nonnegative rainfall plus included runon ft/s. |
| depth | Finite nonnegative ponded depth feet. |
| dt | Finite positive seconds; decrements T before choosing the branch. |
| model_type | GREEN_AMPT resets event F in the low-rain timer branch; MOD_GREEN_AMPT skips that particular reset. Dry-zone emptying/reset logic is shared; other enum values also follow the non-GREEN_AMPT branch. |
| infil_factor | Conductivity multiplier: ks=Ks*factor and lu=Lu*sqrt(factor). Positive finite factor is needed for nonzero finite lu in division branches; zero/negative/nonfinite factors receive no protective guard. |
| recovery_factor | Dimensionless dry-recovery multiplier, normally positive finite; zero can produce an infinite inter-event timer and is not special-cased. |
- Returns
- Infiltration ft/s from the state-dependent supply/capacity solve. Factors are applied locally, upper-zone drainage/event resets follow the legacy algorithm, and no finite-output check, convergence status or rollback is supplied.
◆ grnampt_init()
Convert authored Green-Ampt parameters and initialize the upper zone.
- Parameters
-
| [out] | state | Receives S/Ks/IMD/IMDmax, F=Fu=0, derived Lu/Fumax and saturated=false. Existing inter-event T is retained; caller initializes it for new simulation state. Invalid values are not rejected or clamped. |
| S | Suction depth in project inches/mm, normally nonnegative. |
| Ks | Positive saturated conductivity in project in/hr or mm/hr, converted first to ft/s; Lu is derived from conductivity expressed in in/hr in all systems. |
| IMD | Initial moisture-deficit fraction, physically in [0,1]. |
| opts | Valid project unit options used by rainfall/depth conversions. No forcing factors or accepted water-store changes occur here. |
◆ horton_getInfil()
| double openswmm::infil::horton_getInfil |
( |
HortonState & | state, |
|
|
double | precip, |
|
|
double | depth, |
|
|
double | dt ) |
Integrate exponential Horton capacity over one step with dry recovery.
- Parameters
-
| [in,out] | state | Initialized parameters/history; normally finite f0>=fmin>=0, nonnegative decay/regen/Fmax and meaningful cumulative tp/Fe. Caller applies any conductivity/recovery multipliers before calling. Updates tp and, when capped, Fe; Fmh is not used. No rollback if an intermediate becomes nonfinite. |
| precip | Rainfall plus included runon rate ft/s, normally finite nonnegative. |
| depth | Ponded feet available over this interval, normally finite nonnegative. |
| dt | Finite positive seconds; no zero/negative-step guard. |
- Returns
- Actual ft/s bounded by available precip+depth/dt for valid state. Negative capacity difference/decay/regen returns zero unchanged. Equal f0/fmin or zero decay uses constant capacity without advancing history or enforcing Fmax. Wet regular steps solve equivalent cumulative time (up to twenty Newton iterations); dry steps recover time and capped infiltration. Numerical failure has no diagnostic.
◆ horton_init()
| void openswmm::infil::horton_init |
( |
HortonState & | state, |
|
|
double | f0, |
|
|
double | fmin, |
|
|
double | decay, |
|
|
double | regen, |
|
|
double | Fmax, |
|
|
const SimulationOptions & | opts ) |
Convert authored Horton parameters and reset ordinary Horton history.
- Parameters
-
| [out] | state | Receives parameters plus tp=Fe=0. Existing Fmh is retained; use a fresh/default state or explicitly reset it before Modified Horton reuse. |
| f0 | Initial capacity in project rainfall units (in/hr or mm/hr). |
| fmin | Ultimate capacity in the same units, normally 0<=fmin<=f0. |
| decay | Finite nonnegative exponential/linear decay constant per hour, converted to per second. |
| regen | Drying time in days, not a regeneration rate; positive becomes -log(0.02)/(regen*86400), nonpositive disables recovery. |
| Fmax | Cumulative infiltration depth in inches/mm; positive converts to feet, nonpositive stores zero (unlimited). No validity/finite checks are performed. |
| opts | Compatible valid flow-unit selection for rainfall/rain-depth conversions. Does not apply monthly/pattern conductivity/recovery factors. |
◆ modHorton_getInfil()
| double openswmm::infil::modHorton_getInfil |
( |
HortonState & | state, |
|
|
double | precip, |
|
|
double | depth, |
|
|
double | dt ) |
Advance the linear excess-infiltration Modified Horton model.
- Parameters
-
| [in,out] | state | Compatible initialized Horton parameters with finite f0>=fmin>=0 and nonnegative decay/regen. Fe drives capacity f0-decay*Fe; Fmh tracks total infiltration against positive Fmax. Caller resets Fmh when starting a new simulation because horton_init does not do so. Updates Fe/Fmh, not tp. |
| precip | Finite nonnegative incoming rate ft/s including caller-supplied runon. |
| depth | Finite nonnegative ponded depth feet. |
| dt | Finite positive step seconds; unchecked. |
- Returns
- Capacity/supply-limited ft/s. Invalid negative parameter relationships return zero unchanged; constant-capacity branches bypass cumulative state/cap. Dry periods exponentially reduce Fe and Fmh. No finite validation/error status or trial rollback is supplied.