(CFD)
Hashim Hasnain Hadi(13ME36)
M. Hanzla Tahir(13ME37)
Sardar Gulshan Lal(13ME39)
AND ALL CLASMATES
Batch 2013-14
Dept. of Mechanical Engineering
Balochistan University of Engineering &
Technology,
Khuzdar.
.
Outline
What is CFD?
Why use CFD?
Where is CFD used?
Physics
Modeling
Numerics
CFD process
Resources
2
What is CFD?
What is CFD and its objective?
3
What is CFD?
Thefield in which computers and numerical
analysis are combined to solve fluid
problems/Energy prblems is termed as
Computational fluid dynamics
4
Why use CFD?
Why use CFD?
– Analysis and Design
Simulation-based design instead of “build & test”
– More cost effectively and more rapidly than with experiments
– CFD solution provides high-fidelity database for interrogation of
flow field
Simulation of physical fluid phenomena that are difficult to be
measured by experiments
– Scale simulations (e.g., full-scale ships, airplanes)
– Hazards (e.g., explosions, radiation, pollution)
– Physics (e.g., weather prediction, planetary boundary layer,
stellar evolution)
– Knowledge and exploration of flow physics
5
Where is CFD used? (Aerospace)
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Wing-Body Interaction Hypersonic Launch Vehicle
6
7
Where is CFD used? (Appliances)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
Surface-heat-flux plots of the No-Frost
– Power Generation refrigerator and freezer compartments helped
BOSCH-SIEMENS engineers to optimize the
– Sports location of air inlets.
8
Where is CFD used? (Automotive)
Interior Ventilation
Engine Cooling 9
Where is CFD used? (Biomedical)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R Medtronic Blood Pump
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Temperature and natural
convection currents in the eye
following laser heating.
10
Where is CFD used? (Chemical Processing)
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation Twin-screw extruder
modeling
– Sports
13
Where is CFD used? (Marine)
14
Where is CFD used? (Oil & Gas)
– Power Generation
– Sports
Flow of lubricating mud
over drill bit 15
Where is CFD used? (Power Generation)
17
Physics
Inviscid Viscous
Laminar Turbulence
Internal External
Compressible Incompressible (airfoil, ship)
(pipe,valve)
(air, acoustic) (water)
D
ρ v = −∇p + µ ∇ v + ρ g
2
Dt
20
Modeling
Mathematical representation of the physical problem
– Some problems are exact (e.g., laminar pipe flow)
– Exact solutions only exist for some simple cases. In
these cases nonlinear terms can be dropped from the N-
S equations which allow analytical solution.
– Most cases require models for flow behavior [e.g.,
Reynolds Averaged Navier Stokes equations (RANS)
or Large Eddy Simulation (LES) for turbulent flow]
Initial —Boundary Value Problem (IBVP), include:
governing Partial Differential Equations (PDEs), Initial
Conditions (ICs) and Boundary Conditions (BCs)
21
Governing Equations
(Equations based on “average” velocity)
∂v ∂ ∂ ∂
+ ρ ux + ρ u y + ρ uz = 0
∂t ∂ x ∂y ∂z
Continuity
∂u ∂u ∂u ∂u ∂p ∂ ∂ ∂
ρ x + u x x + u y x + u z x = − − τ xx + τ yx + τ zx + ρg x
∂t ∂x ∂y ∂z ∂ x ∂x ∂y ∂z
x - Equation of motion
22
Numerics / Discretization
Computational solution of the IBVP
Method dependent upon the model equations and
physics
Several components to formulation
– Discretization and linearization
– Assembly of system of algebraic equations
– Solve the system and get approximate solutions
23
Finite Differences
∂u ui +1, j − ui , j ∂ 2u ( ∆ x ) ∂ 3u ( ∆ x ) 2
= − 2 + 3 +
∂x i , j ∆x ∂x i , j 2 ∂x i , j 6
Methods of Solution
ui +1, j
∂u
= ui , j + ∆ x + 2
∂ u
2
( ∆x )
2
∂u
3
+ 3
( ∆x )
3
+
∂x i , j ∂x i , j 2 ∂x i , j 6
∆x
jmax
j+1
j
∆y
j-1 Taylor’s Series Expansion
u i,j = velocity of fluid
o i-1 i i+1 imax x
26
CFD - how it works
Analysis begins with a mathematical Filling
Nozzle
model of a physical problem. Bottle
inviscid, two-dimensional).
Provide appropriate initial and
boundary conditions for the problem. 27
Geometry description
Typical approaches
– Make assumptions and
simplifications
– CAD/CAE integration
– Engineering drawings
– Coordinates include Cartesian
system (x,y,z), cylindrical system (r,
θ, z), and spherical system(r, θ, Φ)
28
Selection of models for flow field
Direct Numerical Simulations (DNS) is to solve the N-S
equations directly without any modeling. Grid must be fine
enough to resolve all flow scales. Applied for laminar flow
and rare be used in turbulent flow.
Reynolds Averaged Navier-Stokes (NS) equations (RANS)
is to perform averaging of NS equations and establishing
turbulent models for the eddy viscosity. Too many
averaging might damping vortical structures in turbulent
flows
Large Eddy Simulation (LES), Smagorinsky’ constant
model and dynamic model. Provide more instantaneous
information than RANS did. Instability in complex
geometries
Detached Eddy Simulation (DES) is to use one single
formulation to combine the advantages of RANS and LES.
29
CFD - how it works (2)
CFD applies numerical methods (called
discretization) to develop approximations of the
governing equations of fluid mechanics in the
fluid region of interest.
– Governing differential equations: algebraic.
– The collection of cells is called the grid.
– The set of algebraic equations are solved
numerically (on a computer) for the flow field
variables at each node or cell.
– System of equations are solved simultaneously
to provide solution.
Mesh for bottle filling
The solution is post-processed to extract problem.
quantities of interest (e.g. lift, drag, torque, heat
transfer, separation, pressure loss, etc.). 30
Discretization
Domain is discretized into a finite set of control volumes
or cells. The discretized domain is called the “grid” or the “mesh.”
General conservation (transport) equations for mass, momentum,
energy, etc., are discretized into algebraic equations.
All equations are solved to render flow field.
31
Design and create the grid
Should you use a quad/hex grid, a tri/tet grid, a hybrid grid, or a
non-conformal grid?
What degree of grid resolution is required in each region of the
domain?
How many cells are required for the problem?
Will you use adaption to add resolution?
Do you have sufficient computer memory?
tetrahedron pyramid
triangle
arbitrary polyhedron
hexahedron prism or wedge
quadrilateral
32
Tri/tet vs. quad/hex meshes
For simple geometries, quad/hex
meshes can provide high-quality
solutions with fewer cells than a
comparable tri/tet mesh.
33
Set up the numerical model
For a given problem, you will need to:
– Select appropriate physical models.
– Turbulence, combustion, multiphase, etc.
– Define material properties.
Fluid.
Solid.
Mixture.
35
Compute the solution
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 the physical models.
– Grid resolution and independence.
– Problem setup.
36
Numerical parameters & flow
solution
Typical time
history of
residuals
The closer the
flow field to the
converged
solution, the
smaller the speed
of the residuals
decreasing.
Solution converged, residuals do
not change after more iterations
37
Post-processing
Analysis, and visualization
– Calculation of derived variables
Vorticity
Wall shear stress
Simple 2D contours
38
Examine the results
Visualization 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?
– Are physical models and boundary conditions appropriate?
– Numerical reporting tools can be used to calculate
quantitative results, e.g:
Lift, drag, and torque.
Surface-averaged quantities.
39
Velocity vectors around a
dinosaur
40
Velocity magnitude (0-6 m/s)
on a dinosaur
41
Pressure field on a dinosaur
42
Advantages of CFD
Relatively low cost.
– Using physical experiments and tests to get essential
engineering data for design can be expensive.
– CFD simulations are relatively inexpensive, and costs are
likely to decrease as computers become more powerful.
Speed.
– CFD simulations can be executed in a short period of time.
– Quick turnaround means engineering data can be introduced
early in the design process.
Ability to simulate real conditions.
– Many flow and heat transfer processes can not be (easily)
tested, e.g. hypersonic flow.
– CFD provides the ability to theoretically simulate any
physical condition. 43
Limitations of CFD
Physical models.
– CFD solutions rely upon physical models of real world
processes (e.g. turbulence, compressibility, chemistry,
multiphase flow, etc.).
– The CFD solutions can only be as accurate as the physical
models on which they are based.
Numerical errors.
– Solving equations on a computer invariably introduces
numerical errors.
– Round-off error: due to finite word size available on the
computer. Round-off errors will always exist (though they
can be small in most cases).
– Truncation error: due to approximations in the numerical
models. Truncation errors will go to zero as the grid is
refined. Mesh refinement is one way to deal with truncation 44
error.
Limitations of CFD (2)
Boundary conditions.
– As with physical models, the accuracy of the CFD solution
is only as good as the initial/boundary conditions provided
to the numerical model.
– Example: flow in a duct with sudden expansion. If flow is
supplied to domain by a pipe, you should use a fully-
developed profile for velocity rather than assume uniform
conditions.
Computational Computational
Domain Domain
45
Software and resources
CFD software was built upon physics, modeling, numerics .
Two types of available software
– Commercial (e.g., FLUENT, CFX, Star-CD)
– Research (e.g., CFDSHIP-IOWA, U2RANS)
More information on CFD can be got on the following website:
– CFD Online: http://www.cfd-online.com/
– CFD software
FLUENT: http://www.fluent.com/
CFDRC: http://www.cfdrc.com/
CFX/AEA: http://www.software.aeat.com/cfx/
GridPro: http://www.gridpro.com/
Hypermesh
– Visualization software
Tecplot: http://www.amtec.com/ 46
Software Used
1. Matlab
2. Ansys
3. Pro-Engineer
4. Autodesk Inventor professional
. CATIA
6. Fluent
7. Maple
47
Sofware Used
Tecplot
IcemCFD
Femlab
48
THANK YOU
49