Computational Fluid DynamicsComputational Fluid Dynamics
(CFD)(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.
.
2
OutlineOutline
 What is CFD?
 Why use CFD?
 Where is CFD used?
 Physics
 Modeling
 Numerics
 CFD process
 Resources
3
What is CFD?What is CFD?
 What is CFD and its objective?
– Computational Fluid Dynamics
– Historically Analytical Fluid Dynamics (AFD) and EFD
(Experimental Fluid Dynamics) was used. CFD has become
feasible due to the advent of high speed digital computers.
– Computer simulation for prediction of fluid-flow phenomena.
– The objective of CFD is to model the continuous fluids with
Partial Differential Equations (PDEs) and discretize PDEs into
an algebra problem , solve it, validate it and achieve simulation
based design.
What is CFD?What is CFD?
The field in which computers and numerical
analysis are combined to solve fluid
problems/Energy prblems is termed as
Computational fluid dynamics
4
5
Why use CFD?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
6
Where is CFD used? (Aerospace)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
F18 Store Separation
Wing-Body Interaction Hypersonic Launch Vehicle
7
8
Where is CFD used? (Appliances)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Surface-heat-flux plots of the No-Frost
refrigerator and freezer compartments helped
BOSCH-SIEMENS engineers to optimize the
location of air inlets.
9
Where is CFD used? (Automotive)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
External Aerodynamics Undercarriage
Aerodynamics
Interior Ventilation
Engine Cooling
10
Where is CFD used? (Biomedical)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports Temperature and natural
convection currents in the eye
following laser heating.
Medtronic Blood Pump
11
Where is CFD used? (Chemical Processing)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Polymerization reactor vessel - prediction
of flow separation and residence time
effects.
Shear rate distribution in twin-
screw extruder simulation
Twin-screw extruder
modeling
12
Where is CFD used? (HVAC&R)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Particle traces of copier VOC emissions
colored by concentration level fall
behind the copier and then circulate
through the room before exiting the
exhaust.
Mean age of air contours indicate
location of fresh supply air
Streamlines for workstation
ventilation
Flow pathlines colored by
pressure quantify head loss
in ductwork
13
Where is CFD used? (Hydraulics)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
14
Where is CFD used? (Marine)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
15
Where is CFD used? (Oil & Gas)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Flow vectors and pressure distribution
on an offshore oil rig
Flow of lubricating mud
over drill bit
Volume fraction of water
Volume fraction of oil
Volume fraction of gas
Analysis of multiphase separator
16
Where is CFD used? (Power Generation)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
Flow pattern through a water turbine.
Flow in a burner
Flow around cooling towers
Pathlines from the inlet
colored by temperature
during standard operating
conditions
17
Where is CFD used? (Sports)
• Where is CFD used?
– Aerospace
– Appliances
– Automotive
– Biomedical
– Chemical Processing
– HVAC&R
– Hydraulics
– Marine
– Oil & Gas
– Power Generation
– Sports
18
PhysicsPhysics
 CFD codes typically designed for representation
of specific flow phenomenon
– Viscous vs. inviscid (no viscous forces) (Re)
– Turbulent vs. laminar (Re)
– Incompressible vs. compressible (Ma)
– Single- vs. multi-phase (Ca)
– Thermal/density effects and energy equation (Pr, γ, Gr,
Ec)
– Free-surface flow and surface tension (Fr, We)
– Chemical reactions, mass transfer
– etc…
19
PhysicsPhysics
Fluid Mechanics
Inviscid Viscous
Laminar Turbulence
Internal
(pipe,valve)
External
(airfoil, ship)Compressible
(air, acoustic)
Incompressible
(water)
Components of Fluid Mechanics
20
Claude-Louis Navier George Gabriel Stokes
gvpv
Dt
D
ρµρ +∇+−∇= 2
Navier-Stokes EquationNavier-Stokes Equation
21
ModelingModeling
 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)
