Professional Documents
Culture Documents
Acknowledgement: Simulation in Computer Graphics University of Freiburg
Acknowledgement: Simulation in Computer Graphics University of Freiburg
WS 04/05
Motivation
Outline
n
n
n
introduction
pre-requisites
governing equations
n
n
n
solution techniques
n
n
n
continuity equation
momentum equation
summary
Lax-Wendroff
MacCormack
numerical aspects
Introduction
n
mass is conserved
force = mass acceleration (Newtons second law)
energy is conserved (not considered in this lecture)
Continuous Quantities
n
n
Governing
Equations
Discretization
Navier-Stokes
Euler
Finite
Difference
System of
Algebraic
Equations
Discrete
Nodal
Values
Equation
Solver
Approx.
Solution
Lax-Wendroff
MacCormack
Problem
x, y, z 3D coordinate system
t time
( x,y,z,t ) density
v ( x,y,z,t ) velocity
v (x,y,z,t )
(x,y,z,t )
University of Freiburg - Institute of Computer Science - Computer Graphics Laboratory
v (x,y,z,t+t )
(x,y,z,t+t )
Substantial Derivative of
Outline
n
n
n
introduction
pre-requisites
governing equations
n
n
n
continuity equation
momentum equation
summary
solution techniques
n
n
n
Lax-Wendroff
MacCormack
numerical aspects
Substantial Derivative of
n
v +
w +
z 1
t 1
1
n
n
n
1 ( x1,y1,z1,t1 )
2 ( x2,y2,z2,t2 )
substantial derivative of
D
u
+v
+w
+
x
y
z
Dt
t
substantial derivative = local derivative + convective derivative
+ (v )
t
Dt
t2 t1
2 1
=
u +
t2 t1
x 1
y
Substantial Derivative
( y 2 y 1 ) +
(z 2 z 1 ) +
(t2 t1 )
z 1
t 1
1
y 2 y1 z 2 z 1
+
+
z 1 t 2 t1 t 1
1 t 2 t1
2 1 x 2 x1
=
+
t2 t1
x 1 t 2 t1 y
=
,
,
x y z
Divergence of v
n
Outline
u v w
1 D ( V
+
+
=
x y
z
V
Dt
n
n
n
introduction
pre-requisites
governing equations
n
n
n
solution techniques
n
n
n
Continuity Equation
n
n
n
Lax-Wendroff
MacCormack
numerical aspects
Continuity Equation
mass is conserved
infinitesimally small fluid element moving with the flow
fixed mass m, variable volume V, variable density
m = V
D
1 D V
+
=0
Dt
V Dt
continuity equation
momentum equation
summary
D
+ v = 0
Dt
substantial derivative
time rate of change of
density of a moving
fluid element
D
+ v = 0
Dt
Continuity Equation
n
Continuity Equation
n
D
+ v = 0
Dt
manipulation
D
+ v =
+ v + v =
+ ( v )
Dt
t
t
conservation form (considers element at fixed location)
+ ( v ) = 0
t
+ ( v ) = 0
t
Outline
n
n
n
introduction
pre-requisites
governing equations
n
n
n
solution techniques
n
n
n
continuity equation
momentum equation
summary
Lax-Wendroff
MacCormack
numerical aspects
Momentum Equation
n
n
n
body forces
n gravity
surface forces
n based on pressure distribution on the surface
n based on shear and normal stress distribution on the surface
due to deformation of the fluid element
friction
fluid
element
gravity
pressure
normal
stress
shear
stress
velocity
velocity
Pressure Force
Body Force
n
n
n
n
dx
Stress
n
n
dy
dx dy dz
p p + dx dy dz =
x
x
dz
( p + p/ x dx ) dy dz
dx
dy
fluid
element
dz
Stress
n
n
n
normal
stress
shear
stress
velocity
velocity
xx
x
University of Freiburg - Institute of Computer Science - Computer Graphics Laboratory
Surface Forces in x
Momentum Equation in x
(yx + yx / y dy) dx dz
m a x = Fx
dz
p dy dz
( p + p/ x dx ) dy dz
xx dy dz
(xx + xx / x dx) dy dz
dy
dx
yx dx dz
Fx = p p + dx dy dz + xx + xx dx xx dy dz
x
x
zx not illustrated
dx dy dz
mass
+ yx + yx dy yx dx dz + zx + zx dz zx dy dz
z
y
p xx yx zx
+
dx dy dz
Fx =
+
+
y
z
x
x
n
n
= + xx +
+
+ fx
Dt
x x
y
z
Dv
p xy yy zy
= +
+
+
+ fy
Dt
y x
y
z
yz zz
Dw
p
= + xz +
+
+ fz
Dt
z
x
y
z
acceleration
time rate of change
of velocity of a
moving fluid element
surface force
pressure
normal stress
shear stress
body force
gravity
yx zx
p
Du
= + xx +
+
+ fx
x
x
y
z
Dt
Momentum Equation
Du p xx yx zx
dx dy dz + f x dx dy dz
+
= +
+
Dt x x
y
z
Momentum Equation in x
n
Du
u
=
+ v u
Dt
t
( u)
u
=
+u
t
t
t
u
( u)
=u
t
t
t
( u v ) = u ( v) + ( v ) u
( v ) u = ( u v) u ( v)
Du ( u)
=
u + ( v) + ( u v )
Dt
t
t
continuity equation
Du ( u )
=
+ ( u v )
Dt
t
Momentum Equation
n
Newtonian Fluids
n
xx = ( v ) + 2
n
n
n
n
n
n
u
x
v u
xy = yx = +
x y
yz zz
( w )
p
+
+ fz
+ ( w v ) = + xz +
y
z
t
z
x
Perfect Gas
v
y
u w
xz = zx = +
z x
zz = ( v ) + 2
w
z
w v
yz = zy = +
y z
Momentum Equation in x
yx zx
( u )
p
+ ( u v ) = + xx +
+
+ fx
t
x x
y
z
n
now,
p can be expressed using density and
can be expressed using velocity gradients,
fx is user-defined (e. g. gravity)
Governing Equations
Viscous Compressible Flow
n
n
n
introduction
pre-requisites
governing equations
n
n
n
n
n
continuity equation
momentum equation
summary
( v )
p xy yy zy
+ ( v v) =
+
+
+
+ fy
t
y
x
y
z
Lax-Wendroff
MacCormack
numerical aspects
yz zz
( w )
p
+
+ fz
+ ( w v ) = + xz +
y
z
t
z
x
Governing Equations
Inviscid Compressible Flow
Euler equations
Comments
on the Governing Equations
n
continuity equation
( u )
p
+ ( u v ) = + f x
t
x
( v )
p
+ ( v v ) = + f y
t
y
( w )
p
+ ( w v ) = + f z
t
z
n
n
momentum equation
+ ( v ) = 0
t
continuity equation
yx zx
( u )
p
+
+ fx
+ ( u v ) = + xx +
y
z
t
x x
+ ( v ) = 0
t
solution techniques
n
momentum equation
Outline
Governing Equations in
Conservation Form
n
Generic Form
viscous flow
?v
u
?w
u u + p xx
? u w t zx
u
? u v t yx
? fx
U=
F=
G =
H =
J
=
? f
v u xy
? v w + p t zy
v
? v v + p t yy
y
w
w u
? ww + p t
? f
? wv t
yz
xz
zz
inviscid flow
u
?v
u
uu + p
?u v
U=
F
=
G
=
vu
?v v + p
v
w
wu
?w v
U F G H
+
+
+
=J
t x y z
Generic Form
n
n
n
n
n
?w
0
?u w
? fx
H =
J
=
? f
?v w + p
y
?w w + p
? f
10
Outline
n
n
n
introduction
pre-requisites
governing equations
n
n
n
continuity equation
momentum equation
summary
solution techniques
n
n
n
Lax-Wendroff Technique
Lax-Wendroff
MacCormack
numerical aspects
n
n
Lax-Wendroff
Example
n
n
n
v
=
+u
+
+v
y
y
2
it,+j t = it, j +
t +
2
t i , j
t
u
u
u R T
= u
+v
+
t
y
x
x
2u
u
u it ,+j t = u it, j +
t + 2
t i , j
t
v
v
v R T
= u
+v
+
t
x
y
y
( t )2
+ ...
i, j 2
t
( t )
+ ...
i , j 2
t
2 v ( t )2
v
v it,+j t = v it, j +
+ ...
t + 2
t i , j
t i, j 2
t
11
( t )
+ ...
i, j 2
t
=
+u
+
+v
t
x
y
y
x
2u
2
u
2 u
2v
v
2 v
=
+
+u
+
+
+
+v
+
t 2
x t x t
y t y t
y t y t
x t x t
t
t
vt
t
t u it+ 1, j u it 1, j
it 1, j
vit 1, j
it 1, j
+ u it, j i + 1, j
+ it, j i + 1, j
+ v it, j i + 1, j
= i , j
2 x
2 x
2 y
2 y
t i , j
u u
u
R T
u
u v R T
= u
+
+v
+
2
+
x 2 x
x t
x
y
y
x
x
x 2
u
u
2 =
i, j
2
t
i +1, j
2u + u
t
i, j
2
(x )
Outline
n
n
n
t
i 1, j
ut
+ ut
ut
ut
2u
= i+1, j +1 i 1, j1 i 1, j +1 i +1, j 1
4xy
xy i, j
introduction
pre-requisites
governing equations
n
n
solution techniques
n
n
n
continuity equation
momentum equation
summary
Lax-Wendroff
MacCormack
numerical aspects
12
MacCormack Technique
MacCormack Technique
n
n
n
n
n
t
t
vt
t
t u it +1 , j u it1 , j
it1, j
v it 1, j
it 1, j
+ u it, j i + 1, j
+ it, j i + 1, j
+ v it, j i + 1, j
= i , j
2
x
2
x
2
y
2
y
t i, j
it,+j t = it, j +
t
t i , j
t
av
it,+j t = it, j +
t
t i, j
Comments
i , j
u
= it,+j t
t + t
i +1 , j
2 x
t + t
i 1 , j
+ u it,+j t
t + t
i +1 , j
2x
t+ t
i 1 , j
+ it,+j t
av
t
1
t
it,+j t = it, j +
t = i, j +
+
t
t
i, j
i , j t
t+ t
i +1 , j
2 y
t + t
i 1 , j
+ v it,+j t
t + t
i +1 , j
2 y
t + t
i 1, j
t + t
i , j
n
n
n
n
MacCormack Technique
n
v
v it,+j t = vit, j +
t
t i, j
non-conservation form
conservation form
viscous flow
inviscid flow
13
Outline
n
n
n
introduction
pre-requisites
governing equations
n
n
n
solution techniques
n
n
n
continuity equation
momentum equation
summary
Lax-Wendroff
MacCormack
numerical aspects
Numerical Effects
n
n
n
n
original function
Numerical Effects
n
x
dissipation
x
dispersion
Summary
n
Lax-Wendroff
MacCormack
numerical aspects
14
Recent Research
Recent Research
15