OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
statsrpt.c File Reference

Tabular reporting of legacy simulation statistics. More...

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "headers.h"
#include "lid.h"
Include dependency graph for statsrpt.c:

Macros

#define _CRT_SECURE_NO_DEPRECATE
 
#define WRITE(x)
 

Functions

void writeSubcatchRunoff ()
 Write subcatchment runoff totals, peak flows and runoff coefficients.
 
void writeGroundwater (void)
 Write subcatchment groundwater balances and final states.
 
void writeSubcatchLoads ()
 Write subcatchment pollutant washoff loads and system totals.
 
void writeNodeDepths ()
 Writes simulation statistics for nodes to report file.
 
void writeNodeFlows ()
 Writes flow statistics for nodes to report file.
 
void writeNodeSurcharge ()
 Write node surcharge durations and maximum crown/rim clearances.
 
void writeNodeFlooding ()
 Write node flooding duration, peak rate, volume and ponding.
 
void writeStorageVolumes ()
 Writes simulation statistics for storage units to report file.
 
void writeOutfallLoads ()
 Write outfall flow frequency, volume and pollutant-loading statistics.
 
void writeLinkFlows ()
 Writes simulation statistics for links to report file.
 
void writeFlowClass ()
 Writes flow classification for each conduit to report file.
 
void writeLinkSurcharge ()
 Write conduit full-flow and capacity-limited durations.
 
void writePumpFlows ()
 Writes simulation statistics for pumps to report file.
 
void writeLinkLoads ()
 Write per-link pollutant loads accumulated during routing.
 
void statsrpt_writeReport ()
 Reports simulation summary statistics.
 

Variables

TSubcatchStats * SubcatchStats
 
TNodeStats * NodeStats
 
TLinkStats * LinkStats
 
TStorageStats * StorageStats
 
TOutfallStats * OutfallStats
 
TPumpStats * PumpStats
 
double MaxOutfallFlow
 
double MaxRunoffFlow
 
double RoutingTimeSpan
 
double * NodeInflow
 
double * NodeOutflow
 

Detailed Description

Tabular reporting of legacy simulation statistics.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com (OpenSWMM maintenance and extensions)
License
Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_DEPRECATE

◆ WRITE

#define WRITE ( x)
Value:
void report_writeLine(const char *line)
Writes a line of text to the report file.
Definition report.c:211

Function Documentation

◆ writeFlowClass()

void writeFlowClass ( void )

Writes flow classification for each conduit to report file.

Here is the caller graph for this function:

◆ writeGroundwater()

void writeGroundwater ( void )

Write subcatchment groundwater balances and final states.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Normalizes accumulated mean moisture/water-table values by elapsed runoff seconds; that duration must be positive. Outputs authored depth, flow and elevation units with dimensionless moisture.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLinkFlows()

void writeLinkFlows ( void )

Writes simulation statistics for links to report file.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLinkLoads()

void writeLinkLoads ( void )

Write per-link pollutant loads accumulated during routing.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Converts internal loading to authored mass units and uses log10 values for COUNT pollutants. Does not alter accumulated link loads.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLinkSurcharge()

void writeLinkSurcharge ( void )

Write conduit full-flow and capacity-limited durations.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Excludes dummy/nonconduit links and untouched records. Durations use hours with a 0.01-hour report minimum on included rows.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the caller graph for this function:

◆ writeNodeDepths()

void writeNodeDepths ( void )

Writes simulation statistics for nodes to report file.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeNodeFlooding()

void writeNodeFlooding ( void )

Write node flooding duration, peak rate, volume and ponding.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Excludes outfalls and unflooded nodes. Uses hours, authored flow/volume units and either ponding depth or volume according to routing method.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeNodeFlows()

void writeNodeFlows ( void )

Writes flow statistics for nodes to report file.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeNodeSurcharge()

void writeNodeSurcharge ( void )

Write node surcharge durations and maximum crown/rim clearances.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Excludes outfalls and unsurcharged nodes; durations are hours and clearances use authored length units. Prints a no-surcharge message when empty.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeOutfallLoads()

void writeOutfallLoads ( void )

Write outfall flow frequency, volume and pollutant-loading statistics.

Precondition
Frpt.file, outfall statistics, report counts and model arrays are initialized; ReportStepCount is positive when outfall statistics are written.

Reads global results and emits authored flow/volume/mass units, including log-count pollutant loads. Allocates and frees a temporary total load array; allocation and output failures are not returned as a status. No table is written when the model contains no outfall nodes.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writePumpFlows()

void writePumpFlows ( void )

Writes simulation statistics for pumps to report file.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeStorageVolumes()

void writeStorageVolumes ( void )

Writes simulation statistics for storage units to report file.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeSubcatchLoads()

void writeSubcatchLoads ( void )

Write subcatchment pollutant washoff loads and system totals.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Allocates/frees a temporary pollutant-total array and silently skips output on allocation failure. COUNT pollutants are displayed as log10 loads.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeSubcatchRunoff()

void writeSubcatchRunoff ( void )

Write subcatchment runoff totals, peak flows and runoff coefficients.

Precondition
Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.

Uses accumulated volumes divided by each nonzero subcatchment area for rainfall-depth units, and authored flow/volume units for aggregate runoff.

Note
Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ LinkStats

TLinkStats* LinkStats
extern

◆ MaxOutfallFlow

double MaxOutfallFlow
extern

◆ MaxRunoffFlow

double MaxRunoffFlow
extern

◆ NodeInflow

double* NodeInflow
extern

◆ NodeOutflow

double* NodeOutflow
extern

◆ NodeStats

TNodeStats* NodeStats
extern

◆ OutfallStats

TOutfallStats* OutfallStats
extern

◆ PumpStats

TPumpStats* PumpStats
extern

◆ RoutingTimeSpan

double RoutingTimeSpan
extern

◆ StorageStats

TStorageStats* StorageStats
extern

◆ SubcatchStats

TSubcatchStats* SubcatchStats
extern