Sunday, December 29, 2024

SWMM5 report.c Summary

 The report.c file in SWMM5 handles the generation of reports for simulations. It includes functions for reporting errors, warnings, and results for various aspects of a simulation, including subcatchments, nodes, links, runoff, groundwater, and more.

Key Features and Functions:

1. Report Options and Flags:

  • The report_readOptions() function reads and sets reporting options (such as whether to report results for subcatchments, nodes, and links).
  • The RptFlags structure controls which categories of results are reported (e.g., RptFlags.nodes, RptFlags.links).

2. Writing Results:

  • report_writeLine(): Writes a line of text to the report file.
  • report_writeSysTime(): Logs the starting and ending times of the simulation.
  • report_writeLogo(): Writes a logo header at the beginning of the report.
  • report_writeTitle(): Writes the project title to the report.
  • report_writeOptions(): Logs the analysis options used in the simulation.
  • report_writeRainStats(): Reports statistics related to rainfall data.
  • report_writeRunoffError(): Reports runoff quantity continuity errors if any.
  • report_writeNodeResults(): Logs results for selected nodes.
  • report_writeLinkResults(): Logs results for selected links.

3. Error and Warning Reporting:

  • report_writeErrorMsg(): Writes error messages to the report file based on error codes.
  • report_writeWarningMsg(): Writes warning messages, such as issues with data input or inconsistencies.
  • report_writeInputErrorMsg(): Reports input errors, including the specific line where the error occurred.

4. Continuity Error Reporting:

  • report_writeRunoffError(): Reports errors in the runoff continuity.
  • report_writeLoadingError(): Reports errors in the pollutant loading continuity.
  • report_writeQualError(): Reports errors in water quality routing continuity.
  • report_writeFlowError(): Reports errors in flow routing continuity.

5. Detailed Element Reporting:

  • report_writeMaxStats(): Reports the nodes and links with the highest mass balance errors or the most frequent Courant time step issues.
  • report_writeNonconvergedStats(): Reports nodes that failed to converge most frequently.
  • report_writeTimeStepStats(): Reports statistics about the routing time steps, including the number of iterations and whether the system was in steady state.
  • report_RouteStepFreq(): Writes a grouped frequency table for routing time steps.

6. Detailed Reporting of Simulation Results:

  • report_writeSubcatchments(): Reports results for subcatchments, including runoff, evaporation, infiltration, and quality metrics.
  • report_writeNodeResults(): Reports results for nodes, including flow, overflow, depth, and head.
  • report_writeLinkResults(): Reports results for links, including flow, velocity, depth, and capacity.

7. Control Actions:

  • report_writeControlActionsHeading(): Starts the section for control actions taken.
  • report_writeControlAction(): Logs a control action taken, including the link affected and the rule that triggered the action.

Key Features for Report Generation:

  1. Time Series Reporting:

    • The report includes time-series data for various simulation aspects, such as rainfall, runoff, and quality concentrations. This is done for selected subcatchments, nodes, and links.
  2. Error Handling and Logging:

    • Error messages and warnings related to the simulation process are captured and included in the report, helping users identify issues in their input data or the simulation process.
  3. Continuity Errors:

    • The system tracks continuity errors for runoff, pollutant loadings, and water quality. These errors are reported if they exceed certain thresholds, allowing users to detect discrepancies in the simulation.
  4. Control and Flow Management:

    • The report includes information about control actions (e.g., adjustments made to control nodes or links) and the frequency of flow instability in the system (e.g., flow reversals or non-convergence).
  5. Flexible Reporting:

    • Users can choose which aspects of the simulation to report on (subcatchments, nodes, links) and can control the level of detail in the report.

Overall Functionality:

The report.c file is integral to generating detailed reports for SWMM simulations. It allows users to customize the output, track simulation errors, and analyze various results related to runoff, groundwater, water quality, and control actions. The report helps users understand the performance of the model and troubleshoot any issues in their simulation setup.

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