k-Wave Toolbox
k-Wave Toolbox Previous   Next

checkStability

Compute maximum stable time step for k-space models

Syntax

dt_stability_limit = checkStability(kgrid, medium)

Description

checkStability calculates the maximum time step for which the k-space propagation models kspaceFirstOrder1D, kspaceFirstOrder2D and kspaceFirstOrder3D are stable. These models are unconditionally stable when the reference sound speed is equal to or greater than the maximum sound speed in the medium and there is no absorption. However, when the reference sound speed is less than the maximum sound speed the model is only stable for sufficiently small time steps. The criterion is more stringent (the time step is smaller) in the absorbing case. The time steps given are accurate when the medium properties are homogeneous. For a heterogeneous media they give a useful, but not exact, estimate.

Inputs

kgrid

Structure containing the grid properties generated by makeGrid

medium

Structure containing the medium properties

Outputs

dt_stability_limit

The maximum time step that for which the models are stable.

See Also

makeGrid, makeTime, kspaceFirstOrder1D, kspaceFirstOrder2D, kspaceFirstOrder3D


© 2009-2014 Bradley Treeby and Ben Cox.