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

Namespaces

namespace  ode
 

Variables

constexpr double GRAVITY = 32.2
 
constexpr double SQRT_GRAVITY = 5.67450438786
 sqrt(GRAVITY) — precomputed to avoid per-element std::sqrt in Froude calc.
 
constexpr double INV_SQRT_GRAVITY = 0.17622692584
 1.0 / sqrt(GRAVITY) — multiply instead of divide in Froude computation.
 
constexpr double PI = 3.141592654
 Pi.
 
constexpr double PHI = 1.486
 
constexpr double MEXP = 5.0 / 3.0
 
constexpr double VISCOS = 1.1e-5
 Kinematic viscosity of water at 20°C (ft²/sec).
 
constexpr double SEC_PER_DAY = 86400.0
 Seconds per day.
 
constexpr double FT_PER_IN = 1.0 / 12.0
 Feet per inch.
 
constexpr double IN_PER_FT = 12.0
 Inches per foot.
 
constexpr double FUDGE = 0.0001
 
constexpr double MIN_SURFAREA = 12.566
 
constexpr double MIN_DELTA_Z = 0.001
 Minimum elevation drop for conduit slope computation (ft).
 
constexpr double XTOL = 0.001
 
constexpr double TINY = 1.0e-6
 Small positive number for underflow protection.
 
constexpr double OMEGA = 0.5
 
constexpr double DEFAULT_HEAD_TOL = 0.005
 
constexpr int DEFAULT_MAX_TRIALS = 8
 
constexpr double MAX_VELOCITY = 50.0
 
constexpr double MIN_TIMESTEP = 0.001
 
constexpr double EXTRAN_CROWN_CUTOFF = 0.96
 
constexpr double SLOT_CROWN_CUTOFF = 0.985257
 Preissmann slot crown cutoff fraction.
 
constexpr double SLOT_WIDTH_FACTOR = 0.001
 Preissmann slot width factor (slot_width = y_full * this factor).
 
constexpr double MIN_LINK_FLOW = 0.001
 Minimum orifice/weir flow threshold.
 
constexpr double RECT_ALFMAX = 0.97
 Maximum alpha fraction for rectangular shapes.
 
constexpr double TRAP_ALFMAX = 0.98
 Maximum alpha fraction for trapezoidal shapes.
 
constexpr int N_TRANSECT_TBL = 51
 Transect discretization table size.
 
constexpr int MAX_SHAPES = 26
 Maximum number of cross-section shape types.
 
constexpr int N_FLOW_CLASSES = 7
 Number of flow classification bins.
 
constexpr int MAX_PAST_RAIN = 48
 Maximum past rain hours tracked per gage.
 
constexpr int N_TIME_BINS = 5
 Number of time step histogram bins.
 
constexpr int DATE_DELTA = 693594
 

Variable Documentation

◆ DATE_DELTA

constexpr int openswmm::constants::DATE_DELTA = 693594
constexpr

Delphi-style date offset used by legacy datetime encoding.

See also
Legacy: DateDelta in datetime.c Needed for day-of-week computation: (floor(date) + DATE_DELTA) % 7 gives 0=Sat with +1 → 1=Sun..7=Sat matching legacy datetime_dayOfWeek().

◆ DEFAULT_HEAD_TOL

constexpr double openswmm::constants::DEFAULT_HEAD_TOL = 0.005
constexpr

Default convergence tolerance for node depth change (ft).

See also
Legacy: HeadTol in globals.h

◆ DEFAULT_MAX_TRIALS

constexpr int openswmm::constants::DEFAULT_MAX_TRIALS = 8
constexpr

Default maximum Picard iterations per routing step.

See also
Legacy: MaxTrials in globals.h

◆ EXTRAN_CROWN_CUTOFF

constexpr double openswmm::constants::EXTRAN_CROWN_CUTOFF = 0.96
constexpr

EXTRAN surcharge crown cutoff fraction (depth/full_depth). Above this, the Preissmann slot or surcharge algorithm activates.

◆ FT_PER_IN

constexpr double openswmm::constants::FT_PER_IN = 1.0 / 12.0
constexpr

Feet per inch.

◆ FUDGE

constexpr double openswmm::constants::FUDGE = 0.0001
constexpr

Minimum depth/area/flow threshold (ft or ft²). Values below this are treated as zero for numerical stability.

See also
Legacy: FUDGE in dynwave.c

◆ GRAVITY

constexpr double openswmm::constants::GRAVITY = 32.2
constexpr

Gravitational acceleration (ft/s²).

See also
Legacy: GRAVITY in consts.h

◆ IN_PER_FT

