Sunday, December 29, 2024

SWMM5 rdii.c Summary

 The rdii.c file in SWMM5 is responsible for managing the Rainfall Dependent Infiltration/Inflow (RDII) process. RDII is crucial in representing how rainfall infiltrates and flows into a sewer system, contributing to overflows and treatment demands. This file handles the storage, calculation, and management of RDII inflows for simulation and reporting within the SWMM model.

Key Functions and Features:

1. rdii_readRdiiInflow():

  • Reads RDII inflow data for a specific node from input data, associates it with a unit hydrograph, and assigns the associated area for the RDII calculation.

2. rdii_initUnitHyd():

  • Initializes the unit hydrograph parameters for RDII processing, including rainfall parameters for each month.

3. rdii_readUnitHydParams():

  • Reads parameters of unit hydrographs, which define the relationship between rainfall events and inflows into the system.

4. rdii_openRdii():

  • Opens and prepares the RDII interface file, initializing the RDII inflow processing system, reading any existing RDII inflow data, and creating new files if necessary.

5. rdii_closeRdii():

  • Closes the RDII interface file and releases any memory allocated for RDII processing.

6. rdii_getNumRdiiFlows():

  • Retrieves the number of RDII flows for a specific time period based on the current date.

7. rdii_getRdiiFlow():

  • Retrieves the RDII flow for a specific node, returning the flow value along with the node index.

8. rdii_getRainInterval():

  • Retrieves the time interval for rainfall data that corresponds to a unit hydrograph (UH) group.

9. getUnitHydConvol():

  • Performs the convolution of a unit hydrograph with past rainfall data to calculate the RDII flow at a given time based on previous rainfall.

10. saveRdiiFlows():

  • Saves the current RDII inflow data to the RDII interface file.

11. closeRdiiProcessor():

  • Finalizes RDII processing by writing statistics and freeing memory allocated during the RDII process.

12. rdii_deleteRdiiInflow():

  • Deletes the RDII inflow object associated with a specific node, freeing the allocated memory.

13. applyIA():

  • Applies initial abstraction (IA) to rainfall data for unit hydrographs, adjusting rainfall for any pre-set abstraction before using it in RDII calculations.

14. updateDryPeriod():

  • Updates the dry period for a unit hydrograph, tracking the time since the last non-zero rainfall.

15. getUnitHydRdii():

  • Computes the RDII generated by past rainfall for each unit hydrograph (UH) group.

16. getUnitHydOrd():

  • Returns the ordinate (flow value) of a unit hydrograph at a given time.

17. getNodeRdii():

  • Retrieves the RDII flow for each node that has RDII inflow data, storing it in the system for further processing.

18. rdii_createRdiiFile():

  • Creates and initializes a new RDII interface file, which will store RDII inflow data and relevant metadata for future simulations.

19. getMaxPeriods():

  • Determines the maximum number of past periods of rainfall data to store for unit hydrographs.

Key Concepts and Components:

  • Unit Hydrographs (UH): The RDII inflow for a node is modeled using unit hydrographs. These hydrographs define the relationship between rainfall events and the flow that enters the system, based on previous rainfall.

  • RDII Processing: The RDII processing works by calculating RDII inflows based on the convolution of past rainfall data with predefined unit hydrographs. This is done on a time-step basis (e.g., hourly or every 15 minutes) based on the rainfall and unit hydrograph parameters.

  • Inflow and Outflow: RDII inflows are generated based on rainfall that enters a sewer system, and they can contribute to overflows or system loading. The file tracks how much RDII is generated at each node and contributes to the overall system flow.

  • Interface File: The RDII inflow data is saved to an interface file (binary or text), which is used by SWMM for modeling and reporting purposes. The interface file contains information about the RDII time step, flow rates, and node-specific RDII data.

Overall Functionality:

The rdii.c file integrates RDII inflows into the SWMM model, using unit hydrographs to represent the relationship between rainfall and sewer inflow. It manages the creation, reading, and writing of RDII data files, processes rainfall events for RDII calculations, and ensures that all RDII data is accurately tracked and saved for use in simulations.

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...