22
Governing EquationsGoverning Equations
xzxyxxx
x
z
x
y
x
x
x
g
zyxx
p
z
u
u
y
u
u
x
u
u
t
u
ρτττρ +





∂
∂
+
∂
∂
+
∂
∂
−
∂
∂
−=





∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
Continuity
x - Equation of motion
0=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
zyx u
z
u
y
u
xt
v
ρρρ
(Equations based on “average” velocity)(Equations based on “average” velocity)
23
Numerics / DiscretizationNumerics / 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
24
Finite DifferencesFinite Differences
Methods of Solution
Direct methods Iterative methods
Cramer’s Rule, Gauss elimination
LU decomposition
Jacobi method, Gauss-Seidel
Method, SOR method
( ) ( ) +
∆






∂
∂
+
∆






∂
∂
−
∆
−
=





∂
∂ +
62
2
,
3
3
,
2
2
,,1
,
x
x
ux
x
u
x
uu
x
u
jiji
jiji
ji
Finite difference
representation
Truncation error
25
Numeric SolutionNumeric Solution
(Finite Differences)(Finite Differences)
o xi i+1i-1
j+1
j
j-1
imax
jmax
x∆
y∆
( ) ( ) +
∆






∂
∂
+
∆






∂
∂
+∆





∂
∂
+=+
62
3
,
3
32
,
2
2
,
,,1
x
x
ux
x
u
x
x
u
uu
jijiji
jiji
Taylor’s Series Expansion
u i,j = velocity of fluid
Discrete Grid Points
26
CFD processCFD process
 Geometry description
 Specification of flow conditions and properties
 Selection of models
 Specification of initial and boundary conditions
 Grid generation and transformation
 Specification of numerical parameters
 Flow solution
 Post processing: Analysis, and visualization
27
Domain for bottle filling
problem.
Filling
Nozzle
Bottle
CFD - how it worksCFD - how it works
 Analysis begins with a mathematical
model of a physical problem.
 Conservation of matter, momentum,
and energy must be satisfied
throughout the region of interest.
 Fluid properties are modeled
empirically.
 Simplifying assumptions are made in
order to make the problem tractable
(e.g., steady-state, incompressible,
inviscid, two-dimensional).
 Provide appropriate initial and
boundary conditions for the problem.
28
Geometry descriptionGeometry 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, θ, Φ)
29
Selection of models for flow fieldSelection 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.
30
Mesh for bottle filling
problem.
CFD - how it works (2)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.
 The solution is post-processed to extract
quantities of interest (e.g. lift, drag, torque, heat
transfer, separation, pressure loss, etc.).
31
DiscretizationDiscretization
 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.
Fluid region of pipe flow
discretized into finite set of control
volumes (mesh).
control
volume
32
Design and create the gridDesign 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?
triangle
quadrilateral
tetrahedron pyramid
prism or wedgehexahedron
arbitrary polyhedron
33
Tri/tet vs. quad/hex meshesTri/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.
 For complex geometries, quad/hex
meshes show no numerical
advantage, and you can save
meshing effort by using a tri/tet
mesh.
34
Set up the numerical modelSet 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.
– Prescribe operating conditions.
– Prescribe boundary conditions at all boundary zones.
– Provide an initial solution.
– Set up solver controls.
– Set up convergence monitors.
35
Initial and boundary conditionsInitial and boundary conditions
 For steady/unsteady flow
 IC should not affect final solution, only convergence path, i.e.
iteration numbers needed to get the converged solution.
 Robust codes should start most problems from very crude IC, .
But more reasonable guess can speed up the convergence.
 Boundary conditions
– No-slip or slip-free on the wall, periodic, inlet (velocity
inlet, mass flow rate, constant pressure, etc.), outlet
(constant pressure, velocity convective, buffer zone,
zero-gradient), and non-reflecting (compressible flows,
such as acoustics), etc.
36
Compute the solutionCompute 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.
37
Numerical parameters & flowNumerical parameters & flow
solutionsolution
 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
