0% found this document useful (0 votes)
23 views54 pages

0.Introduction to CFD

The document provides an overview of Computational Fluid Dynamics (CFD), detailing its historical development, key figures, and foundational equations. It discusses the evolution of CFD technology, the distinction between analytical, experimental, and computational methods, and highlights various applications across multiple industries. Additionally, it emphasizes the importance of CFD in modeling complex fluid phenomena and its role in modern engineering practices.

Uploaded by

Rishab Madan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views54 pages

0.Introduction to CFD

The document provides an overview of Computational Fluid Dynamics (CFD), detailing its historical development, key figures, and foundational equations. It discusses the evolution of CFD technology, the distinction between analytical, experimental, and computational methods, and highlights various applications across multiple industries. Additionally, it emphasizes the importance of CFD in modeling complex fluid phenomena and its role in modern engineering practices.

Uploaded by

Rishab Madan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Introduction to

Computational Fluid Dynamics

1
Overview of Fluid Mechanics

Mechanics

Statics Dynamics

Kinematics Kinetics

◼ Fluids essential to life


 Human body 95% water
 Earth’s surface is 2/3 water
 Atmosphere extends 17km above the earth’s surface

2
History: 18th and 19th century
◼ Much work focused on describing the motion of fluids:
 Daniel Bernoulli (1700-1782) derived Bernoulli’s equation.
 Leonhard Euler (1707-1783) proposed the Euler equations,
which describe conservation of momentum for an inviscid fluid,
and conservation of mass. He also proposed the velocity
potential theory.
 Claude Louis Marie Henry Navier (1785-1836) and George
Gabriel Stokes (1819-1903) introduced viscous transport into the
Euler equations, which resulted in the Navier-Stokes equation.
This forms the basis of modern day CFD.
 Other key figures were Jean Le Rond d’Alembert, Siméon-Denis
Poisson, Joseph Louis Lagrange, Jean Louis Marie Poiseuille,
John William Rayleigh, M. Maurice Couette, and Pierre Simon
de Laplace.

3
History: Osborne Reynolds - England (1842-1912)
◼ Most well-known for the
Reynolds number, which is the
ratio between inertial and
viscous forces in a fluid. This
governs the transition from
laminar to turbulent flow.
◼ His apparatus consisted of a
long glass pipe through which
water could flow at different
rates, controlled by a valve at the
pipe exit. The state of the flow
was visualized by a streak of dye
injected at the entrance to the
pipe.
4
History: First part of the 20th century
◼ Much work was done on boundary
layers and turbulence:
 Ludwig Prandtl (1875-1953): boundary
layer theory, the mixing length concept,
compressible flows, the Prandtl number.
 Theodore von Karman (1881-1963)
analyzed what is now known as the von
Karman vortex street.
 Geoffrey Ingram Taylor (1886-1975):
statistical theory of turbulence and the
Taylor microscale.
 Andrey Nikolaevich Kolmogorov (1903-
1987): the Kolmogorov scales and the
universal energy spectrum.
 George Keith Batchelor (1920-2000):
contributions to the theory of
homogeneous turbulence.
5
History: Lewis Fry Richardson (1881-1953)
◼ In 1922, Lewis Fry Richardson developed the first
numerical weather prediction system.
 Division of space into grid cells and the finite difference
approximations of Bjerknes's "primitive differential equations.”
 His own attempt to calculate weather for a single eight-hour
period took six weeks and ended in failure.
◼ His model's enormous calculation requirements led to a
proposed solution called the “forecast-factory.”
 The "factory" would have filled a vast stadium with 64,000
people.
 Each one, armed with a mechanical calculator, would perform
part of the calculation.
 A leader in the center, using colored signal lights and telegraph
communication, would coordinate the forecast.

6
History: 1930s to 1950s
◼ Earliest numerical solution: for flow past a cylinder (1933).
◼ Thom, A. 1933. ‘The Flow Past Circular Cylinders at Low Speeds’,
Proc. Royal Society, A141: 651-666.
◼ Kawaguti obtains a solution for flow around a cylinder, in
1953 by using a mechanical desk calculator, working 20
hours per week for 18 months.
◼ Kawaguti, M. 1953. ‘Numerical Solution of the NS Equations for the
Flow Around a Circular Cylinder at Reynolds Number 40’, J. Phy. Soc.
Japan, 8: 747-757.

7
History: 1960s and 1970s
◼ During the 1960s the theoretical division at Los Alamos
contributed many numerical methods that are still in use
today, such as the following methods:
 Particle-In-Cell (PIC).
 Marker-and-Cell (MAC).
 Vorticity-Streamfunction Methods.
 Arbitrary Lagrangian-Eulerian (ALE).
 k- turbulence model.

