Compressible Flow in a Nozzle
Flow over an airfoil
Forced Convect ion over a Flat
Plat e
http://instruct1.cit.cornell.edu/courses/fluent/ (1 of 4)11/7/2005 6:08:21 PM
FLUENT TUTORIALS - Cornell University
About the FLUENT Tutorials
This FLUENT short course consist s of a set of t ut orials on using FLUENT t o solve
problems in fluid mechanics. The t ut orials lead t he user t hrough t he st eps
involved in solving a select ed set of problems using GAMBI T ( t he preprocessor)
and FLUENT. We not only provide t he solut ion st eps but also t he rat ionale
behind t hem. I t is wort hwhile for t he user t o underst and t he underlying
concept s as she goes t hrough t he t ut orials in order t o be able t o correct ly apply
FLUENT t o ot her problems. The user would be ill- served by clicking t hrough t he
t ut orials in zombie- mode. Each t ut orial is followed by problems which are
geared t owards st rengt hening and reinforcing t he knowledge and
underst anding gained in t he t ut orials. Working t hrough t he problem set s is an
int rinsic part of t he learning process and shouldn' t be skipped.
These t ut orials have been developed by t he Swanson Engineering Simulat ion
Program in t he Sibley School of Mechanical and Aerospace Engineering at
Cornell Universit y. The Swanson Engineering Simulat ion Program has been
est ablished wit h t he goal of int egrat ing comput er- based simulat ions int o t he
mechanical engineering curriculum. The development of t hese t ut orials is being
support ed by a Facult y I nnovat ion in Teaching award from Cornell Universit y.
What i s FLUENT
FLUENT is a comput at ional fluid dynamics ( CFD) soft ware package t o simulat e
fluid flow problems. I t uses t he finit e- volume met hod t o solve t he governing
equat ions for a fluid. I t provides t he capabilit y t o use different physical models
such as incompressible or compressible, inviscid or viscous, laminar or
t urbulent , et c. Geomet ry and grid generat ion is done using GAMBI T which is t he
preprocessor bundled wit h FLUENT.
How t o use t hese t ut or i al s
These t ut orials are designed t o be used online and run side- by- side wit h t he
FLUENT soft ware. Aft er you launch t he web t ut orials and FLUENT, you will have
t o drag t he browser window t o t he widt h of t he largest image ( about 350
pixels) . To make best use of screen real est at e, move t he windows around and
resize t hem so t hat you approximat e t his screen arrangement .
http://instruct1.cit.cornell.edu/courses/fluent/ (2 of 4)11/7/2005 6:08:21 PM
FLUENT TUTORIALS - Cornell University
Sy st em and sof t w ar e r equi r ement s
q Syst em: Any syst em t hat can run GAMBI T, FLUENT, and a web browser.
q Screen: Resolut ion should be at least 1280 x 1024 pixels for opt imal
viewing. A 17" monit or or larger is recommended.
q GAMBI T version 2. 0. These t ut orials were creat ed using GAMBI T 2. 0.
q FLUENT version 6. 0. These t ut orials were creat ed using FLUENT 6. 0.
q Web Browser: These t ut orials work best in 5. 0 or higher versions of
I nt ernet Explorer and Net scape because st yle sheet support is needed.
These t ut orials can be used wit h Net scape 4. x but may not render
correct ly.
Choose a t ut orial by select ing from t he list at t he t op of t his page
Conv ent i ons used
Each t ut orial begins wit h a problem specificat ion. A solut ion can be obt ained by
following t hese nine st eps:
1. Creat e Geomet ry in GAMBI T
2. Mesh Geomet ry in GAMBI T
3. Set Boundary Types in GAMBI T
4. Set Up Problem in FLUENT
5. Solve!
6. Analyze Result s
7. Refine Mesh
These st eps appear at t he t op of each page of t he t ut orial wit h t he current st ep
highlight ed in red.
GAMBI T and FLUENT uses cascading menus which are represent ed as follows:
Ma in Men u > File > Exp or t > Mes h . . .
This means t hat in t he Main Menu, click on File. Then, in t he File menu t hat
comes up, click on Export and so on.
http://instruct1.cit.cornell.edu/courses/fluent/ (3 of 4)11/7/2005 6:08:21 PM
FLUENT TUTORIALS - Cornell University
Names of windows are in it alics.
I t ems and opt ions appearing wit hin menus and dialog boxes are pur pl e, i t al i c,
and bol d.
Text and numbers t hat need t o be ent ered are indicat ed in Courier font.
Addit ional explanat ions and relat ed discussions are enclosed in a box.
Copyright 2002.
Cornell University
Sibley School of Mechanical and Aerospace Engineering
Feedback .

http://instruct1.cit.cornell.edu/courses/fluent/ (4 of 4)11/7/2005 6:08:21 PM
Fluent Tutorial - Introduction to CFD Basics
I nt r oduct i on t o CFD Basi cs
Aut hor: Raj esh Bhaskaran
E- mail: rb88@cornell. edu
Introduction to CFD Basics
You can download t he following t ut orials in PDF format . You will need Adobe
Acrobat t o read t hese files.
I nt roduct ion t o CFD Basics
Problem set on CFD Basics
Back t o: FLUENT Home Page
Copyright 2002.
Cornell University
Sibley School of Mechanical and Aerospace Engineering.
Fluent Short Course-Tutorial List | Feedback
http://instruct1.cit.cornell.edu/courses/fluent/cfd/index.htm11/7/2005 6:11:18 PM
Introduction to CFD Basics
Rajesh Bhaskaran
Lance Collins
Jan. 2003
This is a quick introduction to the basic concepts underlying CFD. The concepts are
illustrated by applying them to a simple 1D example. We discuss the following topics brieﬂy:
1. The Need for CFD
2. Applications of CFD
3. The Strategy of CFD
4. Discretization Using the Finite-Diﬀerence Method
5. Discretization Using The Finite-Volume Method
6. Assembly of Discrete System and Application of Boundary Conditions
7. Solution of Discrete System
8. Grid Convergence
9. Dealing with Nonlinearity
10. Direct and Iterative Solvers
11. Iterative Convergence
12. Numerical Stability
1
Applications of CFD
CFD is useful in a wide variety of applications and here we note a few to give you an idea of
its use in industry. The simulations shown below have been performed using the FLUENT
software.
CFD can be used to simulate the ﬂow over a vehicle. For instance, it can be used to study
the interaction of propellers or rotors with the aircraft fuselage The following ﬁgure shows
the prediction of the pressure ﬁeld induced by the interaction of the rotor with a helicopter
fuselage in forward ﬂight. Rotors and propellers can be represented with models of varying
complexity.
The temperature distribution obtained from a CFD analysis of a mixing manifold is shown
below. This mixing manifold is part of the passenger cabin ventilation system on the Boeing
767. The CFD analysis showed the eﬀectiveness of a simpler manifold design without the
need for ﬁeld testing.
Bio-medical engineering is a rapidly growing ﬁeld and uses CFD to study the circulatory and
respiratory systems. The following ﬁgure shows pressure contours and a cutaway view that
reveals velocity vectors in a blood pump that assumes the role of heart in open-heart surgery.
CFD is attractive to industry since it is more cost-eﬀective than physical testing. However,
one must note that complex ﬂow simulations are challenging and error-prone and it takes a
lot of engineering expertise to obtain validated solutions.
2
The Strategy of CFD
Broadly, the strategy of CFD is to replace the continuous problem domain with a discrete
domain using a grid. In the continuous domain, each ﬂow variable is deﬁned at every point
in the domain. For instance, the pressure p in the continuous 1D domain shown in the ﬁgure
below would be given as
p = p(x), 0 < x < 1
In the discrete domain, each ﬂow variable is deﬁned only at the grid points. So, in the
discrete domain shown below, the pressure would be deﬁned only at the N grid points.
p
i
= p(x
i
), i = 1, 2, . . . , N
Continuous Domain Discrete Domain
x=0
x=1
x
1
x
i

