OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
DegreeDaySnow.hpp File Reference

Snowmelt — degree-day and rain-on-snow methods. More...

#include <cstddef>
#include <vector>
#include "SnowModel.hpp"
Include dependency graph for DegreeDaySnow.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::snow::SnowSoA
 
class  openswmm::snow::DegreeDaySnow
 

Namespaces

namespace  openswmm
 
namespace  openswmm::snow
 
namespace  openswmm::surface
 

Typedefs

using openswmm::snow::SnowSolver = DegreeDaySnow
 
using openswmm::surface::DegreeDaySnow = snow::DegreeDaySnow
 

Variables

constexpr int openswmm::snow::N_SUBAREAS = 3
 Plowable, Impervious, Pervious.
 
constexpr int openswmm::snow::SNOW_PLOWABLE = 0
 
constexpr int openswmm::snow::SNOW_IMPERV = 1
 
constexpr int openswmm::snow::SNOW_PERV = 2
 

Detailed Description

Snowmelt — degree-day and rain-on-snow methods.

Batch-oriented: all snowpack computations use the same daily temperature/wind. The per-subcatchment snowmelt calculation is independent and vectorisable. Three subareas (plowable, imperv, perv) are processed per subcatchment — inner loop can be unrolled.

Key vectorisable operations:

  • ATI update: ati += tipm * (Ta - ati) → batch over subcatchments
  • Degree-day melt: smelt = dhm * (Ta - Tbase) → batch over subcatchments
  • Cold content update: cc += rnm * dhm * (ati - Ta) * dt → batch
  • Snow accumulation: wsnow += snowfall * dt → batch
Note
Legacy reference: src/legacy/engine/snow.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0