38
Post-processingPost-processing
 Analysis, and visualization
– Calculation of derived variables
 Vorticity
 Wall shear stress
– Calculation of integral parameters: forces,
moments
– Visualization (usually with commercial software)
 Simple X-Y plots
 Simple 2D contours
 3D contour carpet plots
 Vector plots and streamlines (streamlines are
the lines whose tangent direction is the same
as the velocity vectors)
 Animations (dozens of sample pictures in a
series of time were shown continuously)
39
Examine the resultsExamine 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.
 Average heat transfer coefficients.
 Surface-averaged quantities.
40
Velocity vectors around aVelocity vectors around a
dinosaurdinosaur
41
Velocity magnitude (0-6 m/s)Velocity magnitude (0-6 m/s)
on a dinosauron a dinosaur
42
Pressure field on a dinosaurPressure field on a dinosaur
43
Advantages of CFDAdvantages 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.
44
Limitations of CFDLimitations 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
error.
45
poor better
Fully Developed Inlet
Profile
Computational
Domain
Computational
Domain
Uniform Inlet
Profile
Limitations of CFD (2)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.
46
Software and resourcesSoftware 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, U2
RANS)
 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/
 Computational Dynamics: http://www.cd.co.uk/
 CFX/AEA: http://www.software.aeat.com/cfx/
– Grid generation software
 Gridgen: http://www.pointwise.com
 GridPro: http://www.gridpro.com/
 Hypermesh
– Visualization software
 Tecplot: http://www.amtec.com/
Software UsedSoftware Used
1. Matlab
2. Ansys
3. Pro-Engineer
4. Autodesk Inventor professional
. CATIA
6. Fluent
7. Maple
47
Sofware UsedSofware Used
Tecplot
IcemCFD
Femlab
48
THANK YOUTHANK YOU
49