x
N

0 ≤ x ≤ 1 x = x
1
, x
2
, …,x
N

Grid point
Coupled PDEs + boundary
conditions in continuous
variables
Coupled algebraic eqs. in
discrete variables
In a CFD solution, one would directly solve for the relevant ﬂow variables only at the grid
points. The values at other locations are determined by interpolating the values at the grid
points.
The governing partial diﬀerential equations and boundary conditions are deﬁned in terms
of the continuous variables p,

V etc. One can approximate these in the discrete domain in
terms of the discrete variables p
i
,

V
i
etc. The discrete system is a large set of coupled,
algebraic equations in the discrete variables. Setting up the discrete system and solving it
(which is a matrix inversion problem) involves a very large number of repetitive calculations
and is done by the digital computer.
This idea can be extended to any general problem domain. The following ﬁgure shows
the grid used for solving the ﬂow over an airfoil.
3
Discretization Using the Finite-Diﬀerence Method
To keep the details simple, we will illustrate the fundamental ideas underlying CFD by
applying them to the following simple 1D equation:
du
dx
+ u
m
= 0; 0 ≤ x ≤ 1; u(0) = 1 (1)
We’ll ﬁrst consider the case where m = 1 when the equation is linear. We’ll later consider
the m = 2 case when the equation is nonlinear.
We’ll derive a discrete representation of the above equation with m = 1 on the following
grid:
x
1
=0 x
2
=1/3 x
3
=2/3 x
4
=1
∆x=1/3
This grid has four equally-spaced grid points with ∆x being the spacing between successive
points. Since the governing equation is valid at any grid point, we have

du
dx

i
+ u
i
= 0 (2)
where the subscript i represents the value at grid point x
i
. In order to get an expression for
(du/dx)
i
in terms of u at the grid points, we expand u
i−1
in a Taylor’s series:
u
i−1
= u
i
−∆x

du
dx

i
+ O(∆x
2
)
Rearranging gives

du
dx

i
=
u
i
−u
i−1
∆x
+ O(∆x) (3)
The error in (du/dx)
i
due to the neglected terms in the Taylor’s series is called the truncation
error. Since the truncation error above is O(∆x), this discrete representation is termed ﬁrst-
order accurate.
Since the error in (du/dx)
i
due to the neglected terms in the Taylor’s series is of O(∆x),
this representation is termed as ﬁrst-order accurate. Using (3) in (2) and excluding higher-
order terms in the Taylor’s series, we get the following discrete equation:
u
i
−u
i−1
∆x
+ u
i
= 0 (4)
Note that we have gone from a diﬀerential equation to an algebraic equation!
This method of deriving the discrete equation using Taylor’s series expansions is called
the ﬁnite-diﬀerence method. However, most commercial CFD codes use the ﬁnite-volume or
ﬁnite-element methods which are better suited for modeling ﬂow past complex geometries.
For example, the FLUENT code uses the ﬁnite-volume method whereas ANSYS uses the
ﬁnite-element method. We’ll brieﬂy indicate the philosophy of the ﬁnite-volume method
next but will keep using the ﬁnite-diﬀerence approach to illustrate the underlying concepts
since they are very similar between the diﬀerent approaches with the ﬁnite-diﬀerence method
being easier to understand.
4
Discretization Using The Finite-Volume Method
If you look closely at the airfoil grid shown earlier, you’ll see that it consists of quadrilaterals.
In the ﬁnite-volume method, such a quadrilateral is commonly referred to as a “cell” and a
grid point as a “node”. In 2D, one could also have triangular cells. In 3D, cells are usually
hexahedrals, tetrahedrals, or prisms. In the ﬁnite-volume approach, the integral form of the
conservation equations are applied to the control volume deﬁned by a cell to get the discrete
equations for the cell. For example, the integral form of the continuity equation was given
earlier. For steady, incompressible ﬂow, this equation reduces to

V
i
= u
i
ˆ
i + v
i
ˆ
j. Applying the mass conservation
equation (5) to the control volume deﬁned by the cell gives
−u
1
∆y −v
2
∆x + u
3
∆y + v
4
∆x = 0
This is the discrete form of the continuity equation for the cell. It is equivalent to summing
up the net mass ﬂow into the control volume and setting it to zero. So it ensures that the net
mass ﬂow into the cell is zero i.e. that mass is conserved for the cell. Usually the values at
the cell centers are stored. The face values u
1
, v
2
, etc. are obtained by suitably interpolating
the cell-center values for adjacent cells.
Similarly, one can obtain discrete equations for the conservation of momentum and energy
for the cell. One can readily extend these ideas to any general cell shape in 2D or 3D and any
conservation equation. Take a few minutes to contrast the discretization in the ﬁnite-volume
approach to that in the ﬁnite-diﬀerence method discussed earlier.
Look back at the airfoil grid. When you are using FLUENT or another ﬁnite-volume code,
it’s useful to remind yourself that the code is ﬁnding a solution such that mass, momentum,
energy and other relevant quantities are being conserved for each cell.
5
Assembly of Discrete System and Application of Boundary Condi-
tions
Recall that the discrete equation that we obtained using the ﬁnite-diﬀerence method was
u
i
−u
i−1
∆x
+ u
i
= 0
Rearranging, we get
−u
i−1
+ (1 + ∆x)u
i
= 0
Applying this equation to the 1D grid shown earlier at grid points i = 2, 3, 4 gives
−u
1
+ (1 + ∆x) u
2
= 0 (i = 2) (6)
−u
2
+ (1 + ∆x) u
3
= 0 (i = 3) (7)
−u
3
+ (1 + ∆x) u
4
= 0 (i = 4) (8)
The discrete equation cannot be applied at the left boundary (i=1) since u
i−1
is not deﬁned
here. Instead, we use the boundary condition to get
u
1
= 1 (9)
Equations (6)-(9) form a system of four simultaneous algebraic equations in the four
unknowns u
1
, u
2
, u
3
and u
4
. It’s convenient to write this system in matrix form:

