Graphics Reference
In-Depth Information
These equations can be further simplified if the assumptions of small fluid velocity and slowly vary-
ing depth are used. The former assumption eliminates the second term of Equation 8.12 , while the latter
assumption implies that the term d can be removed from inside the derivative in Equation 8.13 . These
simplifications result in Equations 8.14 and 8.15 .
@v
@t þ g @v
@x ¼ 0
(8.14)
@d
@t þ d @v
@x ¼
0
(8.15)
Differentiating Equation 8.14 with respect to x and Equation 8.15 with respect to t and substituting
for the cross-derivatives results in Equation 8.16 . This is the one-dimensional wave equation with a
wave velocity
g p . As Kass and Miller [ 10 ] note, this degree of simplification is probably not accurate
enough for engineering applications.
2
2
@
h
2 þ gd @
h
(8.16)
@t
@x
2
This partial differential equation is solved using finite differences. The discretization, as used by
Kass and Miller [ 10 ] , is set up as in Figure 8.8 , with samples of v positioned halfway between
the samples of h . The authors report a stable discretization, resulting in Equations 8.17 and 8.18 .
Putting these two equations together results in Equation 8.19 , which is the discrete version of
Equation 8.16 .
@h i
@t ¼
d i 1 þ d i
2 Dx
d i þ d i þ 1
2 Dx
j v i 1
v i
(8.17)
@v i
@t ¼ ðgÞðh i þ 1 h i Þ
(8.18)
Dx
!
!
2
@
h i
@t
ðd i 1 þ d i
2
ðd i þ d i þ 1 Þ
2
2 ¼g
ðh i h i 1 Þþg
ðh i þ 1 h i Þ
(8.19)
2
2
ðDxÞ
ðDxÞ
Equation 8.19 states the relationship of the height of the water surface to the height's acceleration in
time. This could be solved by using values of h i to compute the left-hand side and then using this value
to update the next time step. As Kass and Miller [ 10 ] report, however, this approach diverges quickly
because of the sample spacing.
A first-order implicit numerical integration technique is used to provide a stable solution to Equa-
tion 8.19 . Numerical integration uses current sample values to approximate derivatives. Explicit
methods use approximated derivatives to update the current samples to their new values. Implicit inte-
gration techniques find the value whose derivative matches the discrete approximation of the current
samples. Implicit techniques typically require more computation per step, but, because they are less
likely to diverge significantly from the correct values, larger time steps can be taken, thus producing
an overall savings.
 
Search WWH ::




Custom Search