next up previous contents
Next: Boundary conditions Up: Lock exchange Previous: Grid   Contents

Initial conditions

The initial velocity field is quiescent, the initial free surface height is 0, and the initial density distribution is defined in the function ReturnSalinity in initialization.c as

  return -.001*tanh(2.0*2.6467/5*(x-50.0));
Because $\beta=1$ in suntans.dat (the parameter beta), this is also the initial density distribution, since $(\rho-\rho_0)/\rho_0 = \beta(s-s_0)$ More generally, then, this density distribution is given by

\frac{\rho}{\rho_0} = -\frac{1}{2}\frac{\Delta\rho}{\rho_0}
...anh}^{-1}(\alpha)}{\delta}\left(x-\frac{L}{2}\right)\right] ,

where and is shown in Figure 9.
Figure 9: Initial density distribution in $x$-$z$ (a) and as a profile at $x=L/2$ (b) for the lock exchange test case.