Overview of street.c
module
The street.c
module in SWMM5 provides functions to handle the creation, deletion, and parameter reading of street cross-section objects used in hydrologic modeling. This module supports the representation of streets in the drainage network, including their geometry, slope, and roughness, which are important for modeling runoff in urban environments.
Key Functions
-
street_create
:- Purpose: Creates a collection of
Street
objects in memory, initializing them for use in the model. - Input:
nStreets
— number of street objects to create. - Output: Returns an error code (0 if successful).
- Details: Allocates memory for the street objects and initializes them.
- Purpose: Creates a collection of
-
street_delete
:- Purpose: Deletes the collection of
Street
objects created in the model. - Output: Frees allocated memory for the street objects.
- Purpose: Deletes the collection of
-
street_readParams
:- Purpose: Reads the parameters for a street cross-section from an input file.
- Input:
tok[]
— tokenized input string;ntoks
— number of tokens. - Output: Returns an error code.
- Details: Parses the input data and assigns the corresponding values to the
Street
object, including parameters such as roadway crown, curb height, cross slope, roughness, and street backing. If any required parameters are missing or incorrect, the function returns an error.
-
street_getExtentFilled
:- Purpose: Calculates the degree to which a street is filled with water based on the link depth and cross-section area.
- Input:
link
— the index of the link representing the street. - Output: Returns the degree of fill as a ratio (0 to 1).
- Details: If the routing model is dynamic wave (DW), the function uses the maximum depth at the link's nodes. Otherwise, it computes the fill level based on the cross-section area of the conduit.
Data Structure (TStreet
)
The module relies on the TStreet
data structure to represent a street’s geometry. The fields within this structure include:
width
: Roadway width.curbHeight
: Height of the curb.slope
: Cross slope of the roadway.roughness
: Manning's roughness coefficient for the road surface.gutterDepression
: Gutter depression height.gutterWidth
: Width of the gutter.sides
: Number of sides of the street (1 or 2).backWidth
: Width of the street backing.backSlope
: Slope of the street backing.backRoughness
: Roughness coefficient for the street backing.
Core Logic
-
Street Geometry and Parameters:
- The street geometry is defined by parameters such as crown height, gutter width, slope, and roughness. These are used to calculate runoff and flow characteristics in urban settings where streets are a critical part of the drainage network.
-
Street Cross-Section Calculation:
- The module supports street cross-sections for both paved and unpaved streets. The
Transect
function, which is invoked bystreet_readParams
, calculates the geometric properties of the street cross-section based on the input parameters.
- The module supports street cross-sections for both paved and unpaved streets. The
-
Street Fill Calculation:
- The function
street_getExtentFilled
computes the degree to which a street is filled with water. This is useful for modeling stormwater runoff and determining how much water is captured by the street versus flowing through the drainage system.
- The function
Application
The street.c
module is important for accurately modeling stormwater runoff in urban environments, where streets often serve as significant conduits for runoff. By specifying detailed parameters for streets, such as slopes and roughness coefficients, SWMM 5 can more accurately simulate how stormwater flows over streets and interacts with other parts of the drainage system.
Example Use Case:
For a city planning scenario, you might have a collection of streets, each with different cross-sections. By configuring the street geometry, such as curb heights and gutter slopes, you can simulate how these streets handle runoff during a rainstorm. This allows you to estimate flooding, identify areas that require stormwater improvements, and ensure that the drainage system is designed to handle expected flow rates.
Summary
The street.c
module enables SWMM5 to handle complex urban street geometry in the context of stormwater modeling. It allows for precise configuration of street parameters, such as crown height, slope, roughness, and drainage capacity, ensuring that streets are modeled accurately in runoff and flooding simulations.
No comments:
Post a Comment