1 0 0 0
−1 1 + ∆x 0 0
0 −1 1 + ∆x 0
0 0 −1 1 + ∆x
¸
¸
¸
¸
¸

u
1
u
2
u
3
u
4
¸
¸
¸
¸
¸
=

1
0
0
0
¸
¸
¸
¸
¸
(10)
In a general situation, one would apply the discrete equations to the grid points (or cells
in the ﬁnite-volume method) in the interior of the domain. For grid points (or cells) at or
near the boundary, one would apply a combination of the discrete equations and boundary
conditions. In the end, one would obtain a system of simultaneous algebraic equations with
the number of equations being equal to the number of independent discrete variables. The
process is essentially the same as above with the details being much more complex.
FLUENT, like other commercial CFD codes, oﬀers a variety of boundary condition op-
tions such as velocity inlet, pressure inlet, pressure outlet, etc. It is very important that
you specify the proper boundary conditions in order to have a well-deﬁned problem. Also,
read through the documentation for a boundary condition option to understand what it
does before you use it (it might not be doing what you expect). A single wrong boundary
condition can give you a totally wrong result.
6
Solution of Discrete System
The discrete system (10) for our own humble 1D example can be easily inverted to obtain
the unknowns at the grid points. Solving for u
1
, u
2
, u
3
and u
4
in turn and using ∆x = 1/3,
we get
u
1
= 1 u
2
= 3/4 u
3
= 9/16 u
4
= 27/64
The exact solution for the 1D example is easily calculated to be
u
exact
= exp(−x)
The ﬁgure below shows the comparison of the discrete solution obtained on the four-point
grid with the exact solution. The error is largest at the right boundary where it is equal to
14.7%.
0 0.2 0.4 0.6 0.8 1
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x
u
Numerical solution
Exact solution
In a practical CFD application, one would have thousands to millions of unknowns in the
discrete system and if one uses, say, a Gaussian elimination procedure naively to invert the
matrix, it would be take the computer forever to perform the calculation. So a lot of work
goes into optimizing the matrix inversion in order to minimize the CPU time and memory
required. The matrix to be inverted is sparse i.e. most of the entries in it are zeros since the
discrete equation at a grid point or cell will contain only quantities from the neighboring
points or cells. A CFD code would store only the non-zero values to minimize memory
usage. It would also generally use an iterative procedure to invert the matrix; the longer one
iterates, the closer one gets to the true solution for the matrix inversion.
7
Grid Convergence
While developing the ﬁnite-diﬀerence approximation for the 1D example, we saw that the
truncation error in our discrete system is O(∆x). So one expects that as the number of grid
points is increased and ∆x is reduced, the error in the numerical solution would decrease
and the agreement between the numerical and exact solutions would get better.
Let’s consider the eﬀect of increasing the number of grid points N on the numerical
solution of the 1D problem. We’ll consider N = 8 and N = 16 in addition to the N = 4
case solved previously. We can easily repeat the assembly and solution steps for the discrete
system on each of these additional grids. The following ﬁgure compares the results obtained
on the three grids with the exact solution. As expected, the numerical error decreases as the
number of grid points is increased.
0 0.2 0.4 0.6 0.8 1
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x
u
N=4
N=8
N=16
Exact solution
When the numerical solutions obtained on diﬀerent grids agree to within a level of tolerance
speciﬁed by the user, they are referred to as “grid converged” solutions. The concept of
grid convergence applies to the ﬁnite-volume approach also where the numerical solution, if
correct, becomes independent of the grid as the cell size is reduced. It is very important
that you investigate the eﬀect of grid resolution on the solution in every CFD problem you
solve. Never trust a CFD solution unless you have convinced yourself that the solution is
grid converged to an acceptance level of tolerance (which would be problem dependent).
8
Dealing with Nonlinearity
The momentum conservation equation for a ﬂuid is nonlinear due to the convection term
(

V · ∇)

V . Phenomena such as turbulence and chemical reaction introduce additional non-
linearities. The highly nonlinear nature of the governing equations for a ﬂuid makes it
challenging to obtain accurate numerical solutions for complex ﬂows of practical interest.
We will demonstrate the eﬀect of nonlinearity by setting m = 2 in our simple 1D exam-
ple (1):
du
dx
+ u
2
= 0; 0 ≤ x ≤ 1; u(0) = 1
A ﬁrst-order ﬁnite-diﬀerence approximation to this equation, analogous to that in (4) for
m = 1, is
u
i
−u
i−1
∆x
+ u
2
i
= 0 (11)
This is a nonlinear algebraic equation with the u
2
i
term being the source of the nonlinearity.
The strategy that is adopted to deal with nonlinearity is to linearize the equations about
a guess value of the solution and to iterate until the guess agrees with the solution to a
speciﬁed tolerance level. We’ll illustrate this on the above example. Let u
g
i
be the guess for
u
i
. Deﬁne
∆u
i
= u
i
−u
g
i
Rearranging and squaring this equation gives
u
2
i
= u
2
g
i
+ 2u
g
i
∆u
i
+ (∆u
i
)
2
Assuming that ∆u
i
u
g
i
, we can neglect the ∆u
2
i
term to get
u
2
i
u
2
g
i
+ 2u
g
i
∆u
i
= u
2
g
i
+ 2u
g
i
(u
i
−u
g
i
)
Thus,
u
2
i
2u
g
i
u
i
−u
2
g
i
The ﬁnite-diﬀerence approximation (11) after linearization becomes
u
i
−u
i−1
∆x
+ 2u
g
i
u
i
−u
2
g
i
= 0 (12)
Since the error due to linearization is O(∆u
2
), it tends to zero as u
g
→u.
In order to calculate the ﬁnite-diﬀerence approximation (12), we need guess values u
g
at
the grid points. We start with an initial guess value in the ﬁrst iteration. For each subsequent
iteration, the u value obtained in the previous iteration is used as the guess value.
Iteration 1: u
(1)
g
= Initial guess
Iteration 2: u
(2)
g
= u
(1)
.
.
.
Iteration l: u
(l)
g
= u
(l−1)
The superscript indicates the iteration level. We continue the iterations until they converge.
We’ll defer the discussion on how to evaluate convergence until a little later.
This is essentially the process used in CFD codes to linearize the nonlinear terms in the
conservations equations, with the details varying depending on the code. The important
points to remember are that the linearization is performed about a guess and that it is
necessary to iterate through successive approximations until the iterations converge.
9
Direct and Iterative Solvers
We saw that we need to perform iterations to deal with the nonlinear terms in the governing
equations. We next discuss another factor that makes it necessary to carry out iterations in
practical CFD problems.
Verify that the discrete equation system resulting from the ﬁnite-diﬀerence approxima-
tion (12) on our four-point grid is

