snowpack-model / snowpack

SNOWPACK model
GNU Lesser General Public License v3.0
10 stars 5 forks source link

CFL adaptive time step overly conservative #18

Closed EricKeenan closed 3 years ago

EricKeenan commented 3 years ago

In the driftingsnow branch, we establish an adaptive time step for the explicit snow drift scheme in order to simultaneously minimize computational expense and preserve numerical stability.

Currently we have implemented a particle slow down term. However, this has not yet been accounted for when calculating the sub time step. In the case of a constant slowdown, this could be fixed with

double sub_dt = std::min(C_max * dx / (sqrt(2.) * grid_VW.grid2D.getMax() - particle_slowdown), dt); // Sub time step

or in the case of a multiplicative slowdown

double sub_dt = std::min(C_max * dx / (particle_slowdown * sqrt(2.) * grid_VW.grid2D.getMax()), dt); // Sub time step