![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
X3b: RWPT longitudinal dispersion on LARD segments. More...
#include <algorithm>#include <cmath>#include <cstdint>#include <vector>#include "../../core/SimulationContext.hpp"#include "SegmentStore.hpp"Go to the source code of this file.
Classes | |
| class | openswmm::lard::RwptDispersion |
| Persistent particle field + the per-substep exchange operator. More... | |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::lard |
Functions | |
| std::uint64_t | openswmm::lard::rwpt_hash (std::uint64_t z) |
| double | openswmm::lard::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 | openswmm::lard::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 | openswmm::lard::rwpt_u_dev (double eta, double ubar, double ustar, bool turbulent) |
| Velocity DEVIATION u(η) − ū. Turbulent: log-law; laminar: parabola. | |
| double | openswmm::lard::rwpt_d_eta (double eta, double h, double ustar, bool turbulent) |
| double | openswmm::lard::rwpt_d_eta_grad (double eta, double h, double ustar, bool turbulent) |
| double | openswmm::lard::rwpt_hyd_radius (double area, double depth, double diam, bool circular) |
Variables | |
| constexpr int | openswmm::lard::kRwptParticlesPerLink = 2000 |
| constexpr double | openswmm::lard::kKappa = 0.41 |
| von Kármán | |
| constexpr double | openswmm::lard::kNuWater = 1.05e-5 |
| kinematic viscosity, ft²/s | |
| constexpr double | openswmm::lard::kDm = 1.3454e-8 |
| molecular diffusivity, ft²/s | |
| constexpr double | openswmm::lard::kEtaMin = 1.0e-3 |
| log-law floor | |
| constexpr double | openswmm::lard::kReTurb = 2000.0 |
X3b: RWPT longitudinal dispersion on LARD segments.
Subplan X3b (strategy §5, §2.5; §16 D-L4/D-L6). Longitudinal dispersion emerges from resolved VERTICAL shear plus a vertical random walk — the Taylor/Elder mechanism — rather than from a fitted D_L coefficient (that deterministic alternative is the ARD engine's E3 machinery; the user chose RWPT for LARD).
D-X3b1 — particles carry no mass; they estimate the inter-segment dispersive exchange. Persistent per-particle state is (ζ, η): ζ ∈ [0, V] the volume coordinate from the link's FRONT (upstream) boundary — volume coordinates make the substep's bulk advection an exact uniform shift (ζ += V_in) — and η ∈ (0,1) the normalized depth, which holds the velocity memory that shear dispersion correlates against position. Each substep, after the segment field is final (post-RELEASE):
Profiles (v1, wide-channel forms, documented deviations):
D-L6 counter RNG: draws are a pure function of (seed, link, global substep counter, particle, draw#) via a splitmix64-style hash — bit-reproducible under any threading, schedule, or run repetition; RWPT_SEED changes every draw.
NOT here (recorded): inter-LINK particle dispersion (ζ reflects at both link ends; segment exchange stops at the boundary node's CSTR, which already mixes), transverse-shear dispersion (Fischer's field-scale term — a calibrated-D machinery, not a resolved one), particle-count adaptivity, wall species.