1
∆xu
2
g
2
∆xu
2
g
3
∆xu
2
g
4
¸
¸
¸
¸
¸
(13)
In a practical problem, one would usually have millions of grid points or cells so that each
dimension of the above matrix would be of the order of a million (with most of the elements
being zeros). Inverting such a matrix directly would take a prohibitively large amount of
memory. So instead, the matrix is inverted using an iterative scheme as discussed below.
Rearrange the ﬁnite-diﬀerence approximation (12) at grid point i so that u
i
is expressed
in terms of the values at the neighboring grid points and the guess values:
u
i
=
u
i−1
+ ∆xu
2
g
i
1 + 2 ∆xu
g
i
If a neighboring value at the current iteration level is not available, we use the guess value
for it. Let’s say that we sweep from right to left on our grid i.e. we update u
4
, then u
3
and
ﬁnally u
2
in each iteration. In the m
th
iteration, u
(l)
i−1
is not available while updating u
m
i
and
so we use the guess value u
(l)
g
i−1
for it instead:
u
(l)
i
=
u
(l)
g
i−1
+ ∆xu
(l)
2
g
i
1 + 2 ∆xu
(l)
g
i
(14)
Since we are using the guess values at neighboring points, we are eﬀectively obtaining only
an approximate solution for the matrix inversion in (13) during each iteration but in the
process have greatly reduced the memory required for the inversion. This tradeoﬀ is good
strategy since it doesn’t make sense to expend a great deal of resources to do an exact matrix
inversion when the matrix elements depend on guess values which are continuously being
reﬁned. In an act of cleverness, we have combined the iteration to handle nonlinear terms
with the iteration for matrix inversion into a single iteration process. Most importantly, as
the iterations converge and u
g
→u, the approximate solution for the matrix inversion tends
towards the exact solution for the inversion since the error introduced by using u
g
instead
of u in (14) also tends to zero.
Thus, iteration serves two purposes:
1. It allows for eﬃcient matrix inversion with greatly reduced memory requirements.
2. It is necessary to solve nonlinear equations.
In steady problems, a common and eﬀective strategy used in CFD codes is to solve the
unsteady form of the governing equations and “march” the solution in time until the solution
converges to a steady value. In this case, each time step is eﬀectively an iteration, with the
the guess value at any time level being given by the solution at the previous time level.
10
Iterative Convergence
Recall that as u
g
→ u, the linearization and matrix inversion errors tends to zero. So we
continue the iteration process until some selected measure of the diﬀerence between u
g
and
u, refered to as the residual, is “small enough”. We could, for instance, deﬁne the residual
R as the RMS value of the diﬀerence between u and u
g
on the grid:
R ≡

N
¸
i=1
(u
i
−u
g
i
)
2
N
It’s useful to scale this residual with the average value of u in the domain. An unscaled
residual of, say, 0.01 would be relatively small if the average value of u in the domain is 5000
but would be relatively large if the average value is 0.1. Scaling ensures that the residual is
a relative rather than an absolute measure. Scaling the above residual by dividing by the
average value of u gives
R =

¸
¸
¸
¸
¸
¸
¸

N
¸
i=1
(u
i
−u
g
i
)
2
N
¸

¸
¸
¸
¸
¸
¸
N
N
¸
i=1
u
i
¸

=

N
N
¸
i=1
(u
i
−u
g
i
)
2
N
¸
i=1
u
i
(15)
For the nonlinear 1D example, we’ll take the initial guess at all grid points to be equal
to the value at the left boundary i.e. u
(1)
g
= 1. In each iteration, we update u
g
, sweep
from right to left on the grid updating, in turn, u
4
, u
3
and u
2
using (14) and calculate
the residual using (15). We’ll terminate the iterations when the residual falls below 10
−9
(which is referred to as the convergence criterion). Take a few minutes to implement this
procedure in MATLAB which will help you gain some familiarity with the mechanics of the
implementation. The variation of the residual with iterations obtained from MATLAB is
shown below. Note that logarithmic scale is used for the ordinate. The iterative process
converges to a level smaller than 10
−9
in just 6 iterations. In more complex problems, a lot
more iterations would be necessary for achieving convergence.
1 2 3 4 5 6
10
−10
10
−8
10
−6
10
−4
10
−2
10
0
Iteration number
R
e
s
i
d
u
a
l
11
The solution after 2,4 and 6 iterations and the exact solution are shown below in the
right ﬁgure. It can easily be veriﬁed that the exact solution is given by
u
exact
=
1
x + 1
The solutions for iterations 4 and 6 are indistinguishable on the graph. This is another
indication that the solution has converged. The converged solution doesn’t agree well with
the exact solution because we are using a coarse grid for which the truncation error is
relatively large. The iterative convergence error, which is of order 10
−9
, is swamped out
by the truncation error of order 10
−1
. So driving the residual down to 10
−9
when the
truncation error is of order 10
−1
is a waste of computing resources. In a good calculation,
both errors would be of comparable level and less than a tolerance level chosen by the user.
The agreement between the numerical and exact solutions should get much better on reﬁning
the grid as was the case for m = 1.
0 0.2 0.4 0.6 0.8 1
0.5
0.55
0.6
0.65
0.7
0.75
0.8
0.85
0.9
0.95
1
x
u
Iteration 2
Iteration 4
Iteration 6
Exact
Some points to note:
1. Diﬀerent codes use slightly diﬀerent deﬁnitions for the residual. Read the documenta-
tion to understand how the residual is calculated.
2. In the FLUENT code, residuals are reported for each conservation equation. A discrete
conservation equation at any cell can be written in the form LHS = 0. For any iteration,
if one uses the current solution to compute the LHS, it won’t be exactly equal to
zero, with the deviation from zero being a mesaure of how far one is from achieving
convergence. So FLUENT calculates the residual as the (scaled) mean of the absolute
value of the LHS over all cells.
3. The convergence criterion you choose for each conservation equation is problem- and
code-dependent. It’s a good idea to start with the default values in the code. One may
then have to tweak these values.
12
Numerical Stability
In our previous 1D example, the iterations converged very rapidly with the residual falling
below the convergence criterion of 10
−9
in just 6 iterations. In more complex problems, the
iterations converge more slowly and in some instances, may even diverge. One would like
to know a priori the conditions under which a given numerical scheme converges. This is
determined by performing a stability analysis of the numerical scheme. A numerical method
is referred to as being stable when the iterative process converges and as being unstable
when it diverges. It is not possible to carry out an exact stability analysis for the Euler or
Navier-Stokes equations. But a stability analysis of simpler, model equations provides useful
insight and approximate conditions for stability. As mentioned earlier, a common strategy
used in CFD codes for steady problems is to solve the unsteady equations and march in time
until the solution converges to a steady state. A stability analysis is usually performed in
the context of time-marching.
While using time-marching to a steady state, we are only interested in accurately obtain-
ing the asymptotic behavior at large times. So we would like to take as large a time-step
∆t as possible to reach the steady state in the least number of time-steps. There is usually
a maximum allowable time-step ∆t
max
beyond which the numerical scheme is unstable. If
∆t > ∆t
max
, the numerical errors will grow exponentially in time causing the solution to
diverge from the steady-state result. The value of ∆t
max
depends on the numerical dis-
cretization scheme used. There are two classes of numerical shemes, explicit and implicit,
with very diﬀerent stability characteristics which we’ll brieﬂy discuss next.
Explicit and Implicit Schemes
The diﬀerence between explicit and implicit schemes can be most easily illustrated by ap-
plying them to the wave equation
∂u
∂t
+ c
∂u
∂x
= 0
where c is the wavespeed. One possible way to discretize this equation at grid point i and
time-level n is
u
n
i
−u
n−1
i
∆t
+ c
u
n−1
i
−u
n−1
i−1
∆x
= O(∆t, ∆x) (16)
The crucial thing to note here is that the spatial derivative is evaluated at the n−1 time-level.
Solving for u
n
i
gives
u
n
i
=
¸
1 −

