next up previous contents
Next: Boundary conditions Up: Time accuracy 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 -.03*tanh(2.0*2.6467/20*(z+50-cos(PI*x/100)));
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

\begin{displaymath}
\frac{\rho}{\rho_0} = -\frac{1}{2}\frac{\Delta\rho}{\rho_0}
...
...-1}(\alpha)}{\delta}\left(z+\frac{D}{2}-\zeta\right)\right] ,
\end{displaymath}

where and is shown in Figure 7.
Figure 7: Initial density distribution in $x$-$z$ (a) and as a profile at $x=L/2$ (b) for the time accuracy test case.
1\includegraphics{figures/initdens}



2014-08-06