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

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)
 
std::uint64_t rwpt_hash (std::uint64_t z)
 
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)
 
double rwpt_d_eta_grad (double eta, double h, double ustar, bool turbulent)
 
double rwpt_hyd_radius (double area, double depth, double diam, bool circular)
 

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
 

Function Documentation

◆ rowLayout()

SpeciesRowLayout openswmm::lard::rowLayout ( const SimulationContext & ctx)
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rwpt_d_eta()

double openswmm::lard::rwpt_d_eta ( double eta,
double h,
double ustar,
bool turbulent )
inline

Vertical diffusivity in η-units (D_t/h²), and its η-gradient (the Itô drift). Turbulent: Rouse parabola κ·u*·h·η(1−η); laminar: molecular.

Here is the caller graph for this function:

◆ rwpt_d_eta_grad()

double openswmm::lard::rwpt_d_eta_grad ( double eta,
double h,
double ustar,
bool turbulent )
inline
Here is the caller graph for this function:

◆ rwpt_hash()

std::uint64_t openswmm::lard::rwpt_hash ( std::uint64_t z)
inline
Here is the caller graph for this function:

◆ rwpt_hyd_radius()

double openswmm::lard::rwpt_hyd_radius ( double area,
double depth,
double diam,
bool circular )
inline

Hydraulic radius: exact for CIRCULAR from flow area, ≈ depth otherwise (wide-channel v1 approximation, recorded).

Here is the caller graph for this function:

◆ rwpt_normal()

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 )
inline

Standard normal (Box–Muller on two keyed uniforms).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rwpt_u_dev()

double openswmm::lard::rwpt_u_dev ( double eta,
double ubar,
double ustar,
bool turbulent )
inline

Velocity DEVIATION u(η) − ū. Turbulent: log-law; laminar: parabola.

Here is the caller graph for this function:

◆ rwpt_uniform()

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 )
inline

Uniform in (0,1), keyed. draw distinguishes multiple draws per particle.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ kDm

double openswmm::lard::kDm = 1.3454e-8
constexpr

molecular diffusivity, ft²/s

◆ kEtaMin

double openswmm::lard::kEtaMin = 1.0e-3
constexpr

log-law floor

◆ kKappa

double openswmm::lard::kKappa = 0.41
constexpr

von Kármán

◆ kMaxSegmentsPerLink

int openswmm::lard::kMaxSegmentsPerLink = 100
constexpr

EPANET-style cap on segments per link (strategy §4.1 default; the [OPTIONS] MAX_SEGMENTS_PER_LINK override arrives with X3).

◆ kMergeAtol

double openswmm::lard::kMergeAtol = 1.0e-6
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.

◆ kMergeRtol

double openswmm::lard::kMergeRtol = 1.0e-4
constexpr

◆ kNuWater

double openswmm::lard::kNuWater = 1.05e-5
constexpr

kinematic viscosity, ft²/s

◆ kReTurb

double openswmm::lard::kReTurb = 2000.0
constexpr

◆ kRwptParticlesPerLink

int openswmm::lard::kRwptParticlesPerLink = 2000
constexpr

◆ kTinyFlow

double openswmm::lard::kTinyFlow = 1.0e-8
constexpr

cfs; below this a link moves nothing