c∆t
∆x

u
n−1
i
+

c∆t
∆x

u
n−1
i−1
(17)
This is an explicit expression i.e. the value of u
n
i
at any grid point can be calculated directly
from this expression without the need for any matrix inversion. The scheme in (16) is known
as an explicit scheme. Since u
n
i
at each grid point can be updated independently, these
schemes are easy to implement on the computer. On the downside, it turns out that this
scheme is stable only when
C ≡
c∆t
∆x
≤ 1
where C is called the Courant number. This condition is refered to as the Courant-Friedrichs-
Lewy or CFL condition. While a detailed derivation of the CFL condition through stability
analysis is outside the scope of the current discussion, it can seen that the coeﬃcient of u
n−1
i
13
in (17) changes sign depending on whether C > 1 or C < 1 leading to very diﬀerent behavior
in the two cases. The CFL condition places a rather severe limitation on ∆t
max
.
In an implicit scheme, the spatial derivative term is evaluated at the n time-level:
u
n
i
−u
n−1
i
∆t
+ c
u
n
i
−u
n
i−1
∆x
= O(∆t, ∆x)
In this case, we can’t update u
n
i
at each grid point independently. We instead need to solve a
system of algebraic equations in order to calculate the values at all grid points simultaneously.
It can be shown that this scheme is unconditionally stable so that the numerical errors will
be damped out irrespective of how large the time-step is.
The stability limits discussed above apply speciﬁcally to the wave equation. In general,
explicit schemes applied to the Euler or Navier-Stokes equations have the same restriction
that the Courant number needs to be less than or equal to one. Implicit schemes are not
unconditonally stable for the Euler or Navier-Stokes equations since the nonlinearities in
the governing equations often limit stability. However, they allow a much larger Courant
number than explicit schemes. The speciﬁc value of the maximum allowable Courant number
is problem dependent.
Some points to note:
1. CFD codes will allow you to set the Courant number (which is also referred to as
the CFL number) when using time-stepping. Taking larger time-steps leads to faster
convergence to the steady state, so it is advantageous to set the Courant number as
large as possible within the limits of stability.
2. You may ﬁnd that a lower Courant number is required during startup when changes
in the solution are highly nonlinear but it can be increased as the solution progresses.
3. Under-relaxation for non-timestepping
14
Turbulence Modeling
There are two radically diﬀerent states of ﬂows that are easily identiﬁed and distinguished:
laminar ﬂow and turbulent ﬂow. Laminar ﬂows are characterized by smoothly varying ve-
locity ﬁelds in space and time in which individual “laminae” (sheets) move past one another
without generating cross currents. These ﬂows arise when the ﬂuid viscosity is suﬃciently
large to damp out any perturbations to the ﬂow that may occur due to boundary imper-
fections or other irregularities. These ﬂows occur when at low-to-moderate values of the
Reynolds number. In contrast, turbulent ﬂows are characterized by large, nearly random
ﬂuctuations in velocity and pressure in both space and time. These ﬂuctuations arise from
instabilities that grow until nonlinear interactions cause them to break down into ﬁner and
ﬁner whirls that eventually are dissipated (into heat) by the action of viscosity. Turbulent
ﬂows occur in the opposite limit of high Reynolds numbers.
2.3
2.2
2.1
2.0
1.9
1.8
1.7
y
l
a
b
e
l
100 80 60 40 20 0
xlabel
(a)
PSfrag replacements
u
t
-0.4
-0.2
0.0
0.2
y
l
a
b
e
l
100 80 60 40 20 0
xlabel
(b)
PSfrag replacements
u
t
u

≡ u −u and (c) shows the square of the ﬂuctuating velocity. Dashed lines in (a) and (c)
indicate the time averages.
A typical time history of the ﬂow variable u at a ﬁxed point in space is shown in Fig. 1(a).
The dashed line through the curve indicates the “average” velocity. We can deﬁne three types
of averages:
1. Time average
15
2. Volume average
3. Ensemble average
The most mathematically general average is the ensemble average, in which you repeat a
given experiment a large number of times and average the quantity of interest (say velocity)
at the same position and time in each experiment. For practical reasons, this is rarely done.
Instead, a time or volume average (or combination of the two) is made with the assumption
that they are equivalent to the ensemble average. For the sake of this discussion, let us deﬁne
the time average for a stationary ﬂow
1
as
u(y) ≡ lim
τ→∞
1
2τ

τ
−τ
u(y, t)dt (18)
The deviation of the velocity from the mean value is called the ﬂuctuation and is usually
deﬁned as
u

≡ u −u (19)
Note that by deﬁnition u

= 0 (the average of the ﬂuctuation is zero). Consequently, a
better measure of the strength of the ﬂuctuation is the average of the square of a ﬂuctuating
variable. Figures 1(b) and 1(c) show the time evolution of the velocity ﬂuctuation, u

, and
the square of that quantity, u
2
. Notice that the latter quantity is always greater than zero
as is its average.
The equations governing a turbulent ﬂow are precisely the same as for a laminar ﬂow;
however, the solution is clearly much more complicated in this regime. The approaches to
solving the ﬂow equations for a turbulent ﬂow ﬁeld can be roughly divided into two classes.
Direct numerical simulations (DNS) use the speed of modern computers to numerically
integrate the Navier Stokes equations, resolving all of the spatial and temporal ﬂuctuations,
without resorting to modeling. In essence, the solution procedure is the same as for laminar
ﬂow, except the numerics must contend with resolving all of the ﬂuctuations in the velocity
and pressure. DNS remains limited to very simple geometries (e.g., channel ﬂows, jets and
boundary layers) and is extremely expensive to run.
2
The alternative to DNS found in
most CFD packages (including FLUENT) is to solve the Reynolds Averaged Navier Stokes
(RANS) equations. RANS equations govern the mean velocity and pressure. Because these
quantities vary smoothly in space and time, they are much easier to solve; however, as will
be shown below, they require modeling to “close” the equations and these models introduce
signiﬁcant error into the calculation.
To demonstrate the closure problem, we consider fully developed turbulent ﬂow in a
channel of height 2H. Recall that with RANS we are interested in solving for the mean
velocity u(y) only. If we formally average the Navier Stokes equations and simplify for this
geometry we arrive at the following
du