◼ During the 1970s a group working under D. Brian Spalding,


at Imperial College, London, develop:
 Parabolic flow codes (GENMIX).
 Vorticity-Stream function based codes.
 The SIMPLE algorithm and the TEACH code.
 The form of the k- equations that are used today.
 Upwind differencing.
 ‘Eddy break-up’ and ‘presumed pdf’ combustion models.
8
History: 1980s and 1990s
◼ Previously, CFD was performed using academic, research
and in-house codes. When one wanted to perform a CFD
calculation, one had to write a program.
◼ This is the period during which most commercial CFD codes
originated that are available today:
◼ Fluent (UK and US).
◼ Fidap (US).
◼ Polyflow (Belgium).
◼ Phoenix (UK).
◼ Star CD (UK).
◼ Ansys/CFX (UK).
◼ Flow 3d (US).
◼ ESI/CFDRC (US).
◼ SCRYU (Japan).

9
Commercial Software
◼ CFD software
1. FLUENT: http://www.fluent.com
2. CFDRC: http://www.cfdrc.com
3. STAR-CD:http://www.cd-adapco.com
4. ANSYS/CFX:
http://www-waterloo.ansys. com/cfx

◼ Grid Generation software


1. Gridgen: http://www.pointwise.com
2. GridPro: http://www.gridpro.com

◼ Visualization software
1. Tecplot: http://www.amtec.com
2. Fieldview: http://www.ilight.com

10
Fluid Analysis
◼ Engineers have different kinds of tools available for
solving fluids engineering systems
 Analytical Fluid Dynamics (AFD)
 Experimental Fluid Dynamics (EFD)
 Computational Fluid Dynamics (CFD)

◼ AFD is typically provided through lectures and CFD


and EFD through labs

11
Analytical Fluid Dynamics
◼ The theory of mathematical physics: problem &
formulation
◼ Control volume & differential analysis
◼ Exact solutions only exist for simple geometry and
conditions
◼ Approximate solutions for practical applications
 Linear
 Empirical relations using EFD data

12
Analytical Fluid Dynamics
◼ Example: laminar pipe flow
Assumptions: Fully developed, Low Re (<2000)
Approach: Simplify momentum equation, integrate, apply boundary conditions
(no-slip wall) to determine integration constants and use energy
equation to calculate head loss
Schematic
0
Du 0 p   2u  2u  0
=− +  2 + 2  + gx
Dt x  x y 

Exact solution:
u(r) = 1 (− p)(R2 − r 2)
4 x
8 du
Friction factor: f = 8 w = dy w = 64
V 2 V 2 Re

Head loss:
p1
+ z1 =
p2
+ z2 + h f L V 2 32  LV
hf = f =
  D 2g  D2
13
Computational Fluid Dynamics (CFD)
◼ Computational Fluid Dynamics is the science of
predicting fluid flow, heat transfer, mass transfer,
chemical reactions, and related phenomena by solving
mathematical equations that represent physical laws
using a numerical process
◼ CFD use computational methods for solving fluid
engineering systems, including modeling (mathematical
& Physics) and numerical methods (solvers, finite
differences, and grid generations, etc.).
◼ Rapid growth in CFD technology since advent of
computer

ENIAC 1, 1946 IBM WorkStation 14


◼ ENIAC (Electronic Numerical Integrator and Computer) was the first
general-purpose electronic computer. The first version, ENIAC 1,
was developed in 1946 by John Mauchly and J. Presper Eckert at
the University of Pennsylvania. It was a massive machine, weighing
over 27 tons and occupying an entire room. ENIAC 1 used vacuum
tubes and was programmed using patch cords and switches. It
could perform calculations at a rate of several hundred per second,
making it a groundbreaking innovation in the field of computing
15
Computational Fluid Dynamics (CFD)

◼ The objective of CFD is to model the continuous fluids


with Partial Differential Equations (PDEs) and discretise
PDEs into an algebra problem, solve it, validate it and
achieve simulation based design instead of “build & test”

◼ Simulation of physical fluid phenomena that are difficult


to be measured by experiments: scale simulations (full-
scale ships, airplanes), hazards (explosions, radiations,
pollution), physics (weather prediction, planetary
boundary layer, stellar evolution).

16
Experimental Fluid Dynamics (EFD)
Definition:
Use of experimental methodology and procedures for solving
fluids engineering systems, including full and model scales,
large and table top facilities, measurement systems
(instrumentation, data acquisition and data reduction),
uncertainty analysis, and dimensional analysis and similarity.

