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

#include <Snow.hpp>

Collaboration diagram for openswmm::snow::SnowSolver:

Public Member Functions

void init (int n_subcatch)
 
void execute (SimulationContext &ctx, double dt, double temp, double wind, double rainfall, double gamma=0.0, double ea=0.0)
 Compute snowmelt for all subcatchments (batch).
 
void setMeltCoeffs (int day_of_year)
 Update seasonal melt coefficients based on day of year.
 
void plowSnow (SimulationContext &ctx, double dt, double snowfall)
 Snow plowing — redistribute excess snow between subareas.
 
SnowSoAstate ()
 

Member Function Documentation

◆ execute()

void openswmm::snow::SnowSolver::execute ( SimulationContext ctx,
double  dt,
double  temp,
double  wind,
double  rainfall,
double  gamma = 0.0,
double  ea = 0.0 
)

Compute snowmelt for all subcatchments (batch).

For each subcatchment × subarea:

  1. Batch ATI update (vectorisable)
  2. Batch cold content update (vectorisable)
  3. Batch degree-day or rain-on-snow melt (vectorisable)
  4. Batch snow accumulation from snowfall (vectorisable)
  5. Batch free water routing (vectorisable)
Parameters
ctxSimulation context.
dtTimestep (seconds).
tempAir temperature (deg F, scalar — broadcast).
windWind speed (mph, scalar — broadcast).
rainfallCurrent rainfall rate (ft/sec, scalar — broadcast).
gammaPsychrometric constant from climate (deg F^-1).
eaSaturation vapor pressure from climate (in Hg).

◆ init()

void openswmm::snow::SnowSolver::init ( int  n_subcatch)
Here is the call graph for this function:

◆ plowSnow()

void openswmm::snow::SnowSolver::plowSnow ( SimulationContext ctx,
double  dt,
double  snowfall 
)

Snow plowing — redistribute excess snow between subareas.

Parameters
ctxSimulation context (for subcatchment areas).
dtTimestep (seconds).
snowfallSnowfall rate (ft/sec).
Note
Legacy reference: snow.csnow_plowSnow()

◆ setMeltCoeffs()

void openswmm::snow::SnowSolver::setMeltCoeffs ( int  day_of_year)

Update seasonal melt coefficients based on day of year.

Parameters
day_of_yearDay of year (1-365).
Note
Legacy reference: snow.csnow_setMeltCoeffs()

◆ state()

SnowSoA & openswmm::snow::SnowSolver::state ( )
inline

The documentation for this class was generated from the following files: