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

#include <ForcingData.hpp>

Collaboration diagram for openswmm::ForcingData:

Public Member Functions

void resize (int n_nodes, int n_links, int n_subcatches, int n_gages, int n_pollutants)
 Allocate all arrays and initialise to NONE / 0 / RESET.
 
void clear_all ()
 Reset ALL forcing modes to NONE (called on simulation restart).
 
void clear_reset_entries ()
 Clear only RESET-persistence entries (called at end of each step).
 
double effective_temperature (double broadcast) const noexcept
 Resolve the effective air temperature (deg F internal).
 
double effective_wind (double broadcast) const noexcept
 Resolve the effective wind speed (mph internal).
 
double effective_rainfall (std::size_t ui, double gage_rainfall) const noexcept
 Resolve the effective rainfall for a subcatchment.
 
double effective_climate_evap (double broadcast) const noexcept
 Resolve the effective system-wide evaporation rate (ft/sec).
 
double effective_snowfall (std::size_t ui, double gage_snowfall) const noexcept
 Resolve the effective snowfall for a subcatchment (ft/sec).
 
double effective_evap_rate (std::size_t ui, double broadcast_rate) const noexcept
 Resolve the effective evaporation rate for a subcatchment.
 

Public Attributes

std::vector< ForcingModenode_lat_inflow_mode
 
std::vector< double > node_lat_inflow_value
 
std::vector< ForcingPersistnode_lat_inflow_persist
 
std::vector< ForcingModenode_head_boundary_mode
 
std::vector< double > node_head_boundary_value
 
std::vector< ForcingPersistnode_head_boundary_persist
 
std::vector< ForcingModenode_quality_mode
 
std::vector< double > node_quality_value
 mass rate (mass/sec)
 
std::vector< ForcingPersistnode_quality_persist
 
std::vector< ForcingModelink_flow_mode
 
std::vector< double > link_flow_value
 
std::vector< ForcingPersistlink_flow_persist
 
std::vector< ForcingModelink_setting_mode
 
std::vector< double > link_setting_value
 0.0–1.0 for pump/orifice/weir
 
std::vector< ForcingPersistlink_setting_persist
 
std::vector< ForcingModelink_quality_mode
 flattened link × pollutant
 
std::vector< double > link_quality_value
 OVERRIDE: concentration; ADD: mass rate (mass/sec)
 
std::vector< ForcingPersistlink_quality_persist
 
std::vector< ForcingModesubcatch_rainfall_mode
 
std::vector< double > subcatch_rainfall_value
 user units (in/hr or mm/hr)
 
std::vector< ForcingPersistsubcatch_rainfall_persist
 
std::vector< ForcingModesubcatch_evap_mode
 
std::vector< double > subcatch_evap_value
 prescribed PET rate, ft/sec (internal units; converted from in/day or mm/day at the C API boundary)
 
std::vector< ForcingPersistsubcatch_evap_persist
 
std::vector< ForcingModesubcatch_snowfall_mode
 
std::vector< double > subcatch_snowfall_value
 ft/sec (internal; converted from in/hr or mm/hr at the C API boundary)
 
std::vector< ForcingPersistsubcatch_snowfall_persist
 
std::vector< ForcingModegage_rainfall_mode
 
std::vector< double > gage_rainfall_value
 user units (in/hr or mm/hr)
 
std::vector< ForcingPersistgage_rainfall_persist
 
ForcingMode climate_temperature_mode = ForcingMode::NONE
 
double climate_temperature_value = 0.0
 deg F (internal; converted from deg C at the C API boundary for SI)
 
ForcingPersist climate_temperature_persist = ForcingPersist::RESET
 
ForcingMode climate_wind_mode = ForcingMode::NONE
 
double climate_wind_value = 0.0
 mph (internal; converted from km/hr at the C API boundary for SI)
 
ForcingPersist climate_wind_persist = ForcingPersist::RESET
 
ForcingMode climate_evap_mode = ForcingMode::NONE
 
double climate_evap_value = 0.0
 ft/sec (internal; converted from in/day or mm/day at the C API boundary)
 
ForcingPersist climate_evap_persist = ForcingPersist::RESET
 
int n_nodes_ = 0
 
int n_links_ = 0
 
int n_subcatches_ = 0
 
int n_gages_ = 0
 
int n_pollutants_ = 0
 

Member Function Documentation

◆ clear_all()

void openswmm::ForcingData::clear_all ( )
inline

