5.7 Two Spatial Dimensions
283
• Initialire the fluxes to zero
for each i, j do
• Increment Fand G due to fiuxes through the left cell interface
for each i, j do
U =u . ?
n+'
1-2 ')
R=r/J': .-r/J': I
I ,)
1'
,)
if U > 0, then I = i-I, else I = i
F':' , . = F':' 1 • + Ur/JI)'
1-2 ')
(**)
1-2,)
,
if U > 0, then I = i, else I = i-I
. n+!
n
n
l:i.t
n+!
if u, '+ 1 > 0, then GI '+ 1 = GI '+ 1 -
I,) 2
, ) 2
,) 2
2l:i.s
--RUv . '+ 1
I, ) 2
if n+!
n
n
l:i.t
n+!
I v. . I < 0, then GI . I = GI . , - - - RU v. . ,
1,)- 2
-J > 2
,)- 2
2l:i.s
1,)- 2
• Increment Fand G due to fluxes through the bottom cell interface
(as above, switching the roles of i and j, u and v, and F and G)
• Update tp
for each i, j do
,
I = r/JI)' -
'
l:i.s I:i.t 1 1.- F" , . +
2')
1-2 ')
I,)
'+ ' -
2
")-2
I]
TABLE 5.2. Algorithm for executing one time step of LeVeque's two-dimensional
flux-limited advection scheme.
283
• Initialire the fluxes to zero
for each i, j do
• Increment Fand G due to fiuxes through the left cell interface
for each i, j do
U =u . ?
n+'
1-2 ')
R=r/J': .-r/J': I
I ,)
1'
,)
if U > 0, then I = i-I, else I = i
F':' , . = F':' 1 • + Ur/JI)'
1-2 ')
(**)
1-2,)
,
if U > 0, then I = i, else I = i-I
. n+!
n
n
l:i.t
n+!
if u, '+ 1 > 0, then GI '+ 1 = GI '+ 1 -
I,) 2
, ) 2
,) 2
2l:i.s
--RUv . '+ 1
I, ) 2
if n+!
n
n
l:i.t
n+!
I v. . I < 0, then GI . I = GI . , - - - RU v. . ,
1,)- 2
-J > 2
,)- 2
2l:i.s
1,)- 2
• Increment Fand G due to fluxes through the bottom cell interface
(as above, switching the roles of i and j, u and v, and F and G)
• Update tp
for each i, j do
,
I = r/JI)' -
'
l:i.s I:i.t 1 1.- F" , . +
2')
1-2 ')
I,)
'+ ' -
2
")-2
I]
TABLE 5.2. Algorithm for executing one time step of LeVeque's two-dimensional
flux-limited advection scheme.
