Professional Documents
Culture Documents
t
2
t
1
Substantial Derivative of
( ) ( ) ( ) ( )
1 2
1
1 2
1
1 2
1
1 2
1
1 2
t t
t
z z
z
y y
y
x x
x
,
_
+
,
_
,
_
+
,
_
+
1 1 2
1 2
1 1 2
1 2
1 1 2
1 2
1 1 2
1 2
,
_
,
_
,
_
,
_
t t t
z z
z t t
y y
y t t
x x
x t t
1 1 1 1 1 2
1 2
,
_
+
,
_
,
_
+
,
_
t
w
z
v
y
u
x t t
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n substantialderivativeof
n substantialderivative=localderivative+convectivederivative
n localderivative timerateofchangeatafixedlocation
n convectivederivative timerateofchangeduetofluidflow
n subst.derivative=totalderivativewithrespecttotime
Substantial Derivative
t z
w
y
v
x
u
Dt
D
T
z y x t Dt
D
,
_
, , ) ( v
4
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n divergenceofvelocityv =timerateofchangeofthe
volumeVofamovingfluidelementperunitvolume
Divergence of v
( )
Dt
V D
V z
w
y
v
x
u
v
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n introduction
n pre-requisites
n governingequations
n continuityequation
n momentumequation
n summary
n solutiontechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Outline
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n massisconserved
n infinitesimallysmallfluidelementmovingwiththeflow
n fixedmassm,variablevolumeV, variabledensity
n timerateofchangeofthemassofthemovingfluid
elementiszero
Continuity Equation
V m
( )
0 +
Dt
V D
Dt
D
V
Dt
V D
Dt
m D
0
1
+
Dt
V D
V Dt
D
0 + v
Dt
D
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
Continuity Equation
0 + v
Dt
D
divergenceofvelocity-
timerateofchangeofvolume
ofamovingfluidelementper
volume
substantialderivative
timerateofchangeof
densityofamoving
fluidelement
5
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n non-conservationform(considersmovingelement)
n manipulation
n conservationform(considerselementatfixedlocation)
Continuity Equation
0 + v
Dt
D
( ) v v v v
+ +
+
t t Dt
D
( ) 0 +
t
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n motivationforconservationform
n infinitesimallysmallelementatafixedlocation
n massfluxthroughelement
n differenceofmassinflowandoutflow=netmassflow
n netmassflow=timerateofmassincrease
Continuity Equation
( ) 0 +
t
netmassflow
pervolume
timerateofmass
increasepervolume
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n introduction
n pre-requisites
n governingequations
n continuityequation
n momentumequation
n summary
n solutiontechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Outline
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n consideramovingfluidelement
n physicalprinciple:F =ma (Newtonssecondlaw)
n twosourcesofforces
n bodyforces
n gravity
n surfaceforces
n basedonpressuredistributiononthesurface
n basedonshearandnormalstressdistributiononthesurface
duetodeformationofthefluidelement
normal
stress
Momentum Equation
pressure fluid
element
gravity
shear
stress
friction
velocity
velocity
6
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n f =bodyforceperunitmass
n gravity:f=mg /m=g
bodyforceonfluidelement
f (dx dy dz )
Body Force
dx
dz
dy
fluid
element
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n considerthex component
n pressureforce
actsorthogonal
tosurfaceinto
thefluidelement
n netpressureforceinx direction
Pressure Force
dx
dy
dz
pdy dz (p+p/xdx ) dy dz
dz dy dx
x
p
dz dy dx
x
p
p p
1
]
1
,
_
+
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n normalstress relatedtothetimerateofchangeofvolume
n shearstress relatedtothetimerateofchange
oftheshearingdeformation
n
jk
stressink directionappliedtoasurfaceperpendicular
tothej axis
n
xx
normalstressinx direction
n
zx
,
yx
shearstressesinxdirections
Stress
xx
x
y
yx
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n normalstressisrelatedtopressureorthogonaltosurface
n shearstressisrelatedtofrictionparalleltosurface
n frictionandpressurearerelatedtothevelocitygradient
n friction(shearstress)modelsviscosity(viscousflow)
n incontrasttoinviscid flow,wherefrictionisnotconsidered
Stress
normal
stress
pressure shear
stress
friction
velocity
velocity
7
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
(
yx
+
yx
/ydy) dx dz
Surface Forces in x
dx
dy
dz
pdy dz (p+p/xdx ) dy dz
xx
dy dz (
xx
+
xx
/xdx) dy dz
yx
dx dz
zx
notillustrated
dz dy dx
x
dz dy dx
x
p
p p F
xx
xx
xx x 1
]
1
,
_
+ +
1
]
1
,
_
dz dy dz
z
dz dx dy
y
zx
zx
zx yx
yx
yx 1
]
1
,
_
+ +
1
]
1
,
_
+ +
dz dy dx
z y x x
p
F
zx yx xx
x
,
_
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
Momentum Equation in x
dz dy dx f dz dy dx
z y x x
p
Dt
Du
dz dy dx
x
zx yx xx
,
_
x x
F a m
mass acceleration
timerateofchange
ofvelocityofa
movingfluidelement
surfaceforce
pressure
normalstress
shearstress
bodyforce
gravity
x
zx yx xx
f
z y x x
p
Dt
Du
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n viscousflow,non-conversationform
n Navier-Stokesequations
Momentum Equation
x
zx yx xx
f
z y x x
p
Dt
Du
y
zy yy xy
f
z y x y
p
Dt
Dv
z
zz yz xz
f
z y x z
p
Dt
Dw
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n obtainingtheconservationformofNavier-Stokes
Momentum Equation in x
u
t
u
Dt
Du
+
v
( )
t
u
t
u
t
u
( )
t
u
t
u
t
u
( ) ( ) ( ) u u u + v v v ( ) ( ) ( ) v v v u u u
( )
( ) ( ) v v u
t
u
t
u
Dt
Du
+
1
]
1
continuityequation
( )
( ) v u
t
u
Dt
Du
8
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n Navier-Stokesequationsinconservationform
Momentum Equation
( )
( )
x
zx yx xx
f
z y x x
p
u
t
u
v
( )
( )
y
zy yy xy
f
z y x y
p
v
t
v
v
( )
( )
z
zz yz xz
f
z y x z
p
w
t
w
v
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n Newton:shearstressinafluidisproportional
tovelocitygradients
n mostfluidscanbeassumedtobenewtonian,
butbloodisapopularnon-newtonian fluid
n Stokes:
n isthemolecularviscositycoefficient
n isthesecondviscositycoefficientwith =-2/3
Newtonian Fluids
( )
x
u
xx
+ 2 v ( )
y
v
yy
+ 2 v ( )
z
w
zz
+ 2 v
1
]
1
y
u
x
v
yx xy
1
]
1
x
w
z
u
zx xz
1
]
1
z
v
y
w
zy yz
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n intermolecularforcesarenegligible
n R specificgasconstant
n T temperature
n termal equationofstate
Perfect Gas
T R p
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n now,
p canbeexpressedusingdensityand
canbeexpressedusingvelocitygradients,
f
x
isuser-defined(e.g.gravity)
Momentum Equation in x
( )
( )
x
zx yx xx
f
z y x x
p
u
t
u
v
9
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n introduction
n pre-requisites
n governingequations
n continuityequation
n momentumequation
n summary
n solutiontechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Outline
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n thus,fourequationsandfourunknowns,u,v,w
Governing Equations
Viscous Compressible Flow
( )
( )
x
zx yx xx
f
z y x x
p
u
t
u
v
( )
( )
y
zy yy xy
f
z y x y
p
v
t
v
v
( )
( )
z
zz yz xz
f
z y x z
p
w
t
w
v
( ) 0 +
t
continuityequation
m
o
m
e
n
t
u
m
e
q
u
a
t
i
o
n
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n Eulerequations
Governing Equations
Inviscid Compressible Flow
( )
( )
x
f
x
p
u
t
u
v
( )
( )
y
f
y
p
v
t
v
v
( )
( )
z
f
z
p
w
t
w
v
( ) 0 +
t
continuityequation
m
o
m
e
n
t
u
m
e
q
u
a
t
i
o
n
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n coupledsystemofnonlinearpartialdifferentialequations
n normalandshearstresstermsarefunctionsofthe
velocitygradients
n pressureisafunctionofthedensity
n onlymomentumequationsareNavier-Stokesequations,
howeverthenameiscommonlyusedforthefullset
ofgoverningequations(plusenergyequation)
Comments
on the Governing Equations
10
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n canbeobtaineddirectly fromacontrolvolumefixedin
space
n considerflux ofmass,momentum(andenergy)intoand
outofthevolume
n haveadivergencetermwhichinvolvestheflux of
mass(v),momentuminx,y,z(uv,vv,wv)
n canbeexpressedinagenericform
Governing Equations in
Conservation Form
J
H G F U
z y x t
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n viscousflow
n inviscid flow
Generic Form
,
_
w
v
u
,
_
xz
xy
xx
u w
u v
p u u
u
,
_
yz
yy
yx
t v w ?
t p v v ?
t v u ?
v ?
G
,
_
z
y
x
f ?
f ?
f ?
0
J
,
_
+
+
zz
zy
zx
t p w w ?
t p w v ?
t w u ?
w ?
H
,
_
w
v
u
,
_
u w
u v
p u u
u
,
_
v w ?
p v v ?
v u ?
v ?
G
,
_
z
y
x
f ?
f ?
f ?
0
J
,
_
+
+
p w w ?
p w v ?
w u ?
w ?
H
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n U solutionvector(tobesolvedfor)
n F,G,H fluxvectors
n J sourcevector(externalforces,energychanges)
n dependentflowfieldvariablescanbesolvedprogressively
instepsoftime(time-marching )
n spatialderivativesareknowfromprevioustimesteps
n numberscanbeobtainedfordensity andfluxvariables
u,v,w
Generic Form
z y x t
H G F
J
U
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n inmanyreal-worldproblems,discontinuouschangesin
theflow-fieldvariables,v occur(shocks,shockwaves)
n problem:differentialformofthegoverningequations
assumesdifferentiable(continuous)flowproperties
n simple1-Dshockwave:
1
u
1
=
2
u
2
n conservationformsolvesforu,seesnodiscontinuity
n positiveeffectonnumericalaccuracyandstability
Motivation for Different Forms
of the Governing Equations
x
x
u
x
u
11
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n introduction
n pre-requisites
n governingequations
n continuityequation
n momentumequation
n summary
n solutiontechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Outline
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n flow-fieldvariables,u,v,w areknownateachdiscrete
spatialposition(x,y,z )attimet
n Lax-Wendroff computesallinformationattimet+t
n second-orderaccuracyinspaceandtime
n explicit,finite-differencemethod
n particularlysuitedtomarchingsolutions
n marchingsuitedtohyperbolic,parabolicPDEs
n unsteady(time-dependent),compressibleflow
isgovernedbyhyperbolicPDEs
Lax-Wendroff Technique
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n 2D,inviscid flow,nobodyforce,innon-conservationform
Lax-Wendroff
Example
,
_
y
v
y
v
x
u
x
u
t
,
_
x
T R
y
u
v
x
u
u
t
u
,
_
y
T R
y
v
v
x
v
u
t
v
,
_
+
,
_
+
+
t
t
t
t
t
j i
t
j i
t
j i
t t
j i
( )
...
2
2
,
2
2
,
, ,
+
,
_
+
,
_
+
+
t
t
u
t
t
u
u u
t
j i
t
j i
t
j i
t t
j i
( )
...
2
2
,
2
2
,
, ,
+
,
_
+
,
_
+
+
t
t
v
t
t
v
v v
t
j i
t
j i
t
j i
t t
j i
12
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n /t canbereplacedbyspatialderivatives
giveninthegoverningequations
n usingsecond-ordercentraldifferences
Taylor Expansion - Density
( )
...
2
2
,
2
2
,
, ,
+
,
_
+
,
_
+
+
t
t
t
t
t
j i
t
j i
t
j i
t t
j i
,
_
y
v
y
v
x
u
x
u
t
,
_
,
_
+ + + +
y
v
y
v v
x
u
x
u u
t
t
j i
t
j i t
j i
t
j i
t
j i t
j i
t
j i
t
j i t
j i
t
j i
t
j i t
j i
t
j i
2 2 2 2
, 1 , 1
,
, 1 , 1
,
, 1 , 1
,
, 1 , 1
,
,
,
_
t
v
y t y
v
t y
v
t y
v
t
u
x t x
u
t x
u
t x
u
t
2 2 2 2
2
2
,
_
+
,
_
+
,
_
2
2 2
2
2 2
2
2 2
x
T R
x
T R
x
v
y
u
y x
u
v
x
u
x
u
u
t x
u
,
_
+
y x
u u u u
y x
u
t
j i
t
j i
t
j i
t
j i
t
j i
+
,
_
+ + + +
4
1 , 1 1 , 1 1 , 1 1 , 1
,
2
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n introduction
n pre-requisites
n governingequations
n continuityequation
n momentumequation
n summary
n solutiontechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Outline
13
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n samecharacteristicslikeLax-Wendroff
n second-orderaccuracyinspaceandtime
n requiresonlyfirsttimederivative
n predictor corrector
n illustratedfordensity
MacCormack Technique
t
t
av
j i
t
j i
t t
j i
,
_
+
+
,
, ,
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n predictorstepfordensity
n u,v arepredictedthesameway
MacCormack Technique
,
_
,
_
+ + + +
y
v
y
v v
x
u
x
u u
t
t
j i
t
j i t
j i
t
j i
t
j i t
j i
t
j i
t
j i t
j i
t
j i
t
j i t
j i
t
j i
2 2 2 2
, 1 , 1
,
, 1 , 1
,
, 1 , 1
,
, 1 , 1
,
,
t
t
t
j i
t
j i
t t
j i
,
_
+
+
,
, ,
t
t
u
u u
t
j i
t
j i
t t
j i
,
_
+
+
,
, ,
t
t
v
v v
t
j i
t
j i
t t
j i
,
_
+
+
,
, ,
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n correctorstepfordensity
n correspondstoHeun schemeforODEs
n otherhigher-orderschemes,e.g.Runge-Kutta 2or4,
couldbeusedaswell
MacCormack Technique
,
_
,
_
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
y
v
y
v v
x
u
x
u u
t
t t
j i
t t
j i t t
j i
t t
j i
t t
j i t t
j i
t t
j i
t t
j i t t
j i
t t
j i
t t
j i t t
j i
t t
j i
2 2 2 2
, 1 , 1
,
, 1 , 1
,
, 1 , 1
,
, 1 , 1
,
,
t
t t
t
t
t t
j i
t
j i
t
j i
av
j i
t
j i
t t
j i
1
1
]
1
,
_
+
,
_
+
,
_
+
+
+
, ,
,
,
, ,
2
1
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n Lax-Wendroff andMacCormack canbeusedfor
unsteadyflow
n non-conservationform
n conservationform
n viscousflow
n inviscid flow
n higher-orderaccuracyrequiredtoavoidnumerical
dissipation,artificialviscosity,numericaldispersion
n note,thatviscosityisrepresentedbysecondpartial
derivativesinthegoverningequations
Comments
14
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n introduction
n pre-requisites
n governingequations
n continuityequation
n momentumequation
n summary
n solutiontechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Outline
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n truncationerrorcausesdissipationanddispersion
n numericaldissipationiscausedbyeven-orderterms
ofthetruncationerror
n numericaldispersioniscausedbyodd-orderterms
n leadingterminthetruncationerrordominatesthe
behavior
Numerical Effects
x
u
x
u
x
u
originalfunction dissipation dispersion
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n artificialviscositycompromisestheaccuracy,but
improvesthestabilityofthesolution
n addingartificialviscosityincreasestheprobabilityof
makingthesolutionlessaccurate,butimproves
thestability
n similartoiterativesolutionschemesforimplicitintegration
schemes,whereasmallernumberofiterationsintroduces
artificialviscosity,butimprovesthestability
Numerical Effects
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
n governingequationsforcompressibleflow
n continuityequation,momentumequation
n Navier-Stokes(viscousflow)andEuler(inviscid flow)
n discussionofconservationandnon-conservationform
n explicittime-marchingtechniques
n Lax-Wendroff
n MacCormack
n numericalaspects
n recentresearchingraphics
Summary
15
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
Recent Research
M.Carlson,P.J.Mucha,G.Turk,RigidFluid:Animatingthe
InterplayBetweenRigidBodiesandFluid, Siggraph 2004.
UniversityofFreiburg- InstituteofComputerScience- ComputerGraphicsLaboratory
Recent Research
T.G.Goktekin,A.W.Bargteil,J.F.OBrien,
AMethodforAnimatingViscoelastic Fluids, Siggraph 2004.