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

Street cross-section geometry and hydraulic properties. More...

Go to the source code of this file.

Functions

int street_create (int nStreets)
 Allocate zero-initialized street cross-section definitions.
 
void street_delete ()
 Deletes the collection of Street objects.
 
int street_readParams (char *tok[], int ntoks)
 Parse a street cross section and construct its hydraulic transect tables.
 
double street_getExtentFilled (int link)
 Inspect the high-end depth or area of a street conduit.
 

Detailed Description

Street cross-section geometry and hydraulic properties.

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.

Function Documentation

◆ street_create()

int street_create ( int nStreets)

Allocate zero-initialized street cross-section definitions.

Parameters
[in]nStreetsNonnegative requested street count.
Returns
Zero on success, ERR_MEMORY when calloc returns NULL.
Postcondition
Resets Street and Nobjects[STREET], then assigns the new array/count on success. The project owns the allocation and street_delete() releases it.
Precondition
Any earlier Street allocation has been released before this call.

◆ street_delete()

void street_delete ( )

Deletes the collection of Street objects.

◆ street_getExtentFilled()

double street_getExtentFilled ( int link)

Inspect the high-end depth or area of a street conduit.

Parameters
[in]linkValid street conduit link index.
Returns
Maximum endpoint node depth in feet for dynamic-wave routing, otherwise maximum conduit endpoint flow area in square feet. Returns zero when the cross-section transect index is negative.
Note
The result is a dimensional depth/area, not a normalized fullness ratio.

◆ street_readParams()

int street_readParams ( char * tok[],
int ntoks )

Parse a street cross section and construct its hydraulic transect tables.

Parameters
[in]tokBorrowed ntoks non-null token strings: ID, crown width, curb height, cross slope, road n, then optional gutter/backing parameters. Lengths are authored ft/m and slopes are percentages.
[in]ntoksNumber of tokens; at least five required, with complete backing slope/roughness data required when backing width is positive.
Returns
Zero on success or an input error code for missing, unknown or invalid numeric items; error_setInpError stores the diagnostic token.
Postcondition
Stores Street properties in feet and dimensionless slope fractions and calls transect_createStreetTransect(). ID may be set before a later error.