Graphics Reference
In-Depth Information
If you plug this in as a possible h ( x, z, t ) in the wave equation, we get the
following equation:
sin 2 π ( k
=
sin 2 π ( k
.
A 4 π 2 c 2
λ 2
·
( x, z )
ct )
gdA 4 π 2
λ 2
·
( x, z )
ct )
λ
λ
This reduces to
c 2 = gd.
In other words, the wave equation has solutions corresponding to waves
moving at speed gd .
The key insight to glean from all these simplifications and models is
that shallow water waves move at a speed related to the depth: the deeper
the water, the faster the waves move. For example as a wave approaches
the shore, the depth decreases and the wave slows down. In particular,
the front of the wave slows down earlier, and so water from the back of
the wave starts to pile up as the wave front slows down. Waves near
the shore naturally get bigger and steeper, and if conditions are right,
they will eventually crest and overturn. The shallow water equations
we've developed in this chapter do contain this feature, though of course
the height field assumption breaks down at the point of waves breaking:
we won't be able to quite capture that look, but we'll be able to come
close.
12.3 Discretization
There are many possibilities for discretizing the shallow water equations,
each with its own strengths and weaknesses. You might in particular take a
look at Kass and Miller's introduction of the equations to animation [Kass
and Miller 90], and Layton and van de Panne's unconditionally stable
method [Layton and van de Panne 02]. Here we'll provide a small vari-
ation on the Layton and van de Panne method that avoids the need for
a linear solver at the expense of having a stability restriction on the time
step.
We begin with the two-dimensional staggered MAC grid as usual, stor-
ing the velocity components u and w at the appropriate edge midpoints and
the depth d at the cell centers. Where needed, the height h is reconstructed
from the depth as h = b + d . We also use the usual time-splitting approach
of handling advection in an initial stage, perhaps with the semi-Lagrangian
Search WWH ::




Custom Search