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

Classes

struct  CulvertCurve
 Inlet-control curve coefficients for one culvert type code. More...
 

Functions

OPENSWMM_KERNEL_FN double fricSlopeHW (double velocity, double hyd_rad, double c_hw) noexcept
 
OPENSWMM_KERNEL_FN double fricSlopeDW (double velocity, double hyd_rad, double roughness) noexcept
 
OPENSWMM_KERNEL_FN double culvertInflow (double q_proposed, double head, double y_full, double a_full, double slope, const CulvertCurve &cc, bool mitered, double &dqdh) noexcept
 Inlet-controlled discharge for one culvert.
 

Variables

constexpr double kViscosity = 1.1e-5
 
constexpr double kGravity = 32.2
 Gravity in internal units, matching constants::GRAVITY.
 

Function Documentation

◆ culvertInflow()

OPENSWMM_KERNEL_FN double openswmm::hydkernels::culvertInflow ( double q_proposed,
double head,
double y_full,
double a_full,
double slope,
const CulvertCurve & cc,
bool mitered,
double & dqdh )
noexcept

Inlet-controlled discharge for one culvert.

Three regimes, keyed on the relative headwater h/D: unsubmerged (≤ 0.95) Q = A·√D · (h/D / K)^(1/M) submerged (≥ y₂) Q = A·√D · √((h/D − Y + scf) / C) between linear interpolation of the two

with the slope correction factor scf = −7·S for a mitered inlet and +0.5·S otherwise. Returns q_proposed unchanged when the inlet does not control.

Parameters
ccthe type code's coefficients (see culvert::getCoeffs)
miteredwhether the type code is a mitered inlet (5, 37, 46)
Here is the caller graph for this function:

◆ fricSlopeDW()

OPENSWMM_KERNEL_FN double openswmm::hydkernels::fricSlopeDW ( double velocity,
double hyd_rad,
double roughness )
noexcept

Darcy-Weisbach friction slope, with the Swamee-Jain explicit approximation to Colebrook-White above the laminar range. S_f = f·v²/(2·g·D), D = 4R

Here is the caller graph for this function:

◆ fricSlopeHW()

OPENSWMM_KERNEL_FN double openswmm::hydkernels::fricSlopeHW ( double velocity,
double hyd_rad,
double c_hw )
noexcept

Hazen-Williams friction slope. S_f = (v / (1.318·C·R^0.63))^(1/0.54)

Here is the caller graph for this function:

Variable Documentation

◆ kGravity

double openswmm::hydkernels::kGravity = 32.2
inlineconstexpr

Gravity in internal units, matching constants::GRAVITY.

◆ kViscosity

double openswmm::hydkernels::kViscosity = 1.1e-5
inlineconstexpr

Kinematic viscosity of water, ft²/s. Spelled here rather than included so the header stays dependency-free for the plugin build; it must equal constants::VISCOS, and a static_assert in ForceMain.cpp holds it to that.