OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::SimulationSnapshot Struct Reference

Complete simulation state snapshot at one output time step. More...

#include <SimulationSnapshot.hpp>

Collaboration diagram for openswmm::SimulationSnapshot:

Public Attributes

double sim_time = 0.0
 Simulation date/time (SWMM DateTime: days since 12/31/1899).
 
std::int64_t wall_time_unix = 0
 Wall-clock Unix timestamp when snapshot was taken.
 
int output_step_index = 0
 Sequential output step index (0-based).
 
int node_count = 0
 Number of nodes.
 
int link_count = 0
 Number of links.
 
int subcatch_count = 0
 Number of subcatchments.
 
int gage_count = 0
 Number of rain gages.
 
int pollut_count = 0
 Number of pollutants.
 
NodeSnapshot nodes
 Node state.
 
LinkSnapshot links
 Link state.
 
SubcatchSnapshot subcatch
 Subcatchment state.
 
GageSnapshot gages
 Gage state.
 
double sys_temperature = 0.0
 Air temperature.
 
double sys_rainfall = 0.0
 Average rainfall over all gages.
 
double sys_snow_depth = 0.0
 Total snow depth.
 
double sys_evap = 0.0
 Total evaporation loss.
 
double sys_infil = 0.0
 Total infiltration loss.
 
double sys_runoff = 0.0
 Total runoff flow.
 
double sys_dw_inflow = 0.0
 Total dry weather inflow.
 
double sys_gw_inflow = 0.0
 Total groundwater inflow.
 
double sys_ii_inflow = 0.0
 Total RDII inflow.
 
double sys_ext_inflow = 0.0
 Total external inflow.
 
double sys_flooding = 0.0
 Total flooding.
 
double sys_outflow = 0.0
 Total outflow.
 
double sys_storage = 0.0
 Total storage volume.
 
double sys_pet = 0.0
 Potential evapotranspiration.
 
std::vector< double > node_quality
 Node pollutant concentrations.
 
std::vector< double > link_quality
 Link pollutant concentrations.
 
std::vector< double > subcatch_quality
 Subcatchment pollutant loadings.
 
const std::vector< std::string > * node_ids = nullptr
 Node IDs in index order. Pointer to engine-managed strings.
 
const std::vector< std::string > * link_ids = nullptr
 Link IDs in index order.
 
const std::vector< std::string > * subcatch_ids = nullptr
 Subcatchment IDs in index order.
 
const std::vector< std::string > * gage_ids = nullptr
 Gage IDs in index order.
 
const std::vector< std::string > * pollut_names = nullptr
 Pollutant names in index order.
 
const char * flow_units = nullptr
 Flow unit string (e.g., "CFS", "LPS").
 
const char * length_units = nullptr
 Length unit string (e.g., "FEET", "METERS").
 
int flow_units_code = 0
 Flow units code (FlowUnits enum value: 0=CFS, 3=CMS, etc.).
 
int surface_tri_count = 0
 Number of triangles (faces)
 
int surface_vert_count = 0
 Number of vertices (nodes)
 
std::vector< double > surface_depth
 Overland flow depth ψ_o (m), per face.
 
std::vector< double > surface_head
 Total head h_o = z_s + ψ_o (m), per face.
 
std::vector< double > surface_grad_hx
 Unlimited head gradient ∂h/∂x, per face.
 
std::vector< double > surface_grad_hy
 Unlimited head gradient ∂h/∂y, per face.
 
std::vector< double > surface_grad_hx_lim
 Slope-limited head gradient ∂h/∂x, per face.
 
std::vector< double > surface_grad_hy_lim
 Slope-limited head gradient ∂h/∂y, per face.
 
std::vector< double > surface_rainfall
 Rainfall intensity (m/s), per face.
 
std::vector< double > surface_coupling_flux
 Coupling flux to SWMM node (m/s, + = into 2D), per face.
 
std::vector< double > surface_net_source
 Net source/sink (m/s), per face.
 
std::vector< double > surface_edge_flux
 Normal flux through each edge, flat [tri*3+edge].
 
std::vector< double > surface_vert_head
 Reconstructed head at vertices (m)
 

Detailed Description

Complete simulation state snapshot at one output time step.

Created by the main simulation thread when output is due, then posted to the IOThread write queue. Plugins receive a const reference to this during IOutputPlugin::update().

Member Data Documentation

◆ flow_units

const char* openswmm::SimulationSnapshot::flow_units = nullptr

Flow unit string (e.g., "CFS", "LPS").

◆ flow_units_code

int openswmm::SimulationSnapshot::flow_units_code = 0

Flow units code (FlowUnits enum value: 0=CFS, 3=CMS, etc.).

◆ gage_count

int openswmm::SimulationSnapshot::gage_count = 0

Number of rain gages.

◆ gage_ids

const std::vector<std::string>* openswmm::SimulationSnapshot::gage_ids = nullptr

Gage IDs in index order.

◆ gages

GageSnapshot openswmm::SimulationSnapshot::gages

Gage state.

◆ length_units

const char* openswmm::SimulationSnapshot::length_units = nullptr

Length unit string (e.g., "FEET", "METERS").

◆ link_count

int openswmm::SimulationSnapshot::link_count = 0

Number of links.

◆ link_ids

const std::vector<std::string>* openswmm::SimulationSnapshot::link_ids = nullptr

Link IDs in index order.

◆ link_quality

std::vector<double> openswmm::SimulationSnapshot::link_quality

Link pollutant concentrations.

Layout: [link_index * pollut_count + pollut_index]

◆ links

LinkSnapshot openswmm::SimulationSnapshot::links

