You are on page 1of 11

CFD Techniques: An overview

Dr. G.S.V.L. Narasimham


Principal Research Scientist
Department of Mechanical Engineering
Indian Institute of Science
Bangalore 560 012
(Email address: mecgsvln@mecheng.iisc.ernet.in)
(Telephone: 080-22932971)

Introduction

1.1

What is CFD ?

CFD is a generic term used for tackling practical problems involving fluid
flow, heat transfer, mass transfer, combustion, etc., by means of computation;
Also referred to as Numerical Fluid Dynamics, Numerical Heat Transfer, etc.,
depending upon the application.
1.2

Why CFD ?

Less expensive compared to experimental studies


Solutions can be obtained in shorter duration
Numerous parametric studies can be performed
Problems which are difficult for experimental investigation can be handled more easily
Very detailed descriptions of flow, temperature, concentration
and other fields can be obtained compared to experimental methods
1.3

Limitations of CFD

Checks and/or validations are required before accepting the results


Problems with complex geometry and other features like turbulence, radiation in participating media, etc., may need large programming effort,
storage space and computing time
There are some problems which cannot be solved by CFD at present
(e.g., boiling, condensation, falling liquid films with wavy surface, etc.)
1.4

Steps in the solution of a problem by CFD

Mathematical formulation of the problem (involves algebraic and ordinary/partial differential equations, initial and boundary conditions)
1

Grid layout for the computational domain


Discretisation
Solution of simultaneous linear/non-linear algebraic equations
Interpretation of results

Methods of problem formulation

Primitive or Primary Equations in their


Variable Formulation
original form (particularly
momentum equations)
Derived Variable
Formulation

2.1

Equations recast in terms


of derived variables such as
vorticity, stream function,
vector potential, scalar potential

Example of a primary variable formulation for 2D, unsteady,


natural convection
u v
+
=0
x y

1 p
2u 2u
u

+
(u ) + (vu) =
+
+
g(T Tr )~g .i
t x
y
x
x2 y 2
v

1 p
2v 2v
+
(vu) + (v 2) =
+ 2 + 2 g(T Tr )~g .j
t x
y
y
x
y
cp

"

2T
2T
T

+
(uT ) + (vT ) =
+ 2 + Q v
t
x
y
x2
y
#

p excess over the hydrostatic pressure; momentum and energy equations


uncoupled in forced convection.
2

Different types of derived variable formulation

Vorticity-stream function (2D, unsteady, steady, incompressible & 2D,


steady, compressible)
u=

;
y

v=

v u
(continuity automatically satisfied); =

x
x y

Stream function (two-dimensional flow rate) is not defined in 3D.


2 2
+ 2 =
x2
y

T
2 2

+
(u) + (v) = 2 + 2 g ~g .j + g ~g .i
t x
y
x
y
x
y

Vorticity-velocity (2D and 3D, unsteady, steady, incompressible)


v u

y x y
"
#
v
2u
2
x y
y
2
u 2u
+
x2 y 2
2v 2v
Similarly
+
x2 y 2
"

=
y

=
y

=
x
=

Two velocity Poissons equations + one VTE equation in 2D; Three velocity Poissons equations and three VTEs in 3D. (Vorticity has a single
component in 2D but has three components in 3D).
~ V~ .
In 3D, the vorticity is defined as ~ =
~ ~ =
~ 2V
~ + (
~ .
~ V~ ) =
~ 2V~ since by continuity
Taking the curl,
~ V~ =0.
.
~ This is the set of three velocity Poissons
~ 2V~ =
~ .
In other words,
equations.
3

The vorticity transport and energy equations are:


