WHAT IS CFD.

CFD stands for computational fluid dynamics. It was introduced in 1960’s when it was only in
the field of aeronautics and astronautics, but now it is
becoming rapidly adopted methodology for solving
complex problems win modern engineering practices.
basically CFD is derived from disciplines off fluid
mechanics and heat transfer, but now it considered as an
important toll in the areas of chemical, civil and
environmental engineering.

Modern CFD evolved as integration of disciplines of fluid
mechanics, heat transfer and computer science as shown
in figure. Now here in the section below all of these
individual discipline will be defined briefly.

FLUID MECHANICS.

Fluid mechanics is study of behavior of fluids, either at rest or motion. Most of the times we are
interested in the fluids in motion, also called fluid dynamics. The behavior of fluid flow
influences processes that may include heat transfer and chemical reactions etc. Besides this
fluid behavior also shows the effect of flow on the forces and stresses generated in the conduit
in which fluid is flowing.

MATHEMATICS.

Characteristics of fluid motions are described through fundamental mathematical equation,
usually in integral or differential form. These equations govern the flow of fluid and allow us to
calculate the effects of fluid motion on a system, these equations will be discussed in later
sections of this chapter. This is where we need mathematics to solve and understand the
governing equations of fluid mechanics and CFD.

COMPUTER SCIENCE.

In CFD all the governing equations are solved numerically and numerical method for these
equations need high computational power.

In order to solve these equations computer scientists use computer programming languages to
convert the equations into computer program or software packages, which allows us to solve all
of the governing equations numerically while consuming less time and effort.
In order to make good use of CFD, user must have knowledge about fluid mechanics,
mathematics and all the other theory related to the problem he wants to simulate.

BASIC APROACHES TO SOLVE PROBLEMS.

Traditionally experimental and analytical methods were used to study veracious aspects of fluid
dynamics. The arrival of high tech computers, CFD has emerged as third method which can be
used to study fluid dynamics. As shown in figure, all of these three approaches or methods are
strongly interlinked and cannot work in isolation.

CFD needs verification of results either through
analytical methods or by experiments. Sometimes
results obtained from CFD can be ambiguous and
depicted picture could be unrealistic, the data from CFD
results must be verified to ensure that the result are not
defying physics.

Advantage of use of CFD is it allows us to visualize the
whole process through different pictures and
animations. Besides that, some of the designing
processes are iterative, which means high manufacturing and setup cost. In this case CFD not
only reduces the project cost but also reduces the time and effort required to get final result.

CFD SOLUTION PROCEDURE:

With the advent of high power computers and large variety of commercial software, CFD has
become is easy even for new comers to this field of study. Commercial software has inbuilt
codes for simulations which can be used to get the CFD solutions.

These codes are usually structured around robust numerical algorithms that can tackle fluid-
flow problems. In order to get easy access to these codes CFD software are provided with use
interface called GUI, which allows us to get a sight into to the solutions as well as results.

The code that provides a complete CFD analysis consists of following three elements.

1) Pre-processor.
2) Solver.
3) Prost-processor.

domain of all of these elements is shown in figure.
There are many commercial software available, which have all of these elements or any of these
elements. But the basic purpose of the software is to assist the user to get the final results by
requiring minimum effort, cost and time.

One of the most commonly used commercial software is ANSYS. This package contains different
modules or solvers for different types of solution required, but for the fluid flows ANSYS FLUENT
or ANSYS CFX is used. Along with different solvers, different pre-processors and post-processor
are also available for the sake of user friendliness. This all is to be discussed in the coming few
paragraphs.

PRE-PROCESS.

Pre-processor is used to meet all the prerequisites for the solver. These include a well-defined
geometry and generation of mesh or grid generation.

Both the processes of geometry and grid generation will be discussed separately.

GEOMETRY GENERATION.
First step in any CFD analysis is the definition and creation of well-defined geometry. Geometry
that defines all the flow region, walls and solid regions. All the boundary conditions are
specified to the geometry before exporting to the solver.

ANSYS package have provides different modules for the geometry generation, which are.

1) Design modeler.
2) ICEM CFD.
3) BladeGen.

DESIGN MODELER.

This module comes with the ANSYS package and is used to make the geometries or to modify
the existing geometries. Most of the people use this software to define different parts in the
geometry, parts like, walls, flow regions, solids and the other important features of the
geometry.

