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

Classes

struct  CulvertCoeffs
 

Functions

CulvertCoeffs getCoeffs (int culvert_code)
 Copy an FHWA culvert inlet coefficient record.
 
double getInflow (double q0, double y, const XSectParams &xs, double slope, int code, double &dqdh, bool &controls)
 Apply an FHWA inlet-capacity limit to a proposed conduit flow.
 

Function Documentation

◆ getCoeffs()

CulvertCoeffs openswmm::culvert::getCoeffs ( int culvert_code)

Copy an FHWA culvert inlet coefficient record.

Parameters
[in]culvert_codeActive coefficient-table code 1..57; every other value selects the inactive record.
Returns
Coefficient copy; all five members are zero for an invalid code.
Here is the caller graph for this function:

◆ getInflow()

double openswmm::culvert::getInflow ( double q0,
double y,
const XSectParams & xs,
double slope,
int code,
double & dqdh,
bool & controls )

Apply an FHWA inlet-capacity limit to a proposed conduit flow.

Uses the submerged equation above its FHWA threshold, unsubmerged equation at/below 0.95*y_full, and a secant transition between. Form-1 root status is not propagated and no separate finite/geometry validation or nonnegative clamp is performed. No pointer is retained.

Parameters
[in]q0Positive proposed per-barrel flow in ft3/s.
[in]yPositive upstream head above the inlet invert in ft.
[in]xsBorrowed valid per-barrel geometry with positive full depth/area and valid Form-1 width evaluations.
[in]slopeDimensionless conduit slope; correction is -7*slope for codes 5/37/46, otherwise 0.5*slope.
[in]codeFHWA inlet code 1..57; invalid codes return q0 with controls=false.
[in,out]dqdhExisting flow/head derivative in ft2/s; replaced only when inlet capacity is strictly below q0.
[out]controlsAlways reset to false; set true only if the computed inlet capacity is strictly below q0.
Returns
The computed inlet capacity when smaller than q0; otherwise q0.