~ ~
~)=
~ 2~
~ [(T Tr )~g ]
+ (~ V
t
cp

"

T
~ V~ T ) =
~ 2 T + Q v
+ .(
t
#

Note: The satisfaction of continuity constraint is merely assumed but not


~ V~ may not be exactly zero or V~ may not be exactly solenoidal.
forced .
Vorticity-vector potential formulation
~ V~ =0 (continuity), then V~ =
~ ,
~ where
~ is called the vector
If .
potential.
~
~ 1 = (
~ +
~ B)
~
The vector potential is not single valued because
=
~
~
~
~
~
, where 1 = + B.
~ V~ = (
~
~ )
~ =
~ 2 +
~ (
~ .
~ )
~ =
The vorticity is defined as ~ =

~ 2,
~ if a solenoidal constraint is placed on ,
~ i.e., .
~
~ = 0.

The equations for the three vector potential components are:


~ 2.
~
~ =
In addition, we have three VTEs and the energy equation.
Vorticity-vector potential-scalar potential (3D, unsteady, steady, incompressible)
~ =
~
~ +
~ ,
~ i.e., any vector field can be
Begin by asserting that V
~ )
~ field and an irrotational field
expressed as the sum of a solenoidal (
~ )
~ (Helmholtzs theorem).
(
~ V~ =
~ (
~
~ +
~ )
~
The vorticity is defined as: ~ =
~ 2
~ + (
~ .
~ )
~ without solenoidal constraint on
~ or
= -
~ 2
~ with solenoidal constraint on .
~
= -
~ V~ =0, i.e., .(
~
~
~ +
~ )=0,
~
The continuity equation is .
which means
2
~
~ =0
~
~ =0.
.
or
4

For closed boundary geometries can be set to zero identically (does


not enter the problem any more). This is not so convenient for throughflow problems, where introduction of scalar potential simplifies the boundary
~ 2=0 (additional set of three equations) is to be
conditions. But then
solved.

Types of meshes
Regular/structured (include staggered)
Block-structured (e.g., cartesian in one region, polar in another region)
Composite (combination of Lagrangian and Eulerian meshses)
Unstructured (similar to FE mesh)

Main methods of CFD


The finite difference method (direct substitution of FDAs in the governing equations)
The finite volume method (integration of governing equations over micro
control volumes; good conservation properties; very useful for complex
geometries) No difference between FDM and FVM for regular geometries.
The spectral method and mixed spectral and FD/FV methods
The finite element method

FEM differs radically differs from FDM/FVM; approximates the solution


by trial functions and uses method of weighted residuals (MWR) to find
unknown coefficients or variational formulation.
MWR Collocation, Subdomain, Galerkin and Least Squares.

dx
= x; t > 0; x = 1 when t = 0; x = 1 + c1 t + c2 t2 ;
dt
dx
R=
+ x = 1 + c1 (1 + t) + c2 (2t + t2 )
dt
Collocation: Choose two locations, say, t = 1/3 and t = 2/3; Set R(1/3) =
0 and R(2/3) = 0; Solve for c1 and c2 from the two equations.
Subdomain: Choose two subdomains, say 0 < t < 1/2 and 1/2 < t < 1;
R1
R1
R 1/2
R 1/2
Rdt/ 1/2
dt = 0; Solve for
Set average residuals 0 Rdt/ 0 dt = 0 and 1/2
c1 and c2 from the two equations.
Galerkin: Make the weighted averages of the residual over the desired
interval as zero:
Rb
a wf (t)dt
Rb
a wdt

= 0;

R1
0 tRdt
R1
0 tdt

= 0;

Rb 2
0 t Rdt
R1
2
0 t dt

= 0;

Solve for c1 and c2 using the two equations. Important: Weighting function
belongs to the trial function family; Recall: x = 1 + c1 t + c2 t2 .
Generally the Galerkin method has the highest accuracy in the MWR
family.
Least squares: Integral of the square of the residual over the desired interval is a minimum:
Z1 2
Z1 2
R dt = 0;
R dt = 0.
c1 0
c2 0
FEM involves solution of very large sets of simultaneous equations; this
requires special techniques like out-of-core sky-line procedure, frontal solution, etc.
FEM is well established for solid mechanics problems; not very well
established for fluid flow and convection problems.

Algorithms for primitive variable formulation

In incompressible flow constant and is not connected to pressure. The


question is how to couple pressure and velocity. In this attempt, there arise
various algorithms.
Projection Method (Chorin, Temam)
~
V
~ V~ ) = 1 p
~ +
~ 2V
~ where C(
~ V~ ) = .(
~ V~ V~ ) or (V~ .)
~ V~ .
+ C(
t

~n
V~ n+1 V
~ V~ n ) = 1 p
~ n+1 +
~ 2V
~n
+ C(
t

V~ V~ n ~ ~ n
~ 2V
~n
+ C(V ) =
t
~ n+1 V~
V
1 ~ n+1
= p
t

~ V~ n+1 = 0:
Taking divergence and enforcing .
~ V~
.
2 n+1
~
p
=
t
The artificial compressibility method (Chorin, Yanenko)
~ V~ ) = 1 p
~ +
~ 2V~ where C(
~ V~ ) = .(
~ V~ V
~ ) or (V~ .)
~ V~ .
C(

Introduce artificial density and write:


~ ~
+ .V = 0
t
Connect pressure to artificial density through artificial sound speed
p = c2 :
p
~ V~
= c2 .
t
7

Select a large value of c2 ; Note that SOLA-MAC (Hirt, Nichols and Romero)
builds this procedure into the system of unsteady equations.
MAC method (PPE method)
Explicit method employing PPE
~ p = D .(
~ V~ .
~V
~ ) + .
~
~ 2V~ .

t
"

~
~ 2V~ =
~ 2(.
~ V~ ). However, dropping this term may be
Note that .
detrimental due to growth of small oscillations. For additional forcing for
divergence free velocity field, we may write D/t = (D n+1 Dn )/t =
Dn /t.
SIMPLE and SIMPLEC
Originated from the explicit method SMAC in which the potential function
= p0 t, where p0 is the pressure correction of SIMPLE.
~n
V~ n+1 V
~ n+1 +
~ 2V
~ n+1
~ V~ n+1) = 1 p
+ C(
t

1~
V~ V~ n ~ ~
~ 2V~
+ C(V ) = p
+
t

V~ n+1 V~
1 ~ n+1
~ 2(V~ n+1 V
~ )
p ) +
(p
t

~ (V~

n+1

2
2
V~ )
(V~ n+1 V~ )
+
2
2
x
y

"

We then have for velocity correction:


~ n+1 p ) + 2 1 + 1
(p
t
x2 y 2
"

!#

(V~ n+1 V~ )

~ V~ n+1 to be zero to obtain:


Take divergence and force .
8

~ (p

n+1

1
p )
+ 2
+
2
t
x
y 2

"

!#

~ V~ )
(.

For SIMPLEC, drop the term involving 1/x2 + 1/y 2.


Other methods of SIMPLE family SIMPLER, SIMPLEST, PISO, FIMOSE
Penalty, penalisation or perturbation method (Temam)
~ V~ =  p,  > 0;  0
.
1~
1 ~ ~ ~
(.V ) = p


~
V
~ .
~ V~ ) +
~ 2V~ 1 (.
~ V~ ) = 1 (
~ V~ )V~
+ C(
t

2
The last term is added for numerical stability.

Equation solvers
Point-by-point GS/SOR/SUR
Line-by-line GS/SOR/SUR (generally along with TDMA)
SIP, MSIP
Conjugate Gradients, etc.

Convective differencing schemes

Central differencing wiggles or non-physical oscillations


Upwind differencing stable but introduces false diffusion

T
Ti Ti1
2Ti 2Ti1
= u
=u
x
x
2x
Ti+1 Ti1 Ti+1 + 2Ti Ti1
= u
2x
Ti+1 Ti1 ux Ti+1 + 2Ti Ti1
= u

2x
2
x2
2T
T
= u
(central) f alse 2
x
x

Donor cell differencing (Second-order upwind differencing) somewhat


better
Higher order differencing Numerical dispersion
Higher order + upwind bias QUICK, ULTRA-QUICK, Zhus HLPA
scheme, TVD schemes etc.

Commercial packages

FLUENT, CFX, PHOENICS, STAR CD, FLOW3D, FLUIDYN, FIDAP


(FEM-based), etc.

10

You might also like