#include <Snow.hpp>
|
| void | init (int n_subcatch) |
| |
| void | execute (SimulationContext &ctx, double dt, double temp, double wind, const double *rainfall, const double *snowfall, double gamma=0.0, double ea=0.0) |
| | Compute snowmelt for all subcatchments (batch).
|
| |
| void | execute (SimulationContext &ctx, double dt, double temp, double wind, double rainfall, double snowfall=0.0, double gamma=0.0, double ea=0.0) |
| |
| void | setMeltCoeffs (int day_of_year) |
| | Update seasonal melt coefficients based on day of year.
|
| |
| void | plowSnow (SimulationContext &ctx, double dt, const double *snowfall) |
| | Snow accumulation + plowing — adds new snowfall to each pack and redistributes excess snow between subareas.
|
| |
| void | plowSnow (SimulationContext &ctx, double dt, double snowfall) |
| |
| SnowSoA & | state () |
| |
| const SnowSoA & | state () const |
| |
◆ execute() [1/2]
| void openswmm::snow::SnowSolver::execute |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double | temp, |
|
|
double | wind, |
|
|
const double * | rainfall, |
|
|
const double * | snowfall, |
|
|
double | gamma = 0.0, |
|
|
double | ea = 0.0 ) |
Compute snowmelt for all subcatchments (batch).
For each subcatchment × subarea:
- Batch ATI update (vectorisable)
- Batch cold content update (vectorisable)
- Batch degree-day or rain-on-snow melt (vectorisable)
- Batch snow accumulation from snowfall (vectorisable)
- Batch free water routing (vectorisable)
- Parameters
-
| ctx | Simulation context. |
| dt | Timestep (seconds). |
| temp | Air temperature (deg F, scalar — broadcast). |
| wind | Wind speed (mph, scalar — broadcast). |
| rainfall | Per-subcatchment rainfall rate (ft/sec, sized n_subcatch — matching legacy subcatch_getRunoff → snow_getSnowMelt which receives each subcatchment's own precipitation). |
| snowfall | Per-subcatchment snowfall rate (ft/sec, sized n_subcatch). |
| gamma | Psychrometric constant from climate (deg F^-1). |
| ea | Saturation vapor pressure from climate (in Hg). |
◆ execute() [2/2]
| void openswmm::snow::SnowSolver::execute |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double | temp, |
|
|
double | wind, |
|
|
double | rainfall, |
|
|
double | snowfall = 0.0, |
|
|
double | gamma = 0.0, |
|
|
double | ea = 0.0 ) |
Scalar convenience overload: broadcast a single rainfall (and optional snowfall) rate to every subcatchment. Equivalent to filling per-subcatchment arrays with the same value and calling the array form above.
◆ init()
| void openswmm::snow::SnowSolver::init |
( |
int | n_subcatch | ) |
|
◆ plowSnow() [1/2]
| void openswmm::snow::SnowSolver::plowSnow |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
const double * | snowfall ) |
Snow accumulation + plowing — adds new snowfall to each pack and redistributes excess snow between subareas.
- Parameters
-
| ctx | Simulation context (for subcatchment areas). |
| dt | Timestep (seconds). |
| snowfall | Per-subcatchment snowfall rate (ft/sec, sized n_subcatch). |
- Note
- Legacy reference: snow.c — snow_plowSnow(), called from runoff_execute() each runoff step before melt computation.
◆ plowSnow() [2/2]
| void openswmm::snow::SnowSolver::plowSnow |
( |
SimulationContext & | ctx, |
|
|
double | dt, |
|
|
double | snowfall ) |
Scalar convenience overload: broadcast a single snowfall rate to every subcatchment before accumulation + plowing.
◆ setMeltCoeffs()
| void openswmm::snow::SnowSolver::setMeltCoeffs |
( |
int | day_of_year | ) |
|
Update seasonal melt coefficients based on day of year.
- Parameters
-
| day_of_year | Day of year (1-365). |
- Note
- Legacy reference: snow.c — snow_setMeltCoeffs()
◆ state() [1/2]
| SnowSoA & openswmm::snow::SnowSolver::state |
( |
| ) |
|
|
inline |
◆ state() [2/2]
| const SnowSoA & openswmm::snow::SnowSolver::state |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydrology/Snow.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydrology/Snow.cpp