The **statsrpt.c** module in SWMM 5 handles the reporting of summary statistics for the simulation. It generates detailed tables summarizing various aspects of the simulation, including runoff, groundwater, flow, and storage volumes, and it reports these statistics in a format suitable for analysis.
### Key Concepts and Functions in **statsrpt.c**:
#### 1. **Key Reporting Functions**:
- **`statsrpt_writeReport`**: This is the main function that generates and writes the simulation's summary statistics. It calls various other helper functions to report different aspects of the simulation, such as subcatchment runoff, groundwater data, node depths, and link flows.
- **`writeSubcatchRunoff`**: Reports runoff statistics for each subcatchment, including total precipitation, runoff, infiltration, evaporation, and the maximum runoff rate.
- **`writeGroundwater`**: Writes the groundwater summary, including infiltration, evaporation, lateral flow, deep flow, and the maximum flow for groundwater processes in the subcatchments.
- **`writeSubcatchLoads`**: Reports pollutant loads for each subcatchment, including pollutant buildup, wash-off, and total pollutant loads for each subcatchment.
- **`writeNodeDepths`**: Reports depth statistics for nodes, including average and maximum depth, surcharging, and flooding information.
- **`writeNodeFlows`**: Reports inflow statistics for nodes, including maximum lateral inflow, total inflow, and the volume of water in the node.
- **`writeNodeSurcharge`**: Reports surcharging statistics for nodes, specifically for those experiencing surcharges in dynamic wave flow routing.
- **`writeNodeFlooding`**: Reports flooding statistics, including the total time spent flooding and the volume of water flooded.
- **`writeStorageVolumes`**: Reports storage volume statistics for storage nodes, including average and maximum volumes, and flow through storage units.
- **`writeOutfallLoads`**: Reports the total loads (pollutants) at outfall nodes, including flow, volume, and pollutant mass.
- **`writeLinkFlows`**: Reports flow statistics for links, including maximum flow, velocity, and depth.
- **`writeFlowClass`**: Reports the flow classification for each conduit, showing the fraction of time each flow classification occurred (e.g., subcritical, supercritical, normal, etc.).
- **`writeLinkSurcharge`**: Reports the surcharge statistics for conduits, showing the time periods during which each conduit was surcharged.
#### 2. **Table Formatting**:
The report tables are well-structured to show the following types of information:
- **Subcatchment Runoff Summary**: Includes details such as the total precipitation, runoff, evaporation, infiltration, and impervious/pervious runoff for each subcatchment.
- **Groundwater Summary**: Includes infiltration, evaporation, lateral flow, deep flow, and the maximum flow for groundwater in each subcatchment.
- **Node Depth Summary**: Includes average and maximum depths for nodes, surcharging and flooding occurrences, and the time of maximum depth.
- **Node Inflow Summary**: Reports inflows to nodes, including maximum lateral inflow and total inflow.
- **Storage Volume Summary**: Summarizes storage unit volumes, including average and maximum volumes, and the time the storage was full or surcharged.
- **Outfall Loading Summary**: Reports pollutant loads at outfalls, including flow, volume, and pollutant mass.
- **Link Flow Summary**: Provides details on link flows, including maximum flow, velocity, and the time the link was surcharged.
- **Link Surcharge Summary**: Shows surcharging statistics for links, including the time spent in surcharge conditions.
#### 3. **Units and Formatting**:
- The module ensures the correct units are applied to all values (e.g., inches, feet, cfs, etc.), and it provides a consistent format for reporting.
- For pollutants, the units used for reporting can vary, and the module ensures that values are formatted correctly based on the unit system (US or SI) and the type of pollutant.
- The flow values are reported in either scientific notation or standard format, depending on the size of the value.
#### 4. **Important Statistics**:
- **Subcatchment Statistics**: These include various water balance components (precipitation, runoff, infiltration, etc.) and pollutant loads.
- **Groundwater Statistics**: These include lateral flow, infiltration, evaporation, and deep flow in groundwater systems.
- **Node Statistics**: These include depths, inflows, overflows, and flooding information for nodes.
- **Link Statistics**: These include flow rates, velocities, and surcharge times for links.
#### 5. **Output Format**:
- The report is generated in a structured, tabular format that makes it easy to interpret the results for each component of the system (e.g., subcatchments, nodes, links, etc.).
- The module uses functions like `fprintf` to format and print the results to the report file in a consistent manner, making it easier for users to understand the results.
### Summary:
The **statsrpt.c** module plays a critical role in generating summary reports for a SWMM 5 simulation. It handles the reporting of a wide range of statistics related to runoff, groundwater, flow, storage, and water quality, presenting these statistics in a clear, structured format. This functionality is essential for understanding the behavior of the drainage system and for validating the simulation results against expected or observed data.
No comments:
Post a Comment