Link state.

◆ node_count

int openswmm::SimulationSnapshot::node_count = 0

Number of nodes.

◆ node_ids

const std::vector<std::string>* openswmm::SimulationSnapshot::node_ids = nullptr

Node IDs in index order. Pointer to engine-managed strings.

◆ node_quality

std::vector<double> openswmm::SimulationSnapshot::node_quality

Node pollutant concentrations.

Layout: [node_index * pollut_count + pollut_index] Size: node_count * pollut_count doubles.

◆ nodes

NodeSnapshot openswmm::SimulationSnapshot::nodes

Node state.

◆ output_step_index

int openswmm::SimulationSnapshot::output_step_index = 0

Sequential output step index (0-based).

◆ pollut_count

int openswmm::SimulationSnapshot::pollut_count = 0

Number of pollutants.

◆ pollut_names

const std::vector<std::string>* openswmm::SimulationSnapshot::pollut_names = nullptr

Pollutant names in index order.

◆ sim_time

double openswmm::SimulationSnapshot::sim_time = 0.0

Simulation date/time (SWMM DateTime: days since 12/31/1899).

◆ subcatch

SubcatchSnapshot openswmm::SimulationSnapshot::subcatch

Subcatchment state.

◆ subcatch_count

int openswmm::SimulationSnapshot::subcatch_count = 0

Number of subcatchments.

◆ subcatch_ids

const std::vector<std::string>* openswmm::SimulationSnapshot::subcatch_ids = nullptr

Subcatchment IDs in index order.

◆ subcatch_quality

std::vector<double> openswmm::SimulationSnapshot::subcatch_quality

Subcatchment pollutant loadings.

◆ surface_coupling_flux

std::vector<double> openswmm::SimulationSnapshot::surface_coupling_flux

Coupling flux to SWMM node (m/s, + = into 2D), per face.

◆ surface_depth

std::vector<double> openswmm::SimulationSnapshot::surface_depth

Overland flow depth ψ_o (m), per face.

◆ surface_edge_flux

std::vector<double> openswmm::SimulationSnapshot::surface_edge_flux

Normal flux through each edge, flat [tri*3+edge].

◆ surface_grad_hx

std::vector<double> openswmm::SimulationSnapshot::surface_grad_hx

Unlimited head gradient ∂h/∂x, per face.

◆ surface_grad_hx_lim

std::vector<double> openswmm::SimulationSnapshot::surface_grad_hx_lim

Slope-limited head gradient ∂h/∂x, per face.

◆ surface_grad_hy

std::vector<double> openswmm::SimulationSnapshot::surface_grad_hy

Unlimited head gradient ∂h/∂y, per face.

◆ surface_grad_hy_lim

std::vector<double> openswmm::SimulationSnapshot::surface_grad_hy_lim

Slope-limited head gradient ∂h/∂y, per face.

◆ surface_head

std::vector<double> openswmm::SimulationSnapshot::surface_head

Total head h_o = z_s + ψ_o (m), per face.

◆ surface_net_source

std::vector<double> openswmm::SimulationSnapshot::surface_net_source

Net source/sink (m/s), per face.

◆ surface_rainfall

std::vector<double> openswmm::SimulationSnapshot::surface_rainfall

Rainfall intensity (m/s), per face.

◆ surface_tri_count

int openswmm::SimulationSnapshot::surface_tri_count = 0

Number of triangles (faces)

◆ surface_vert_count

int openswmm::SimulationSnapshot::surface_vert_count = 0

Number of vertices (nodes)

◆ surface_vert_head

std::vector<double> openswmm::SimulationSnapshot::surface_vert_head

Reconstructed head at vertices (m)

◆ sys_dw_inflow

double openswmm::SimulationSnapshot::sys_dw_inflow = 0.0

Total dry weather inflow.

◆ sys_evap

double openswmm::SimulationSnapshot::sys_evap = 0.0

Total evaporation loss.

◆ sys_ext_inflow

double openswmm::SimulationSnapshot::sys_ext_inflow = 0.0

Total external inflow.

◆ sys_flooding

double openswmm::SimulationSnapshot::sys_flooding = 0.0

Total flooding.

◆ sys_gw_inflow

double openswmm::SimulationSnapshot::sys_gw_inflow = 0.0

Total groundwater inflow.

◆ sys_ii_inflow

double openswmm::SimulationSnapshot::sys_ii_inflow = 0.0

Total RDII inflow.

◆ sys_infil

double openswmm::SimulationSnapshot::sys_infil = 0.0

Total infiltration loss.

◆ sys_outflow

double openswmm::SimulationSnapshot::sys_outflow = 0.0

Total outflow.

◆ sys_pet

double openswmm::SimulationSnapshot::sys_pet = 0.0

Potential evapotranspiration.

◆ sys_rainfall

double openswmm::SimulationSnapshot::sys_rainfall = 0.0

Average rainfall over all gages.

◆ sys_runoff

double openswmm::SimulationSnapshot::sys_runoff = 0.0

Total runoff flow.

◆ sys_snow_depth

double openswmm::SimulationSnapshot::sys_snow_depth = 0.0

Total snow depth.

◆ sys_storage

double openswmm::SimulationSnapshot::sys_storage = 0.0

Total storage volume.

◆ sys_temperature

double openswmm::SimulationSnapshot::sys_temperature = 0.0

Air temperature.

◆ wall_time_unix

std::int64_t openswmm::SimulationSnapshot::wall_time_unix = 0

Wall-clock Unix timestamp when snapshot was taken.


The documentation for this struct was generated from the following file: