Sie sind auf Seite 1von 34

Computational Fluid Dynamics (CFD)

Instructor: Shilong Lan


Tel:

13683389591

Email: lanshilong@126.com

Fluid flow (physics)


Physicist
Theory (Science)

Model (mathematics)

Algorithms (numerics)
CFD

CFD

Applications (Tool)

Engineer

The aim of course :


To understand CFD and CFD codes

Mathematician

CFD:

1. Pre-processor
Geometry, domain ,grid/mesh, initial conditions
Boundary conditions

2. Solver
schemes

3. Post-processor
data analysis, graphic output

Governing equations of the flow of a compressible


Newtonian fluid
Continuity

div( U ) 0
t
X-momentum

( u)
p
div( uU ) div( grad u) SMx
t
x
Energy

( i )
div( iU ) pdiv(U ) div(k grad T ) Si
t

Equations of state

p p( , T )
i i( , T )
For perfect gas

p RT
i CvT
Unknowns:

u, v, w, p, , T , i

General transport equations

( u)
p
div( uU ) div( grad u) SMx
t
x
( )
div( U ) div( grad ) S
t
convective term

diffusive term source term

Differential form for a fluid element

( )
div( U ) div( grad ) S
t
dV

CV

( )
CV t dV CV div( U )dV CV div( grad )dV CV SdV
Integral form for a control volume(CV)

dV n ( U )dA n ( grad )dA S dV

CV
A
A
CV
t
Integrate with respect to time t over a small interval t

dt

Classification of physical behaviours


Equilibrium problems
steady fluid flows
steady state conductive heat transfer

T
2T
k 2 0
t
x
T T2

T T1

Boundary-value problems

2T 2T
2 0
2
x
y

Elliptic equation

Irrotational and imcompressible flow (potential flow)

0
2

Solution:

BCs:

(1, ) f ( )
r

0 r 1,

a0 n
( r, ) r (an cos n bn sin n )
2 n 1

boundar y

an , bn

depend upon the all BCs

Disturbance signals
travel in all directions

Marching problems
unsteady fluid flows
Transient heat transfer

T
2T
k 2
t
x
T T0

T T0

t 0
t 1
T0

Parabolic equation

Initial-boundary-value problems
Disturbance at one
instant only influences
events at later time

t
x

Another kind of marching problem described by


hyperbolic equation

2u 2 2u
c
0 2nd order wave equation
2
2
t
x
ICs: u ( x,0) f ( x)

u ( x, 0) t g ( x)

x (, )

DAlembert solution:

1
1 x ct
u( x, t ) f ( x ct ) f ( x ct ) g (r )dr
2
2c x ct

Appendix 1

The solution of P is the sum of half of the values at point P1 and P2,
at the same time, it depends on the initial function between P1 and P2

t
P( x, t )
P1

x ct

P2

x ct

1
1 x ct
u( x, t ) f ( x ct ) f ( x ct ) g (r )dr
2
2c x ct
Domain of dependence and region of influence

Observation in fluid flow


w ave front

ct

V
P

V/c <1, influence the entire region

Mac h c one

t
P

ct
V

t 0

V/c >1, influence downstream


only

y
c harac teris tic line

region of influenc e

Move with point P

Steady problem

Classification of quasi-linear PDE


Classification of PDE based on characteristics

Cramers rule or Eigenvalue method

Example (Cramers rule)

2u
2u
2u
A 2 2B
C 2 D
x
xy
y
A,B,C,D are functions of x, y, u, u x, u y

(1)

Total differential

(1),(2) ,(3)

2u
2u
d (u x ) 2 dx
dy
x
xy

(2)

2u
2u
d (u y )
dx 2 dy
xy
y

(3)

2u 2u 2u
,
, 2 are indeterminate
if
2
x xy y

2B

dx

dy

0 0

dx

dy

dy B B 2 AC

dx
A

B 2 AC 0

hyperbolic

B 2 AC 0

parabolic

B 2 AC 0

elliptic

Example:

Steady, isentropic, inviscid, compressible flow over an aerofoil


2
2

2
(1 M ) 2 2 0
x
y

Steady, inviscid, compressible flow over an aerofoil


2D steady Euler equations

Example:

2u 2 2u
c
0
2
2
t
x
total differential of

(1)

