Computational Methods for the Euler Equations

advertisement
Computational Methods for the Euler Equations
Before discussing the Euler Equations and computational methods for them, let’s
look at what we’ve learned so far:
Method
2-D panel
Assumptions/Flow type
2-D, Incompressible, Irrotational Inviscid
Vortex lattice
3-D, Incompressible, Irrotational Inviscid, Small
disturbance
Potential method
Prandtl-Glauert
3-D, Subsonic compressible, Irrotational, Inviscid,
Small disturbance
Euler CFD
3-D, Compressible (no M ∞ limit), Rotational,
Shocks, Inviscid
The only major effect missing after this week will be viscous-related effects.
2-D Euler Equations in Integral Form
Consider an arbitrary area (i.e. a fixed control volume) through which flows a
compressible inviscid flow:
v
n
y
dS
c
x
δC
v
n ≡ outward pointing normal (unit length)
dS ≡ elemental (differential) surface length
v
v
v
n dS = dyi − dxj
dy
v
n dS
dS
dx
Note: Path around surface is taken so that interior of control volume is on left.
Computational Methods for the Euler Equations
Conservation of Mass
⎛ rate of change ⎞ ⎛ rate of mass flow ⎞
⎜⎜
⎟⎟ + ⎜⎜
⎟⎟ = 0
⎠
⎝ of mass in C ⎠ ⎝ out of C
Mass in C = ∫∫ ρdA
where ρ ≡ destiny of fluid
C
⇒ rate of change =
d
ρdA
dt ∫∫C
of mass in C
Now, the rate of mass flowing out of C :
v v
Mass flow out of C = ∫ ρu • n dS
δC
⇒
v
u = velocity vector
d
v v
ρdA + ∫ ρu • n dS = 0
∫∫
C
δ
C
dt
Conservation of x-momentum
Recall that: total rate of change momentum = ∑ forces
For x-momentum this gives:
⎛ rate of change of ⎞ ⎛ rate of x − momflow ⎞
⎜⎜
⎟⎟ + ⎜⎜
⎟⎟ = ∑ Forces in x-direction
⎝ x − momentum in C ⎠ ⎝ out of C
⎠
d
v v
ρudA + ∫ ρuu • n dS = ∑ Forces in x-direction
∫∫
C
δ
C
dt
Now, looking closer at x-forces, for an inviscid compressible flow we only have
pressure (ignoring gravity).
Normal to surface
v
− pn dS
Recall pressure acts normal to the surface
dS
Into surface
v v
⇒ ∑ Force s in x = − ∫ pn • i dS
δC
Gives x-direction
16.100 2002
2
Computational Methods for the Euler Equations
d
v v
v v
ρ
udA
+
ρ
u
u
•
n
dS
=
−
p
n
∫
∫ • i dS
dt ∫∫
C
δC
δC
Conservation of y-momentum
This follows exactly the same as the x-momentum:
d
v v
v v
ρ
vdA
+
ρ
v
u
•
n
dS
=
−
p
n
∫
∫ • j dS
dt ∫∫
C
δC
δC
Conservation of Energy
Recalling your thermodynamics:
⎛ total rate of change ⎞ ⎛ work done on ⎞ ⎛ heat added ⎞
⎟⎟
⎟⎟ + ⎜⎜
⎟⎟ = ⎜⎜
⎜⎜
⎠
⎠ ⎝ fluid in C ⎠ ⎝ to C
⎝ of energy in C
For the Euler equations, we ignore the possibility of heat addition.
⎛ total rate of change ⎞ ⎛ rate of change of ⎞ ⎛ rate of energy ⎞
⎟⎟
⎟⎟ + ⎜⎜
⎟⎟ = ⎜⎜
⎜⎜
⎠ ⎝ flow out of C ⎠
⎠ ⎝ energy in C
⎝ of energy in C
The total energy of the fluid is:
1
ρE = ρe + ρ (u 2 + v 2 )
2
Total
energy
Note:
Internal
energy
Kinetic
energy
e = cvT where cv ≡ specific heat at constant volume
Static temperature
So,
⎛ total rate of change ⎞ d
v v
⎜⎜
⎟⎟ = ∫∫ ρEdA + ∫ ρEu • n dS
⎝ of energy in C
⎠ dt C
δC
The work done on the fluid is through pressure forces and is equal to the
pressure forces multiplied by (i.e. acting in) the velocity direction:
(work ) = ∫ (− pnv ) • uvdS
δC
Pressure force
16.100 2002
3
Computational Methods for the Euler Equations
⇒
d
v v
v v
ρEdA + ∫ ρEu • n dS = − ∫ pn • u dS
∫∫
dt C
δC
δC
Summary of 2-D Euler Equations
d
v v
ρdA + ∫ ρu • n dS = 0
∫∫
dt C
δC
d
v v
v v
ρ
+
ρ
•
=
−
• i dS
udA
u
u
n
dS
p
n
∫
∫
dt ∫∫
C
δC
δC
d
v v
v v
ρ
+
ρ
•
=
−
• j dS
vdA
v
u
n
dS
p
n
∫
∫
dt ∫∫
C
δC
δC
d
v v
v v
ρEdA + ∫ ρEu • n dS = − ∫ pn • ndS
∫∫
dt C
δC
δC
These are often written very compactly as:
v
v v
d
(
UdA
+
F
i
+
G
j ) • n ds = 0
∫sc
dt ∫∫c
⎡ρ ⎤
⎢ ρu ⎥
U ≡⎢ ⎥
⎢ ρv ⎥
⎢ ⎥
⎣ ρE ⎦
Conservative
state vector
⎡ ρu
⎢ 2
ρu +
F≡⎢
⎢ ρuv
⎢
⎢⎣ ρuH
⎤
⎥
p⎥
⎥
⎥
⎥⎦
Flux vector
for x-direction
H ≡ total enthalpy ≡ E + p
⎡ ρv
⎢ ρvu
G≡⎢ 2
⎢ ρv +
⎢
⎢⎣ ρvH
⎤
⎥
⎥
p⎥
⎥
⎥⎦
Flux vector for
y-direction
ρ
1
⎡
⎤
Ideal gas: p = ρRT = (γ − 1) ⎢ ρE − ρ (u 2 + v 2 )⎥
2
⎣
⎦
A Finite Volume Scheme for the 2-D Euler Eqns.
Here’s the basic idea:
(1) Divide up (i.e. discretize) the domain into simple geometric shapes (triangles
and quads)
16.100 2002
4
Computational Methods for the Euler Equations
Looking at this small region:
10
2
11
12
9
0
3
13
8
1
4
7
6
5
Cell 0 is surrounded by cells 1, 2, & 3.
i.e. cell 0 has 3 neighbors: cell 1, 2, & 3.
Nearest neighbors
16.100 2002
5
Computational Methods for the Euler Equations
(2) Decide how to place the unknowns in the grid.
(a) Cell-centered: cell-average values of the conservative state vector are
stored for each cell.
(b) Node-based: point values of the conservative state vector are stored at
each node.
The debate still rages about which of these options is best. We will look at cellcentered schemes because these are easiest (although not necessarily the
best). Also, they are very widely used in the aerospace industry.
(3) Approximate the 2-D integral Euler equation on the grid to determine the
chosen unknowns.
16.100 2002
6
Computational Methods for the Euler Equations
16.100 2002
7
Computational Methods for the Euler Equations
16.100 2002
8
Computational Methods for the Euler Equations
16.100 2002
9
Computational Methods for the Euler Equations
Let’s look in detail at step (3):
f
b
2
e
1
Cells: 0,1, 2, 3
Nodes: a, b, c, d, e, f
0
c
a
3
d
Cell-average unknowns:
⎡ρ 0 ⎤
⎡ ρ1 ⎤
⎢(ρu ) ⎥
⎢ ( ρu ) ⎥
0 ⎥
1 ⎥
⎢
U1 = ⎢
U0 =
⎢(ρv )0 ⎥
⎢(ρv )1 ⎥
⎢
⎥
⎢
⎥
⎣(ρE )1 ⎦
⎣(ρE )0 ⎦
U 2 = .............
U 3 = ...........
Specifically, we define U 0 as:
U0 ≡
1
A0
∫∫UdA
C0
⎧C 0 ≡ cell 0
where ⎨
⎩ A0 ≡ area of cell 0
Now, we apply conservation eqns:
v
v v
d
(
UdA
+
F
i
+
G
j ) • n dS = 0
∫δC0
dt ∫∫C0
The time-derivative term can be simplified a little:
dU 0
d
UdA = A0
∫∫
C
dt 0
dt
The surface flux integral can also be simplified a little:
v
v v
v
v v
b
∫ (Fi + Gj ) • nds = ∫ (Fi + Gj ) • ndS
δC0
a
v
v v
c
+ ∫ (Fi + Gj ) • ndS
b
v
v v
a
+ ∫ (Fi + Gj ) • n dS
c
16.100 2002
10
Computational Methods for the Euler Equations
Combining these expressions:
A0
v
v v
v
v v
b
c
dU 0
+ ∫ (Fi + Gj ) • n dS + ∫ (Fi + Gj ) • n dS
a
b
dt
v
v v
a
+ ∫ (Fi + Gj ) • n dS = 0
No approximations so far!
c
Now, we make some approximations. Let’s look at the surface integral from
a →b:
b
v
v v
b
∫a (Fi + Gj ) • nds
2
1
0
c
a
v
nab
3
The normal can easily be calculated since the face is a straight line between
nodes a & b. Recall, the unknowns are stored at all centers. So, what would be a
logical approximation for :
v
v v
b
∫ (Fi + Gj ) • nab dS = ???
a
Option #1=
Option #2=
Note: Option #1 ≠ option #2 in general.
There is very little difference in practice between these options. Let’s stick with:
v
v v
v 1
v⎤ v
b
⎡1
ℑ ab ≡ ∫ (Fi + Gj ) • nab dS = ⎢ (F0 + F1 )i + (G0 + G1 ) j ⎥ • nab ∆S ab
a
2
⎣2
⎦
v
v v
v 1
v⎤ v
c
⎡1
ℑbc ≡ ∫ (Fi + Gj ) • nbc dS = ⎢ (F0 + F2 )i + (G0 + G2 ) j ⎥ • nbc ∆S bc
b
2
⎣2
⎦
v
v
v 1
v⎤ v
a
⎡1
ℑca ≡ ∫ (Fi + Gj ) • nca dS = ⎢ (F0 + F3 )i + (G0 + G3 ) j ⎥ • nca ∆s ca
c
2
⎣2
⎦
Where
F0 ≡ F (U 0 )
G0 ≡ G (U 0 )
F2 ≡ F (U 2 )
G2 ≡ G (U 2 )
F1 ≡ F (U 1 )
F3 ≡ F (U 3 )
16.100 2002
G1 ≡ G (U1 )
G3 ≡ G (U 3 )
11
Computational Methods for the Euler Equations
Finally, we have to approximate A0
dU 0
somehow. The simplest approach is
dt
forward Euler:
A0
dU 0
+ ℑ ab + ℑbc + ℑ ca = 0
dt
U 0n +1 − U 0n
n
n
+ ℑ nab + ℑbc
+ ℑca
=0
∆t
Where U on ≡ U o t n and t n ≡ n∆t , n ≡ iteration
A0
( )
And ℑ nab etc. are defined as:
(
)
(
)
v 1
v⎤ v
⎡1
ℑ nab ≡ ⎢ F0n + F1n i + G0n + G1n j ⎥ • n ab ∆S ab
2
⎣2
⎦
n
n
F0 ≡ F U 0
etc.
n
1
F
( )
≡ F (U )
n
1
For steady solution, basic procedure is to make a guess of U at t = 0 and then
iterate until the solution no longer changes. This is called time marching.
Question
What assumptions have we made in developing our 2-D Euler Equation Finite
Volume Method?
16.100 2002
12
Download