next up previous
Next: The Physics Up: Project Lagrangian Previous: Boundary Conditions

Initial Conditions

Sensible initial conditions might be,
$\displaystyle u_{n}'^{(0)}$ $\textstyle =$ $\displaystyle M c \sin ( 2 \pi n/N + \pi c \delta t / L )$ (2.58)
$\displaystyle x_{n}'^{(0)}$ $\textstyle =$ $\displaystyle nL/N + (ML/{2 \pi}) \cos
( 2 \pi n / N ) \quad ,$ (2.59)

where $M$, the amplitude of the sound wave, is the ratio of $u$ to the sound speed (i.e. the Mach number). Be careful to choose sensible values for the parameters: e.g. the values of $x_n$ should rise monotonically with $n$, otherwise some cells will have negative fluid densities. The essential physics of the problem is independent of the absolute values of the equilibrium pressure and density so you can set $L = 1$, $\Delta m = (1/N)$ and $P = \rho^\gamma$. In addition you can assume that $\gamma = C_{\rm p}/C_{\rm v} = \frac53$. Note that the scheme is leap-frog but not of the dangerous variety: alternate steps solve for $u$ and $x$.