Function veloren_world::sim::diffusion

source ยท
pub fn diffusion(
    nx: usize,
    ny: usize,
    xl: f64,
    yl: f64,
    dt: f64,
    _ibc: (),
    h: &mut [f64],
    b: &mut [f64],
    kd: impl Fn(usize) -> f64,
    kdsed: f64,
)
Expand description

From https://github.com/fastscape-lem/fastscapelib-fortran/blob/master/src/Diffusion.f90

See https://fastscape-lem.github.io/fastscapelib-fortran

nx = grid size x

ny = grid size y

xl = x-dimension of the model topography in meters (double precision)

yl = y-dimension of the model topography in meters (double precision)

dt = length of the time step in years (double precision)

ibc = boundary conditions for grid. For now, we assume all four boundaries are fixed height, so this parameter is ignored.

h = heights of cells at each cell in the grid.

b = basement height at each cell in the grid (see https://en.wikipedia.org/wiki/Basement_(geology)).

kd = bedrock transport coefficient (or diffusivity) for hillslope processes in meter squared per year (double precision) at each cell in the grid.

kdsed = sediment transport coefficient (or diffusivity) for hillslope processes in meter squared per year; (double precision;) note that when kdsed < 0, its value is not used, i.e., kd for sediment and bedrock have the same value, regardless of sediment thickness