OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_massbalance.h File Reference

OpenSWMM Engine — Mass Balance / Continuity C API. More...

#include "openswmm_engine.h"
Include dependency graph for openswmm_massbalance.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum SWMM_RunoffTotal SWMM_RunoffTotal
 Runoff mass balance component codes.
 
typedef enum SWMM_RoutingTotal SWMM_RoutingTotal
 Routing mass balance component codes.
 

Enumerations

enum  SWMM_RunoffTotal {
  SWMM_RUNOFF_RAINFALL = 0 ,
  SWMM_RUNOFF_EVAP = 1 ,
  SWMM_RUNOFF_INFIL = 2 ,
  SWMM_RUNOFF_RUNOFF = 3 ,
  SWMM_RUNOFF_SNOWREMOV = 4 ,
  SWMM_RUNOFF_INITSTORE = 5 ,
  SWMM_RUNOFF_FINALSTORE = 6
}
 Runoff mass balance component codes. More...
 
enum  SWMM_RoutingTotal {
  SWMM_ROUTING_DRY_WEATHER = 0 ,
  SWMM_ROUTING_WET_WEATHER = 1 ,
  SWMM_ROUTING_GW_INFLOW = 2 ,
  SWMM_ROUTING_RDII = 3 ,
  SWMM_ROUTING_EXTERNAL = 4 ,
  SWMM_ROUTING_FLOODING = 5 ,
  SWMM_ROUTING_OUTFLOW = 6 ,
  SWMM_ROUTING_EVAP_LOSS = 7 ,
  SWMM_ROUTING_SEEP_LOSS = 8 ,
  SWMM_ROUTING_INIT_STORAGE = 9 ,
  SWMM_ROUTING_FINAL_STORAGE = 10
}
 Routing mass balance component codes. More...
 

Functions

SWMM_ENGINE_API int swmm_get_runoff_continuity_error (SWMM_Engine engine, double *error)
 Get the runoff continuity error (fraction, e.g. 0.001 = 0.1%).
 
SWMM_ENGINE_API int swmm_get_routing_continuity_error (SWMM_Engine engine, double *error)
 Get the routing continuity error (fraction).
 
SWMM_ENGINE_API int swmm_get_quality_continuity_error (SWMM_Engine engine, int pollutant_idx, double *error)
 Get the quality continuity error for a pollutant (fraction).
 
SWMM_ENGINE_API int swmm_get_runoff_total (SWMM_Engine engine, int component, double *volume)
 Get a runoff mass balance total (cumulative volume).
 
SWMM_ENGINE_API int swmm_get_routing_total (SWMM_Engine engine, int component, double *volume)
 Get a routing mass balance total (cumulative volume).
 

Detailed Description

OpenSWMM Engine — Mass Balance / Continuity C API.

Query continuity errors and cumulative flux totals for runoff, routing, and water quality. Available after SWMM_STATE_ENDED.

See also
openswmm_engine.h
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License

Typedef Documentation

◆ SWMM_RoutingTotal

Routing mass balance component codes.

◆ SWMM_RunoffTotal

Runoff mass balance component codes.

Enumeration Type Documentation

◆ SWMM_RoutingTotal

Routing mass balance component codes.

Enumerator
SWMM_ROUTING_DRY_WEATHER 

Cumulative dry weather inflow volume.

SWMM_ROUTING_WET_WEATHER 

Cumulative wet weather (runoff) inflow volume.

SWMM_ROUTING_GW_INFLOW 

Cumulative groundwater inflow volume.

SWMM_ROUTING_RDII 

Cumulative rainfall-dependent I/I volume.

SWMM_ROUTING_EXTERNAL 

Cumulative external (user-defined) inflow volume.

SWMM_ROUTING_FLOODING 

Cumulative flooding (surcharge overflow) volume.

SWMM_ROUTING_OUTFLOW 

Cumulative outfall discharge volume.

SWMM_ROUTING_EVAP_LOSS 

Cumulative evaporation loss from conveyance.

SWMM_ROUTING_SEEP_LOSS 

Cumulative seepage loss from conveyance.

SWMM_ROUTING_INIT_STORAGE 

Initial in-system storage volume.

SWMM_ROUTING_FINAL_STORAGE 

Final in-system storage volume.

◆ SWMM_RunoffTotal

Runoff mass balance component codes.

Enumerator
SWMM_RUNOFF_RAINFALL 

Cumulative rainfall volume.

SWMM_RUNOFF_EVAP 

Cumulative evaporation loss.

SWMM_RUNOFF_INFIL 

Cumulative infiltration loss.

SWMM_RUNOFF_RUNOFF 

Cumulative surface runoff volume.

SWMM_RUNOFF_SNOWREMOV 

Cumulative snow removal volume.

SWMM_RUNOFF_INITSTORE 

Initial surface storage volume.

SWMM_RUNOFF_FINALSTORE 

Final surface storage volume.

Function Documentation

◆ swmm_get_quality_continuity_error()

SWMM_ENGINE_API int swmm_get_quality_continuity_error ( SWMM_Engine  engine,
int  pollutant_idx,
double *  error 
)

Get the quality continuity error for a pollutant (fraction).

◆ swmm_get_routing_continuity_error()

SWMM_ENGINE_API int swmm_get_routing_continuity_error ( SWMM_Engine  engine,
double *  error 
)

Get the routing continuity error (fraction).

◆ swmm_get_routing_total()

SWMM_ENGINE_API int swmm_get_routing_total ( SWMM_Engine  engine,
int  component,
double *  volume 
)

Get a routing mass balance total (cumulative volume).

Parameters
engineEngine handle.
componentSWMM_RoutingTotal code.
volume[out] Cumulative volume (project volume units).
Returns
SWMM_OK or error code.

◆ swmm_get_runoff_continuity_error()

SWMM_ENGINE_API int swmm_get_runoff_continuity_error ( SWMM_Engine  engine,
double *  error 
)

Get the runoff continuity error (fraction, e.g. 0.001 = 0.1%).

◆ swmm_get_runoff_total()

SWMM_ENGINE_API int swmm_get_runoff_total ( SWMM_Engine  engine,
int  component,
double *  volume 
)

Get a runoff mass balance total (cumulative volume).

Parameters
engineEngine handle.
componentSWMM_RunoffTotal code.
volume[out] Cumulative volume (project volume units).
Returns
SWMM_OK or error code.