You are on page 1of 20

Getting started: CFD notation

 
u u u 2 u pu
PDE of p-th order f u, x, t, x1 , . . . , , ,
xn t x1 x2 , . . . , tp =0

scalar unknowns u = u(x, t), x Rn , t R, n = 1, 2, 3


vector unknowns v = v(x, t), v Rm , m = 1, 2, . . .


Nabla operator = i x + j y + k z x = (x, y, z), v = (vx , vy , vz )

h iT
u = i u
x + j u
y + k u
z = u u u
x , y , z gradient
z
vx vy vz v
v = x + y + z divergence
vy

vz
i j k y z k
y
v = det = vx vz curl i j

x y z z x


vy vx
vx vy vz x y x
2u 2u 2u
u = (u) = 2 u = x2 + y 2 + z 2 Laplacian
Tensorial quantities in fluid dynamics

Velocity gradient
1111111111111111
0000000000000000
vx vy vz 0000000000000000
1111111111111111
x x x
vy

v = [vx , vy , vz ] = vx vz
y y y
vx vy vz v
z z z 1111111111111111
0000000000000000
0000000000000000
1111111111111111

Remark. The trace (sum of diagonal elements) of v equals v.

Deformation rate tensor (symmetric part of v)


  
vx 1 vy vx 1 vz vx
x 2 x + y 2 x + z
1    
vy vy vy
D(v) = (v + vT ) = vx vz
1 1
y + x +
2 2
  y  2 y z
1 vx vz 1 vy vz vz
2 z + x 2 z + y z

Spin tensor S(v) = v D(v) (skew-symmetric part of v)


Vector multiplication rules

Scalar product of two vectors



b1
T

a, b R3 , a b = a b = [a1 a2 a3 ] b2

= a1 b 1 + a2 b 2 + a3 b 3 R
b3

u u u
Example. v u = vx + vy + vz convective derivative
x y z

Dyadic product of two vectors



a1 a1 b 1 a1 b 2 a1 b 3

a, b R ,3
a b = abT =
a2 [b1 b2 b3 ] = a2 b1
a2 b 2 a2 b 3
R 33

a3 a3 b 1 a3 b 2 a3 b 3
Elementary tensor calculus
1. T = {tij }, T = {tij } R33 , R

2. T 1 + T 2 = {t1ij + t2ij }, T 1 , T 2 R33 , a R3



t t t
11 12 13 P 3
3. a T = [a1 , a2 , a3 ] t21 t22 t23 = ai [ti1 , ti2 , ti3 ]
i=1 | {z }
t31 t32 t33 i-th row

t t t a t
11 12 13 1 P 3
1j
4. T a = t21 t22 t23 a2 = t2j aj (j-th column)
j=1
t31 t32 t33 a3 t3j

t111 t112 t113 t211 t212 t213  3
P


5. T 1 T 2 = t121 t122 t123 t221 t222 t223 = t1ik t2kj
k=1
t131 t132 t133 t231 t232 t233
3 P
P 3
1 2 1 2 T
6. T : T = tr (T (T ) ) = t1ik t2ik
i=1 k=1
Divergence theorem of Gau

Let R3 and n be the outward unit normal to the boundary = \.
Z Z
Then f dx = f n ds for any differentiable function f (x)

Example. A sphere: = {x R3 : ||x|| < 1}, = {x R3 : ||x|| = 1}


p
where ||x|| = x x = x2 + y 2 + z 2 is the Euclidean norm of x

Consider f (x) = x so that f 3 in and n = x


||x|| on
Z Z  
4 3
volume integral: f dx = 3 dx = 3|| = 3 1 = 4
3
Z Z Z Z
xx
surface integral: f n ds = ds = ||x|| ds = ds = 4
||x||
Governing equations of fluid dynamics

Physical principles Mathematical equations


1. Mass is conserved continuity equation
2. Newtons second law momentum equations
3. Energy is conserved energy equation

It is important to understand the meaning and significance of each equation


in order to develop a good numerical method and properly interpret the results

Description of fluid motion z


v