, known as the Reynolds stress,
3
is a higher-order moment that must
be modeled in terms of the knowns (i.e., u(y) and its derivatives). This is referred to as
the “closure” approximation. The quality of the modeling of this term will determine the
reliability of the computations.
4
Turbulence modeling is a rather broad discipline and an in-depth discussion is beyond
the scope of this introduction. Here we simply note that the Reynolds stress is modeled in
terms of two turbulence parameters, the turbulent kinetic energy k and the turbulent energy
dissipation rate deﬁned below
k ≡
1
2

u
2
+ v
2
+ w
2

(23)
≡ ν

∂u

∂x

2
+

∂u

∂y

2
+

∂u

∂z

2
+

∂v

∂x

2
+

∂v

∂y

2
+

∂v

∂z

2
+

∂w

∂x

2
+

∂w

∂y

2
+

∂w

∂z

2
¸
¸
(24)
where (u

, v

, w

) is the ﬂuctuating velocity vector. The kinetic energy is zero for laminar
ﬂow and can be as large as 5% of the kinetic energy of the mean ﬂow in a highly turbulent
case. The family of models is generally known as k– and they form the basis of most CFD
packages (including FLUENT). We will revisit turbulence modeling towards the end of the
semester.
3
Name after the same Osborne Reynolds from which we get the Reynolds number.
4
Notice that if we neglect the Reynolds stress the equations reduce to the equations for laminar ﬂow;
thus, the Reynolds stress is solely responsible for the diﬀerence in the mean proﬁle for laminar (parabolic)
and turbulent (blunted) ﬂows.
17
Problem Set for “Intro to CFD” Notes
Consider the following diﬀerential equation
d
2
u
dx
2
− 2 u
3
= 0; 0 ≤ x ≤ 9; u(0) = 1, u(9) = 0.1
• Apply the ﬁnite-diﬀerence method to this equation to get a linearized diﬀerence equa-
tion at grid point i away from the boundary. Note that a second-order diﬀerence
approximation for the second-derivative is

d
2
u
dx
2

i
=
u
i−1
− 2u
i
+ u
i+1
∆x
2
+O

∆x
2

• Assemble the discrete system of equations for a four-point grid into a matrix system
of the form
[A]{u} = {b}
where
{u} = {u
1
u
2
u
3
u
4
}
T
• Develop a MATLAB program to solve the ﬁnite-diﬀerence equations on a grid with N
points. Apply this code to obtain the solution on a 4-point grid (∆x = 3). For the
initial guess, use a linear variation between the two boundary values. Converge your
solution until the residual is below 10
−6
. Plot the residuals vs. iteration number.
Hint: In MATLAB, initialize all elements of [A] to zero. For row i of [A] when
2 ≤ i ≤ N − 1, you need to set only the elements A
i,i−1
, A
i,i
and A
i,i+1
.
• Plot the ﬁnite-diﬀerence solution obtained on the 4-point grid and compare it with the
exact solution
u
exact
=
1
x + 1
• Use your MATLAB program to obtain the solution on a 7-point grid (∆x = 1.5).
Plot the solution and compare it with the solution for the 4-point grid and the exact
solution.
1
Fluent Tutorial - Laminar Pipe Flow
Lami nar Pi pe Fl ow
Aut hor: Raj esh Bhaskaran
E- mail: rb88@cornell. edu

We' ll more or less work our way across t he Operat ion Toolpad as we go
t hrough t he solut ion st eps. Not ice t hat as each of t he t op but t ons is
select ed, a different "sub- pad" appears. The Geomet ry sub- pad is shown in
t he above snaphot .
q Global Cont rol Toolpad:

This is t he window t o which out put from GAMBI T commands is writ t en and
which provides feedback on t he act ions t aken by GAMBI T as you perform
operat ions. I f, at some point , you are not sure you clicked t he right but t on
or ent ered a value correct ly, t his is where t o look t o figure out what you
j ust did. You can click on t he arrow but t on in t he upper right hand corner t o
make t he Transcript window full- sized. You can click on t he arrow again t o
ret urn t he window t o it s original size. Go ahead, give t his a t ry.

This will bring up a window cont aining t he vert ices t hat have been select ed.
Vert ices can be moved from t he Avai l abl e and Pi ck ed list s by select ing t hem
and t hen pressing t he left or right arrow but t ons.

Now select t he left edge by Shi f t - cl i ck i ng on it . The select ed edge should
appear in t he yellow box next t o t he Edges box you j ust worked wit h as well as
t he Label / Ty pe list right under t he Edges box.
Next t o Name: , ent er inlet.
For Ty pe: , select VELOCI TY_I NLET.
Click Appl y . You should see t he new ent ry appear under Name/ Ty pe box near
t he t op of t he window.
http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step3.htm (2 of 4)11/7/2005 6:36:49 PM
Fluent Tutorial - Laminar Pipe Flow Step #3

Repeat t his process for t he ot her t hree edges according t o t he following t able:
Edge
Position
Name Type
Left inlet VELOCITY_INLET
Right outlet PRESSURE_OUTLET
Top wall WALL
Bottom centerline AXIS
You should have t he following edges in t he Name/ Ty pe list when finished:

Def i ne Boundar y Condi t i ons
We' ll now set t he value of t he velocit y at t he inlet and pressure at t he out let .
Ma in Men u > Defin e > Bou n d a r y Con d it ion s . . .
We not e here t hat t he four t ypes of boundaries we defined are specified as zones
on t he left side of t he Boundary Condit ions Window. The cent er l i ne zone should
be select ed by default . Make sure it is, t hen make sure t he Ty pe of t his
boundary is select ed as ax i s and click Set .... Not ice t hat t here is not hing t o set
for t he axis. Click OK.
Move down t he list and select i nl et under Zone. Not e t hat FLUENT indicat es t hat
t he Ty pe of t his boundary is vel oci t y - i nl et . Recall t hat t he boundary t ype for
t he "inlet " was set in GAMBI T. I f necessary, we can change t he boundary t ype
set previously in GAMBI T in t his menu by select ing a different t ype from t he list
on t he right .
http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (8 of 9)11/7/2005 6:37:26 PM
Fluent Tutorial - Laminar Pipe Flow Step #4

