Skip to main content

diffusive_dt

Function diffusive_dt 

Source
pub fn diffusive_dt(dx: f64, nu: f64, safety: f64) -> f64
Expand description

Compute the diffusive (viscous) timestep constraint.

dt = safety * dx^2 / (2 * nu) (for 1-D; the factor 2 accounts for the standard Von-Neumann stability limit).

Returns f64::MAX when nu is effectively zero.