Eulerian monitor the flow characteristics (x1 ; y1 ; z1 )

in a fixed control volume k (x0 ; y0 ; z0 )

i j y
Lagrangian track individual fluid particles as
they move through the flow field x
Description of fluid motion
Trajectory of a fluid particle
z
x = x(x0 , t) dx
v = vx (x, y, z, t), x|t0 = x0
(x1 ; y1 ; z1 )
dt
x = x(x0 , y0 , z0 , t) dy
(x0 ; y0 ; z0 )
= vy (x, y, z, t), y|t0 = y0
k
y y = y(x0 , y0 , z0 , t) dt
i j
dz
z = z(x0 , y0 , z0 , t) = vz (x, y, z, t), z|t0 = z0
dt
x

Definition. A streamline is a curve which is tangent to the velocity vector


v = (vx , vy , vz ) at every point. It is given by the relation
y

dx dy dz v dy
=
vy
= = y(x) dx vx
vx vy vz
x

Streamlines can be visualized by injecting tracer particles into the flow field.
Flow models and reference frames

Eulerian Lagrangian

S S

integral
V V

fixed CV of a finite size moving CV of a finite size

differential
dS dS
dV dV

fixed infinitesimal CV moving infinitesimal CV

Good news: all flow models lead to the same equations


Eulerian vs. Lagrangian viewpoint

d
Definition. Substantial time derivative dt is the rate of change for a moving

fluid particle. Local time derivative t is the rate of change at a fixed point.

Let u = u(x, t), where x = x(x0 , t). The chain rule yields
du u u dx u dy u dz u
= + + + = + v u
dt t x dt y dt z dt t
substantial derivative = local derivative + convective derivative

Reynolds transport theorem


Z Z Z
d u(x, t)
u(x, t) dV = dV + u(x, t)v n dS
dt Vt V Vt t SSt

rate of change in rate of change in convective transfer


= +
a moving volume a fixed volume through the surface
Derivation of the governing equations

Modeling philosophy Generic conservation law


Z Z Z
1. Choose a physical principle
u dV + f n dS = q dV
t V S V
conservation of mass
S n
f = vu du
conservation of momentum V
dS f
flux function
conservation of energy
Divergence theorem yields
2. Apply it to a suitable flow model Z Z Z
u
Eulerian/Lagrangian approach dV + f dV = q dV
V t V V
for a finite/infinitesimal CV
Partial differential equation
3. Extract integral relations or PDEs u
+f =q in V
which embody the physical principle t
Derivation of the continuity equation

Physical principle: conservation of mass


Z Z Z
dm d
= dV = dV + v n dS = 0
dt dt Vt V Vt t SSt

accumulation of mass inside CV = net influx through the surface

Divergence theorem yields Continuity equation


Z  

+ (v) dV = 0 + (v) = 0
V t t

Lagrangian representation
d
(v) = v + v + v = 0
dt
d
Incompressible flows: dt =v =0 (constant density)
Conservation of momentum

Physical principle: f = ma (Newtons second law)

total force f = g dV + h dS, where h=n


dS
dV n body forces g gravitational, electromagnetic,. . .
h surface forces h pressure + viscous stress
g
Stress tensor = pI + momentum flux

For a newtonian fluid viscous stress is proportional to velocity gradients:


1 2
= ( v)I + 2D(v), where D(v) = (v + vT ),
2 3

Normal stress: stretching Shear stress: deformation



vy vx
xx = v + 2 v
x
x y
xy = yx = x
+ y
y

