You are on page 1of 26

FMIA

Fluid Mechanics and Its Applications 113 Fluid Mechanics and Its Applications

Moukalled · Mangani · Darwish


Series Editor: A. Thess
F. Moukalled · L. Mangani · M. Darwish
The Finite Volume Method in Computational Fluid Dynamics
An Advanced Introduction with OpenFOAM® and Matlab®

This textbook explores both the theoretical foundation of the Finite Volume Method
(FVM) and its applications in Computational Fluid Dynamics (CFD). Readers will
F. Moukalled
discover a thorough explanation of the FVM numerics and algorithms used in the
simulation of incompressible and compressible fluid flows, along with a detailed L. Mangani
examination of the components needed for the development of a collocated
unstructured pressure-based CFD solver. Two particular CFD codes are explored. The
first is uFVM, a three-dimensional unstructured pressure-based finite volume academic
M. Darwish
CFD code, implemented within Matlab®. The second is OpenFOAM®, an open source

The Finite
framework used in the development of a range of CFD programs for the simulation of
industrial scale flow problems.
With over 220 figures, numerous examples and more than one hundred exercises on
FVM numerics, programming, and applications, this textbook is suitable for use in an
introductory course on the FVM, in an advanced course on CFD algorithms, and as a

Volume Method
reference for CFD programmers and researchers.

Computational Fluid Dynamics


The Finite Volume Method in
in Computational
Fluid Dynamics
An Advanced Introduction with
OpenFOAM® and Matlab®
Engineering
ISBN 978-3-319-16873-9

9 783319 168739

Mathematical Description
of Physical Phenomena
Chapter 03
Conservation Equations

Physical Mathematical
Principles Equations

Mass conservation Continuity Equation


Momentum Conservation Momentum Equation
Energy Conservation Energy Equation

Specie Conservation Specie Equation

2
Lagrangian vs Eulerian
z
z

MV(t+∆t)
MV(t+∆t)
CV(t)

MV(t)
MV(t)
y
y

A fluid flow field can be thought of x


x Another view of fluid motion is the
as being comprised of a large number of Eulerian description. In the Eulerian
finite sized fluid particles which have description of fluid motion, we consider how
mass, momentum, internal energy, and flow properties change at a fluid element that
other properties. Mathematical laws can is fixed in space and time (x,y,z,t), rather than
then be written for each fluid particle. following individual fluid particles.
This is the Lagrangian description of fluid
motion.

Governing equations can be derived using either framework and converted to the other form.

3
Reynolds Transport Theorem
φ ( x, y, z,t ) outward directed
Material or dS
surface normal

substantial derivative Local time


volume V with
enclosing surface ∂V

derivative

Dφ ∂φ ∂φ ∂x ∂φ ∂y ∂φ ∂z
= + + +
Dt ∂t ∂x ∂t ∂y ∂t ∂z ∂t
∂φ Convective
= + v ⋅ ∇φ
Rate of change for ∂t derivative
a moving particle
Rate of change at a
fixed point
f

d ∂
∫∫ φ ( r,t ) dΩ + ∂Ω!∫ φ ( r,t )( v − w ) ⋅ dS
∫∫Ω φ ( r,t ) dΩ = ∂t Ω=Ω
n

dt t t
dS

dΦ ∂Φ ! ! in
= + Φ out − Φ
dt ∂t
4
Transport Theorem
For any global system property B and property per unit mass b=B/m

⎛ dB ⎞ d⎛ ⎞
⎜⎝ dt ⎟⎠ = dt ⎜⎜ ∫ bρ dV ⎟⎟ + ∫ bρ v r ⋅ n dS
MV ⎝ V (t ) ⎠ S (t )

d⎛ ⎞ ∂ ⎛ dB ⎞ ∂
dt ⎜⎝ V∫
bρ dV ⎟⎠ ∫ ∂t ( bρ ) dV
= ⎜⎝ dt ⎟⎠ = ∫V ∂t ( bρ ) dV + ∫S bρ v ⋅ n dS
V MV

⎛ dB ⎞ ⎡∂ ⎤
⎜⎝ dt ⎟⎠ = ∫V ⎢⎣ ∂t ( ρ b ) + ∇ ⋅ ( ρ vb ) ⎥ dV
MV ⎦

⎛ dB ⎞ ⎡D ⎤
⎜⎝ dt ⎟⎠ = ∫V ⎢⎣ Dt ( ρ b ) + ρ b∇ ⋅ v ⎥ dV
MV ⎦