• EFD process is steps to set up an experiment and take data:


1. Setup facility
2. Install model
3. Setup equipment
4. Setup Data Acquisition
5. Perform calibrations
6. Data Analysis and Data Reduction
7. Uncertainty Analysis
8. Comparison with CFD results
9. Documentation and Reporting
17
Experimental Fluid Dynamics (EFD)

Full and model scale

• Scales: model, and full-scale


• Selection of the model scale: governed by dimensional analysis and similarity

18
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive F18 Store Separation

 Biomedical
 Chemical Processing
 HVAC&R
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports

Wing-Body Interaction Hypersonic Launch


Vehicle
19
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
 Chemical Processing
 HVAC&R
 Hydraulics
 Marine
 Oil & Gas
 Power Generation Surface-heat-flux plots of the No-Frost
 Sports refrigerator and freezer compartments helped
engineers to optimize the location of air inlets.

20
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
 Chemical Processing
 HVAC&R
External Aerodynamics Undercarriage
 Hydraulics Aerodynamics

 Marine
 Oil & Gas
 Power Generation
 Sports

Interior Ventilation
Engine Cooling 21
Applications of CFD
◼ 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.

22
Spinal Catheter
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive Polymerization reactor vessel - prediction
of flow separation and residence time
 Biomedical effects.

 Chemical Processing
 HVAC&R
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports Twin-screw extruder
Shear rate distribution in twin-
modeling
screw extruder simulation

23
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
Particle traces of copier VOC emissions
 Chemical Processing colored by concentration level fall
behind the copier and then circulate
 HVAC&R Streamlines for workstation
ventilation through the room before exiting the
exhaust.
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports

Flow pathlines colored by


pressure quantify head loss
Mean age of air contours indicate
in ductwork
location of fresh supply air 24
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
 Chemical Processing
 HVAC&R
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports

25
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
 Chemical Processing
 HVAC&R
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports

26
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive Volume fraction of gas

 Biomedical
 Chemical Processing
 HVAC&R Flow vectors and pressure Volume fraction of oil
distribution on an offshore oil rig
 Hydraulics
 Marine
 Oil & Gas Volume fraction of water

 Power Generation Analysis of multiphase


separator
 Sports

Flow of lubricating
mud over drill bit
27
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
 Chemical Processing
Flow in a
 HVAC&R Flow around cooling
towers burner
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports

Pathlines from the inlet


Flow pattern through a water colored by temperature
turbine. during standard 28
operating conditions
Applications of CFD
◼ Where is CFD used?
 Aerospace
 Appliances
 Automotive
 Biomedical
 Chemical Processing
 HVAC&R
 Hydraulics
 Marine
 Oil & Gas
 Power Generation
 Sports

29
CFD Process
◼ Governing equations
 Navier-Stokes equations (momentum), continuity equation, pressure
Poisson equation, energy equation, ideal gas law, combustions
(chemical reaction equation), multi-phase flows(e.g. Rayleigh
equation), and turbulent models (RANS, LES, DES).
◼ Coordinates
 Cartesian, cylindrical and spherical coordinates result in different
form of governing equations
◼ Initial conditions
 Initial guess of the solution
◼ Boundary Conditions
 No-slip wall, free-surface, zero-gradient, symmetry, velocity/pressure
inlet/outlet
◼ Flow conditions
 Geometry approximation, domain, Reynolds Number, and Mach
Number, etc.
30
How does a CFD code work?
◼ 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:
(i) a pre-processor,
(ii) a solver and
(iii) a post-processor.

31
Pre-processor
◼ Definition of the geometry of the region of interest: the
computational domain
◼ Grid generation – the sub-division of the domain into a
number of smaller, non-overlapping sub-domains: a grid
(or mesh) of cells (or control volumes or elements)
◼ Selection of the physical and chemical phenomena that
need to be modelled
◼ Definition of fluid properties
◼ Specification of appropriate boundary conditions at
cells which coincide with or touch the domain boundary.

32
◼ The solution to a flow problem (velocity, pressure,
temperature etc.) is defined at nodes inside each cell.
The accuracy of a CFD solution is governed by the
number of cells in the grid.

33
Solver
◼ There are three distinct streams of numerical solution
techniques: finite difference, finite element and spectral
methods.

◼ We shall be solely concerned with the finite volume


method, a special finite difference formulation that is
central to the most well-established CFD codes:
CFX/ANSYS, FLUENT, PHOENICS and STAR-CD.