Sole purpose of design modeler is to make or define different parts geometry. The geometry file
from design modeler can be exported to different file formats like, paralsolid, IGES and STEP etc.

User interface of design modeler allows the access to different features and option on available
to carry out he required operation while making a geometry. Main window of design modeler is
shown in figure.

After making the geometry, design modeler also allows us to name different parts of the
geometry. The process of naming different parts is called “named selection”. Named selection
makes it easy to specify boundary condition in the solver later on. Process of specifying
boundary conditions will be discussed in description of solvers.

ICEM CFD.

Like design modeler, ICEM CFD can also be used for making geometries. But its geometry
generation features are less user friendly than design modeler, but on the other hands it allows
us to generate mesh.

Most of the user make geometry in any other design software and then use ICEM CFD for grid
generation. Boundary condition types can also be specified within ICEM CFD before exporting
the mesh file to solver.

Figures shows some geometry features of a sample problem.

This geometry represents the setup for flow over to cylinders. The outer box represents fluid
flow zone and the cylinder represent solid domain. Rest of the features are labelled.
Besides using the software provided by ANSYS, one can use any other CAD software to make
geometry and export geometry file to ANSYS or any other solver. These CAD software include
SolidWorks, Catia, Proe, Creo and AutoCAD etc.

GRID GENERATION.

The is the second and most important step in the post-process stage. It is the process of division
of domain into number of small volumes. Each volume is called an element. The accuracy of
CFD results is highly effected by number, types and distribution of elements.

Like geometry generation, ANSYS package gives numerous choices for grid generation as well.
Most commonly used are.

1) ANSYS grid generator, also called Tgrid.
2) ICEM CFD.

Along with them other commercial software like Gambit, PointWise etc. can also be used for
grid generation.

As most of the users use ICEM CFD for grid generation, we have also used it for our project. So
only ICEM CFD will be discussed here.

GRID GENERATION IN ICEM CFD.

It is software which come with ANSYS package. As described earlier, it is used not only make
geometry but also for grid generation. Advantage of ICEM CFD over other software is that it
gives authority to make changes to geometry and generate mesh at the same time. While along
with these tasks, all the types of boundary conditions can be assigned before exporting the
mesh file to solver.

TYPES OF MESHES IN ICEM CFD.

ICEM CFD can be used to make both structured (Sometimes also called hexa mesh) and
unstructured mesh (Sometimes called tetra mesh). Structure mesh gives better results but it
demands time and experience. Structured mesh is mostly used for 2D problems or for simple
geometries. Figure shows the example of structured mesh.
On the other side tetra mesh is used when the geometries are complicated and intricate. It
consumes less time as compared to structured mesh but number of elements are increased for
same geometry to get same accurate results as compared to structured mesh. The problem
with tetra mesh is that is requires better local controls and it can give you unrealistic results. So
the interpretation requires more keen observation of results. Figure shows tetra mesh for the
domain in the problem discussed for the geometry generation.

Sometimes geometry is much complicated for only structured or unstructured mesh. The
reason is that the structured mesh is very difficult to generate and tetra unstructured need very
small size mesh in local area. The example is capturing the boundary layer, where pressure and
temperature gradients etc. are very large. In this case we use combination of structured and
unstructured mesh, this type of mesh is called hybrid mesh. Hybrid mesh is shown in figure.
ASSIGNING BOUNDARY CONDITIONS.

One of the advantage of ICEM CFD is that it allows users to assign the boundary condition to the
geometry before exporting it to solver. It makes our work easy when we are working in solver
and specifying different values to boundary conditions.

Different boundary conditions like domains or volumes (Solid or fluid), walls, interfaces, inlets
and outlets, symmetry and periodicity etc. can be assigned.

SOLVER.

Solver is a software which solves the codes of CFD. These codes are the program which are used
to solve all the required equations in order to get the solution. As described earlier all of the
fundamental equation are solved numerically with help of a programming code. Solver allows
user to select and make use of required equations according to the physics of problem which is
being simulated.

Steps to the solution are depicted in the figure.
Before initialization, some numeric values are given to the boundary conditions. This can be
done through GUI of solver. Boundary conditions for our problems are shown in the figure.
Before understanding the working of solver we need some knowledge of all the components of
flow figure shown earlier.

INITIALIZATION AND SOLUTION METHOD.

Initialization acts as some input values for solution methods to get the final solution.

