These html pages are based on the PhD thesis "Cluster-Based Parallelization of Simulations on Dynamically Adaptive Grids and Dynamic Resource Management" by Martin Schreiber.
There is also more information and a PDF version available.

1.1 Continuity equation

As a starting point for the derivation of the continuity equation, we consider a one-dimensional simulation scenario (see Fig. 1.1) placed at an infinitesimal small interval of size dx. The quantities we are interested in are given continuously by Û(x,t) n for n conserved quantities at position x at time t. Furthermore a so-called flux function F(Û(x,t)) : n n is given. Its values account for the change of the conserved quantities at a particular position x for the current state Û(x,t) at time t . To give an example, we consider a single simulated quantity, such as the gas density or the water height, only. Based upon an advection model assuming a constant advection speed vc of conserved quantity, then, the flux function is given by F(Û(x,t)) := vc Û(x,t).


pict

Figure 1.1: Conservation of quantities in an infinitesimal small one-dimensional shallow water simulation interval.

A sketch of a single interval I(i) := [xi -dx
-2;xi + dx
2-] of our model is given in Figure 1.1. In each interval, we consider the average quantities Û(i)(t) := 1dx I(i)Û(x,t)dx. We further should track the incoming and outgoing quantities at the interval boundaries dI(i) := {xi -dx
2,xi + dx
 2} with the change of quantities given by the flux function which is evaluated at the corresponding boundary points. Assuming a change in conserved quantities Û(i) in an interval with a mesh size dx in space and time-step size dt, we describe the change of the system by the change on the boundaries and get

                            (                                )
ˆU(i)(t+ dt)dx = ˆU (i)(t)dx + dt F (ˆU(x -  dx,t))-  F(ˆU (x  + dx,t)) .
                                   i   2             i   2
(1.1)

The left side of Equation (1.1) represents the average of conserved quantities in the interval I(i)) at the next time step whereas the right side represents the old state and the change of this state over time via the flux at both interval boundaries.

These terms can be rearranged to a forward finite differencing scheme, yielding

 ˆ(i)         ˆ (i)        ˆ      dx        ˆ      dx
U---(t+-dt)--U---(t) = F-(U(xi --2-,t))---F(U-(xi +-2 ,t)).
         dt                          dx
(1.2)

Assuming that the solution Û is sufficiently smooth, the limits dt 0 and dx 0 of (1.2) then gives the one-dimensional continuity equation

ˆ           ˆ
Ut(x,t)+ Fx(U (x,t)) = 0
(1.3)

with Û as the set of conserved quantities and the subscript x and t used as an abbreviation for the derivative w.r.t. to space and time.

We further add a source term S(Û(x,t)) at the right side of the Eq. (1.3). This source term is frequently used to account for non-homogeneous effects such as external forces, changing bathymetry, etc. An extension to two and three dimensions is directly given by including flux functions with a derivative with respect to y and z. For flux functions based on two-dimensional conserved quantities such as the momentum, we use the notation G for the flux function derived to x and H derived to y

ˆ              ˆ              ˆ             ˆ
Ut(x,y,t)+ Gx (U (x,y,t))+ Hy (U (x,y,t)) = S (U (x,y,t)).
(1.4)

Using the gradient = (∂∂x,∂∂y)T and F(Û,t) = G(Û,t)(1,0)T + H(Û,t)(0,1)T , this equation can be written compactly with the two-dimensional equation of conservation

Uˆt(x,y,t)+ ∇  ⋅F(ˆU (x, y,t)) = S(ˆU (x, y,t)).
(1.5)