34
◼ In outline the numerical algorithm consists of the
following steps:
 Integration of the governing equations of fluid flow
over all the (finite) control volumes of the domain
 Discretisation – conversion of the resulting integral
equations into a system of algebraic equations
 Solution of the algebraic equations by an iterative
method

35
Post-processor
◼ As in pre-processing, a huge amount of development
work has recently taken place in the post-processing
field. Due to the increased popularity of engineering
workstations, many of which have outstanding graphics
capabilities, the leading CFD packages are now
equipped with versatile data visualization tools.
◼ These include:
• Domain geometry and grid display
• Vector plots • Line and shaded contour plots
• 2D and 3D surface plots • Particle tracking
• View manipulation (translation, rotation, scaling etc.)
• Colour PostScript output
36
CFD Process

◼ The solution can also be post-processed to


extract quantities of interest (e.g. lift, drag,
torque, heat transfer, separation, pressure
loss, etc.).
◼ Domain is discretised into a finite set of control
volumes or cells. The discretised domain is
called grid or mesh.
Mesh for bottle filling
problem.

control
volume
tetrahedron pyramid
triangle

Fluid region of pipe


flow discretised into hexahedron prism or wedge
finite set of control quadrilateral
volumes (mesh).
37
CFD Process


Mass: +   u = 0
t
Du  u 
Momentum:    + u  u  = −p +    + S M
Dt  t 

= − p  u +   (k T ) +  + S M
DT
Energy: c
Dt

Others: ( ) +   (u ) =   ( u ) + S
t
BCs/
Loading

Ax=b
System
Matrix
Variables
u, p, T, etc. 38
CFD Process

39
Example – 2D Aerodynamic Simulation
◼ Fluid property (air):
 Density: 1.2 kg/m3
 Viscosity: 2.0E–05 kg/ms
 Speed of air: 20 m/s (72 km/h)
 Specific heat: 1005 J/kgK
 Heat conduction coefficient: 0.024 W/mK

40
Example: Boundary Settings

Neutral

Inflow
u0 = u0 Outflow
v0 = 0 p0 = 0

No slip

No slip

41
Example: Boundary Settings

Convective flux

Initial temperature
Temperature 300 K Convective
320 K flux

Thermal insulation

Thermal insulation

42
Example: Mesh

Whole Domain
Max. element size = 0.5
Refinement
recommended

Vehicle boundary
Max. element size = 0.05

Ground
Max. element size = 0.1

43
Example: Velocity Resolution & Vectors

44
Example: Pressure & Streamlines

45
Example: Temperature & Streamlines

heat

46
Case Study: Temperature & Streamlines

47
Case Study: Graphs for Surface Pressure

Drag = 416 N/m Lift = 1581 N/m

48
Case Study: Consider Revisions to the Model
◼ Are physical models appropriate?
 Is flow turbulent?
 Is flow unsteady?
 Are there compressibility effects?
 Are there 3D effects?
 Are boundary conditions correct?
◼ Is the computational domain large enough?
 Are boundary conditions appropriate?
 Are boundary values reasonable?
◼ Is grid adequate?
 Can grid be adapted to improve results?
 Does solution change significantly with adaption, or is the
solution grid independent?
 Does boundary resolution need to be improved?

49
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.
50
Advantages of CFD
◼ Ability to simulate ideal conditions.
 CFD allows great control over the physical process, and
provides the ability to isolate specific phenomena for study.
 Example: a heat transfer process can be idealized with
adiabatic, constant heat flux, or constant temperature
boundaries.
◼ Comprehensive information.
 Experiments only permit data to be extracted at a limited number
of locations in the system (e.g. pressure and temperature
probes, heat flux gauges, LDV, etc.).
 CFD allows the analyst to examine a large number of locations
in the region of interest, and yields a comprehensive set of flow
parameters for examination.

51
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 error.
52
Limitations of CFD
◼ 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, a fully-developed profile should be
used for velocity rather than assume uniform conditions.

Computational Computational
Domain Domain

Fully Developed
Uniform Inlet Inlet Profile
Profile Poor Better

53
Conclusion
◼ CFD is a method to numerically calculate fluid flow and
heat transfer.

◼ Currently, its main application is as an engineering


method, to provide data that is complementary to
theoretical and experimental data. This is mainly the
domain of commercially available codes and in-house
codes at large companies.

◼ CFD can also be used for purely scientific studies, e.g.


into the fundamentals of turbulence. Codes are usually
developed to specifically study a certain problem.
54

You might also like