Graphics Reference
In-Depth Information
Kass and Miller [
10
] find that a first-order implicit method (Eqs.
8.20
and
8.21
) is sufficient for this
application. Using these equations to solve for
h
(
n
) and substituting Equation
8.19
for the second deriv-
hðnÞhðn
1
Þ
_
ðnÞ¼
(8.20)
Dt
_
ðnÞ
_
ðn
1
Þ
Dt
hðnÞ¼
(8.21)
h
i
ðnÞ¼
2
h
i
ðn
Þh
i
ðn
Þ
1
2
2
d
i
1
þ d
i
2
Dx
gðDtÞ
ðh
i
ðnÞh
i
1
ðnÞÞ
2
(8.22)
2
d
i
1
þ d
i
2
þgðDtÞ
ðh
i þ
1
ðnÞh
i
ðnÞÞ
Dx
2
Assuming
d
is constant during the iteration, the next value of
h
can be calculated from previous
Ah
i
ðnÞ¼
2
h
i
ðn
1
Þþh
i
ðn
2
Þ
(8.23)
2
4
3
5
e
0
f
0
000 0 0
f
0
e
0
f
i
00 0 0
0
f
i
e
2
...
0
0
0
A ¼
00
... ... ...
0
0
(8.24)
000
... e
n
3
f
n
3
0
0000
f
n
3
e
n
2
f
n
2
00000
f
n
2
e
n
1
!
d
0
þ d
1
2
2
e
0
¼
1
þ gðDtÞ
2
ðDxÞ
!
ð
d
i
1
þ
2
d
1
þ d
i þ
1
2
e
i
¼
1
þ gðDtÞ
0
< i < n
1
Þ
2
ðDxÞ
2
!
d
n
2
þ d
n
1
2
2
e
n
1
¼
1
þ gðDtÞ
2
ðDxÞ
!
!
d
i
þ d
i þ
1
2
2
f
i
¼ gðDtÞ
(8.25)
2
ðDxÞ
To simulate a viscous fluid, Equation
8.23
can be modified to incorporate a parameter that controls
0,
Ah
i
ðnÞ¼h
i
ðn
1
Þþð
1
tÞðh
i
ðn
1
Þh
i
ðn
2
ÞÞ
(8.26)
Search WWH ::
Custom Search