( Click pict ure for larger image)
Sav i ng t he Pl ot
Save t he dat a from t his plot :
I n t he Solut ion XY Plot Window, check t he Wr i t e t o Fi l e box under Opt i ons. The
Pl ot but t on should have changed t o Wr i t e.... Click on Wr i t e.... Ent er vel.xy as
t he XY Fi l e Name and click OK. Check t hat t his file has been creat ed in your
FLUENT working direct ory.
Now, save a pict ure of t he plot :
Leave t he Solut ion XY Plot Window and t he Graphics Window open and click on:
File > Ha r d cop y . . .
Under For mat , choose one of t he following t hree opt ions:
EPS - if you have a post script viewer, t his is t he best choice. EPS allows you t o
save t he file in vect or mode, which will offer t he best viewable image qualit y.
Aft er select ing EPS, choose Vect or from under Fi l e Ty pe.
TI FF - t his will offer a high resolut ion image of your graph. However, t he image
file generat ed will be rat her large, so t his is not recommended if you do not have
http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (4 of 12)11/7/2005 6:39:21 PM
Fluent Tutorial - Laminar Pipe Flow Step #6
a lot of room on your st orage device.
JPG - t his is small in size and viewable from all browsers. However, t he qualit y
of t he image is not part icularly good.
Aft er select ing your desired image format and associat ed opt ions, click on Save...
Ent er vel.eps, vel.tif, or vel.jpg depending on your format choice and click
OK.
Verify t hat t he image file has been creat ed in your working direct ory. You can
now copy t his file ont o a disk or print it out for your records.
Coef f i ci ent of Sk i n Fr i ct i on
FLUENT provides a large amount of useful informat ion in t he online help t hat
comes wit h t he soft ware. Let ' s probe t he online help for informat ion on
calculat ing t he coefficient of skin frict ion.
Ma in Men u > Help > Us er ' s Gu id e I n d ex. . .
Click on S in t he links on t op and scroll down t o sk i n f r i ct i on coef f i ci ent . Click
on t he second 965 link ( normally, you would have t o go t hrough each of t he
links unt il you find what you are looking for) . We can see an excerpt on t he skin
coefficient as well as t he equat ion for calculat ing it .
Click on t he link for Ref er ence Val ues panel , which t ells us how t o set t he
reference values used in calculat ing t he skin coefficient .

Click I ni t . Close t he Solut ion I nit ializat ion window.
Set Conver gence Cr i t er i a
http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (2 of 5)11/7/2005 6:49:57 PM
Fluent Tutorial - Turbulent Pipe Flow Step #3
Recall t hat FLUENT report s a residual for each governing equat ion being solved.
The residual is a measure of how well t he current solut ion sat isfies t he discret e
form of each governing equat ion. We' ll it erat e t he solut ion unt il t he residual for
each equat ion falls below 1e- 6.
Ma in Men u > Solve > Mon it or s > Res id u a l. . .
Not ice t hat Conver gence Cr i t er i on has t o be set for t he k and epsilon
equat ions in addit ion t o t he t hree equat ions in t he last t ut orial. Set t he
Conver gence Cr i t er i on t o be 1e-06 for all five equat ions being solved.
Select Pr i nt and Pl ot under Opt i ons. This will print as well plot t he residuals as
t hey are calculat ed which you will use t o monit or convergence.

where r( x) is t he radius of t he cross- sect ion at x and
A = 0. 1 + x
2

for t he given nozzle geomet ry, we get
r( x) = [ ( 0. 1 + x
2
) / pi]
0. 5
; - 0. 5 < x < 0. 5
This is t he equat ion of t he curved wall. Life would have been easier if GAMBI T
allowed for t his equat ion t o be ent ered direct ly t o creat e t he curved edge.
I nst ead, one has t o creat e a file cont aining t he coordinat es of a series of point s
along t he curved line and read in t he file. The more number of point s used along
t he curved edge, t he smoot her t he result ant edge.
The file vert . dat cont ains t he point definit ions for t he nozzle wall. Take a look at
t his file. The first line is
21 1
which says t hat t here are 21 point s along t he edge and we are defining only 1
edge. This is followed by x, r and z coordinat es for each point along t he edge. The
r- value for each x was generat ed from t he above equat ion for r( x) . The z-
coordinat e is 0 for all point s since we have a 2D geomet ry.
Ri ght - cl i ck on vert . dat and select Save As... t o download t he file t o your
http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (2 of 6)11/7/2005 6:51:18 PM
Compressible Flow in a Nozzle - Step #1
working direct ory.
Ma in Men u > File > I n p u t > I CEM I n p u t . . .
Next t o Fi l e Name: , ent er t he pat h t o t he vert.dat file t hat you downloaded or
browse t o it by clicking on t he Br ow se but t on.
Then, check t he Ver t i cesand Edges boxes under Geomet r y t o Cr eat e as we
want t o creat e t he vert ices as well as t he curved edge.
Click Accept .
This should creat e t he curved edge. Here it is in relat ion t o t he vert ices we
creat ed above:
http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (3 of 6)11/7/2005 6:51:18 PM
Compressible Flow in a Nozzle - Step #1

Now select t he left edge by Shi f t - cl i ck i ng on it . The select ed edge should
appear in t he yellow box next t o t he Edges box you j ust worked wit h as well as
t he Label / Ty pe list right under t he Edges box.
Next t o Name: , ent er inlet.
http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step3.htm (1 of 3)11/7/2005 6:51:51 PM
Compressible Flow in a Nozzle - Step #3
For Ty pe: , select VELOCI TY_I NLET.
Click Appl y . You should see t he new ent ry appear under Name/ Ty pe box near
t he t op of t he window.

Creat e boundary t ypes for each of t he edges as specified in t he chart below:
http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step3.htm (2 of 3)11/7/2005 6:51:51 PM
Compressible Flow in a Nozzle - Step #3
Edge
Position
Name Type
Left inlet PRESSURE_INLET
Right outlet PRESSURE_OUTLET
Top wall WALL
Bottom centerline AXIS
You should have t he following edges in t he Name/ Ty pe list when finished:

Make sure t hat is select ed and click OK.
Solve > I n it ia lize
As you may recall from t he previous t ut orials, t his is where we set t he init ial
guess values ( t he base case) for t he it erat ive solut ion. Once again, we' ll set
t hese values t o be t he ones at t he inlet . Select i nl et under Comput e Fr om.

Click I ni t .
http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step5.htm (2 of 4)11/7/2005 6:52:52 PM
Compressible Flow in a Nozzle - Step #5
Solve > Mon it or s > Res id u a l
Now we will set t he residual values ( t he crit eria for a good enough solut ion) .
Once again, we' ll set t his value t o 1e- 06.

( a) Plot t he variat ion of Mach number at t he axis and t he wall as a funct ion of
t he axial dist ance x. Also, plot t he corresponding result s obt ained on t he 50x20
grid used in class and from t he quasi- 1D assumpt ion. Recall t hat t he quasi- 1D
result for t he Mach number variat ion was given t o you in t he M_1D.xy file. Not e
all five curves should be plot t ed on t he same graph so t hat you can compare
t hem. You can make t he plot s in FLUENT, MATLAB or EXCEL.

