2. 7/22/2019 2
Fluid Dynamics
• Fluid Dynamics is both interesting & challenging field for study and research. In real world
almost everywhere fluid is present. So, we need fluid dynamics to describe or model these
fluid flows.
• In brief any fluid flow can be solved/Described by three basic physical law, or by three
equations.
1. Continuity equation- Mass is conserved.
2. Momentum equation (Widely knows as Navier-Stokes equation)- Newton’s Second Law
3. Energy equation- Energy is conserved
3. 7/22/2019 3
Problem Solving Approach
Any problem/phenomena can be analyzed by three ways
1. Analytical/Theoretical approach - using laws/theories and associated equations, such as
using Newton’s law of viscosity to solve a fluid flow problem, these solutions are exact.
2. Experimental approach - do experiments and try to understand the phenomena and
relation between various variables, such as wind tunnel experiments which helps to design
and optimize external shape of airplanes, ships, automobiles etc.
3. Numerical approach -Solve a fluid flow problem using numerical techniques. These
solutions are approximate, not exact.
4. 7/22/2019 4
What is CFD
• Computational Fluid Dynamics (CFD) is a set of numerical methods applied to obtain
approximate solutions of problems of fluid dynamics and heat transfer.
• So, CFD is not a science by itself, it is a way to apply the methods of one discipline
(numerical analysis) to another (fluid flow/mass transfer and heat transfer).
• CFD solutions are not exact. Experimental approach is more reliable
“CFD is used because there are many engineering problems that can’t be solved by
analytical or Experimental approach, or it is difficult to use analytical or experimental
approach.”
5. 7/22/2019 5
Approaches
• Theoretical approach: This approach gives exact solution which is a great advantage. But
analytical solutions are only possible for a limited number of problems, usually
formulated in an artificial, idealized way.
• Experimental approach: These approaches are reliable, and depict real world situations.
• For example, in aerospace industries Wind Tunnel experiments are very reliable. But
some times these are very expensive, and some times these also have some technical
difficulties (Sometimes it takes several years before an experiment is set up and all
technical problems are resolved).
6. 7/22/2019 6
Problem solving using commercial
CFD packages
• CFD codes are structured around the numerical algorithms that can tackle fluid flow
problems.
• In order to provide easy access to their solving power all commercial CFD packages
include sophisticated user interfaces to input problem parameters and to examine the
results. Hence all codes contain three main elements:
1. A Pre-Processor
2. A solver and
3. A Post Processor
7. 7/22/2019 7
…Terminology
• Pre-processor: This step includes creating Geometry and Mesh.
• Solver: This part is to numerically solve the fluid flow equations in the computational
domain.
• Post-Processor: In this steps, result of simulation is analyzed, or represented in useful
form.
• In ANSYS WORKBENCH, Design Modeler & Meshing works as pre-processor, FLUENT is the
Solver, and CFD-post is the postprocessor.
8. 7/22/2019 8
Methods of CFD
• There are three basic methods to solve problem in CFD.
1. Finite difference method
2. Finite element method
3. Spectral methods
• Finite Volume Method is a special case of Finite difference method. It is a very popular
method.
9. 7/22/2019 9
FLUENT
• ANSYS, Inc. is an engineering simulation software (computer-aided engineering, or CAE)
developer headquartered south of Pittsburgh in the South pointe business park in Cecil
Township, Pennsylvania, United States.
• One of its most significant products is Ansys CFD, a proprietary computational fluid
dynamics (CFD) program (Source-Wikipedia).
• ANSYS FLUENT is one of the most popular commercial CFD software packages. We will
use ANSYS FLUENT to solve Engineering problems.
10. 7/22/2019 10
Ansys Fluent CFD solver
• ANSYS FLUENT CFD Solver is based on the Finite Volume method
• Domain is discretized into a finite number of control volumes.
• General conservation (transport) equations for mass, momentum, energy, species, etc.
are solved on this set of control volumes
11. 7/22/2019 11
FLUENT applications:
• External/internal automotive flows
and
• in-cylinder flows
• High-speed aerodynamics
• Rocket flows
• Turbomachinery
• Chemical reactors
• Cyclones
• Bubble columns
• Mixing vessels
• Fluidized beds
• Flow-induced noise
• Moving and dynamic mesh
• Many more
12. 7/22/2019 12
Application of CFD
• CFD is a very powerful technique and spans a wide a wide range of industrial and non-
industrial applications. Some examples are –
• Aerodynamics of aircrafts and vehicles: Drag & Lift
• Power plant: Combustion in internal combustion engines & Gas turbines.
• Hydrodynamics of ships
• Biomedical engineering: Blood flow through arteries and veins
• Environmental engineering: distribution of pollutants
• In a nutshell, CFD is applied in almost every disciplines of Engineering. From the 1960s
onwards Aerospace industries has integrated CFD techniques in the design, R&D, and
manufacturing of
• Aircrafts and Jet engines.
13. 7/22/2019 13
Steps solving problem by ANSYS
FLUENT
• To solve Engineering problems using ANSYS FLUENT the necessary steps are-
1. Pre-analysis
2. Geometry
3. Mesh
4. Physical Setup
5. Numerical Solution
6. Verification & Validation
Pre-
Analysis
Geometry Mesh
Physical
Set-up
Numerical
Solution
Verification
& Validation
14. 7/22/2019 14
Pre-Analysis
• Pre-Analysis: You want to solve a real world Engineering problem numerically using
ANSYS FLUENT.
• Then you will need boundary condition. You will observe the real physical situation, or
you will obtain data so that you Can represent the actual case. You will also obtain
corresponding theoretical or experimental results to compare it will your simulation.
• These steps are important, especially to obtain the correct boundary condition. For
example, if you want to simulate airflow over the wing of a commercial airplane you have
to know the range of speed for that wing, you will also look for previous experimental or
numerical results, and the relevant theories.
15. 7/22/2019 15
Geometry & Meshing
• Geometry: You have to make the geometry. You can use ANSYS design modeler software,
which you can use from ANSYS WORKBENCH. You can also use any other CAD Software
you like, such as AutoCAD, Solid works, CATIA, AutoCAD Inventor etc.
• Meshing: Meshing is one of the most important step for your simulation. Simulation
results depend on Mesh quality. Low quality Mesh can produce poor simulation result,
even divergence.
• These steps are pre-possessing.
16. 7/22/2019 16
Physical Set-up
• Physical Setup: It is done in the solver ANSYS. Your concentration will be to understand
and perform physical setup, numerical result, and Verification & Validation.
• In physical setup step, you give inputs for solution accuracy, boundary condition, physics
involved, material involved, properties of involved etc. In a nutshell, here you
numerically depict the real situation you want to simulate.
17. 7/22/2019 17
Selection of Fluent template in Ansys Workbench
ANSYS WORKBENCH >>> Analysis systems >>> Fluid Flow(FLUENT)
• This tree showing the all the steps you have to complete for a successful simulation. Now you can skip Geometry &
Meshing. You will start from Setup tab which is physical setup.
18. 7/22/2019 18
Solver Execution
The menus are arranged such that the order of operation is generally left to right.
1. Read and scale the mesh file.
2. Select physical models.
3. Define material properties.
4. Prescribe operating conditions.
5. Prescribe boundary conditions.
6. Provide an initial solution.
7. Set solver controls.
8. Set up convergence monitors.
9. Compute and monitor solution.
Post-processing
1. Feedback into the solver
2. Engineering analysis
Mesh file Physical
Model
Operating
conditions
Boundary
conditions
Initial
solutions
Solver
controls
Convergence
control
Compute
Post-processing
19. 7/22/2019 19
Steps To Be Followed In FLUENT SOLVER
1. Reading the Mesh – Components
2. Reading the Mesh – Zones
3. Scaling the Mesh and Selecting Units
4. Reordering and Modifying the Grid
5. Polyhedral Mesh Conversion (if required but not mandatory)
6. Profile Data and Solution Data Interpolation
7. Setting Material Properties
8. Materials Databases
9. Setting Operating Conditions
10.Solver Execution
20. 7/22/2019 20
Starting of Fluent
• Here you have to specify you solver about your
geometry(2D/3D), and accuracy you want(click
double precision if you want better accuracy)
• Unmarking double precision makes the solver single
precision, it means FLUENT will use 16-bit floating
points for its calculation. Double precision solver
uses 32-bit floating points.
• Processing Options are to speed up your simulation,
and using full power of your cluster computer or
your fancy desktop which is a fun. If you select only
1 core of your computer’s processor will be used,
although your desktop(i7 4790k) may has 8
cores/threads.
• By selecting parallel you can select how many
cores/threads you want to use. However, to use
more than one core you need additional license
from ANSYS.
22. 7/22/2019 22
Step by Step inputs providing tabs
These tabs allow you to
describe your problem’s
physics and control your
simulation. For this course,
our current objective is to
be familiar with these tabs,
know some details about
them and use them for a
successful simulation. These
will be discussed
briefly.
First you have to deal with this
tab. Here you will define general
type of your case, for example
time is steady/transient.
23. 7/22/2019 23
Solver types
Two types of solvers are available-
1. Pressure based &
2. Density based
• You can remember a rule of thumb, if density is not
changing then you will use Pressure based solver.
• Pressure based solver is the default, and should used for
most cases, handles the Mach number in the range 0~2-
3.
• For solving higher Mach number problems, Density
based solver are used. Or they are used for special cases,
for example, to capture interacting shock waves.
24. 7/22/2019 24
Solvers
• There are two kinds of solvers available in
FLUENT
- Pressure-based solver
- Density-based coupled solver (DBCS)
25. 7/22/2019 25
Pressure based solver
• The pressure-based solvers take momentum and pressure (or pressure correction) as the
primary variables.
• Pressure-velocity coupling algorithms are derived by reformatting the continuity
equation
• Two algorithms are available with the pressure-based solvers:
- Segregated solver – Solves for pressure correction and momentum sequentially
- Coupled Solver (PBCS) – Solves pressure and momentum simultaneously.
- Note: the pressure-based solvers are implicit
26. 7/22/2019 26
Density based solver
• Density-Based Coupled Solver – equations for continuity, momentum, energy, and
species, if required, are solved in vector form.
• Pressure is obtained through the equation of state.
• Additional scalar equations are solved in a segregated fashion.
• The density-based solver can use either an implicit or explicit solution approach:
• Implicit – Uses a point- implicit Gauss- Seidel / symmetric block Gauss-Seidel/ ILU
method to solve for variables.
• Explicit - uses a multi-step Runge- Kutta explicit time integration method
27. 7/22/2019 27
Models Available
• Fluid flow and heat transfer
-Momentum, continuity, energy equations
-Radiation
• Turbulence
-RANS-based models (Spalart-Allmaras, k–ε, k–ω,
Reynolds stress)
-Large-eddy simulation (LES) and detached eddy
simulation (DES)
28. 7/22/2019 28
• Species transport
• Volumetric reactions
-Arrhenius finite-rate chemistry
-Turbulent fast chemistry Eddy Dissipation, non-Premixed, premixed, partially premixed
Turbulent finite-rate chemistry EDC, laminar flame let, composition PDF transport Surface
Reactions
29. 7/22/2019 29
• Multiphase flows
-Discrete Phase Model (DPM)
-Volume of Fluid (VOF) model for immiscible fluids
-Mixtures
-Eulerian-Eulerian and Eulerian-granular
-Liquid/Solid and cavitation phase change
• Moving and deforming mesh
-Moving zones ,Single and multiple reference frames(MRF)Mixing plane model Sliding mesh model
-Moving and deforming (dynamic) mesh (MDM)
• User-defined scalar transport equations
30. 7/22/2019 30
Assigning Materials
• This tab is like a inventory. You can use the edit/create
button to copy any material from ANSYS database, or
edit properties of the selected material. Here you will
keep all the material you are working with, or you want
to work in future.
31. 7/22/2019 31
Cell Zones – Fluid
• A fluid cell zone is a group of cells for which all active
equations are solved.
• Fluid material selection is required. For multiple species
or multiphase flows, the material is not shown. Instead,
the fluid zone consists of the mixture of the phases.
• Optional inputs allow specification of source terms.
Mass, momentum, energy, UDS, etc.
• Define the fluid zone as laminar flow region if trying to
model transitional flow.
• Can define the zone as porous media.
• Define axis of rotation for rotationally periodic flows.
• Can define motion of the fluid zone.
Here you will select material form the
material zone, to your cell zone. First,
you have to select the zone for
modification, then select the material
type from the option tab called type ,
then press edit to select the material.
32. 7/22/2019 32
Cell Zones – Solid
• A solid zone is a group of cells for which only heat conduction problem solved
- No flow equations are solved.
- Material being treated as solid may actually be fluid, but it is assumed that no convection
occurs.
• Only required input is the material name defined in the materials (solid) panel.
• Optional inputs allow you to set volumetric heat generation rate (heat source).
• Need to specify rotation axis if rotationally periodic boundaries adjacent to solid zone.
• Can define motion for solid zone
33. 7/22/2019 33
Defining Boundary conditions
• To define a problem that results in a unique solution, you must specify information on
the dependent (flow) variables at the domain boundaries Specify fluxes of mass,
momentum, energy, etc. into the domain.
• Defining boundary conditions involves: Identifying the location of the boundaries (e.g.,
inlets, walls, symmetry).Supplying information at the boundaries
• The data required at a boundary depends upon the boundary condition type and the
physical models employed.
• You must be aware of the information that is required of the boundary condition and
locate the boundaries where the information on the flow variables are known or can be
reasonably approximated
• Poorly defined boundary conditions can have a significant impact on your solution
34. 7/22/2019 34
Available Boundary Condition Types
External faces :
• General – pressure inlet, pressure outlet
• Incompressible – velocity inlet, outflow
• Compressible – mass flow inlet, pressure far field, mass flow outlet
• Other – wall, symmetry, axis, periodic
• Special – inlet vent, outlet vent, intake fan, exhaust fan
Cell zones
• Fluid
• Solid
• Porous media
• Heat exchanger
Internal faces : Fan, interior, porous jump, radiator, wall
You have to use the type, edit options to
assign the boundary conditions.
35. 7/22/2019 35
General Guidelines
• If possible, select boundary location and shape such that flow either goes in or out. Not
necessary, but will typically observe better convergence
• Should not observe large gradients in direction normal to boundary. Indicates incorrect
set-up.
• Minimize grid skewness near the boundary. Otherwise it would introduce error early in
calculation.
36. 7/22/2019 36
Changing Boundary Condition Types
• Zones and zone types are initially defined in pre-processor.
• To change zone type for a particular zone
• Choose the zone name in Zone list.
• Can also select boundary zone using right mouse button in the grid display.
• Select new zone type in the Type list.
• Define Boundary Conditions…
37. 7/22/2019 37
Setting Boundary Condition Data
• Explicitly assign data in BC panels
• Boundary condition data can be stored and retrieved from a file using TUI commands :
/file/write-bc, /file/read-bc
• Boundary conditions can also be defined by UDFs and profiles
• Profiles can be generated by: Writing a profile from another CFD simulation. Creating an
appropriately formatted text file with boundary condition data.
38. 7/22/2019 38
Inlet details
Velocity Inlet
• Velocity Specification Method(magnitude ,
normal to boundary, magnitude and direction)
• Velocity profile is uniform by default
• Intended for incompressible flows: Using
velocity inlets in compressible flows can lead
to non-physical results.
• Can be used as a “velocity outlet” by specifying
negative velocity. You must ensure that mass
conservation is satisfied if multiple inlets are
used.
Mass Flow inlet
• Required information: Mass Flow Rate or Mass
Flux. Mass Flow Rate implies uniform mass flux.
Mass Flux can be defined using profile or UDF.
Supersonic/Initial Gauge Pressure
• Static pressure where flow is locally supersonic,
ignored if subsonic.
• Will be used if flow field is initialized from this
boundary.
• Total Temperature (on Thermal tab)
• Used as static temperature for incompressible
flow.
• Direction Specification Method
39. 7/22/2019 39
Pressure Inlet :
• Gauge Total Pressure: Defines energy to drive flow. Doubles as back pressure (static gauge) for cases where
backflow occurs. Direction of back flow determined from interior solution.
- Supersonic/Initial Gauge Pressure
- Total Temperature : Used as the static temperature for incompressible flow.
- Inlet flow direction
• Note that gauge pressure inputs are required.
- Operating pressure level may sometimes affect solution accuracy (when pressure fluctuations are relatively
small). To set the operating pressure:
• Suitable for compressible and incompressible flows.
• Pressure inlet boundary is treated as loss-free transition from stagnation to inlet conditions.
• FLUENT calculates static pressure and velocity at inlet
• Mass flux through boundary varies depending on interior solution and specified flow direction.
• Can be used as a “free” boundary in an external or unconfined flow.
40. 7/22/2019 40
Pressure Outlet
• Gauge Pressure (static)
- Interpreted as static pressure of environment into which flow exhausts.
- Radial equilibrium pressure distribution option available
- Doubles as inlet pressure (total gauge) for cases where backflow occurs
• Backflow quantities :Can occur at pressure outlet either during iterations or as part of
final solution. Backflow Direction Specification Method. Backflow boundary data must
be set for all transport variables. Convergence difficulties can be reduced by providing
realistic backflow quantities
• Suitable for compressible and incompressible flows :Specified pressure is ignored if flow
is locally supersonic at the outlet. Can be used as a “free” boundary in an external or
unconfined flow
• For ideal gas (compressible) flow, non-reflecting outlet boundary conditions (NRBC) are
available
41. 7/22/2019 41
Outflow
• No pressure or velocity information is required
- Data at exit plane is extrapolated from interior
- Mass balance correction is applied at boundary
• Flow exiting outflow boundary exhibits zero normal diffusive flux for all flow variables.
Appropriate where the exit flow is fully developed.
• The outflow boundary is intended for use with incompressible flows. Cannot be used
with a pressure inlet boundary (must use velocity-inlet). Combination does not uniquely
set pressure gradient over whole domain.
• Poor rate of convergence when backflow occurs during iterations. Cannot be used if
backflow is expected in the final solution
42. 7/22/2019 42
Other Inlet / Outlet Boundary Conditions
• Pressure Far Field : Used to model free-stream compressible flow at infinity, with
prescribed static conditions and the free-stream Mach number. Available only when
density is calculated using the ideal gas law.
• Target Mass Flow Rate : option for pressure outlets
• Exhaust Fan / Outlet Vent : Models an external exhaust fan or outlet vent with specified
pressure rise / loss coefficient and ambient (discharge) pressure and temperature
• Inlet Vent / Intake Fan : Models an inlet vent / external intake fan with specified loss
coefficient / pressure rise, flow direction, and ambient (inlet) pressure and temperature
• Inlet boundary conditions for large-eddy / detached-eddy simulations are in the
Turbulence Modeling
43. 7/22/2019 43
Wall Boundaries
• Used to bound fluid and solid regions
• In viscous flows, no-slip condition enforced at walls :Tangential fluid velocity equal to
wall velocity. Zero normal velocity Component. Shear stress can also be specified
• Thermal boundary conditions :Wall material and thickness can be defined for 1D or shell
conduction heat transfer calculations
• Wall roughness can be defined for turbulent flows : Wall shear stress and heat transfer
based on local flow field
• Translational or rotational velocity can be assigned to wall boundaries
44. 7/22/2019 44
Periodic Boundaries
• Used to reduce the overall mesh size.
• Flow field and geometry must contain either rotational or translational periodicity.
• Rotational periodicity
- ΔP = 0 across periodic planes.
- Axis of rotation must be defined in fluid zone.
• Translational periodicity
- ΔP can be finite across periodic planes.
- Models fully developed conditions.
- Specify either mean ΔP per period or net mass flow rate.
- Periodic boundaries defined in GAMBIT are translational
45. 7/22/2019 45
Porous Media Conditions
• Porous zone modeled as special type of fluid zone.
- Enable Porous Zone option in the Fluid panel.
- Pressure loss in flow determined via user inputs of resistance coefficients to lumped
parameter model
• Used to model flow through porous media and other “distributed” resistances.
For example,
- Packed beds
- Filter papers
- Perforated plates
- Flow distributors
- Tube banks
46. 7/22/2019 46
Internal Face Boundaries
• Defined on the cell faces only:
- Thickness of these internal faces is zero
- These internal faces provide means of introducing step changes in flow properties.
• Used to implement various physical models including:
- Fans
- Radiators
- Porous-jump models :Preferable over porous media for its better convergence behavior
• Interior walls
47. 7/22/2019 47
Summary of zones
• Zones are used to assign boundary conditions.
• Wide range of boundary conditions permit flow to enter and exit the solution domain.
• Wall boundary conditions are used to bound fluid and solid regions.
• Periodic boundaries are used to reduce computational effort.
• Internal cell zones are used to specify fluid, solid, and porous regions and heat-exchanger
models.
• Internal face boundaries provide way to introduce step-changes in flow properties.
50. 7/22/2019 50
Fluent & CFD(cfx)
• FLUENT – General purpose CFD solver for a wide range of industries
• FLUENT for Catia – FLUENT is embedded in Catia 5 to allow CFD to be
done in the Catia PLM environment.
• ANSYS CFX – General purpose CFD solver, including the coupled, parallel ANSYS CFX
solver
• ANSYS ICEM CFD – Powerful meshing tools with general pre- and post-processing
features, including ICEM CFD for generating complex CFD grids and AI*Environment for
creating sophisticated structural FEA meshes
51. 7/22/2019 51
Some common operations are aliased to simple TUI(text user interface)
commands:
• ls Lists the files in the working directory
• rcd Reads case and data files
• wcd Writes case and data files
• rc/wc Reads/writes case file
• rd/wd Reads/writes data file
• it Iterate
52. 7/22/2019 52
For 2D Solver
• Left button translates/pans (dolly)
• Middle button zooms
• Right button selects/probes
For 3D Solver
• Left button rotates about 2 axes
• Middle button zooms
• Middle click on point in screen
centers point in window
• Right button selects/probes
Mouse button functionality depends on the chosen solver (2D / 3D) and
can be configured in the solver
Default settings of Mouse
53. 7/22/2019 53
Reading the Mesh – Components
• Components are defined in the preprocessor and stored in the mesh file.
• Cell – The control volumes into which the domain is discretized.
• Computational domain is defined by mesh that represents the fluid and
solid regions of interest.
• Face – The boundaries of cells
• Edge – Boundary of a face
• Node – Edge intersection / grid point
• Zone – Grouping of nodes, faces, and/or cells.
• Boundary data is assigned to face zones.
• Material data and source terms are assigned to cell zones.
54. 7/22/2019 54
Other steps
• Scaling the Mesh and Selecting Units : Any “mixed” units system can be used if desired. By
default, FLUENT uses the SI system of units (specifically, MKS system).
• Reordering and Modifying the Grid : The grid can be reordered so that neighboring cells
are near each other in the zones and in memory.
• The face/cell zones can also be modified by the following operations in the Grid menu:
• Separation and merge of zones
• Fusing of cell zones with merge of duplicate faces and nodes
• Translate, rotate, reflect face or cell zones
• Extrusion of face zones to extend the domain
• Replace a cell zone with another or delete it
• Activate and Deactivate cell zones
55. 7/22/2019 55
• Polyhedral Mesh Conversion (if required but not mandatory)
• Profile Data and Solution Data Interpolation :Profile files are data
files which contain point data for selected variables on particular face
zones, and can be both written and read in a FLUENT session.
Similarly, Interpolation data files contain discrete data for selected
field variables on particular cell zones to be written and read into
FLUENT.