You are on page 1of 33

# BMM 4783

Introduction to CFD
Chapter 1
Introduction to CFD
What is CFD and its history?

experimental

## Stages of CFD modeling

Introduction
What is CFD?
Prediction of fluid flow and heat transfer with the complications of
simultaneous fluid flow, heat transfer, mass transfer, phase change,
chemical reaction, etc by solving the mathematical equations which
govern these processes using a numerical process.

## CFD is predicting what will happen, quantitatively, when fluids

flow, often with the complications of:
simultaneous flow of heat,
mass transfer (eg perspiration, dissolution),
phase change (eg melting, freezing, boiling),
chemical reaction (eg combustion, rusting),
mechanical movement (eg of pistons, fans, rudders),
stresses in and displacement of immersed or surrounding solids.
History of CFD

## Since 1940s analytical solution to most fluid dynamics problems

was available for idealized solutions. Methods for solution of
ODEs or PDEs were conceived only on paper due to absence of
personal computer.
Daimler Chrysler was the first company to use CFD in Automotive
sector.
Speedo was the first swimwear company to use CFD.
There are number of companies and software's in CFD field in the
world. Some software's by American companies are FLUENT,
TIDAL, C-MOLD, GASP, FLOTRAN, SPLASH, Tetrex,
ViGPLOT, VGRID, etc.
Why we use CFD?

## Analysis and Design

Morecost effective and more rapid than EFD
CFD provides high-fidelity database for diagnosing flow field
2. Simulation of physical fluid phenomena that are difficult for
experiments
Full scalesimulations (e.g., ships and airplanes)
Environmental effects (wind, weather, etc.)
Physics (e.g., planetary boundary layer, stellar evolution)

## Knowledge and exploration of flow physics

Modern engineers apply both experimental and CFD analyses, and the
two complement each other. For example, engineers may obtain global
properties, such as lift, drag, pressure drop, or power, experimentally, but
use CFD to obtain details about the flow field, such as shear stresses,
velocity and pressure profiles, and flow streamlines.
In addition, experimental data are often used to validate CFD solutions by
matching the computationally and experimentally determined global
quantities.
CFD is then employed to shorten the design cycle through carefully
controlled parametric studies, thereby reducing the required amount of
experimental testing.

6
Application of CFD (WHERE?)
CFD can be used in many applications involving flow and heat
transfer. Some of the applications include:
Engineering
Environment
Architecture and building science
Biomedical
Other phenomena or features

1. Engineering
Automotive
Aerospace

## Temperature and natural convection

currents in the eye following laser
heating. 7
Chemical Processing
Streamlines for workstation
Polymerization reactor vessel - prediction ventilation
of flow separation and residence time
effects. HVAC Power Generation

Marine Sports 8
2. Environment

## Transient tidal flow into, and out

Persian Gulf - Oil-slick Simulation of a harbour (harbour pollution)

## Fire and smoke in a multi-story

building

9
How does CFD make predictions?

## CFD uses a computer to solve the relevant science-based

mathematical equations, using information about the circumstances in
question. Its components are therefore:
the human being who states the problem,
scientific knowledge expressed mathematically,
the computer code (i.e, software) which embodies this knowledge
and expresses the stated problem in scientific terms,
the computer hardware which performs the calculations dictated
by the software, and
the human being who inspects and interprets their results.

10
Are CFD prediction results reliable?

## Computer codes and/or softwares are commonly used for the

making of predictions about what flow phenomena,
temperature distributions, etc, will actually occur in
prescribed circumstances of interest to its user, who usually
wishes to be assured that the predictions will turn out to be
correct.
Such assurances, when given, are usually based upon
arguments of one or both of two kinds, namely:-

## a) inherent probability; and

b) validation.
a. Inherent probability

## High inherent probability of correctness attends predictions which:-

are based upon sufficiently precise formulations of the geometry
and of the initial and boundary conditions;
are performed with sufficiently fine grids;
converge so as make the remaining imbalances in the equations
sufficiently small;
are based upon appropriate physical models;
involve only phenomena of which the physical laws are well-
described by the formulae embodied in the software.

## The sufficiency implied in the first three conditions is of course for

the user to judge; and often there is no way to be certain except by
performing further calculations

12
Moreover, uncertainty about which model is best for given
circumstances increases when any of the following phenomena make
their appearance:
low-Reynolds number effects;
body forces (eg buoyancy, or strong swirl);
kinetic-heating and compressibility effects;
chemical reaction;
free surfaces (eg between air and water);
multi-phase phenomena, involving the intermingling of droplets,
bubbles and solid particles.

13
b. Validation

can be made by comparing the predicted results with reliable
experimental data.
Usually no data can be found which fit exactly the circumstances in
which the user is interested; for, if they did, he would not be
seeking to make computer predictions at all. However, the nearer
are the conditions of the experiment to those which concern the
user, and the more closely the CFD predictions agree with those
data, the greater will be the reliance which can be prudently placed
on the predictions.
Many CFD predictions are subjected to many such validation tests;
and most of the results are reported in many places, for example in
the Journals and other publications.

14
Basic ingredients of CFD

conditions

## 4. Solve and visualize

