Beruflich Dokumente
Kultur Dokumente
1
Guillaume Riflet
Abstract
The shallow water equations are introduced and discretized in a
standard C-grid with a leapfrog, FCTS numerical scheme combined
with simple Asselin-Roberts filtering as presented in Kantha and Clayson [5].
Plain Dirichelet conditions were implemented at the boundaries. Sim-
ple testing were performed with a gaussian level elevation and with
wind forcing. The geostrophic equilibrium of a gaussian level elevation
is presented and an analytical solution of the steady-state is obtained.
Results show that Dirichelet boundary conditions reflect all surface
waves back inside the domain and multiple linear superpositions oc-
cur, eventually leading to instability.
1
Figure 1: System depicted by the mathematical model. eta is the water
level from rest, d is the depth from rest, H is the depth from the water
level. The wind acts on the surface by forcing it, as well as the bed drags
on the bottom. The water column still has momentum in u, v, zonal and
meridional coordinates.
2
coefficient [6] is given by
µ ¶2
zD + z0
CD = k/ ln
z0
k = 0.4.
2 The mesh
The mesh in use is an Arakawa Staggered regular C-grid[1] as illus-
trated in figure 2. It is composed of three distinct cells: the U-cell,
the V-cell, and the T-cell, where are, respectively, at the centres the u,
the v and the η variables of equations 1. The C-grid provides better
precision for the non-linear advecting terms than the B-grid, however
it looses precision when evaluating the Coriolis term in equations 1 [1].
For simplicity, the mesh will have constant step-sizes ∆x and ∆y. The
indices i and j as shown in figure 2 and in figure 3 correspond to the
i-th zonal cell and the j-th meridional cell counted in the South-North
direction and in the West-East direction respectively.
3
Figure 2: Arakawa C staggered grid patterns. From left to right: the T-cell,
where η and H are evaluated at the centres, and u and v are evaluated at the
eastern, western faces and southern, northern faces respectively. The U-cell
where u is evaluated at the centre, η and H are evaluated at the eastern,
western faces, and v is evaluated at the corners. The V-cell, where v is eval-
uated at the centre, η and H are evaluated at the southern, northern faces,
and u is evaluated at the corners. The distance between two consecutive
cells of the same type is ∆x, zonally, and ∆y, meridionally. The indices i
and j correspond to the i-th zonal cell and the j-th meridional cell counted
in the South-North direction and in the West-East direction respectively.
4
where the halved indices correspond to fluxes at the U-cells’ faces.
Thus, the FCTS fluxes write:
2
(Huu)i+1/2 = H (ui+1 + u) /22 ,
2
(Huu)i−1/2 = Hi−1 (u + ui−1 ) /22 ,
(Huv)j+1/2 = 0.25 (Hi−1 + Hi + Hi−1,j+1 + Hi,j+1 ) (uj+1 + u) (vi−1,j+1 + vi,j+1 ) /22 ,
(Huv)j−1/2 = 0.25 (Hi−1 + Hi + Hi−1,j−1 + Hi,j−1 ) (u + uj−1 ) (vi−1 + v) /22 ,
f (Hv) = f (H + Hi−1 ) /2 (vi−1 + vi + vi−1,j+1 + vi,j+1 ) /4,
νH (ui−1 − 2ui + ui+1 ) = ν (H + Hi−1 ) /2 (ui−1 − 2ui + ui+1 ) ,
νH ¡(uj−1 − 2uj + uj+1
¢ ) = ν (H + Hi−1 ) /2 (uj−1 − 2uj + uj+1 ) ,
gH ηi+1/2 − ηi−1/2 = qg (H + Hi−1 ) (η − ηi−1 ) ,
p 2
CD u u + v = CD u u2 + (vi−1 + v + vi−1,j+1 + vi,j+1 ) .
2 2
p
Notice how the (Huu)j+1/2 , (Huv)j−1/2 , f (Hv) and CD u u2 + v 2
terms, loose significant precision over the other terms, due to their 4
terms averaging.
Hence, rewriting the full momentum FCTS spatial scheme we get:
³ ´
∂Hu 2 2
∂t = − H (ui+1 + u) /22 − Hi−1 (u + ui−1 ) /22 /∆x
µ ¶
0.25 (Hi−1 + Hi + Hi−1,j+1 + Hi,j+1 ) (uj+1 + u) (vi−1,j+1 + vi,j+1 ) /22
− /∆y
−0.25 (Hi−1 + Hi + Hi−1,j−1 + Hi,j−1 ) (u + uj−1 ) (vi−1 + v) /22
+f (H + Hi−1 ) /2 (vi−1 + vi + vi−1,j+1 + vi,j+1 ) /4
+ν (H + Hi−1 ) /2 (ui−1 − 2ui + ui+1 ) /∆x2
+ν (H + Hi−1 ) /2 (uj−1 − 2uj + uj+1 ) /∆y 2
−g (H + Hi−1 ) (η − ηi−1 ) /∆xq
p 2
+ ρρa0 Ca u10 u210 + v10
2 − C u u2 + (v
D i−1 + v + vi−1,j+1 + vi,j+1 )
≡ Ru
For the meridional spatial momentum scheme in the V-Cells, clever
symmetry one-to-one relations with zonal momentum scheme in the
U-cells are used:
• switch ∆x and ∆y: ∆x ↔ ∆y,
• switch i and j: i ↔ j,
• switch u and v: u ↔ v,
• switch signal of the Coriolis term: (+ ↔ −).
The finite-difference first-order numerical scheme for the waterlevel (T-
Cell) writes out:
³ ´ ³ ´
∂η
∂t = − (Hu)i+1/2 − (Hu)i−1/2 /∆x − (Hv)j+1/2 − (Hv)j−1/2 /∆y
≡ Rη,
and each face’s FCTS flux term writes down:
(Hu)i+1/2 = (H + Hi+1 ) /2 ui+1 ,
(Hu)i−1/2 = (Hi−1 + H) /2 u,
(Hv)j+1/2 = (H + Hj+1 ) /2 vj+1 ,
(Hv)j−1/2 = (Hj−1 + H) /2 v.
5
Thus, the full waterlevel FCTS numerical scheme is:
∂η
∂t = − ((H + Hi+1 ) /2 ui+1 − (Hi−1 + H) /2 u) /∆x
− ((H + Hj+1 ) /2 vj+1 − (Hj−1 + H) /2 v) /∆y
≡ Rη.
4 Boundary conditions
Currently, only Dirichelet conditions are implemented at the bound-
aries. Indeed, if the T-cells domain has M × N nodes then the U-
cells have M × (N + 1) nodes and the V-cells have (M + 1) × N
nodes. η is calculated within {2, ..., (M − 1)} × {2, ..., (N − 1)}
and u and v are calculated within {2, ..., (M − 1)} × {2, ..., N } and
{2, ..., M } × {2, ..., (N − 1)}.
5 Results
5.1 Gaussian level initial condition
In a 20×20 grid points basin with 10 m depth, 10 m spatial increments
and 0.1 s time increments, we dropped a gaussian water level elevation
of 0.2 meters according to
1 (x−x0 )2 +(y−y0 )2
η(x, y) = √ e− 2σ 2 (2)
σ 2π
6
Figure 3: Detailed mesh emphasizing the boundaries. Composite of T, U and
V-cells, the mesh illustrates the zone of integration of each type of cell: the
blue rectangle contains the T-cells computed nodes, the thin green rectangle
contains the U-cells computed nodes, the thin red rectangle contains the V-
cells computed nodes. The thick green and red rectangles, however, delimit
respectively the faces of the U and V-cells computed nodes.
7
Figure 4: Water level elevation test-run. 2D model initial condition with
Dirichelet conditions at the boundary.
with (x0 , y0 ) = (Lx /2, Ly /2) and σ = 1. The Dirichelet conditions set
the velocity and water level to null at the boundary, thus forcing the
surface waves to bounce back from the boundary, as seen in the figures
[4-12].
5.1.1 Energy
The kinetic energy, KE is given by [4]
Z Z
1 ¡ ¢
KE = ρgH u2 + v 2 dA;
2
the perturbation potential energy, P P E is given [4]
Z Z
1
PPE = ρgη 2 dA;
2
and the total energy is the sum T E = KE + P P E. Figure 13 shows
the evolution of the total, kinetic and potential energy of the gaussian
elevation test case in inviscid, fritctionless conditions. The energy de-
cay is strictly due to numerical diffusion, as the Dirichelet boundary
conditions allow no energy flux through. The FCTS scheme is widely
reknown for its high numerical diffusivity.
8
Figure 5: Water level elevation test-run for t = 0.7 s.
9
Figure 7: Water level elevation test-run for t = 2.1 s.
10
Figure 9: Water level elevation test-run for t = 3.5 s.
11
Figure 11: Water level elevation test-run for t = 4.9 s.
12
6 Energy vs time
x 10
3
Total energy
Kinetic energy
Potential energy
2.5
2
E(J)
1.5
0.5
0
0 10 20 30 40 50 60
t(s)
Figure 14: Fully developed surface velocities and water level when forcing
with a 5 m/s wind along the y-coordinate.
13
5.3 Geostrophic equilibrium
The steady-state solution where the Coriolis force balances the pressure
gradient in a constant depth domain writes
(
∂η
f Hvg = gH ∂x
(3)
f Hug = −gH ∂η ∂y
∂Hug ∂Hvg ∂η
+ =0 ⇒ =0
∂x ∂y ∂t
is obtained. This shows that the constraints yield a well-posed prob-
lem and a steady state solution. The system is then said to be in
geostrophic equilibrium and ug and vg are the geostrophic velocity
components. Plus, (3) yield analytical solution. Indeed, if we use the
gaussian elevation for η given in (2) then
(
∂η x−x0
∂x = − σ 2 η
∂η y−y0
∂y = − σ 2 η
The geostrophic velocity field given in (4) may apply to T-cells. Thus
simple linear interpolation is required when applying it to U-cells and
V-cells. In (15) is plotted the analytical solution of the steady state
problem.
6 Conclusions
Here lies the shallow-water equations numerical model as described in
Kantha-Clayson [5] with the same numerical scheme. It currently only
has the Dirichelet boundary conditions. This means that all surface
waves bounce back at the boundary and and give rise to a cascade of
multiple linear superpositions leading to a path of unavoidable numer-
ical instability. The commonly used solution is to radiate the level at
14
Figure 15: Initial condition in geostrophic balance at t = 0 s.
References
[1] Arakawa, A. Computational design for long-term numerical in-
tegration of the equations of fluid motion: two-dimensional incom-
pressible flow. Part i. 119–143.
[2] Blayo, E., and Debreu, L. Revisiting open boundary conditions
from the point of view of characteristic variables. Ocean Modelling
9 (2005), 231–252.
[3] Brito, D. Titulo do trabalho do david. work in progress, 2006.
[4] Gill, A. E. Atmosphere-ocean dynamics. International Geo-
physics Series (1982), xv, 662 p–xv, 662 p.
[5] Kantha, L. H., and Clayson, C. A. Numerical models of
oceans and oceanic processes. 1168–1168.
[6] Leitão, P. C. Integração de escalas e de processos na mod-
elação do ambiente marinho. Environmental Engineering Depart-
ment (2002).
[7] Orlanski, I. A simple boundary condition for unbounded hyper-
bolic flows. Journal of Computational Physics 21 (1976), 251–269.
[8] Pietrzak, J., Jakobson, J. B., Burchard, H., Ja-
cob Vested, H., and Petersen, O. A three-dimensional hy-
15
drostatic model for coastal and ocean modelling using a generalised
topography following co-ordinate system. 173–205.
[9] Shchepetkin, A. F. A method for computing horizontal pressure-
gradient force in an oceanic model with a nonaligned vertical co-
ordinate. 3090–3090.
16