u t , u x

2u
2u
dt
dx d (u t )
2
t
tx

(2)

2u
2u
dt 2 dx d (u x)
xt
x

(3)

(1),(2),(3) dt
0

c 2
0
dx

0 2u t 2
0

dx 2u x 2 d (u t )
dt 2u xt d (u x )

2u t 2 , or 2u x 2 , or 2u xt

indeterminate

Cramers rule

1
dt

c 2
0

dx

0
dx
c
dx 0
dt
dt
the direction or slope
of the characteristics
right- running characteristic

t
lef t- running characteristic

P1

x ct

P( x, t )
P2

x ct

One point two characteristics, part of information propagation


Propagation speeds are c

Domain of dependence and region of influence


region of inf luence
lef t- running characteristic

right- running characteristic

P( x, t )
P1

P2

x ct

x ct

domain of dependence

ct
1
x

ct
1
x

Numerical domain must include the domain of dependence.

Remarks:

Characteristics

Algorithms

Marching problem or Equilibrium problem


(Transient or Transient-like problem)

(Boundary value problem)

Numerical domain must include the domain of dependence.

x
CFL condition

ct
ct
1
x

Courant-Fredirich-Levis

Eigenvalue method (for system of equations)

u
v
v
u
a1 x b1 y c1 x d1 y 0

a u b u c v d v 0
2
2 x 2 y 2 x
y

u
W
v

a1
a
2

c1 W b1

c2 x b2

d1 W 0

d 2 y 0

W
W 0
K M
x
y 0

W
W 0
1
K M

x
y 0
W
W 0
N

x
y 0
eigenvalues

dy

i
dx

i of [ N ]

Assignment

all real at least two different values

hyperbolic

one same real value

parabolic

all complex

elliptic
finite value

Propagation speed

infinity
null

Remarks:
The eigenvalues may be a mix of both real and complex values
a mixed hyperbolic-elliptic nature
PDEs are transformed into ( , , ) space
the type of PDEs do not alter

Appendix 4

Eigenvalue method can be derived from Cramers rule

Example : 1D unsteady Euler equations

U
U
A
0
t
x

U u
E

0
1
0

A ( 3)u 2 / 2
(3 )u
1
( 1)u 3 uE 1.5( 1)u 2 E u

1 u c, 2 u , 3 u c

A I 0

hyperbolic

Left boundary
On left boundary

Descriptions

Numbers of BCs

u 0, u c

Supersonic entrance

u 0, u c
u 0, u c
u 0, u c

Subsonic entrance

Supersonic exit

null

Subsonic exit

Remarks:
Characteristics

IBCs

IBCs must be properly specified to ensure a well-posed problem


Well-posed problem: if the solution to a PDE exists and unique,
and if the solution depends continuously upon the IBCs.

Number of BCs

Number of characteristics enter the domain

Example : 2D unsteady Euler equations

1,2 u , 3,4 u c
Example: 2D steady Euler equations

1,2 v / u , 3,4

uv c u 2 v 2 c 2

u 2 c2

u 2 v2 c2 0

Supersonic flow

hyperbolic

u 2 v2 c2 0

Subsonic flow

elliptic

u 2 v2 c2 0

Sonic flow

parabolic

2D steady Euler equations

Mixed type

Appendix 1

DAlembert solution

Appendix 2 Characteristics of 1st order PDE

u
u
a ( x , y ) b ( x, y )
c ( x, y )
x
y
Consider a line in (x,y) plane:
along :

if

dx
ds a

dy b
ds

x x(s); y y(s)

du u dx u dy

ds x ds y ds
is hold along

du
c ( x, y )
ds

ODE

is characteristic, along 1st PDE become an ODE

Appendix 3

Method of characteristics

2u 2 2u
c
0
2
2
t
x

(1)

dx
c
Along characteristic
dt

u
u
c
0
t
x

(2)

dx
c
Along characteristic
dt

u
u
c
u
t
x

(3)

(1) (2), (3)

Method of characteristics

Note, along characteristics, 2nd PDE is replaced by two 1st PDE


Classic technique for inviscid supersonic flows
Only for hyperbolic PDE

Appendix 4

2u
2u
2u
A 2 2B
C 2 D
x
xy
y
2u
2u
2u
A 2 2 B
C 2 D