CHE-614
Computational Fluid Dynamics
Introduction
Dr. Muhammad Nadeem
[email protected] Room 15, . : 3774
Recommended Texts
2
Other Sources
3
Grading Policy
• Quizzes = 5 to 10%
• Assignments = 15 to 20%,
• Sessional Exams = 25%,
• Final Exams = 50 %
There will be bonus/penalty marks, obviously.
4
CFD in Chemical Engineering
David F. Fletcher (2022), The future of computational flid dynamics (CFD) simulation
in the chemical process industries, Chemical Engineering Research and Design, vol.
187 pp. 299-305
5
Governing Equation of Fluid Flow
6
General Transport Equations
There are significant commonalities between the various equations.
Using a general variable 𝜙, the conservative form of all fluid flow
equations can usefully be written in the following form:
𝜕 𝜌𝜙
+ div 𝜌𝜙𝐮 = div Γ grad 𝜙 + 𝑆𝜙
𝜕𝑡
Or, in words:
Net rate of flow
Rate of increase Rate of increase Rate of increase
of 𝜙 out of
of 𝜙 of fluid + = of 𝜙 due to + of 𝜙 due to
fluid element
element diffusion sources
(convection)
7
Integral Form
The key step of the finite volume method is to integrate the differential
equation shown in the previous slide, and then to apply Gauss’ divergence
theorem, which for a vector a states:
න div 𝐚𝑑𝑉 = න 𝐧 ⋅ 𝐚𝑑𝐴
𝐶𝑉 𝐴
This then leads to the following general conservation equation in integral
form:
𝜕
න 𝜌𝜙𝑑𝑉 + න 𝐧 ⋅ 𝜌𝜙𝐮 𝑑𝐴 = න 𝐧 ⋅ Γ grad 𝜙 𝑑𝐴 + න 𝑆𝜙 𝑑𝑉
𝜕𝑡
𝐶𝑉 𝐴 𝐴 𝐶𝑉
Net rate of Net rate of
Rate of Net rate of
decrease of 𝜙 due increase of 𝜙 due
to convection =
increase + + creation
to diffusion
of 𝜙 of 𝜙
across boundaries across boundaries
This is the actual form of the conservation equations solved by finite
volume based CFD programs to calculate the flow pattern and associated
8
Integral Form
𝜕 𝜌𝜙
න 𝑑𝑉 + න div 𝜌𝜙𝐮 𝑑𝑉 = න div Γ grad 𝜙 𝑑𝑉 + න 𝑆𝜙 𝑑𝑉
𝜕𝑡
𝐶𝑉 𝐶𝑉 𝐶𝑉 𝐶𝑉
The integrated form of the steady transport equation:
න 𝐧 ⋅ 𝜌𝜙𝐮 𝑑𝐴 = න 𝐧 ⋅ Γ grad 𝜙 𝑑𝐴 + න 𝑆𝜙 𝑑𝑉
𝐴 𝐴 𝐶𝑉
In time-dependent problems it is also necessary to integrate with
respect to time t over a small interval ∆t from, say, t until t + ∆t.
This yields the most general integrated form of the transport equation:
𝜕
න න 𝜌𝜙𝑑𝑉 𝑑𝑡 + න න 𝐧 ⋅ 𝜌𝜙𝐮 𝑑𝐴 𝑑𝑡
𝜕𝑡
∆𝑡 𝐶𝑉 ∆𝑡 𝐴
= න න 𝐧 ⋅ Γ grad 𝜙 𝑑𝐴 𝑑𝑡 + න න 𝑆𝜙 𝑑𝑉 𝑑𝑡
∆𝑡 𝐴 ∆𝑡 𝐶𝑉
9
Classification of Physical Behaviors
Hyperbolic equations Parabolic equations Elliptic equations
𝜕2𝜙 2
𝜕 2𝜙 𝜕𝜙 𝜕2𝜙 𝜕2𝜙 𝜕2𝜙
= 𝑐 =𝛼 2 + =0
𝜕𝑡 2 𝜕𝑥 2 𝜕𝑡 𝜕𝑥 𝜕𝑥 2 𝜕𝑦 2
t t t
P(x, t)
P(x, t)
P(x, t)
Domain of Domain of
dependence Domain of dependence
dependence
x=0 x=L x=0 x=L x=0 x=L
Marching problems Marching problems Equilibrium
without dissipation with dissipation problems
10
Classification of Physical Behaviors
Equilibrium problems Marching problems
T (x, t = 0) = f (x) and
T = T0 Heat flux, q = 0 T = TL T = T0 heat flux, q = 0 T = T0
TL t=0
T0 T0 T0
t=∞
x=0 x=L x=0 x=L
A disturbance in the interior of the A disturbance at a point in the interior
solution changes the solution of the solution region can only
everywhere else influence events at later times t 0
The solutions to physical problems described by elliptic/parabolic equations
are always smooth even if the boundary conditions are discontinuous
11
Classification of Physical Behaviors
Hyperbolic equations y (x, t = 0) = f (x) and
Appear in time-dependent y=0 ∂y/∂x (x, t = 0) = 0 y=0
processes with negligible amounts
x=0 x=0
of energy dissipation.
The vibration amplitude remains
constant, which demonstrates the t = 0, 2L/c
lack of damping in the system.
The shockwave discontinuities are L/c
manifestations of the hyperbolic x=0 x=L
nature of such flows
The disturbances at a point can only influence a limited region in space.
The speed of disturbance propagation through an hyperbolic problem is finite
and equal to the wave speed c.
In contrast, parabolic and elliptic models assume infinite propagation speeds.
12
Classification Method for Simple PDEs
Consider a general second-order PDE in two coordinates x and y.
𝜕2𝜙 𝜕2𝜙 𝜕2𝜙 𝜕𝜙 𝜕𝜙
𝑎 2 +𝑏 +𝑐 2 +𝑑 +𝑒 + 𝑓𝜙 + 𝑔 = 0
𝜕𝑥 𝜕𝑥𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦
Assume that the equation is linear and a, b, c, d, e, f and g are constants
The classification of a PDE is governed by the behaviour of its highest
order derivatives, so we need only consider the second-order
derivatives.
b2 – 4ac Equation Type Characteristics
>0 Hyperbolic Two real characteristics
=0 Parabolic One real characteristic
<0 Elliptic No characteristics
13
Classification Method for Simple PDEs
Second-order PDEs in 𝑁 independent variables (x1, x2, . . . , xN) can be
classified by rewriting them first in the following form with Ajk = Akj :
𝑁 𝑁
𝜕2𝜙
𝐴𝑗𝑘 +𝐻 =0
𝜕𝑥𝑗 𝜕𝑥𝑘
𝑗=1 𝑘=1
this equation can be classified on the basis of the eigenvalues λ of a
matrix with entries 𝐴𝑗𝑘 .
det 𝐴𝑗𝑘 − 𝜆𝐼 = 0
The classification rules are:
▪ if any eigenvalue 𝜆 = 0: the equation is parabolic
▪ if all eigenvalues 𝜆 ≠ 0 and they are all of the same sign: the
equation is elliptic
▪ if all eigenvalues 𝜆 ≠ 0 and all but one are of the same sign: the
equation is hyperbolic
14
Classification of Fluid Flow Equations
Steady flow Unsteady flow
Viscous flow Elliptic Parabolic
Inviscid flow M < 1, elliptic Hyperbolic
M > 1, hyperbolic
Thin shear layers Parabolic Parabolic
15
CFD Methodology
Step I: Geometric and Physical
Modeling
Step II: Domain Discretization
Step III: Equation Discretization
Step IV: Solution of the Discretized
Equations
Step V: Visualization and post-processing
16
CFD Methodology
17
Solution Process
Analytical solution gives us 𝜙(𝑥, 𝑦, 𝑧, 𝑡).
Numerical solution gives us 𝜙 only at discrete grid points.
The process of converting the governing partial differential
equation into discrete algebraic equations is call discretization.
Discretization involves
Discretization of space using mesh generation
Discretization of governing equations to yield sets of
algebraic equations
18
Mesh or Grid
19
Mesh Terminology
• Node-based finite volume scheme: 𝜙 stored at vertex
• Cell-based finite volume scheme: 𝜙 stored at cell centroid
20