COO-3077-145
Courant
Institute of
Mathematical Sciences
ERDA Mathematics and Computing Laboratory
A Survey of Numerical
for
Methods
Compressible Fluids
Gary A. Sod
ERDA
New
York University
UNCLASSIFIED
COO-3077-145
Gary A. Sod
June 1977
UNCLASSIFIED
Abstract
The finite difference methods of Godunov, Hyman, Lax-Wendroff
(two-step), MacCormack,
Rusanov,
the hybrid
I.
Introduction
its
compared,
and
Basic Equations
V+^x^^+P)
^m
V+^x^?P
where
= pe
1
2
+2 pu
and
where
(2)
^^+P)) =
(^^
is the density,
p is pressure,
(1)
is
We may write
'"^)
r^Aip
we have
P = A(S)p^
where
(4b)
m
2
u =
and
in
F(U) =
1%
(e+p)
.;
we
by-
(x, t)
pdx + Cp mdt =
f^
mdx + (f
f
II.
edx
+^
(6)
( + p )dt
(- (e+p))dt =
(7)
(8)
[I6],
Glimm'
Method
'
Let u^ approximate
data
-i+1
>
(i+l/2)Ax
U(x,nAt)
(9)
X
<
(i+l/2)Ax
If At<
Ax
2(
I
where
u] +c)
Let
solution.
g^ be an equidistributed
Define
n+1/2
-i+1/2
v((i+C^)Ax, (n+|)At)
(10)
inexpensively
Chorin
[3]
(pr'^rPp
'
X <
(11)
S^ = (Pj,,u^,p^)
>
The solution at later times looks like (see [1^]) Fig. 1, where
S-,
and
are slip
the state S^ into two parts with possibly different values of p^,
=
^
u^
u^
12)
we obtain
M_g
p/^^-U^)
= P*^^*-
(13)
U_g)
Similarly,
define
the quantity
Mr
.^i-^.
u - u
r
(1*)
-U
M^ = -p fu
where U
-p,(u^-Uj
(15)
we obtain
M^ = /pTpI
'r'^r
Mv^/vJ
M = /p.p.
^i
^{Vjv,)
(16a)
(16b)
where
y^ X
^^
>
= <
<l,(x)
(17)
1-x
^ /o
l-x-Y-l/^^
2/7
/-I
^^^
X < 1
>
- u
(u,
"
i
P* =
Equations
l6a),
l6b),
+I + _l)
M^
M^
(18)
TTx
and M
A/
equations
l6a),
(.l6b),
[3]
and (l8).
),
we iterate using
-L
After p^, M
and M
^*
(12
mttt^^
I
and (1^),
^^^^
is
^^^ replaced by
p'?^^'^^
(19) and
p^^
li._|_-,
^2
^"^
(l8)
problem at i+1/2.
Artificial Viscosity
added.
Let
'^n+
u.
approximation
'^n
~n ~n
where A'u. = u. -u._-| and
is an adjustable constant.
The values of
This is
This artificial
In this
^t "^^^^^x =
^^^
are the values on the left and right of the jump and S is the
given time
t the
>
t)
with properties
for
u e (u^( t
) )
(22)
for
u ^ (u^(t),Uj^(t))
(23)
), Uj^(
law
u^ + (f(u)+ g(u,t))^ =
(2^)
equation
S)
is a shock
24)
For a complete
(5)
splitting.
) )
we use operator
li = "i^i
where
and
m in (IS.+i/gUs^.i/g-Bgn (5^^,/g))a.
= max^ 0,min
k
1^1.1/2
^1^-1/2
u,
(26)
^J
~(k)
~(k)
^^^2_/2 ^ '^i+l~ ^i
10
Let
S.
/p
-,
i^^^2_/2'^'
Then the difference scheme which applies the ACM to the given solu~n+l IS
tion u.
X
.
n+1
iii
~n+l
=H
+
At
2^
'\'n+l
= ^1
,n
where 9.1+1/2
"
/^
>,
-2A3E (gi+i-gi_i)
At
/n
n
-
2A7 (^i+1/2
nn%+l
(27a)
(ll+l-Iil^i+l/2- ISi-Si-ll^i.1/2)
"
"
in
"
'S-i+l
t7k ^
(27b)
-.
/'
^i-1/2)'
nio
^^
-1+1/2'
t-^ componentapplied
<-
wise.
profile.
L-,
Consider
a
>_
2)
L,
k',
Vi
= -1
-^^<.l/2- ^-l/2\
(28)
Vi
-I7
(^1+1/2 - ^Ll/2).
(29)
-i
and
L,
through
11
L^
-It
(f-i-Hl/2
^-1/2^'
^1+1/2-*
^30)
where
is a scalar quantity
^ ^i+-|/p
such that
5.
-^^
1.
"^
^1
(called
^1+1/2
'
^31)
is
L^
Vi
-
so that if
p
>_
-^
17 ^^.1/2 (^1.1/2
-
^-1/2 (^1-1/2
is o(Ax^)
^1.1/2)
(32)
^1-1/2^^
k-1 we have
Lu.
= L u.
+ o(Ax^'^^)
Taking k
(33)
we choose
i ^^+1/2 (^1.1
- ^i^
^-1/2
(^1 - ^1-1))
(3M
'
12
uf'
(Uj^l _ u?)
(35)
-i^
^-i+1
Ax
1
-
_ pH)
.pn
n _ At
-1
At
(Itl.l - ^l)
} <l.l/2
-i-1^
2Ax ^-i
-
1-1/.
<"-!
(36)
"-?-l"
+c)
max(M|u 1^
'^t
scheme
It remains to describe how the switch
is chosen.
There
Harten
1 9J
Let ^^ + 1/2
"
i+1/2
"^i+l
^i"
i-1/2
,
'
^+1/2!
for
^^^^"^
|A.^^/2 +
i-1/2
>
'i-1/2
(37)
,
In this case p =
and
otherwise.
>
p.
1+1/2
by
"iaxce.,e.^^).
13
n+1
i.e.
At
2Ax
'\^n+l
pn
n
^"i+1/2 -i+1/2
pH
,n
1-1/2 -i-1/2^
(38)
In this section we
without oscillations.
It
fCu), = At [gCu,f^)uJ^
(39)
At.
is the coefficient of the diffusion term.
where gCu,^)
Let the
represented by
u^ + fCu)^ = At
where r is
At
At
(g(u,v-) - r(u,T^))u,
'Ax'
/
positive function.
(^0)
'Ax'
14
'vn+l
= Lu.. Then
with the original difference scheme, say u.
In the second step let A be a difference operator approximating
-t '
^4^^"'i^
"x]x
(^2)
0-
We define
n+1 = n'^n+l = -T n
Au.
ALu.
u.
more of a restriction on 7
Ax
[ 2]
-^(F?,, -Fj),
(U? ^ U^.,)
- 2uJ
5i + n(uj+i
n+1 ^ ^n+1
^1
-1
where
Following
the procedure is
u;:};M
if ^
L.
^-1+1/2
uj_^),
s
-1-1/2^'
(..a)
(44c)
(i^i^^s
^
1
.
15
^i+l/2
i+l/2
^1+1/2
n+1
7?n+l.
-u--).
(u
sgn(A.^^/2) max
U Tt, - U..
1
1+1
0,
mm |sgn(A.^^/2)^-l/2' 1^1+1/2!
The parameter
'"Sn(A.^^/2)A.^3/2]|.
The
stability condition is
/
max( u +c
I
'
'
At
<
Ax
Euler scheme.
rule corrector.
n+1/2
u
1
n+1
u.
u^ - At (DF^ -
= u
n _ At
6(*^^,/2
4>"
))
"1-1/2^^'
(i<5a)
At P
(DFfl/2
pH)^
(^5b)
16
where
o^ = (u + c)^,
and
is
We took as the
stability condition
Ax
<
1.
However, it
Replace f^^+1/2
by
^"^
^"+1/2 ^^^^^
1
J^
>
Ax
P =
1
otherwise.
constant state.
and 5
which
> p
p-^
>
and
17
= u
u-|
= 0,
>
At time
Points
x^
It is seen that
However,
contact discontinuity.
m,
e,
= 0.1,
be 1.4.
and
= 0.
Uj-
= 1.,
p.,
p,
= 1.,
u-,
0.01.
= 0.,
-y
o-
In the
The constant
was chosen to
was
The
= 0.125,
For the
In fact, if
is
18
propagate to the left and to the right and thus create a spurious
state.
is to choose |
only once
and
Sod [21]
Godunov scheme.
wave are rounded.
The transi-
artificial compression.
The
19
continuity occupies 6-8 zones while the shock wave occupies 4-6
zones.
The rarefaction
rounded.
This
improved.
20
It
This Is a result of
The shock
wave and the contact discontinuity have been computed with Infinite
However,
It
is
realized.
The Gllmm scheme requires between
and
times as much
However, the Glimm scheme requires far less spatial grid points
for the same resolution.
9
One
21
evaluated by
Qp = 2^D(iAx) AX.
1
i.e.
fluctuations
The momentum
(allowing for
rarefaction
rounded.
The transition
The resolution is
The
slightly rounded.
22
discontinuity
13-
The constant
6-8 zones while the transition of the shock occupies 3-^ zones.
The timing
Table IV.
The only
requires between
and
However, Glimm's
scheme can give the same resolution with far less points
Cas seen in Table II).
IV.
Conclusions
23
handled.
Boris and Book, the hybrid scheme of Harten and Zwas, and
the artificial compression method of Harten is that there
24
Many of the
standard tests fail to work well enough for the use of artificial
compression.
It is possible to generalize
method to other coordinate systems and different equaSee Harten and Sod [10].
See Sod
22]
Acknowledgements
The author would like to thank Professor
Mr.
Alexandre Chorin
The author
25
Appendix:
1,
is separated
by a slip line
>
dx
= u^
-grp
There
(^^Ax
<
i'nAx
u^At/2).
If the left wave is a shock wave
(a)
and p = p.,
u = u.,
O
dx
-ry
(2)
if
and (l) if
we have p = p.,
^
i i
lb
= U,,
dx =
U
-r-p
>
(p^
we have p = p^,
p = p^,
u = u^,
from (13)
M
I
(^6)
U^-u.
(b)
j^.
i7Pfl
-,
where c^ =
*
ty
dx
-^ = u
/
'
?)
Jl
- c
where
dx =
u^
-^-p
- c^,
so
P*
denoted by
A,
and we
isentropic law
P^P^"^ =
P*P*^ = A
(^7)
26
(1)
p = p^,
If
I'nAx
u = u^,
(2)
If
then
and p = p^.
-^^
= u
2i ""Ax
- c
obtaining
- c
{^9)
At
c,
(50)
we can obtain
p,
u,
Using equation
= Ap^
p,p7p^
^^')
('50)
= c^ +
^^
(u^- u)
(52)
By substitution of
of
52)
2P
Ax
7"
53)
into
52)
c
is obtained; by substitution
we obtain
27
P =
(3)
we obtain
= p^,
u = u^,
II.
(I^Ax
>
and p = p^.
u^At/2).
(a)
i
(53)
(f^)'^"'"'
(p^
> p
and (l) if
dy
Ax lies to the left of the shockline defined by -^ = U
we have
dt
r
= p#j u = u^, and p = p^, where p^ is obtained from (15)
,
-M
^
'*
(2)
^=
U^,
(b)
If
r_
u^
'* - U
(5M
we have
= p^,
u = u^,
and p = p^,
"^
(p^
The
) .
= u^ + c^,
i^P*
where c^ =
isentropic law
Pp"^ = P*p;^ = A
(55
tz>
= p^, u = u^,
dx =
u +
(56
/^Pr
"'dtrr'rVp
(55
P* = (-^)
(1)
-rrr
28
(2)
If
dx
= ^ + ^ to the slope of
-g^
),
obtaining
Ax
2i
u+c=-^.
(57)
2c(7-l)-l- u = 2c^(7-l)-^-u^
the isentropic law,
cind
P = PpPj,"^p^ = Ap^
Using equation
(58
Substitution of
(60))
c^+
into
59)
into
(g-i
^^
u,
(u - u^)
Ax
(59
(60
(.57)
2C
By substitution of
c =
p,
and p.
of
(58)
-,
60)
c
by substitution
is obtained;
we obtain
,c2lA-l
P =
(3)
If
Equations
Glimm's method.
(62)
p = p
we obtain
(75^
u = u
i^c)
and p = p
62)
29
>H
30
v|
31
Table II
32
Table III
t/At
1
Qr
Q,
33
Table IV
SCHEMES
3^
Figure
35
Region
Region
Pi
1P5
yu
^1=0
I
'0
Figure
36
Region
Region
u.
Figure
37
1.00
Figure
.00
38
1.00
LamiiuiMHWWWft
LJ
o
o
Hd-oo
.50
.25
Figure
.75
continued
1.00
39
1.00
o
to'
BEEME
nillllllllB
O
CM
>-Cj'
CD
gmmumia^gBD
UJ
o
CO
o
o
0.00
.50
.25
Figure
.75
continued
1.00
1.00
1.00
it2
75
.00
r2>
o
o
0.00
.25
.75
.50
Figure
continued
1.00
43
1.00
o
(M
ximkUHiMiiTnmu
ujS-1-
ID
CO
in
LU
ct:
o
00 +
r"""""""""
o
o
^.00
.50
.25
Figure
.75
1.00
il4
1.00
LU
o
U3
O
O
0.00
.50
.25
Figure
continued
.75
1.00
^5
1.00
1.00
Figure
46
CVJ
o
Oi-U
c
(I
>-co-D
o
LU
^.00
LU
.50
.75
1.00
.75
1.00
o
U3
O
O
t).00
.50
.25
X
Figure
continued
47
1.00
1.00
Figure
0.00
o
o
en
49
o
CM
o
CD--
o
to
Oo
CO-l.
o
o
^.00
.50
.25
.75
1.00
1.00
Figure 10
50
75
o
o
en
1.00
1.00
Figure 11
.00
52
o
CtJ
o
(n4-
BBBT
CD
rtMIIMMJMIIWMPBM
UMju i 1 1
.75
0.00
w nm JWM
i
1.00
o
o
m
o
in
OJ
o
o
CO
loJ
in
o
o
0.00
Figure 11 continued
.00
53
1.00
1.00
Figure 12
o
o
tn
55
.00
1.00
Figure 13
56
1.00
^3.00
o
o
en
o
o
>.cj'
CD
Of
UJ
UJ
o
U3
o
o
0.00
.50
.25
.75
X
Figure 13 continued
1.00
57
1.00
Figure 1^
.00
58
1.00
o
o
(n'
59
1.00
0.00
o
CM
caESc
LUtD--
ID
CO
CO
or
Q_
o
on
Hmmiiuwm^
o
o
0.00
.50
.25
X
Figure 15
.75
1.00
60
o
o
o
LD--
^9 i^SSBBBSmaSBB:
L%aiHanHffisi3 H)
o
LjJ
o
0.00
.25
.50
o
CM
O
>-C\)
CD
LU
LU
o
o
.75
1.00
61
UFT
art
aa.f
".-"-
lEFT
SIDE
IS
S-T
v.
62
List of Captions
Tables.
Table
I.
Table II.
Glliran's
method for
Interior
grid points.
Table III.
Table IV.
Figures
Figure 1.
Figure
2.
Shock tube at
Figure
3-
Shock tube at
>
0.
Figure
4.
Godunov's method.
Figure
5.
Figure
6.
Figure
7.
MacCormack's method.
Figure
8.
Figure
9.
Figure 10.
Figure 11.
Gllmm's method.
Figure 12.
Figure 13-
Hybrid method.
Figure 14.
Figure 15.
Figure 16.
63
Bibliography
[1]
J.
P.
_,and
[2]
11,
2iJ8
Phys
11 ,
38
(1973).
J.
K.
(1975).
[3]
A.
J.
22,
517 (1976).
14]
S.
K.
_47,
271 (1959).
15]
A.
V.
Zabrodin, and
Prokopov, J. Comp
P.
G.
II87 (1962).
1,
16]
J.
17]
A.
Math.
I8
697
(1965).
Contact Discontinuities:
Pure Appl
19]
Math
to appear.
IlO]
and
G.
Method, to appear.
and G. Zwas, J. Comp. Phys.
[11]
[12]
J.
M.
6,
568 (1972).
A.
[14]
P.
D.
2,
7,
10,
[16]
to appear.
154 (1967).
[15]
I,
159
(1954).
537 (1957).
13,
217
6i|
^73 (1969).
[17]
B.
[18]
R-
3,
R.
8,
ed.
M.
Holt, Springer-Verlag,
Intersclence (1967).
Phys
USSR , No.
(1962)
[20]
V.
V.
Rusanov,
[21J
G.
A.
J.
California (1976)
[22
to appear.
65
B.