Computer-based Analysis Tools
Within a given class of flow problems, say for example those
that have a flow which can be taken to be viscous and
incompressible, general computer software can be written to
produce solutions to the governing equations and this
software is not problem-specific.
Many industrial organisations require information on flow
situations and so they either write their own CFD simulation
program (e.g., using Matlab) or they buy one of the software
packages written by a specialist software company. As there
is a growing commercial market for these programs there are
several available.
Regardless of the software being used there is a clearly
defined set of stages that make up the analysis process.
Generally, the following are required if a solution for any
fluid flow problem is to be produced:
a grid of points, or a set of volumes or elements, at which to
store the variables that need to be calculated
boundary conditions that enable the boundary values of the
variables to be calculated
initial conditions that define the initial state of the flow for a
transient problem or define the first guess to the variables for a
fluid properties that appear in the equations such as density and
viscosity and perhaps some turbulence quantities
control parameters that affect the numerical solution of the
equations
Computer Hardware for CFD

## In the world of engineering computation it is common to

classify computers by their performance in terms of some
measure of calculation speed.
Speed can be measured in units based on the number of
instructions that a processor can execute per second or the
number of floating point operations that a system can handle
per second.
Common units are mips or millions of instructions per second
and MFLOPS or millions of floating point operations per
second.
These measures can give a user some idea of the throughput
of a machine but they say nothing about the ways in which
the systems operate with a particular numerical software
package.
This is very important when we consider the CFD analysis
process as the execution of calculations is only one part of the
process of producing a final solution.
Other features such as the speed of access of data are equally
important to the overall speed of the calculation.
If we consider the operational characteristics of the computers
that are used to perform CFD calculations we can divide the
computer types into the following five categories:
i. Personal computers:- These are standalone systems
containing a central processor, some random access memory
(RAM) and some disk storage. Usually they have single-
user operating systems.
ii. Workstations:- These are machines that have a central
processor, local RAM storage, and multi-user operating
systems. These are packaged together with a high resolution
graphics display.
iii. Mini-computers:- These are machines with a central
processor, large amounts of RAM storage and a central data
storage system. They have multi-user operating systems and
are used by several people simultaneously who gain access
to the system by using terminals.
iv. Mini-supercomputers:- These are effectively super
workstations, with very good graphics performance and
near-supercomputer numerical performance. Again they are
usually part of a network.
v. Supercomputers:- Designed to handle numerical data in the
fastest possible way, these machines are dedicated to the
task of running numerical simulations. They are large high
technology devices often with multiple processors and
extremely large amounts of RAM storage to reduce the need
for the machine to communicate with slower storage devices
when carrying out calculations. To enable good graphics
facilities to be used, supercomputers are often networked to
workstations.
When operating or specifying computer hardware it is not
only the computer that has to be considered. In carrying out
the tasks that are part of a CFD analysis, the availability of
various peripheral devices is either a necessity or can be of
great assistance to the analyst, making the analysis process
easier to carry out. These peripherals include:
Secondary data storage devices. When a program is running
the processor accesses data from the RAM storage which is the
primary data storage device. As we shall see later CFD
programs generate large amounts of data and this data needs to
be accessed by the CFD program during the solution of the
numerical equations and by a variety of other programs both
before and after the solution.
Backup devices. To protect the data that CFD programs
generate from loss due to a failure of a disk drive or a disaster
like a machine-room fire, it is necessary to make regular copies
of the data onto some form of backup data store. These can be
demountable hard disks, magnetic tapes or other devices which
can be removed to a safe storage area. Often, this is done
automatically, or is handled by the administrator of the
computing system.
high resolution graphics displays. CFD analyses generate so
much data that, quite often, the only way of analysing the data
over the whole domain is to use some form of graphical
representation.
hardcopy devices. As with most engineering activities report
writing is a necessary evil and so a means of obtaining a
hardcopy of the pictures generated on a graphics device is
necessary.
Suitability of Computer Hardware Types
Hardware Graphics Small Medium Large
Type Jobs Jobs Jobs
Personal
Ok Ok No No
computers
Workstations
Good Good Good No

Mini-computers
Ok Good Good No

Mini-
Good Good Good Ok
supercomputers

No Ok Good Good
Supercomputers
(Expensive)
Commercial Software Packages Used For CFD

## Each software package aimed at the CFD market has to assist

the user in carrying out the tasks that form the analysis
process. This is done by providing, typically, three main
pieces of software:

a pre-processor

a solver

a post-processor

## together with a variety of utility programs.

Commercial Software Packages Used For CFD

## Each software package aimed at the CFD market has to assist

the user in carrying out the tasks that form the analysis
process. This is done by providing, typically, three main
pieces of software:

a pre-processor

a solver

a post-processor

## together with a variety of utility programs.

1. Pre-Processing

All the tasks that take place before the numerical solution
process is started are called pre-processing. This includes the
first three phases of the analysis process namely, thinking,
mesh generation and flow specification.

## Whilst the first phase needs considerable thought, and

considerable engineering judgement, if the physical flow
problem is to be translated into a problem that is solvable by
the CFD software; it does not involve any computing. It is
only when this first phase has been completed that the
computing starts.
To assist in the computational part of the pre-processing
phase, most software packages have a pre-processing
program that can be used to carry out the following
operations:

## set the numerical control parameters.

2. Solving The Equations

## Each package has a program that solves the numerical

equations for the problem under consideration.

This program must be given all the relevant data that has been
defined by the pre-processor. To transfer the data between the
programs, the pre-processor writes out data files that the

computers.

## Although the solver program is the core of any CFD software

system, the user sees little of its operation.
3. Post-Processing Programs

## The post-processing program is used to display the results,

and, as with the pre-processor, this program is interactive and
so usually run on the same machine as the pre-processor.

## Typical pictures obtained with the post-processor might

contain a section of the mesh together with vector plots of
the velocity field or contour plots of scalar variables such as
pressure.

CFD Codes

cfx etc.

etc.

END OF
CHAPTER 1