set Initial Conditions

Class: kwave.toolbox.AcousticSolver Package: kwave.toolbox

Set initial conditions.

Syntax

setInitialConditions(obj)

Description

Initialises the acoustic variables obj.pressurePadded, obj.densitySplitPadded, and obj.velocityPadded to zero. The initial conditions for a photoacoustic source defined by source.initialPressure are setup in kwave.toolbox.AcousticSolver.executeTimeStep as this relies on the time step size.

The reference sound speed obj.medium.soundSpeedReference is also assigned if not provided. The value is set to maximum value in obj.medium.soundSpeed which means the scheme will be unconditionally stable when the medium is lossless.