Introduction to Computational Fluid Dynamics (CFD)

  • 1.
    Computational Fluid DynamicsComputationalFluid Dynamics (CFD)(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. .
  • 2.
    2 OutlineOutline  What isCFD?  Why use CFD?  Where is CFD used?  Physics  Modeling  Numerics  CFD process  Resources
  • 3.
    3 What is CFD?Whatis CFD?  What is CFD and its objective? – Computational Fluid Dynamics – Historically Analytical Fluid Dynamics (AFD) and EFD (Experimental Fluid Dynamics) was used. CFD has become feasible due to the advent of high speed digital computers. – Computer simulation for prediction of fluid-flow phenomena. – The objective of CFD is to model the continuous fluids with Partial Differential Equations (PDEs) and discretize PDEs into an algebra problem , solve it, validate it and achieve simulation based design.
  • 4.
    What is CFD?Whatis CFD? The field in which computers and numerical analysis are combined to solve fluid problems/Energy prblems is termed as Computational fluid dynamics 4
  • 5.
    5 Why use CFD?Whyuse 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
  • 6.
    6 Where is CFDused? (Aerospace) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports F18 Store Separation Wing-Body Interaction Hypersonic Launch Vehicle
  • 7.
  • 8.
    8 Where is CFDused? (Appliances) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports Surface-heat-flux plots of the No-Frost refrigerator and freezer compartments helped BOSCH-SIEMENS engineers to optimize the location of air inlets.
  • 9.
    9 Where is CFDused? (Automotive) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports External Aerodynamics Undercarriage Aerodynamics Interior Ventilation Engine Cooling
  • 10.
    10 Where is CFDused? (Biomedical) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports Temperature and natural convection currents in the eye following laser heating. Medtronic Blood Pump
  • 11.
    11 Where is CFDused? (Chemical Processing) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports Polymerization reactor vessel - prediction of flow separation and residence time effects. Shear rate distribution in twin- screw extruder simulation Twin-screw extruder modeling
  • 12.
    12 Where is CFDused? (HVAC&R) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports Particle traces of copier VOC emissions colored by concentration level fall behind the copier and then circulate through the room before exiting the exhaust. Mean age of air contours indicate location of fresh supply air Streamlines for workstation ventilation Flow pathlines colored by pressure quantify head loss in ductwork
  • 13.
    13 Where is CFDused? (Hydraulics) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports
  • 14.
    14 Where is CFDused? (Marine) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports
  • 15.
    15 Where is CFDused? (Oil & Gas) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports Flow vectors and pressure distribution on an offshore oil rig Flow of lubricating mud over drill bit Volume fraction of water Volume fraction of oil Volume fraction of gas Analysis of multiphase separator
  • 16.
    16 Where is CFDused? (Power Generation) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports Flow pattern through a water turbine. Flow in a burner Flow around cooling towers Pathlines from the inlet colored by temperature during standard operating conditions
  • 17.
    17 Where is CFDused? (Sports) • Where is CFD used? – Aerospace – Appliances – Automotive – Biomedical – Chemical Processing – HVAC&R – Hydraulics – Marine – Oil & Gas – Power Generation – Sports
  • 18.
    18 PhysicsPhysics  CFD codestypically designed for representation of specific flow phenomenon – Viscous vs. inviscid (no viscous forces) (Re) – Turbulent vs. laminar (Re) – Incompressible vs. compressible (Ma) – Single- vs. multi-phase (Ca) – Thermal/density effects and energy equation (Pr, γ, Gr, Ec) – Free-surface flow and surface tension (Fr, We) – Chemical reactions, mass transfer – etc…
  • 19.
    19 PhysicsPhysics Fluid Mechanics Inviscid Viscous LaminarTurbulence Internal (pipe,valve) External (airfoil, ship)Compressible (air, acoustic) Incompressible (water) Components of Fluid Mechanics
  • 20.
    20 Claude-Louis Navier GeorgeGabriel Stokes gvpv Dt D ρµρ +∇+−∇= 2 Navier-Stokes EquationNavier-Stokes Equation
  • 21.
    21 ModelingModeling  Mathematical representationof 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)
  • 22.
    22 Governing EquationsGoverning Equations xzxyxxx x z x y x x x g zyxx p z u u y u u x u u t u ρτττρ+      ∂ ∂ + ∂ ∂ + ∂ ∂ − ∂ ∂ −=      ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ Continuity x - Equation of motion 0= ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ zyx u z u y u xt v ρρρ (Equations based on “average” velocity)(Equations based on “average” velocity)
  • 23.
    23 Numerics / DiscretizationNumerics/ 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
  • 24.
    24 Finite DifferencesFinite Differences Methodsof Solution Direct methods Iterative methods Cramer’s Rule, Gauss elimination LU decomposition Jacobi method, Gauss-Seidel Method, SOR method ( ) ( ) + ∆       ∂ ∂ + ∆       ∂ ∂ − ∆ − =      ∂ ∂ + 62 2 , 3 3 , 2 2 ,,1 , x x ux x u x uu x u jiji jiji ji Finite difference representation Truncation error
  • 25.
    25 Numeric SolutionNumeric Solution (FiniteDifferences)(Finite Differences) o xi i+1i-1 j+1 j j-1 imax jmax x∆ y∆ ( ) ( ) + ∆       ∂ ∂ + ∆       ∂ ∂ +∆      ∂ ∂ +=+ 62 3 , 3 32 , 2 2 , ,,1 x x ux x u x x u uu jijiji jiji Taylor’s Series Expansion u i,j = velocity of fluid Discrete Grid Points
  • 26.
    26 CFD processCFD process Geometry description  Specification of flow conditions and properties  Selection of models  Specification of initial and boundary conditions  Grid generation and transformation  Specification of numerical parameters  Flow solution  Post processing: Analysis, and visualization
  • 27.
    27 Domain for bottlefilling problem. Filling Nozzle Bottle CFD - how it worksCFD - how it works  Analysis begins with a mathematical model of a physical problem.  Conservation of matter, momentum, and energy must be satisfied throughout the region of interest.  Fluid properties are modeled empirically.  Simplifying assumptions are made in order to make the problem tractable (e.g., steady-state, incompressible, inviscid, two-dimensional).  Provide appropriate initial and boundary conditions for the problem.
  • 28.
    28 Geometry descriptionGeometry 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, θ, Φ)
  • 29.
    29 Selection of modelsfor flow fieldSelection 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.
  • 30.
    30 Mesh for bottlefilling problem. CFD - how it works (2)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.  The solution is post-processed to extract quantities of interest (e.g. lift, drag, torque, heat transfer, separation, pressure loss, etc.).
  • 31.
    31 DiscretizationDiscretization  Domain isdiscretized 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. Fluid region of pipe flow discretized into finite set of control volumes (mesh). control volume
  • 32.
    32 Design and createthe gridDesign 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? triangle quadrilateral tetrahedron pyramid prism or wedgehexahedron arbitrary polyhedron
  • 33.
    33 Tri/tet vs. quad/hexmeshesTri/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.  For complex geometries, quad/hex meshes show no numerical advantage, and you can save meshing effort by using a tri/tet mesh.
  • 34.
    34 Set up thenumerical modelSet 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. – Prescribe operating conditions. – Prescribe boundary conditions at all boundary zones. – Provide an initial solution. – Set up solver controls. – Set up convergence monitors.
  • 35.
    35 Initial and boundaryconditionsInitial and boundary conditions  For steady/unsteady flow  IC should not affect final solution, only convergence path, i.e. iteration numbers needed to get the converged solution.  Robust codes should start most problems from very crude IC, . But more reasonable guess can speed up the convergence.  Boundary conditions – No-slip or slip-free on the wall, periodic, inlet (velocity inlet, mass flow rate, constant pressure, etc.), outlet (constant pressure, velocity convective, buffer zone, zero-gradient), and non-reflecting (compressible flows, such as acoustics), etc.
  • 36.
    36 Compute the solutionComputethe 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.
  • 37.
    37 Numerical parameters &flowNumerical parameters & flow solutionsolution  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
  • 38.
    38 Post-processingPost-processing  Analysis, andvisualization – Calculation of derived variables  Vorticity  Wall shear stress – Calculation of integral parameters: forces, moments – Visualization (usually with commercial software)  Simple X-Y plots  Simple 2D contours  3D contour carpet plots  Vector plots and streamlines (streamlines are the lines whose tangent direction is the same as the velocity vectors)  Animations (dozens of sample pictures in a series of time were shown continuously)
  • 39.
    39 Examine the resultsExaminethe 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.  Average heat transfer coefficients.  Surface-averaged quantities.
  • 40.
    40 Velocity vectors aroundaVelocity vectors around a dinosaurdinosaur
  • 41.
    41 Velocity magnitude (0-6m/s)Velocity magnitude (0-6 m/s) on a dinosauron a dinosaur
  • 42.
    42 Pressure field ona dinosaurPressure field on a dinosaur
  • 43.
    43 Advantages of CFDAdvantagesof 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.
  • 44.
    44 Limitations of CFDLimitationsof 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 error.
  • 45.
    45 poor better Fully DevelopedInlet Profile Computational Domain Computational Domain Uniform Inlet Profile Limitations of CFD (2)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.
  • 46.
    46 Software and resourcesSoftwareand 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, U2 RANS)  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/  Computational Dynamics: http://www.cd.co.uk/  CFX/AEA: http://www.software.aeat.com/cfx/ – Grid generation software  Gridgen: http://www.pointwise.com  GridPro: http://www.gridpro.com/  Hypermesh – Visualization software  Tecplot: http://www.amtec.com/
  • 47.
    Software UsedSoftware Used 1.Matlab 2. Ansys 3. Pro-Engineer 4. Autodesk Inventor professional . CATIA 6. Fluent 7. Maple 47
  • 48.
  • 49.