The lid.h
file provides the public interface for the LID (Low Impact Development) functions used in the EPA SWMM5 (Storm Water Management Model). It defines the data structures and function prototypes related to the modeling and simulation of LID units and processes. The file also includes necessary enumerations and constants for managing different types of LID processes and handling water balance calculations.
Key Components of the Header File:
Enumerations:
-
LidTypes: Defines the different types of LID processes that can be modeled, such as:
BIO_CELL
: Bio-retention cellRAIN_GARDEN
: Rain gardenGREEN_ROOF
: Green roofINFIL_TRENCH
: Infiltration trenchPOROUS_PAVEMENT
: Porous pavementRAIN_BARREL
: Rain barrelVEG_SWALE
: Vegetative swaleROOF_DISCON
: Roof disconnection
-
TimePeriod: Specifies two time periods for drain flow calculations:
PREVIOUS
: The previous time periodCURRENT
: The current time period
Data Structures:
-
LID Layer Structures: These structures define the various layers of an LID unit, including surface, pavement, soil, storage, underdrain, and drainage mat layers. Each layer has specific parameters such as thickness, void fraction, permeability, and roughness.
TSurfaceLayer
: Surface layer parameters (e.g., depression storage, roughness, and slope).TPavementLayer
: Pavement layer parameters (e.g., void fraction, permeability, and clogging).TSoilLayer
: Soil layer parameters (e.g., porosity, field capacity, and saturated hydraulic conductivity).TStorageLayer
: Storage layer parameters (e.g., void fraction, saturated hydraulic conductivity, and clogging factor).TDrainLayer
: Underdrain system parameters (e.g., flow coefficients, head levels, and delay).TDrainMatLayer
: Drainage mat layer parameters for green roofs (e.g., thickness, void fraction, and roughness).
-
LID Process (
TLidProc
): This structure represents the generic LID process design for a unit of area, including all the layers and properties associated with the specific LID type.- Contains parameters for surface, pavement, soil, storage, drain, and drainage mat layers.
- Includes pollutant removal data (
drainRmvl
) for underdrain systems.
-
Water Balance (
TWaterBalance
): This structure holds water balance statistics for a specific LID unit, such as inflow, evaporation, infiltration, runoff, drain flow, and storage volumes. -
LID Unit (
TLidUnit
): This structure represents a specific LID unit applied in a subcatchment, containing details such as:- The number of replicate units and their area.
- Flow rates and water balances.
- Detailed reporting information (
TLidRptFile
).
-
LID Report File (
TLidRptFile
): This structure is used for managing the report file related to a specific LID unit, including the file pointer, dry period tracking, and results.
Function Prototypes:
-
LID Creation and Deletion:
lid_create(int lidCount, int subcatchCount)
: Initializes the LID processes and groups based on the number of LID processes and subcatchments.lid_delete(void)
: Deallocates memory for LID processes and groups.
-
LID Parameter Handling:
lid_readProcParams(char* tok[], int ntoks)
: Reads LID process parameters from input data.lid_readGroupParams(char* tok[], int ntoks)
: Reads parameters for specific LID units placed in subcatchments.
-
Water Balance and Performance Calculation:
lid_validate(void)
: Validates LID parameters.lid_initState(void)
: Initializes the state of LID units.lid_getRunoff(int subcatch, double tStep)
: Computes runoff and drain flows from LID units in a subcatchment.lid_writeSummary(void)
: Writes a summary of LID performance to a report file.lid_writeWaterBalance(void)
: Writes detailed water balance results to a report file.
-
Pollutant and Drainage Handling:
lid_addDrainLoads(int subcatch, double c[], double tStep)
: Adds pollutant loads from LID drains to system mass balance totals.lid_addDrainRunon(int subcatch)
: Adds drain flow contributions to subcatchments.lid_addDrainInflow(int subcatch, double f)
: Adds drain flow to conveyance system nodes.
-
LID Unit and Process Evaluation:
lidproc_initWaterBalance(TLidUnit *lidUnit, double initVol)
: Initializes the water balance for an LID unit.lidproc_getOutflow(TLidUnit* lidUnit, TLidProc* lidProc, double inflow, double evap, double infil, double maxInfil, double tStep, double* lidEvap, double* lidInfil, double* lidDrain)
: Computes the outflow (runoff, drainage, etc.) for a specific LID unit.lidproc_saveResults(TLidUnit* lidUnit, double ucfRainfall, double ucfRainDepth)
: Saves the results for a specific LID unit.
Purpose:
The lid.h
file defines the essential data structures and function prototypes needed to model and simulate LID practices within the SWMM5 framework. The functions cover the initialization, parameter reading, water balance calculation, and reporting for various types of LID units, such as rain gardens, green roofs, and porous pavements. This interface is crucial for performing stormwater management simulations using LID strategies to manage runoff, improve water quality, and support sustainable urban drainage systems.
No comments:
Post a Comment