constexpr double openswmm::constants::IN_PER_FT = 12.0
constexpr

Inches per foot.

◆ INV_SQRT_GRAVITY

constexpr double openswmm::constants::INV_SQRT_GRAVITY = 0.17622692584
constexpr

1.0 / sqrt(GRAVITY) — multiply instead of divide in Froude computation.

◆ MAX_PAST_RAIN

constexpr int openswmm::constants::MAX_PAST_RAIN = 48
constexpr

Maximum past rain hours tracked per gage.

◆ MAX_SHAPES

constexpr int openswmm::constants::MAX_SHAPES = 26
constexpr

Maximum number of cross-section shape types.

◆ MAX_VELOCITY

constexpr double openswmm::constants::MAX_VELOCITY = 50.0
constexpr

Maximum conduit velocity (ft/s) — prevents numerical blowup.

See also
Legacy: MAXVELOCITY in dynwave.c

◆ MEXP

constexpr double openswmm::constants::MEXP = 5.0 / 3.0
constexpr

Manning's overland flow exponent (5/3).

See also
Legacy: MEXP in consts.h

◆ MIN_DELTA_Z

constexpr double openswmm::constants::MIN_DELTA_Z = 0.001
constexpr

Minimum elevation drop for conduit slope computation (ft).

◆ MIN_LINK_FLOW

constexpr double openswmm::constants::MIN_LINK_FLOW = 0.001
constexpr

Minimum orifice/weir flow threshold.

◆ MIN_SURFAREA

constexpr double openswmm::constants::MIN_SURFAREA = 12.566
constexpr

Default minimum surface area (ft²) — approximately a 4-ft diameter manhole.

See also
Legacy: MIN_SURFAREA in consts.h

◆ MIN_TIMESTEP

constexpr double openswmm::constants::MIN_TIMESTEP = 0.001
constexpr

Absolute minimum routing timestep (s).

See also
Legacy: MINTIMESTEP in dynwave.c

◆ N_FLOW_CLASSES

constexpr int openswmm::constants::N_FLOW_CLASSES = 7
constexpr

Number of flow classification bins.

◆ N_TIME_BINS

constexpr int openswmm::constants::N_TIME_BINS = 5
constexpr

Number of time step histogram bins.

◆ N_TRANSECT_TBL

constexpr int openswmm::constants::N_TRANSECT_TBL = 51
constexpr

Transect discretization table size.

◆ OMEGA

constexpr double openswmm::constants::OMEGA = 0.5
constexpr

Picard iteration under-relaxation factor.

See also
Legacy: OMEGA in dynwave.c

◆ PHI

constexpr double openswmm::constants::PHI = 1.486
constexpr

Manning's equation US customary unit factor (1.486). Q = (PHI/n) * A * R^(2/3) * S^(1/2) where PHI = 1.486 for US, 1.0 for SI.

See also
Legacy: PHI in consts.h

◆ PI

constexpr double openswmm::constants::PI = 3.141592654
constexpr

Pi.

◆ RECT_ALFMAX

constexpr double openswmm::constants::RECT_ALFMAX = 0.97
constexpr

Maximum alpha fraction for rectangular shapes.

◆ SEC_PER_DAY

constexpr double openswmm::constants::SEC_PER_DAY = 86400.0
constexpr

Seconds per day.

◆ SLOT_CROWN_CUTOFF

constexpr double openswmm::constants::SLOT_CROWN_CUTOFF = 0.985257
constexpr

Preissmann slot crown cutoff fraction.

◆ SLOT_WIDTH_FACTOR

constexpr double openswmm::constants::SLOT_WIDTH_FACTOR = 0.001
constexpr

Preissmann slot width factor (slot_width = y_full * this factor).

◆ SQRT_GRAVITY

constexpr double openswmm::constants::SQRT_GRAVITY = 5.67450438786
constexpr

sqrt(GRAVITY) — precomputed to avoid per-element std::sqrt in Froude calc.

◆ TINY

constexpr double openswmm::constants::TINY = 1.0e-6
constexpr

Small positive number for underflow protection.

◆ TRAP_ALFMAX

constexpr double openswmm::constants::TRAP_ALFMAX = 0.98
constexpr

Maximum alpha fraction for trapezoidal shapes.

◆ VISCOS

constexpr double openswmm::constants::VISCOS = 1.1e-5
constexpr

Kinematic viscosity of water at 20°C (ft²/sec).

◆ XTOL

constexpr double openswmm::constants::XTOL = 0.001
constexpr

Tolerance for bounding state variables.

See also
Legacy: XTOL in gwater.c