Street inlet configuration, capture, and bypass calculations.
More...
Go to the source code of this file.
|
| int | inlet_create (int nInlets) |
| | Allocate and initialize inlet designs and per-node inlet-flow storage.
|
| |
| void | inlet_delete () |
| | Frees all memory allocated for inlet analysis.
|
| |
| int | inlet_readDesignParams (char *tok[], int ntoks) |
| | Extracts a set of inlet design parameters from a tokenized line of the [INLETS] section of a SWMM input file. Format of input line is: ID GRATE Length Width GrateType (OpenArea) (SplashVeloc) ID CURB Length Height (ThroatType) ID SLOTTED Length Width ID DROP_GRATE Length Width GrateType (OpenArea) (SplashVeloc) ID DROP_CURB Length Height ID CUSTOM CurveID.
|
| |
| int | inlet_readUsageParams (char *tok[], int ntoks) |
| | Extracts inlet usage parameters from a tokenized line of the [INLET_USAGE] section of a SWMM input file. Format of input line is: linkID inletID nodeID (numberOfInlets Clog Qmax aLocal wLocal placement) where linkID = ID name of link containing the inlet inletID = ID name of inlet design being used nodeID = ID name of node receiving captured flow numberOfInlets = number of identical inlets used (default = 1) Clog = percent that inlet is clogged Qmax = maximum flow that inlet can capture (default = 0 (no limit)) aLocal = local gutter depression (ft or m) (default = 0) wLocal = width of local gutter depression (ft or m) (default = 0) placement = ON_GRADE, ON_SAG, or AUTO (the default).
|
| |
| void | inlet_validate () |
| | Checks that inlets have been assigned to conduits with proper cross section shapes and counts the number of inlets that each node receives either bypased or captured flow from.
|
| |
| void | inlet_findCapturedFlows (double tStep) |
| | Computes flow captured by each inlet and adjusts the lateral flows of the inlet's bypass and capture nodes accordingly. This function is called after regular lateral flows to all nodes have been set but before a flow routing step has been taken.
|
| |
| void | inlet_adjustQualInflows () |
| | Adjusts accumulated flow rates and pollutant mass inflows at each inlet's bypass and capture nodes after a flow routing step has been taken prior to a quality routing step.
|
| |
| void | inlet_adjustQualOutflows () |
| | Adjusts mass balance totals after a complete routing step has been taken so as not to treat inlet transfer flows as system outflows.
|
| |
| void | inlet_writeStatsReport () |
| | Writes table of street & inlet flow statistics to SWMM's report file.
|
| |
| double | inlet_capturedFlow (int link) |
| | Gets the current flow captured by an inlet.
|
| |
Street inlet configuration, capture, and bypass calculations.
- Author
- Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com (OpenSWMM maintenance and extensions)
- Copyright
- Copyright (c) 2026 Caleb Buahin. OpenSWMM contributions only; original EPA SWMM credits are retained.
- License
- Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.
◆ TInlet
| typedef struct TInlet TInlet |
◆ inlet_adjustQualInflows()
| void inlet_adjustQualInflows |
( |
| ) |
|
Adjusts accumulated flow rates and pollutant mass inflows at each inlet's bypass and capture nodes after a flow routing step has been taken prior to a quality routing step.
◆ inlet_adjustQualOutflows()
| void inlet_adjustQualOutflows |
( |
| ) |
|
Adjusts mass balance totals after a complete routing step has been taken so as not to treat inlet transfer flows as system outflows.
◆ inlet_capturedFlow()
| double inlet_capturedFlow |
( |
int | i | ) |
|
Gets the current flow captured by an inlet.
- Parameters
-
- Returns
- Captured flow rate (cfs).
◆ inlet_create()
| int inlet_create |
( |
int | numInlets | ) |
|
Allocate and initialize inlet designs and per-node inlet-flow storage.
- Parameters
-
| [in] | numInlets | Nonnegative number of inlet designs; controls array size. |
- Returns
- Zero on success or ERR_MEMORY if either allocation returns NULL.
- Postcondition
- Resets inlet globals and initializes designs to CUSTOM_INLET with no curve or opening lengths. Failure may leave an earlier allocation owned by the inlet subsystem; inlet_delete() is responsible for cleanup.
- Precondition
- Called before allocating inlet usage records for the current project.
◆ inlet_delete()
Frees all memory allocated for inlet analysis.
◆ inlet_findCapturedFlows()
| void inlet_findCapturedFlows |
( |
double | tStep | ) |
|
Computes flow captured by each inlet and adjusts the lateral flows of the inlet's bypass and capture nodes accordingly. This function is called after regular lateral flows to all nodes have been set but before a flow routing step has been taken.
- Parameters
-
| [in] | tStep | Current flow routing time step (sec). |
◆ inlet_readDesignParams()
| int inlet_readDesignParams |
( |
char * | tok[], |
|
|
int | ntoks ) |
Extracts a set of inlet design parameters from a tokenized line of the [INLETS] section of a SWMM input file. Format of input line is: ID GRATE Length Width GrateType (OpenArea) (SplashVeloc) ID CURB Length Height (ThroatType) ID SLOTTED Length Width ID DROP_GRATE Length Width GrateType (OpenArea) (SplashVeloc) ID DROP_CURB Length Height ID CUSTOM CurveID.
- Parameters
-
| tok | Array of string tokens. |
| [in] | ntoks | Number of tokens. |
- Returns
- An error code.
◆ inlet_readUsageParams()
| int inlet_readUsageParams |
( |
char * | tok[], |
|
|
int | ntoks ) |
Extracts inlet usage parameters from a tokenized line of the [INLET_USAGE] section of a SWMM input file. Format of input line is: linkID inletID nodeID (numberOfInlets Clog Qmax aLocal wLocal placement) where linkID = ID name of link containing the inlet inletID = ID name of inlet design being used nodeID = ID name of node receiving captured flow numberOfInlets = number of identical inlets used (default = 1) Clog = percent that inlet is clogged Qmax = maximum flow that inlet can capture (default = 0 (no limit)) aLocal = local gutter depression (ft or m) (default = 0) wLocal = width of local gutter depression (ft or m) (default = 0) placement = ON_GRADE, ON_SAG, or AUTO (the default).
- Parameters
-
| tok | Array of string tokens. |
| [in] | ntoks | Number of tokens. |
- Returns
- An error code.
◆ inlet_validate()
Checks that inlets have been assigned to conduits with proper cross section shapes and counts the number of inlets that each node receives either bypased or captured flow from.
◆ inlet_writeStatsReport()
| void inlet_writeStatsReport |
( |
| ) |
|
Writes table of street & inlet flow statistics to SWMM's report file.