![]() |
Peano
|
The shallow water equations (Saint-Venant) are a common (d−1) approximation to the d–dimensional Navier-Stokes equations to model incompressible, free surface flows:
\begin{eqnarray*} \frac{\partial}{\partial t} \begin{pmatrix} h\\hu\\hv \end{pmatrix} + \frac{\partial}{\partial x} \begin{pmatrix} hu\\hu^2 + \frac{1}{2} \cdot gh^2\\huv \end{pmatrix} + \frac{\partial}{\partial y} \begin{pmatrix} hv\\huv\\hv^2 + \frac{1}{2} \cdot gh^2 \end{pmatrix} + \begin{pmatrix} 0\\ghb_x\\ghb_y \end{pmatrix} = \begin{pmatrix} 0\\0\\0 \end{pmatrix} \end{eqnarray*}
With \( b(x, y) \) being the bathymetry measured from a reference \( D \) (normal sea level, negative below, positive above), \( h(x, y, t) \) being the total positive water depth and \( g \) the earth's gravitational acceleration set to \( 9.81ms^{-2} \). The two velocities \( u(x, y, t) \) and \( v(x, y, t) \) are the velocities in x- and y-dimension respectively.
The eigenvalues (wave speeds) in x-dimension are given by:
\begin{eqnarray*} \lambda_{x_1} = u, \lambda_{x_2,_3} = u \pm \sqrt{gh} \end{eqnarray*}
And in y-dimension by:
\begin{eqnarray*} \lambda_{y_1} = v, \lambda_{y_2,_3} = v \pm \sqrt{gh} \end{eqnarray*}
The respective derivations of the various aspects of the shallow water equations can be found in "Shock-Capturing Methods for Free-Surface Shallow Flows" by E.F. Toro (2001).
The two fluxes in x- and y-dimension respectively are given by:
\begin{eqnarray*} F(U) = \begin{pmatrix} hu\\hu^2 + \frac{1}{2} \cdot gh^2\\huv \end{pmatrix} \end{eqnarray*}
\begin{eqnarray*} G(U) = \begin{pmatrix} hv\\huv\\hv^2 + \frac{1}{2} \cdot gh^2 \end{pmatrix} \end{eqnarray*}
The bed slope term
\begin{eqnarray*} \begin{pmatrix} 0\\ghb_x\\ghb_y \end{pmatrix} \end{eqnarray*}
is implemented as a non-conservative product.
For a general overview and all options on how to retrieve and configure the project, refer to Installation. We require the NetCDF library and Git LFS.
cd myPeanoDirectory pip3 install -e . mkdir build && cd build CC=gcc CXX=g++ cmake .. -DENABLE_EXTENSION_EXAHYPE=ON -DENABLE_TOOLBOX_LOADBALANCING=ON -DENABLE_TOOLBOX_BLOCKSTRUCTURED=ON -DWITH_NETCDF=ON make -j && make test cd ../applications/exahype2/shallow-water/scenario/ python3 scenario.py
Where CC=gcc CXX=g++
can be any set of compilers.
python3 myPeanoDirectory/python/peano4/visualisation/render.py solutions/solution-.peano-patch-file