Sunday, December 29, 2024

SWMM5 subcatch.c Summary

 The subcatch.c module in SWMM5 is responsible for calculating runoff from subcatchments. A subcatchment is a geographical area from which runoff is generated, and this module handles the runoff from both impervious and pervious areas, including their interactions with Low Impact Development (LID) features and groundwater.

Key Concepts and Functions

  1. Runoff Calculation:

    • Subcatchment Area: Each subcatchment is divided into impervious and pervious areas, with runoff and infiltration computed for each.
    • Runon: Water flowing from upstream areas into the subcatchment. This flow is distributed over the non-LID portion of the subcatchment unless the LID occupies the entire subcatchment.
    • LID Interactions: The module supports LID features like rain gardens or permeable pavements, which treat runoff before it enters the drainage system.
    • Snowmelt: The module also includes the ability to calculate snowmelt if snow is present.
  2. Core Variables:

    • Runoff: Calculated based on rainfall, snowmelt, and the subcatchment’s characteristics.
    • Evaporation (Vevap) and Infiltration (Vinfil): Subcatchments also have evaporation and infiltration losses, which are calculated over each time step.
    • LID Drainage: LID units capture and treat some of the runoff. These are tracked separately in variables like VlidIn (inflow to LID), VlidOut (surface outflow), VlidDrain (drain outflow), and VlidReturn (return flow to the pervious area).
  3. Key Functions:

    • subcatch_readParams: Reads parameters from the input file for each subcatchment (e.g., area, impervious fraction, slope).
    • subcatch_getRunoff: Computes the total runoff for a subcatchment during a given time step. This includes runoff from impervious and pervious areas, as well as contributions from LID systems.
    • subcatch_getRunon: Distributes the runoff from upstream subcatchments to the subcatchment.
    • subcatch_addRunonFlow: Adds the runoff flow from upstream areas to the subcatchment’s inflow.
    • subcatch_getNetPrecip: Calculates the total precipitation (rainfall + snowmelt) for the subcatchment.
    • subcatch_getStorage: Returns the total volume of stored water (including ponded water and LID storage).
    • subcatch_setOldState: Updates the old state of a subcatchment, storing the previous time step’s runoff and snow depth.
  4. Water Balance:

    • Each subcatchment maintains a water balance involving runoff, infiltration, evaporation, and snowmelt. These values are updated over each time step.
  5. Infiltration and Groundwater:

    • Infiltration: The module calculates the infiltration into the soil based on the characteristics of the subcatchment and its surface conditions.
    • Groundwater: If groundwater is present in the subcatchment, the module calculates inflows and outflows from the groundwater system (e.g., infiltration from the surface, lateral flow to the node).

Water Balance Components:

  1. Inflow: Includes precipitation, snowmelt, runon from upstream subcatchments, and ponded water.
  2. Losses: Includes evaporation and infiltration into the soil or groundwater.
  3. Outflow: Includes surface runoff leaving the subcatchment, either through drainage or outflow to the subcatchment’s outlet.

Integration with Other Modules:

  • LID and Groundwater: This module integrates with the lid.c and gwater.c modules to account for the impact of Low Impact Development (LID) features and groundwater on runoff and infiltration.
  • Pollutant Buildup and Washoff: This module works with surfqual.c to calculate pollutant buildup and washoff from the subcatchment.

Summary of Key Functions and Methods:

  • subcatch_readParams: Reads and assigns the input parameters for each subcatchment (e.g., rain gage, outlet, area, impervious fraction).
  • subcatch_getRunoff: Calculates the runoff for a subcatchment during a time step based on input precipitation and subcatchment characteristics.
  • subcatch_getRunon: Computes the runoff flowing into the subcatchment from upstream areas.
  • subcatch_addRunonFlow: Adds runoff from upstream subcatchments to the current subcatchment’s inflow.
  • subcatch_getStorage: Calculates the volume of stored water in the subcatchment’s surface (ponded water).
  • subcatch_getResults: Computes the weighted average of runoff, snow depth, and water quality for the subcatchment.
  • subcatch_setOldState: Updates the previous state of the subcatchment’s runoff and snow depth.

Example Use Case:

A stormwater management model for a city might use this module to simulate the runoff generated by different land surfaces, including streets, parks, and buildings. Each subcatchment is modeled based on its area, impervious fraction, and slope. The module calculates the volume of water running off each subcatchment, including the impact of rainfall, snowmelt, and runoff from upstream areas. It also accounts for the effects of LID practices (like rain gardens) and infiltration into the groundwater. The final output can include runoff volumes, flow rates, and water quality at the subcatchment outlets.

In conclusion, the subcatch.c module is central to modeling runoff from subcatchments in SWMM5. It computes runoff, loss rates, and pollutant washoff, while also interacting with other modules like LID and groundwater to create a comprehensive model of stormwater behavior.

No comments:

A comprehensive explanation of how minimum travel distance relates to link length in InfoSewer

In hydraulic modeling of sewer networks, the minimum travel distance is a fundamental parameter that affects how accurately the model can si...