The lid.c
file handles the core operations for managing and simulating Low Impact Development (LID) practices in SWMM5 (Storm Water Management Model). It processes the input data for different LID processes (like bio-retention cells, green roofs, rain gardens, etc.), calculates the water balance for each LID unit, and manages their state during the simulation. Here’s an overview of the functionality provided by this code:
Key Data Structures:
- LidList: A linked list holding individual LID units in a group.
- LidGroup: A collection of LID units deployed in a specific subcatchment, tracking the total pervious area, flow to pervious area, and the drain flows.
- LidProc: A structure containing the design parameters for a specific type of LID process (e.g., bio-retention cell, porous pavement, etc.). Each LID process has various layers (surface, pavement, soil, storage, etc.) with associated properties.
- LidUnit: A specific instance of a LID process applied to a subcatchment. It contains parameters such as the number of units, their area, initial saturation, and flow parameters for runoff, drain flow, and evaporation.
Major Functions:
-
lid_create()
:- Initializes arrays for LID processes (
LidProcs
) and LID groups (LidGroups
). - Allocates memory for LID processes and groups based on the user-defined input.
- Initializes arrays for LID processes (
-
lid_delete()
:- Deallocates memory for LID processes and groups, including the free-up of resources like report files.
-
lid_readProcParams()
:- Reads LID process parameters from an input file, allowing different types of LID systems to be configured (e.g., bio-retention cells, green roofs).
- It can read various LID layers such as surface, pavement, soil, storage, and drainage mat parameters.
-
lid_readGroupParams()
:- Reads the parameters for a specific LID unit, such as the number of units, their area, initial saturation, and how much runoff from impervious and pervious areas is treated.
-
lid_getRunoff()
:- Computes runoff and drain flows from LID units in a subcatchment during a time step. The function calculates how much runoff is treated by the LID, including surface runoff, drain flow, evaporation, and infiltration.
-
lid_addDrainRunon()
andlid_addDrainInflow()
:- These functions manage the routing of LID drain flows to other subcatchments or conveyance systems, ensuring that the drainage flows are properly accounted for in the model.
-
lid_writeSummary()
:- Writes a summary report of the LID processes and their performance for each subcatchment. The summary includes details such as the number of units, their area, and the percentage of impervious and pervious runoff treated.
-
lid_writeWaterBalance()
:- Writes detailed water balance information for each LID unit, including inflow, evaporation, infiltration, surface runoff, drain flow, and the change in storage over the simulation period.
-
validateLidProc()
andvalidateLidGroup()
:- Validates the parameters for individual LID processes and groups. This ensures that all necessary layers are defined and that parameters like permeability, thickness, and porosity are within acceptable ranges.
-
evalLidUnit()
:- Evaluates the performance of an individual LID unit during a time step. It calculates the outflow from the LID unit, considering various processes like evaporation, infiltration, and drainage.
Water Balance:
Each LID unit has a water balance that tracks:
- Inflow: Water entering the LID unit from rainfall and runoff.
- Evaporation: Water lost through evaporation.
- Infiltration: Water that infiltrates into the soil or storage layer.
- Surface Runoff: Water that exits the LID unit as surface runoff.
- Drain Flow: Water that exits the LID unit via the underdrain system.
- Storage: Water stored in the LID unit, which can be later evaporated or infiltrated.
Key Features:
- LID Units: Multiple LID units can be deployed in a subcatchment. Each LID unit is configured based on its type (e.g., bio-retention cell, rain garden).
- Pollutant Removal: The code supports pollutant removal through LID processes, with pollutant removal rates defined for the underdrain system.
- Infiltration: Different infiltration methods are supported, including the Green-Ampt method for vegetative swales.
- Reporting: Detailed performance and water balance reports can be generated for each LID unit, providing insights into their effectiveness in managing runoff.
Error Handling:
The code includes robust error handling for reading input data (e.g., checking that all required layers and parameters are defined) and for validating LID configurations. If any issues are detected, appropriate error messages are logged.
Summary:
This module is an essential part of the SWMM5 LID modeling functionality, allowing users to simulate the performance of LID systems for stormwater management. It computes how well different LID types treat runoff, manage water, and reduce pollution, providing valuable data for urban drainage design and sustainability planning.
No comments:
Post a Comment