At t=0 the control volume occupy the same space as the control mass.
Physical laws are derived for control mass
5
Conservation of mass
System property B=m ⎛ dm ⎞
m ⎜⎝ dt ⎟⎠ = 0
Property per unit mass b= =1 MV
dS outward directed
surface normal
m volume V with
enclosing surface ∂V

# Dρ &
∫ %$ Dt + ρ∇ ⋅ v(' dV = 0
V

Dρ ∂ρ
+ ρ∇ ⋅ v = 0 + ∇ ⋅ ⎡⎣ ρ v ⎤⎦ = 0 ∇⋅v = 0
Dt ∂t

6
Second Law of Motion
! d ( mv ) $ ! $ f

# dt & = #" ∫ f dV &%


# & n
" % MV V MV dS

System property B = mv
mv
Property per unit mass b= =v
m

⎡∂ ⎤
∫V ⎢⎣ ∂t ⎣ ⎦
⎡ ρ v ⎤ + ∇ ⋅ { ρ vv } − f ⎥ dV = 0


⎡⎣ ρ v ⎤⎦ + ∇ ⋅ { ρ vv } = f
∂t
f = fs + fb Volume forces
Surface forces
7
⎛ !"#
τ xx ⎞ fs = Σ ⋅ dS = Σ ⋅ ndS

⎜ Σ +p τ xy τ xz ⎟
⎛ p ⎜ ⎟
0 ⎞ ⎜
xx n
0 τ yy ⎟ dS
⎜ ⎟ !"#
Σ = −⎜ 0 p 0 ⎟ +⎜ ⎟ = − pI + τ
⎜ τ yx Σ yy + p τ yz ⎟
⎜ 0 0 p ⎟⎠ ⎜
⎝ τ zz ⎟
⎜ !"# ⎟
⎜⎝ τ zx τ zy Σ zz + p ⎟⎠

⎛ Σ Σ xz ⎞
1
(
p = − Σ xx + Σ yy + Σ zz
3
) ⎜
xx
Σ xy

Σ = ⎜ Σ yx Σ yy Σ yz ⎟
⎜ ⎟
⎜⎝ Σ zx Σ zy Σ zz ⎟⎠
∫f
V
s
dV = ∫ Σ ⋅ n dS = ∫ ∇ ⋅ Σ dV ⇒ fs = ⎡⎣∇ ⋅ Σ ⎤⎦ = −∇p + ⎡⎣∇ ⋅ τ ⎤⎦
S V


⎡ ρ v ⎤ + ∇ ⋅ { ρ vv } = −∇p + ⎡⎣∇ ⋅ τ ⎤⎦ + fb
∂t ⎣ ⎦
{
τ = µ ∇v + ( ∇v )
T
} + λ (∇ ⋅ v ) I
8
⎡ ∂u ⎛ ∂v ∂u ⎞ ⎛ ∂u ∂w ⎞ ⎤
⎢ 2 µ + λ∇ ⋅ v µ ⎜ + ⎟ µ⎜ + ⎥
⎢ ∂x ⎝ ∂x ∂ y ⎠ ⎝ ∂z ∂x ⎟⎠ ⎥
⎢ ⎥
⎛ ∂v ∂u ⎞ ∂v ⎛ ∂w ∂v ⎞
τ = ⎢ µ ⎜ + ⎟ 2µ + λ∇ ⋅ v µ ⎜ + ⎥
⎢ ⎝ ∂x ∂ y ⎠ ∂y ⎝ ∂ y ∂z ⎟⎠ ⎥
⎢ ⎥
⎢ ⎛ ∂u ∂w ⎞ ⎛ ∂w ∂v ⎞ ∂w ⎥
⎢ µ +
⎜⎝ ∂z ∂x ⎟⎠ µ +
⎜⎝ ∂ y ∂z ⎟⎠ 2 µ + λ∇ ⋅ v ⎥
∂z
⎣ ⎦

(
⎢⎣
T
)
⎡⎣∇ ⋅ τ ⎤⎦ = ∇ ⋅ ⎡ µ ∇v + ( ∇v ) ⎤ + ∇ ( λ∇ ⋅ v )
⎥⎦
⎡ ∂ ⎡ ∂u ⎤ ∂ ⎡ ⎛ ∂v ∂u ⎞ ⎤ ∂ ⎡ ⎛ ∂u ∂w ⎞ ⎤ ⎤
⎢ ⎢ 2 µ + λ∇ ⋅ v ⎥ + ∂ y ⎢ µ ⎜⎝ ∂x + ∂ y ⎟⎠ ⎥ + ∂z ⎢ µ ⎜⎝ ∂z + ∂x ⎟⎠ ⎥ ⎥
⎢ ∂x ⎣ ∂x ⎦ ⎣ ⎦ ⎣ ⎦ ⎥
⎢ ⎥
⎢ ∂ ⎡ ⎛ ∂v ∂u ⎞ ⎤ ∂ ⎡ ∂v ⎤ ∂ ⎡ ⎛ ∂w ∂v ⎞ ⎤ ⎥
=⎢ ⎢ µ + ⎥ + 2 µ + λ∇ ⋅ v ⎥ + ∂z ⎢ µ ⎜⎝ ∂ y + ∂z ⎟⎠ ⎥
∂x ⎣ ⎜⎝ ∂x ∂ y ⎟⎠ ⎦ ∂ y ⎢⎣ ∂ y ⎦ ⎣ ⎦

⎢ ⎥
⎢ ∂ ⎡ ⎛ ∂u ∂w ⎞ ⎤ ∂ ⎡ ⎛ ∂w ∂v ⎞ ⎤ ∂ ⎡ ∂w ⎤ ⎥
⎢ ⎢µ ⎜ + ⎟ ⎥ + ⎢ µ ⎜ + ⎟ ⎥ + ⎢ 2 µ + λ ∇ ⋅ v ⎥ ⎥
⎢⎣ ∂x ⎣ ⎝ ∂z ∂x ⎠ ⎦ ∂ y ⎣ ⎝ ∂ y ∂z ⎠ ⎦ ∂z ⎣ ∂z ⎦ ⎥⎦

9
Momentum Equation


∂t { ⎢⎣
T

⎦⎥ }
⎡⎣ ρ v ⎤⎦ + ∇ ⋅ { ρ vv } = −∇p + ∇ ⋅ µ ⎡∇v + ( ∇v ) ⎤ + ∇ ( λ∇ ⋅ v ) + fb


∂t {
!#####"#####
}
⎡⎣ ρ v ⎤⎦ + ∇ ⋅ { ρ vv } = ∇ ⋅ { µ∇v } − ∇p + ∇ ⋅ µ ( ∇v ) + ∇ ( λ∇ ⋅ v ) + fb
T

$
Qv


⎡⎣ ρ v ⎤⎦ + ∇ ⋅ { ρ vv } = ∇ ⋅ { µ∇v } − ∇p + Q v
∂t


∂t { ⎣
T

⎦ }
⎡⎣ ρ v ⎤⎦ + ∇ ⋅ { ρ vv } = −∇p + ∇ ⋅ µ ⎡⎢∇v + ( ∇v ) ⎤⎥ + fb

10
Momentum Equation
∂ ⎡ ∂u ⎤ ∂ ⎡⎛ ∂v ∂u ⎞ ⎤ ∂ ⎡⎛ ∂u ∂w ⎞ ⎤
µ 2 + µ ⎢ + ⎥ + µ ⎢ + ⎥
∂x ⎢⎣ ∂x ⎥⎦ ∂ y ⎣⎜⎝ ∂x ∂ y ⎟⎠ ⎦ ∂z ⎣⎜⎝ ∂z ∂x ⎟⎠ ⎦
⎡ ∂2 u ∂2 u ∂2 u ∂2 v ∂2 u ∂2 w ⎤
= µ⎢ 2 + 2 + 2 + + 2+ ⎥
⎣ ∂x ∂x ∂ y ∂ yx ∂z ∂zx ⎦ viscosity is constant
⎡⎛ ∂2 u ∂2 u ∂2 u ⎞ ∂2 u ∂2 v ∂2 w ⎤
= µ ⎢⎜ 2 + 2 + 2 ⎟ + 2 + + ++ ⎥
⎣ ⎝ ∂x ∂ y ∂z ⎠ ∂x ∂ yx ∂zx ⎦
⎡⎛ ∂ 2 u ∂ 2 u ∂ 2 u ⎞ ∂ ⎛ ∂u ∂v ∂w ⎞ ⎤
= µ ⎢⎜ 2 + 2 + 2 ⎟ + ⎜ + + ⎟⎠ ⎥
⎣ ⎝ ∂x ∂ y ∂z ⎠ ∂x ⎝ ∂x ∂ y ∂z ⎦


⎡⎣ ρ v ⎤⎦ + ∇ ⋅ { ρ vv } = −∇p + µ∇ 2 v + fb
∂t


⎡ ρ v ⎤ + ∇ ⋅ { ρ vv } = −∇p + fb invscid
∂t ⎣ ⎦

11
Conservation of Energy
⎛ dE ⎞ ! − W! Rate of change of the energy of the system is
⎜⎝ dt ⎟⎠ = Q equal to the rate of transfer of energy
MV

System property B=E


dE 1
Property per unit mass B= E ⇒b= = û + v ⋅ v = e
dm 2

dE ∂ ( ρe )
= ∫∫ dΩ + !∫ ρe ( v − w ) ⋅ dS = Q" − W"
dt Ω=Ωt ∂t ∂Ω

dE & ∂ ( ρe ) )
= ∫∫ ' + ∇ ⋅ ( ρe v − w ) * dΩ = Q! − W!
[ ]
dt Ω=Ωt ( ∂t +
where
v2 p
e = C vT + + − g ⋅ r
2 ρ
12
Conservation of Energy
dE & ∂ ( ρe ) )
= ∫∫ ' + ∇ ⋅ ( ρe v − w ) * dΩ
[ ]
dt Ω=Ωt ( ∂t +
= !∫ k∇T ⋅ dS + !∫ v ⋅ p dS + ∫∫ ( Φ + ρv ⋅ g ) dΩ
"$#$%
∂Ω
"$#$
∂Ω
% "$$$#$$$
Ω=Ωt
%
Flux of heat through mechanical contribution of heat Internal   heat   generation   and  body   forces  
the surface arising from compression 
and viscous dissipation

= ∫∫ {∇ ⋅ ( k∇T ) + ∇ ⋅ ( vp ) + Φ + ρv ⋅ g} dΩ
Ω=Ωt

∂ ( ρe )
+ ∇ ⋅ ( ρe [ v − w ]) = ∇ ⋅ ( k∇T ) + ∇ ⋅ (σ ⋅ v ) + Φ + ρv ⋅ g
∂t

13
Generalized Form

Change of of 𝝓 over Surface flux of 𝝓 over Source/sink of 𝝓 over


time ∆t within the = time ∆t across the + time ∆t within
material volume (MV) control volume control volume
dS

Term I Term II Term III


d⎛ ⎞ ⎡∂ ⎤
Term I = ⎜ ∫ ( ρφ ) dV ⎟ = ∫ ⎢ ( ρφ ) + ∇ ⋅ ( ρ vφ ) ⎥ dV
V
∂V

dt ⎝ MV ⎠ V ⎣ ∂t ⎦
(
Term II = − ∫ Jφdiffusion ⋅ n dS = − ∫ ∇ ⋅ Jφdiffusion dV = ∫ ∇ ⋅ Γφ ∇φ dV )
S V V

Term III = ∫ Qφ dV
V


∂t
( !# " #$ ! # "
(
ρφ ) + ∇ ⋅ ( ρ vφ ) = ∇ ⋅ Γ φ ∇φ + Q
#$ !
φ
)
!"
# # $ convection
source
unsteady diffusion term term
term
term

14
Characterizing Flows
Reynolds Number
•The Reynolds number ReReis= ρUL
defined as: Turbulent flow region
µ Transition region
•Here L is a characteristic length, Laminar flow region Re > 5x105

and V is the velocity. Viscous sublayer

• It is a measure of the ratio Flow Re < 5x105

between inertial forces and


viscous forces.

•If Re >> 1 the flow is dominated


by inertia. Re = 10 Re = 100 Re = 1000 Re = 4000

•If Re << 1 the flow is dominated


by viscous effects (Creeping
flow)
‣ Microfluids
‣ Flows in narrow passages

16
Grashof Number

•When Gr >> 1, the viscous gβΔTL3 Buoyancy  force


force is negligible compared to
Gr = =
the buoyancy and inertial ν 2
Vis cou s  force
forces. When buoyant forces
overcome the viscous forces,
the flow starts a transition to
the turbulent regime.
Gr = 1.43× 103 Gr = 1.43× 104 Gr = 1.43× 105 Gr = 1.43× 106

•For a flat plate in vertical


orientation, this transition
occurs around Gr = 10e+9.
•The Grashof number is
analogous to the Reynolds
number in forced convection.

17
Prandtl Number
µc p viscous diffusion rate υ
•In heat transfer problems, Pr =
k
== =
thermal diffusion rate α
the Prandtl number
controls the relative
thickness of the Velocity
Temperature
y
momentum and thermal Thermal
Hydrodynamic Free Stream Free Stream
boundary layers. boundary layer Velocity Temperature
boundary layer

•When Pr is small, it means u(x,y)


T(x,y)
Wall temperature
that the heat diffuses very
quickly compared to the
Pr <1
velocity (momentum). This
means that for liquid metals Temperature Velocity
the thickness of the thermal Hydrodynamic
Free Stream boundary layer
boundary layer is much bigger y Velocity
Free Stream Wall
than the velocity boundary Temperature temperature
layer.
u(x,y) Thermal
T(x,y) boundary layer

18 Pr >1
Prandtl Number

• Typical values for Pr are: Pr = 0.1 Pr = 1 Pr = 10 Pr = 100


‣ around 0.7-0.8 for air and many
other gases,
‣ around 0.16-0.7 for mixtures of
noble gases or noble gases with
hydrogen
‣ around 7 for water (At 20
degrees Celsius)
( Re = 100)
‣ between 100 and 40,000 for
engine oil, Isotherms at increasing values of Prandtl number for
driven flow in a square cavity
‣ between 4 and 5 for R-12
refrigerant
‣ around 0.015 for mercury.

19
Peclet Number
The Péclet number is defined as the ratio of the advective transport rate of a physical
quantity to its diffusive transport rate. For the case of heat transfer, the Péclet number
is given by

ρULc p UL
Pe = = = Re * Pr
k α

Pe = 1 Pe = 10 Pe = 100 Pe = 1000

Isotherms at increasing values of Péclet number for fluid flow over a flat plate maintained at
a hot uniform temperature.

20
Schmidt Number
Sc = 0.07 Sc = 0.7 Sc = 7
ν
Sc =
D

The Schmidt number in


mass transfer is the
counterpart of the Prandtl
number in heat transfer. It
represents the ratio of the
momentum diffusivity to
mass diffusivity

Iso-concentrations at increasing values of Schmidt number (other parameters held fixed) for natural convection
mass transfer in the annulus between concentric horizontal cylinders of rhombic cross sections with larger
solute concentration on the inner wall

21
Nusselt Number

hL
Nu =
k
is the dimensionless form of the convection heat transfer coefficient and provides
a measure of the convection heat transfer at a solid surface.

22
Mach Number
•Ma < 0.3 incompressible Ma =
v Flow  speed
=
•Otherwise compressible a Sound seed

•Mach number, Ma ⎛ ∂p⎞


a= γ ⎜ ⎟
‣ Ma < 1 , subsonic. ⎝ ∂ρ ⎠ T
‣ Ma ≈ 1, transonic
For an ideal gas, it reduces to
‣ M > 1 , supersonic (shock
waves)
a = γ RT
‣ Ma > 5, hypersonic (high
temperatures)

•These distinction affect the


mathematical nature of the
problem and therefore the
solution method
(a) subsonic, (b) transonic, and (c) supersonic speeds.

23
Eckert Number
v⋅v
Ec =
c p ΔT

The Eckert number is a dimensionless number relating the kinetic energy of


the flow to its enthalpy and is computed as

A large value of indicates high viscous dissipation occurring at high


speed of the flow (high kinetic energy).

For small Eckert number several the terms in the energy equation become
negligible (e.g., viscous dissipation, body forces, etc.). This reduces the energy
equation to its incompressible form (i.e., a balance between conduction and
( Ec ≪ 1)
convection).

24
Froude Number
U Velocity
Fr = = U
c Wave  propagation velocity Fr =
gL
c = gL   L : length of  ship at  the waterline level
A
c= g   A : cross − sectional area, B :free − surface width
B

•Fr < 1 subcritical flow Hydraulic Jump


Subcritical flow
•Fr > 1 supercritical flow Critical flow
Fr=1
Fr<1

•Fr ≈ 1 critical flow


Supercritical flow
Fr>1

rapid flow

25
Weber Number

ρU 2 L
We =
σ

The Weber number represents the ratio of inertia to surface


tension forces, is helpful in analyzing multiphase flows involving
interfaces between two different fluids, with curved surfaces such as
droplets and bubbles

26

You might also like