INITIALIZATION.

Most of the CFD solvers are iterative solvers, they assume some value to each of the grid and
then start numerical iterations to get the final solution. The process of assigning this starting
values is called initialization. And these values are called initial conditions.

The value given as initial condition is purely arbitrary, it does not affect final results but the time
required to get final results of required accuracy can be increased or reduced by guessing
appropriate initial conditions.
 If the initial conditions are close to the final solution, the time required to get result with
required accuracy will be reduced.
 If given initial conditions are far away from reality, they time required to get the final
solution will be increased or in extreme cases the solution may crash.

ANSYS FLUENT allows us the give more accurate initial conditions. Some methods of initializing
the solution are given as under.

1) Standard initialization.
2) Hybrid initialization.
3) FMG initialization.

In standard initialization some initial condition, any of our choice, can be given to the solver.
This value is then assigned to every single element or grid. After assuming these values
numerical iterations start in order to get the final solution.

While in the hybrid initialization, some value is assigned to every element and then few
iterations are performed to get some refined initial conditions. Rest of the iterative process for
getting solution is same.

FMG initialization stands for full multigrid initialization. It is not used very often because it
requires more time in refining the initial conditions. It is used when standard and hybrid
initialization fail to give a reasonably stable input to solver, in other word solution crashes.
Unlike the other two, which can be applied by GUI of ANSYS FLUENT, FMG initialization is
applied ty TUI command “solve/initialize/fmg-initialization”.

SOLUTION METHODS.

After giving initial conditions, solver solves the fundamental equations, particularly Navier Stoke
equation, which are in differential form. ANSYS FLUENT gives different methods to solve them,
methods like SIMPLE, SIMPLEC AND COUPLED.

SIMPLE (Semi Implicit Method for pressure Linked Equations) solve pressure for the velocity
calculation for next step or iterations. In other word both pressure and velocity variables are
solved separately, first pressure and then velocity. SIMPLEC or SIMPLER is revised version of
SIMPLE with some pressure corrections added to get better results with reduced computational
time.

Other method which is used to solve the Navier Stoke equations in COUPLED scheme or
method. This method calculates both pressure and velocities in single step for each iteration.
This requires more memory (RAM) to handle all the variables at the same time.
Usually SIMPLE or SIMPLEC method give very much good results but take more iteration steps
to get the final solution but require less memory, while COUPLED needs less iterations to get
final results but more memory. It takes more time per iteration as compared to SIMPLE or
SIMPLEC. COUPLED schemes also gives better accuracy and more stability.

CONVERGENCE AND RESIDUALS:

This step is performed when solver is making calculations based on input data. Convergence is a
measure of imbalances in the results produced by calculations made by solver. Imbalance is
present in the variables which are dealt during calculations. Imbalances are also called as
residuals.

In ANSYS FLUENT the measure of residuals is given on GUI, in the form of a graph or different
lines. Each line in the residual graph represents individual variable. These residual lines give a
track of imbalances in the solution, fall in the lines represents decay in imbalances while rise in
the residual line means increase in instability and imbalances.

Sometime terms convergence or divergence are used to define the behavior or residual lines.
Fall in residuals is considered as convergence and rise is called divergence. Solution is
considered fully converged when residual lines become straight.

CHECKING CONVERGENCE:

Usually only straightening of residual lines is not enough to judge the convergence of solution.
We give different values to residual line to set convergence criteria. These values are based
upon the type of problem which is being solved. For incompressible flows, energy residuals
should be order of 10-6 while rest of residual lines should be around 10 -3. Figure shows the way
to assign convergence criteria to residuals and to read them from the graph during the
calculations.

Besides these residual lines, different monitoring variables like drag, lift and static pressures etc.
can be used for further confirmation of convergence of solutions.

Sometimes residual lines do not meet the criteria of convergence, in this case fluxes like masse
flow and heat transfer must be checked manually. The error for the surface of minimum flux
must be less than 2 percent to get reasonable results.
POST-PROCESSING.

The process of extracting results is included in post-processing. Post-processing includes
obtaining final results in form of numeric values, graph, colors or animations etc.

Different commercial software are available for post-processing, like TECHPlot, Ensight and
FIELDVIEW etc. by ANSYS have its own integrated module which is called CFD post. Or even
FLUENT has its own post-processing module, which can be accessed through FLUENT’s GUI.