yx
v
= v vz
` x
yy = v + 2 yy xz = zx +
xx
z x
v
zz = v + 2 v
z
z
yz = zy = v
y
z
+ zy
x x
Derivation of the momentum equations

Newtons law for a moving volume


Z Z Z
d (v)
v dV = dV + (v v) n dS
dt Vt V Vt t SSt
Z Z
= g dV + n dS
V Vt SSt

Transformation of surface integrals


Z   Z
(v)
+ (v v) dV = [ + g] dV, = pI +
V t V

(v)
Momentum equations + (v v) = p + + g
t
   
(v) v dv
+ (v v) = + v v + v + (v) =
t t t dt
| {z } | {z }
substantial derivative continuity equation
Conservation of energy
Physical principle: e = s + w (first law of thermodynamics)

dS e accumulation of internal energy


dV n
s heat transmitted to the fluid particle
h
g w rate of work done by external forces

Heating: s = q dV fq dS Fouriers law of heat conduction


q internal heat sources fq = T
fq diffusive heat transfer
the heat flux is proportional to the
T absolute temperature
local temperature gradient
thermal conductivity

Work done per unit time = total force velocity

w = f v = g v dV + v ( n) dS, = pI +
Derivation of the energy equation
|v|2
Total energy per unit mass: E =e+ 2
e specific internal energy due to random molecular motion
2
|v|
2 specific kinetic energy due to translational motion

Integral conservation law for a moving volume


Z Z Z
d (E)
E dV = dV + E v n dS accumulation
dt Vt V Vt t SSt
Z Z
= q dV + T n dS heating
V Vt SSt
Z Z
+ g v dV + v ( n) dS work done
V Vt SSt

Transformation of surface integrals


Z   Z
(E)
+ (Ev) dV = [ (T ) + q + ( v) + g v] dV,
V t V

where ( v) = (pv) + ( v) = (pv) + v ( ) + v :


Different forms of the energy equation

Total energy equation

(E)
+ (Ev) = (T ) + q (pv) + v ( ) + v : + g v
t
   
(E) E dE
+ (Ev) = + v E + E + (v) =
t t t dt
| {z } | {z }
substantial derivative continuity equation
dv
Momentum equations = p + + g (Lagrangian form)
dt
dE de dv (e)
= +v = + (ev) + v [p + + g]
dt dt dt t
Internal energy equation

(e)
+ (ev) = (T ) + q p v + v :
t
Summary of the governing equations

1. Continuity equation / conservation of mass



+ (v) = 0
t

2. Momentum equations / Newtons second law


(v)
+ (v v) = p + + g
t

3. Energy equation / first law of thermodynamics


(E)
+ (Ev) = (T ) + q (pv) + v ( ) + v : + g v
t
|v|2 (e)
E =e+ , + (ev) = (T ) + q p v + v :
2 t
This PDE system is referred to as the compressible Navier-Stokes equations
Conservation form of the governing equations
Generic conservation law for a scalar quantity
u
+ f = q, where f = f (u, x, t) is the flux function
t

Conservative variables, fluxes and sources



v 0

U = v , F =
v v + pI ,
Q=
g

E (E + p)v T v (q + g v)

Navier-Stokes equations in divergence form

U
+F=Q U R5 , F R35 , Q R5
t

representing all equations in the same generic form simplifies the programming
it suffices to develop discretization techniques for the generic conservation law
Constitutive relations

Variables: , v, e, p, , T Equations: continuity, momentum, energy

The number of unknowns exceeds the number of equations.

1. Newtonian stress tensor


1 2
= ( v)I + 2D(v), D(v) = (v + vT ),
2 3

2. Thermodynamic relations, e.g.


p = RT ideal gas law R specific gas constant
e = cv T caloric equation of state cv specific heat at constant volume

Now the system is closed: it contains five PDEs for five independent variables
, v, e and algebraic formulae for the computation of p, and T . It remains to
specify appropriate initial and boundary conditions.
Initial and boundary conditions

Initial conditions |t=0 = 0 (x), v|t=0 = v0 (x), e|t=0 = e0 (x) in

Boundary conditions Let = in w out


w

Inlet in = {x : v n < 0}

= in , v = vin , e = ein in out

prescribed density, energy and velocity


w

Solid wall w = {x : v n = 0} Outlet out = {x : v n > 0}


v=0 no-slip condition v n = vn or p + n n = 0
T = Tw given temperature or v s = vs or s n=0
T
 fq
= prescribed heat flux prescribed velocity vanishing stress
n

The problem is well-posed if the solution exists, is unique and depends continuously
on IC and BC. Insufficient or incorrect IC/BC may lead to wrong results (if any).

You might also like