Reset ALL forcing modes to NONE (called on simulation restart).

◆ clear_reset_entries()

void openswmm::ForcingData::clear_reset_entries ( )
inline

Clear only RESET-persistence entries (called at end of each step).

After the forcing has been applied for this timestep, entries with RESET persistence are set back to NONE so they do not carry forward to the next step. PERSIST entries are untouched.

◆ effective_climate_evap()

double openswmm::ForcingData::effective_climate_evap ( double broadcast) const
inlinenoexcept

Resolve the effective system-wide evaporation rate (ft/sec).

Parameters
broadcastClimate-derived evap rate (ft/sec), post-adjustment.
Returns
Prescribed (OVERRIDE), augmented (ADD), or broadcast value.

◆ effective_evap_rate()

double openswmm::ForcingData::effective_evap_rate ( std::size_t ui,
double broadcast_rate ) const
inlinenoexcept

Resolve the effective evaporation rate for a subcatchment.

Applies any prescribed PET forcing to the broadcast climate rate. An OVERRIDE prescription is used as-is (it replaces the climate rate, including any DRY_ONLY suppression already folded into broadcast_rate by the caller); ADD augments it.

Parameters
uiSubcatchment index.
broadcast_rateClimate-derived evap rate (ft/sec), after any caller-side DRY_ONLY handling.
Returns
Effective potential evaporation rate (ft/sec).
Here is the caller graph for this function:

◆ effective_rainfall()

double openswmm::ForcingData::effective_rainfall ( std::size_t ui,
double gage_rainfall ) const
inlinenoexcept

Resolve the effective rainfall for a subcatchment.

Applies any subcatchment rainfall forcing to the gage-derived rate. Units are the caller's (user units, in/hr or mm/hr — matching the C API contract of swmm_forcing_subcatch_rainfall).

Parameters
uiSubcatchment index.
gage_rainfallGage-derived rainfall in user units.
Returns
Effective rainfall in user units.
Here is the caller graph for this function:

◆ effective_snowfall()

double openswmm::ForcingData::effective_snowfall ( std::size_t ui,
double gage_snowfall ) const
inlinenoexcept

Resolve the effective snowfall for a subcatchment (ft/sec).

Applies any subcatchment snowfall forcing to the gage-derived (temperature-split) snowfall rate.

Parameters
uiSubcatchment index.
gage_snowfallGage-derived snowfall (ft/sec).
Returns
Effective snowfall (ft/sec).
Here is the caller graph for this function:

◆ effective_temperature()

double openswmm::ForcingData::effective_temperature ( double broadcast) const
inlinenoexcept

Resolve the effective air temperature (deg F internal).

Parameters
broadcastClimate-derived temperature (deg F).
Returns
Prescribed (OVERRIDE), augmented (ADD), or broadcast value.

◆ effective_wind()

double openswmm::ForcingData::effective_wind ( double broadcast) const
inlinenoexcept

Resolve the effective wind speed (mph internal).

Parameters
broadcastClimate-derived wind speed (mph).
Returns
Prescribed (OVERRIDE), augmented (ADD), or broadcast value.

◆ resize()

void openswmm::ForcingData::resize ( int n_nodes,
int n_links,
int n_subcatches,
int n_gages,
int n_pollutants )
inline

Allocate all arrays and initialise to NONE / 0 / RESET.

Member Data Documentation

◆ climate_evap_mode

ForcingMode openswmm::ForcingData::climate_evap_mode = ForcingMode::NONE

◆ climate_evap_persist

ForcingPersist openswmm::ForcingData::climate_evap_persist = ForcingPersist::RESET

◆ climate_evap_value

double openswmm::ForcingData::climate_evap_value = 0.0

ft/sec (internal; converted from in/day or mm/day at the C API boundary)

◆ climate_temperature_mode

ForcingMode openswmm::ForcingData::climate_temperature_mode = ForcingMode::NONE

◆ climate_temperature_persist

ForcingPersist openswmm::ForcingData::climate_temperature_persist = ForcingPersist::RESET

◆ climate_temperature_value

double openswmm::ForcingData::climate_temperature_value = 0.0

deg F (internal; converted from deg C at the C API boundary for SI)

◆ climate_wind_mode

ForcingMode openswmm::ForcingData::climate_wind_mode = ForcingMode::NONE

◆ climate_wind_persist

ForcingPersist openswmm::ForcingData::climate_wind_persist = ForcingPersist::RESET

