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

Street inlet configuration, capture, and bypass calculations. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct TInlet TInlet
 

Functions

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.
 

Detailed Description

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)
License
Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.

Typedef Documentation

◆ TInlet

typedef struct TInlet TInlet

Function Documentation

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ inlet_capturedFlow()

double inlet_capturedFlow ( int i)

Gets the current flow captured by an inlet.

Parameters
[in]iA link index.
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]numInletsNonnegative 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()

void 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]tStepCurrent flow routing time step (sec).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
tokArray of string tokens.
[in]ntoksNumber of tokens.
Returns
An error code.
Here is the call graph for this function:

◆ 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
tokArray of string tokens.
[in]ntoksNumber of tokens.
Returns
An error code.
Here is the call graph for this function:

◆ inlet_validate()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inlet_writeStatsReport()

void inlet_writeStatsReport ( )

Writes table of street & inlet flow statistics to SWMM's report file.

Here is the call graph for this function:
Here is the caller graph for this function: