OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
Inlet.hpp File Reference

Street inlet capture efficiency — FHWA HEC-22. More...

#include <cstdint>
#include <vector>
Include dependency graph for Inlet.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::inlet::Geom
 Street / channel geometry seen by one inlet, in INTERNAL units. More...
 
struct  openswmm::inlet::Design
 One inlet design in INTERNAL units (legacy TInletDesign, inlet.c:66-74). More...
 
struct  openswmm::inlet::UsageParams
 The per-placement half of one usage row (legacy TInlet fields). More...
 
struct  openswmm::inlet::InletSoA
 
class  openswmm::inlet::InletSolver
 

Namespaces

namespace  openswmm
 
namespace  openswmm::inlet
 

Enumerations

enum class  openswmm::inlet::InletType : int {
  openswmm::inlet::GRATE = 0 ,
  openswmm::inlet::CURB = 1 ,
  openswmm::inlet::COMBO = 2 ,
  openswmm::inlet::SLOTTED = 3 ,
  openswmm::inlet::DROP_GRATE = 4 ,
  openswmm::inlet::DROP_CURB = 5 ,
  openswmm::inlet::CUSTOM = 6
}
 
enum class  openswmm::inlet::GrateType : int {
  openswmm::inlet::P_BAR_50 = 0 ,
  openswmm::inlet::P_BAR_50x100 = 1 ,
  openswmm::inlet::P_BAR_30 = 2 ,
  openswmm::inlet::CURVED_VANE = 3 ,
  openswmm::inlet::TILT_BAR_45 = 4 ,
  openswmm::inlet::TILT_BAR_30 = 5 ,
  openswmm::inlet::RETICULINE = 6 ,
  openswmm::inlet::GENERIC = 7
}
 Legacy enum GrateType (inlet.c:124-127). More...
 
enum class  openswmm::inlet::Placement : int {
  openswmm::inlet::AUTOMATIC = 0 ,
  openswmm::inlet::ON_GRADE = 1 ,
  openswmm::inlet::ON_SAG = 2
}
 
enum class  openswmm::inlet::ThroatAngle : int {
  openswmm::inlet::HORIZONTAL = 0 ,
  openswmm::inlet::INCLINED = 1 ,
  openswmm::inlet::VERTICAL = 2
}
 Legacy enum ThroatAngleType (inlet.c:131) — InletStore::curb_throat. More...
 
enum class  openswmm::inlet::CurveKind : int {
  openswmm::inlet::UNRESOLVED = 0 ,
  openswmm::inlet::DIVERSION = 1 ,
  openswmm::inlet::RATING = 2
}
 InletStore::curve_kind codes for a CUSTOM design. More...
 

Functions

double openswmm::inlet::getEo (double sr, double ts, double w)
 HEC-22 Eq(4-4) solved for Eo with Ts/w substituted for (T/w)−1 (inlet.c:1248).
 
double openswmm::inlet::getFlowSpread (const Geom &g, double Q)
 Width of flow spread, HEC-22 Eq(4-2)/(4-6) (inlet.c:1200).
 
double openswmm::inlet::getGutterFlowRatio (const Geom &g, double w)
 Ratio of the flow over width w to the total street flow, Eq(4-16) (inlet.c:1518).
 
double openswmm::inlet::getGutterAreaRatio (const Geom &g, double Wg, double A)
 
double openswmm::inlet::getSplashOverVelocity (int grate_type, double L)
 
double openswmm::inlet::getGrateInletCapture (const Design &d, Geom &g, double Q)
 
double openswmm::inlet::getCurbInletCapture (const Geom &g, double Q, double opening_length)
 On-grade curb-opening capture, Eq(4-22a)/(4-23)/(4-24) (inlet.c:1477).
 
double openswmm::inlet::getOnGradeInletCapture (const Design &d, Geom &g, double Q, double depth)
 Capture of a single on-grade inlet — type dispatch + COMBO sweeper (inlet.c:1325).
 
double openswmm::inlet::getOnGradeCapturedFlow (const Design &d, const UsageParams &u, Geom &g, double q, double depth)
 Total capture of an on-grade usage: num_inlets in series, both sides (inlet.c:1267).
 
void openswmm::inlet::findOnSagGrateFlows (const Design &d, const Geom &g, double depth, double *weir_flow, double *orifice_flow)
 On-sag grate weir/orifice flows, Eq(4-26)/(4-27) (inlet.c:1644).
 
void openswmm::inlet::findOnSagCurbFlows (const Design &d, const Geom &g, double depth, double L, double *Qw, double *Qo)
 
double openswmm::inlet::getCurbOrificeFlow (double flow_depth, double opening_height, double opening_length, int throat_angle)
 Curb-opening orifice flow with the throat-angle head, Eq(4-31a) (inlet.c:1764).
 
double openswmm::inlet::getOnSagSlottedFlow (const Design &d, double depth)
 On-sag slotted drain flow, Eq(4-32)/(4-33) (inlet.c:1785).
 
double openswmm::inlet::getOnSagInletCapture (const Design &d, const Geom &g, double depth)
 Capture of a single on-sag inlet (inlet.c:1610).
 
double openswmm::inlet::getOnSagCapturedFlow (const Design &d, const UsageParams &u, const Geom &g, double depth)
 Total capture of an on-sag usage: single inlet × nsides · num_inlets (inlet.c:1574).
 
double openswmm::inlet::getCustomCapturedFlow (const UsageParams &u, const Geom &g, const Table &curve, int curve_kind, double q, double depth, double ucf_flow, double ucf_len)
 Capture of a CUSTOM inlet from its diversion / rating curve (inlet.c:1902).
 
double openswmm::inlet::getInletArea (const Design &d, const UsageParams &u)
 Unclogged open area of one usage (ft²) — legacy getInletArea (inlet.c:1870).
 

Variables

constexpr double openswmm::inlet::MIN_RUNOFF_FLOW = 0.001
 Legacy MIN_RUNOFF_FLOW (consts.h:203) — cfs.
 
constexpr double openswmm::inlet::INLET_FUDGE = 0.0001
 Legacy FUDGE (consts.h:272).
 
constexpr double openswmm::inlet::INLET_BIG = 1.0e10
 Legacy BIG (consts.h:118).
 

Detailed Description

Street inlet capture efficiency — FHWA HEC-22.

Inlet types: GRATE, CURB, COMBO, SLOTTED, DROP_GRATE, DROP_CURB, CUSTOM. On-grade capture uses splash-over velocity and frontal / side flow fractions (HEC-22 Eq. 4-16 … 4-24); on-sag capture uses the weir ↔ orifice transition (Eq. 4-26 … 4-33).

Two host kinds share one kernel and one statistics block (plans/INLET_JUNCTION_IMPLEMENTATION_PLAN_2026-09-05.md §2.1):

  • conduit-attribute usage — [INLET_USAGE], host = a STREET conduit, bypass node = that conduit's downstream node;
  • inlet junction — [INLET_JUNCTIONS], host = the node itself, approach flow from the attached street conduit(s).

The pure kernel functions below are transliterations of the legacy file-scope routines and carry the HEC-22 equation numbers; they take their state through inlet::Geom / inlet::Design / inlet::UsageParams instead of legacy's module-level shared variables, so they are directly unit-testable.

Note
Legacy reference: src/legacy/engine/inlet.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0