◆ climate_wind_value

double openswmm::ForcingData::climate_wind_value = 0.0

mph (internal; converted from km/hr at the C API boundary for SI)

◆ gage_rainfall_mode

std::vector<ForcingMode> openswmm::ForcingData::gage_rainfall_mode

◆ gage_rainfall_persist

std::vector<ForcingPersist> openswmm::ForcingData::gage_rainfall_persist

◆ gage_rainfall_value

std::vector<double> openswmm::ForcingData::gage_rainfall_value

user units (in/hr or mm/hr)

◆ link_flow_mode

std::vector<ForcingMode> openswmm::ForcingData::link_flow_mode

◆ link_flow_persist

std::vector<ForcingPersist> openswmm::ForcingData::link_flow_persist

◆ link_flow_value

std::vector<double> openswmm::ForcingData::link_flow_value

◆ link_quality_mode

std::vector<ForcingMode> openswmm::ForcingData::link_quality_mode

flattened link × pollutant

◆ link_quality_persist

std::vector<ForcingPersist> openswmm::ForcingData::link_quality_persist

◆ link_quality_value

std::vector<double> openswmm::ForcingData::link_quality_value

OVERRIDE: concentration; ADD: mass rate (mass/sec)

◆ link_setting_mode

std::vector<ForcingMode> openswmm::ForcingData::link_setting_mode

◆ link_setting_persist

std::vector<ForcingPersist> openswmm::ForcingData::link_setting_persist

◆ link_setting_value

std::vector<double> openswmm::ForcingData::link_setting_value

0.0–1.0 for pump/orifice/weir

◆ n_gages_

int openswmm::ForcingData::n_gages_ = 0

◆ n_links_

int openswmm::ForcingData::n_links_ = 0

◆ n_nodes_

int openswmm::ForcingData::n_nodes_ = 0

◆ n_pollutants_

int openswmm::ForcingData::n_pollutants_ = 0

◆ n_subcatches_

int openswmm::ForcingData::n_subcatches_ = 0

◆ node_head_boundary_mode

std::vector<ForcingMode> openswmm::ForcingData::node_head_boundary_mode

◆ node_head_boundary_persist

std::vector<ForcingPersist> openswmm::ForcingData::node_head_boundary_persist

◆ node_head_boundary_value

std::vector<double> openswmm::ForcingData::node_head_boundary_value

◆ node_lat_inflow_mode

std::vector<ForcingMode> openswmm::ForcingData::node_lat_inflow_mode

◆ node_lat_inflow_persist

std::vector<ForcingPersist> openswmm::ForcingData::node_lat_inflow_persist

◆ node_lat_inflow_value

std::vector<double> openswmm::ForcingData::node_lat_inflow_value

◆ node_quality_mode

std::vector<ForcingMode> openswmm::ForcingData::node_quality_mode

◆ node_quality_persist

std::vector<ForcingPersist> openswmm::ForcingData::node_quality_persist

◆ node_quality_value

std::vector<double> openswmm::ForcingData::node_quality_value

mass rate (mass/sec)

◆ subcatch_evap_mode

std::vector<ForcingMode> openswmm::ForcingData::subcatch_evap_mode

◆ subcatch_evap_persist

std::vector<ForcingPersist> openswmm::ForcingData::subcatch_evap_persist

◆ subcatch_evap_value

std::vector<double> openswmm::ForcingData::subcatch_evap_value

prescribed PET rate, ft/sec (internal units; converted from in/day or mm/day at the C API boundary)

◆ subcatch_rainfall_mode

std::vector<ForcingMode> openswmm::ForcingData::subcatch_rainfall_mode

◆ subcatch_rainfall_persist

std::vector<ForcingPersist> openswmm::ForcingData::subcatch_rainfall_persist

◆ subcatch_rainfall_value

std::vector<double> openswmm::ForcingData::subcatch_rainfall_value

user units (in/hr or mm/hr)

◆ subcatch_snowfall_mode

std::vector<ForcingMode> openswmm::ForcingData::subcatch_snowfall_mode

◆ subcatch_snowfall_persist

std::vector<ForcingPersist> openswmm::ForcingData::subcatch_snowfall_persist

◆ subcatch_snowfall_value

std::vector<double> openswmm::ForcingData::subcatch_snowfall_value

ft/sec (internal; converted from in/hr or mm/hr at the C API boundary)


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