( b) Plot t he variat ion of st at ic pressure at t he axis and t he wall as a funct ion of
t he axial dist ance x. Also, plot t he corresponding result s obt ained on t he 50x20
grid used in class and from t he quasi- 1D assumpt ion. Calculat e t he st at ic
pressure variat ion for t he quasi- 1D case from t he Mach number variat ion given
in M_1D.xy.

( a) Plot cont ours of t he Mach number and st at ic pressure for t his case. I s t he
flow regime as predict ed by quasi- 1D t heory? Explain briefly t he possible causes
for any similarit ies or disparit ies.

( b) Plot t he st at ic and st agnat ion pressures at t he axis as a funct ion of t he axial
dist ance. Also, plot t he corresponding values from t he case where t he exit
pressure is 3, 738. 9 Pa. ( These four curves should be on t he same graph. )
Explain briefly t he salient feat ures of t his plot .

( Click pict ure for larger image)
Next mesh face EDCGE in a similar fashion. The following t able shows t he
paramet ers t o use for t he different edges:
Edges Arrow Direction Successive Ratio Interval Count
EG and CD Downwards 1.15 45

Edges Arrow Direction First Length Interval Count
DE Left to Right 0.02c 60
The result ant mesh should be symmet ric about CG as shown in t he figure below.
http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (3 of 6)11/7/2005 6:55:22 PM
Flow over an Airfoil - Step #2

( Click pict ure for larger image)
Finally, let ' s mesh t he face consist ing of GAFEG and t he airfoil surface. For edges
HI and HJ on t he front part of t he airfoil surface, use t he following paramet ers t o
creat e edge meshes:
Edges Arrow Direction Last Length Interval Count
HI From H to I 0.02c 40
HJ From H to J 0.02c 40
For edges I G and JG, we' ll set t he divisions t o be uniform and equal t o 0. 02c.
Use I nt erval Size rat her t han I nt erval Count and creat e t he edge meshes:
Edges Arrow Direction Successive Ratio Interval Size
IG and JG Left to Right 1 0.02c
For edge AF, t he number of divisions needs t o be equal t o t he number of
divisions on t he line opposit e t o it i. e. t he upper surface of t he airfoil ( t his is a
subt le point ; chew over it ) . To det ermine t he number of divisions t hat GAMBI T
has creat ed on edge I G, select
Op er a t ion Toolp a d > Mes h Com m a n d Bu t t on > Ed ge Com m a n d Bu t t on
>Su m m a r ize Ed ge Mes h
http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (4 of 6)11/7/2005 6:55:22 PM
Flow over an Airfoil - Step #2
Select edge I G and t hen El ement s under Component and click Appl y . This will
give t he t ot al number of nodes ( i. e. point s) and element s ( i. e. divisions) on t he
edge in t he Transcript window. The number of divisions on edge I G is 35. ( I f you
are using a different geomet ry, t his number will be different ; I ' ll refer t o it as
N
I G
) . So t he I nt erval Count for edge AF is N
HI
+ N
I G
= 40+ 35= 75.
Similarly, det ermine t he number of divisions on edge JG. This also comes out as
35 for t he current geomet ry. So t he I nt erval Count for edge EF also is 75.
Creat e t he mesh for edges AF and EF wit h t he following paramet ers:
Edges Arrow Direction First Length Interval Count
AF From A to F 0.02c
40+N
IG
EF From E to F 0.02c
40+N
JG
Mesh t he face. The result ant mesh is shown below.

Now select t he left edge by Shi f t - cl i ck i ng on it . The select ed edge should
appear in t he yellow box next t o t he Edges box as well as t he Label / Ty pe list
under t he Edges box.
Next t o Name: , ent er inflow.
For Type: , select VELOCI TY_I NLET. You may have t o move t he Specify
Boundary Types box up in order t o see t he bot t om of t he list and select
VELOCI TY_I NLET.

Repeat t his process for t he ot her t hree edges according t o t he following t able:
Edge
Position
Name Type
Left inflow VELOCITY_INLET
Right outflow PRESSURE_OUTLET
http://instruct1.cit.cornell.edu/courses/fluent/plate/step3.htm (3 of 4)11/7/2005 7:01:52 PM
Fluent Tutorial - Forced Convection on a Flat Plate Step #3
Top top SYMMETRY
Bottom plate WALL
You should have t he following edges in t he Name/ Type list when finished:

Def i ne Boundar y Condi t i ons
We' ll now set t he value of t he velocit y at t he inflow and pressure at t he out flow.
http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (7 of 10)11/7/2005 7:04:00 PM
Fluent Tutorial - Forced Convection on a Flat Plate Step #4
Ma in Men u > Defin e > Bou n d a r y Con d it ion s . . .
We not e here t hat t he four t ypes of boundaries we defined are specified as zones on t he left
side of t he Boundary Condit ions Window. There are also 2 zones default - int erior fluid, used t o
define t he int erior of t he flow field. We will not need t o change any set t ing for t hese 2 zones.
Move down t he list and select i nf l ow under Zone. Not e t hat FLUENT indicat es t hat t he Type of
t his boundary is vel oci t y - i nl et . Recall t hat t he boundary t ype for t he inflow was set in GAMBI T.
I f necessary, we can change t he boundary t ype set previously in GAMBI T in t his menu by
select ing a different t ype from t he list on t he right . Click Set ....
Ent er 1 for Vel oci t y Magni t ude. This set s t he velocit y of t he fluid ent ering at t he left boundary
t o a uniform velocit y profile of 1m/ s. Set Temperat ure t o 353K. Change Turbulence Specificat ion
Met hod t o I nt ensi t y and Vi scosi t y Rat i o. Set Turbulence I nt ensit y t o 1 and Turbulent
Viscosit y Rat io t o 1. Click OK.

Choose out f l ow under Zone. The Type of t his boundary is pr essur e- out l et . Click Set .... The
default value of t he Gauge Pr essur e is 0. The ( absolut e) pressure at t he out flow is 1 at m.
Since t he operat ing pressure is set t o 1 at m, t he out flow gauge pressure = out flow absolut e
pressure - operat ing pressure = 0. Because we do not expect any backflow, we do not need t o
set any backflow condit ions. Click Cancel t o leave t he default s in place.
http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (8 of 10)11/7/2005 7:04:00 PM
Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Click on pl at e under Zones and make sure Type is set as w al l . Click Set .... Because we have a
heat ed isot hermal plat e, we need t o set t he t emperat ure. On t he Ther mal t ab, select
Temper at ur e under Thermal Condit ions. Change Temperat ure t o 413. The mat erial select ed is
inconsequent ial because t he plat e has zero t hickness in our model, t hus t he mat erial propert ies
of t he plat e do not affect t he heat t ransfer propert ies of t he plat e. Click OK.