INTRODUCTION TO COMPUTATIONAL
FLUID DYNAMICS
Introduction
Fluid dynamics is a discipline that encompasses a wide variety of
scientific and technical systems.
Historically, fluid dynamics analyses have been carried out by
means of analytical approximations with a narrow range of
applicability and of expensive experimental studies.
The numerical integration of the fluid dynamics governing
equations allows us to solve complex flow problems with ease.
Currently, there exists both open source and commercial general-
purpose models that may deal with a wide variety of problems.
These software packages are called CFD (Computational Fluid
Dynamics) solvers and are rapidly spreading in many disciplines.
2
What is CFD?
Computational Fluid Dynamics (CFD) is the science of predicting fluid
flow, heat transfer, mass transfer, chemical reactions, and related
phenomena by solving mathematical equations that represent physical
laws, using a numerical process.
The result of CFD analyses is relevant engineering data:
conceptual studies of new designs
detailed product development
troubleshooting
Redesign
CFD analysis complements testing and experimentation.
Reduces the total effort required in the laboratory.
3
Why CFD?
Experimental methods are costly
Data available throughout the domain
Scale up issues are eliminated
Complex problems can be addressed.
CFD capabilities
Steady state and transient flows
Laminar and turbulent flows
Compressible flows
Heat transfer
Non Newtonian flows
Variable boundary conditions
Rotating frame of reference
Components of CFD
The main stages in a CFD simulation are:
1. Preprocessing
This initial step consists of defining the problem geometry, discretize it in
small control volumes (mesh) and determine the suitable boundary conditions
as well as initial conditions
2. Solver
This step refers to the code execution and includes the monitorization of the
solution..
3. Post processing
This is the final step where we analyze the results obtained from the
simulation.
6
Some commercial meshing packages
Gambit
Ansys-ICEM
Hyper mesh
Pointwise
ADINA
NISA
Some commercial CFD packages
Ansys-Fluent
CFX
Star CCM
COMSOL
FLUIDyn
ANSYS - AQWA
Tools:
Gambit -
preprocessor
To create the geometry
Fluent -
solver manager
To solve the flow equations and
post processing
What can you do with Gambit?
Creating the geometry
Meshing the geometry
Specifying the boundary conditions
Exporting the mesh
10
What can you do with FLUENT ?
Flow problems in 2D and 3D
Compressible & Incompressible
Steady state and time dependent
Variety of material properties
Complex physics & chemistry
Inviscid, viscous, and turbulence models
Multiple and non-inertial reference frames
11
GAMBIT AND FLUENT
12
What is Gambit?
A single, integrated preprocessor for CFD
analysis:
Geometry construction and import
Using ACIS solid modeling capabilities
Using STEP, Parasolid, IGES, etc. import
Cleanup and modification of imported data
Mesh generation for all Fluent solvers
Structured and Unstructured hexahedral, tetrahedral,
pyramid, and prisms.
Mesh quality examination
Boundary zone assignment
13
Operation
General sequence of operations
Geometry Creation (ACIS, STEP, Parasolid, IGES
or Mesh import )
Create full geometry
Decompose into mesh-able sections
Meshing
Local meshing: Edge and Boundary layers
Global meshing: Face and/or Volume
Mesh examination
14
Files in Gambit
GAMBIT directory and files
When GAMBIT starts up, it creates a directory called GAMBIT.#
# = the process number
It also creates a lock file, ident.lok, in the working directory
ident.lok prevents any user from starting up another session
using the same identifier in the same directory. If the code
crashes, this file needs to be manually removed.
Three files are created inside this directory
ident.dbs
= the database. All information will be saved
in this
file. This file is NOT retrievable upon a
jou
=
crash
15
trn
the journal file. This file is directly
accessible from
the Run journal form
Journal File:
Executable list of Gambit commands
Created automatically by Gambit from GUI and TUI.
Can be edited or created externally with text editor.
Journals are small - easy to transfer, e-mail, store
Uses:
Can be parameterized, comments can be added
Easy recovery from a crash or power loss
edit existing commands to create new ones
16
Main Menu
bar
17
Command line
Operation toolpad
Description
window
Global Control
Vertex
Edge
Face
Volume
Group
18
Boundary Layer
Edge
Face
Volume
Group
Boundary Types
Boundary Entity
Continuum
Types
Continuum
Entity
Coordinate
Systems
Sizing Function
G/Turbo
User-Defined Tools
Defining the Model
Problem Identification and PreProcessing
1. Define your modeling goals.
2. Identify the domain you will model.
3. Design and create the grid
Gas
Cyclon
e
Riser
How will you isolate a piece
of the complete physical
system?
Where will the
computational domain begin
and end?
Do you have boundary
19
condition information at
these boundaries?
L-valve
Gas
Defining the Model
Problem Identification and PreProcessing
1. Define your modeling goals.
2. Identify the domain you will model.
3. Design and create the grid.
What results are you looking for, and how will they
be used?
What are your modeling options?
What physical models will need to be included in your
analysis?
What simplifying assumptions can you make?
Do you require a unique modeling capability?
User-defined functions (written in C) in FLUENT 6
What degree of accuracy is required?
20
How quickly do you need the results?
Defining the Mesh
Problem Identification and PreProcessing
1. Define your modeling goals.
2. Identify the domain you will model.
3. Design and create the grid.
triangle
quadrilateral
Can you use a quad/hex grid or should you
use a tri/tet grid or hybrid grid?
How complex is the geometry and
flow?
Will you need a non-conformal
interface?
What degree of grid resolution is required
21
tetrahedro
n
hexahedro
n
pyramid
prism/wedge
in each region of the domain?
Is the resolution sufficient for the
geometry?
Can you predict regions with high
gradients?
Will you use adaption to add
resolution?
Do you have sufficient computer
Defining the solver - FLUENT
Solver Execution
4. Set up the numerical model.
5. Compute and monitor the
solution.
For a given problem, you will need to:
Select appropriate physical models.
Turbulence, combustion,
Solving initially in 2D will
provide valuable experience
with the models and solver
settings for your problem in
a short amount of time.
22
multiphase, etc.
Define material properties.
Fluid
Solid
Mixture
Prescribe operating conditions.
Prescribe boundary conditions at all
boundary zones.
Provide an initial solution.
Set up solver controls.
Set up convergence monitors.
Solver Execution
4. Set up the numerical model.
5. Compute and monitor the
solution.
A converged and gridindependent solution on a
well-posed problem will
provide useful
engineering results!
23
The discretized conservation equations are
solved iteratively.
A number of iterations are usually required to reach a
converged solution.
Convergence is reached when:
Changes in solution variables from one iteration
to the next are negligible.
Residuals provide a mechanism to help
monitor this trend.
Overall property conservation is achieved.
The accuracy of a converged solution is dependent
upon:
Appropriateness and accuracy of physical models.
Grid resolution and independence
Problem setup
Visualizing the Results
Post-Processing
6. Examine the results.
7. Consider revisions to the model.
Examine results to ensure
property conservation and
correct physical behavior.
High residuals may be
attributable to only a few
cells of poor quality.
24
Examine the results to review solution and
extract useful data.
Visualization Tools can be used to answer
such questions as:
What is the overall flow pattern?
Is there separation?
Where do shocks, shear layers, etc.
form?
Are key flow features being resolved?
Numerical Reporting Tools can be used to
calculate quantitative results:
Forces and Moments
Average heat transfer coefficients
Surface and Volume integrated
quantities
Flux Balances
THANK YOU
25