![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Classes | |
| class | LagrangianSolver |
| class | RwptDispersion |
| Persistent particle field + the per-substep exchange operator. More... | |
| class | SegmentStore |
| struct | SpeciesRowLayout |
| The segment store's species-row layout, computed in ONE place. More... | |
Functions | |
| SpeciesRowLayout | rowLayout (const SimulationContext &ctx) |
| The single source of truth for the row layout. Reserved rows are appended after the pollutants in a fixed order (age, then temperature) so an index means the same thing everywhere. | |
| std::uint64_t | rwpt_hash (std::uint64_t z) |
| Mix one unsigned64-bit deterministic random key. | |
| double | rwpt_uniform (std::uint64_t seed, std::uint64_t link, std::uint64_t stepc, std::uint64_t particle, std::uint64_t draw) |
Uniform in (0,1), keyed. draw distinguishes multiple draws per particle. | |
| double | rwpt_normal (std::uint64_t seed, std::uint64_t link, std::uint64_t stepc, std::uint64_t particle, std::uint64_t draw) |
| Standard normal (Box–Muller on two keyed uniforms). | |
| double | rwpt_u_dev (double eta, double ubar, double ustar, bool turbulent) |
| Velocity DEVIATION u(η) − ū. Turbulent: log-law; laminar: parabola. | |
| double | rwpt_d_eta (double eta, double h, double ustar, bool turbulent) |
| Vertical diffusivity in η-units (D_t/h²), and its η-gradient (the Itô drift). Turbulent: Rouse parabola κ·u*·h·η(1−η); laminar: molecular. | |
| double | rwpt_d_eta_grad (double eta, double h, double ustar, bool turbulent) |
| Evaluate coordinate diffusivity gradient used as stochastic drift. | |
| double | rwpt_hyd_radius (double area, double depth, double diam, bool circular) |
| Hydraulic radius: exact for CIRCULAR from flow area, ≈ depth otherwise (wide-channel v1 approximation, recorded). | |
Variables | |
| constexpr double | kTinyFlow = 1.0e-8 |
| cfs; below this a link moves nothing | |
| constexpr int | kRwptParticlesPerLink = 2000 |
| constexpr double | kKappa = 0.41 |
| von Kármán | |
| constexpr double | kNuWater = 1.05e-5 |
| kinematic viscosity, ft²/s | |
| constexpr double | kDm = 1.3454e-8 |
| molecular diffusivity, ft²/s | |
| constexpr double | kEtaMin = 1.0e-3 |
| log-law floor | |
| constexpr double | kReTurb = 2000.0 |
| constexpr int | kMaxSegmentsPerLink = 100 |
| constexpr double | kMergeAtol = 1.0e-6 |
| constexpr double | kMergeRtol = 1.0e-4 |
|
inline |
The single source of truth for the row layout. Reserved rows are appended after the pollutants in a fixed order (age, then temperature) so an index means the same thing everywhere.
Resolve the carried network1D row order for the LARD owner.
| [in] | ctx | Stable transport class policy and active legacy-reaction profile. |
|
inline |
Vertical diffusivity in η-units (D_t/h²), and its η-gradient (the Itô drift). Turbulent: Rouse parabola κ·u*·h·η(1−η); laminar: molecular.
Evaluate diffusivity in the dimensionless vertical particle coordinate.
| [in] | eta | Dimensionless particle ordinate, caller supplies0..1 for physical profile. |
| [in] | h | Finite positive water depth ft; no zero guard. |
| [in] | ustar | Finite nonnegative friction speed ft/s. |
| [in] | turbulent | True selects shear profile, false molecular laminar profile. |
|
inline |
Evaluate coordinate diffusivity gradient used as stochastic drift.
| [in] | eta | Dimensionless particle ordinate, caller supplies0..1 for physical profile. |
| [in] | h | Finite positive water depth ft; no zero guard. |
| [in] | ustar | Finite nonnegative friction speed ft/s. |
| [in] | turbulent | True selects shear profile, false molecular laminar profile. |
|
inline |
Mix one unsigned64-bit deterministic random key.
| [in] | z | Counter/key input, unsigned overflow intentionally wraps modulo2^64. |
|
inline |
Hydraulic radius: exact for CIRCULAR from flow area, ≈ depth otherwise (wide-channel v1 approximation, recorded).
Estimate hydraulic radius for the RWPT turbulence calculation.
| [in] | area | Unused area argument retained for geometry-call symmetry; circle area is recomputed. |
| [in] | depth | Water depth ft; noncircular/invalid-circle fallback max(depth,0). |
| [in] | diam | Positive circular full diameter ft when circular is true. |
| [in] | circular | True selects circular-segment wetted geometry. |
|
inline |
Standard normal (Box–Muller on two keyed uniforms).
Generate a deterministic Box-Muller normal variate from adjacent uniform draws.
| [in] | seed | Reproducibility seed, no global generator state. |
| [in] | link | Stable native link identity key. |
| [in] | stepc | Accepted quality-step counter; repeat tuple reproduces sample. |
| [in] | particle | Zero-based particle key; particle*8+draw wraps unsigned arithmetic. |
| [in] | draw | Draw stream key (draw+1 also used by normal). |
|
inline |
Velocity DEVIATION u(η) − ū. Turbulent: log-law; laminar: parabola.
Evaluate longitudinal particle velocity relative to cross-sectional mean.
| [in] | eta | Dimensionless ordinate, normally0..1; turbulent log floors at1e-3. |
| [in] | ubar | Mean positive speed ft/s used by laminar profile. |
| [in] | ustar | Friction speed ft/s used by turbulent log profile. |
| [in] | turbulent | True selects log-law, false parabolic laminar deviation. |
|
inline |
Uniform in (0,1), keyed. draw distinguishes multiple draws per particle.
Generate a deterministic counter-keyed pseudorandom uniform variate.
| [in] | seed | Reproducibility seed, no global generator state. |
| [in] | link | Stable native link identity key. |
| [in] | stepc | Accepted quality-step counter; repeat tuple reproduces sample. |
| [in] | particle | Zero-based particle key; particle*8+draw wraps unsigned arithmetic. |
| [in] | draw | Draw stream key (draw+1 also used by normal). |
|
constexpr |
molecular diffusivity, ft²/s
|
constexpr |
log-law floor
|
constexpr |
von Kármán
|
constexpr |
EPANET-style cap on segments per link (strategy §4.1 default; the [OPTIONS] MAX_SEGMENTS_PER_LINK override arrives with X3).
|
constexpr |
Merge tolerance for a released segment against the current front segment (strategy §4.5): merge when |dC| <= atol + rtol·|C_front| for EVERY species. Plug-flow stretches then collapse to one segment — the dominant constant-factor win in EPANET's LTD.
|
constexpr |
|
constexpr |
kinematic viscosity, ft²/s
|
constexpr |
|
constexpr |
|
constexpr |
cfs; below this a link moves nothing