0% found this document useful (0 votes)
54 views

Introduction To Computational Fluid Dynamics

This document provides an introduction to computational fluid dynamics (CFD). It defines CFD as the simulation of fluid engineering systems using modeling based on conservation principles and numerical methods. CFD was enabled by advances in computing and is now used widely in fields like aerospace, automotive, biomedical and more. The document outlines the modeling process in CFD including defining governing equations, initial and boundary conditions, and selecting models. It also discusses various numerical methods used to discretize the modeling equations and solve them, including discretization methods, solvers, and grid generation techniques.

Uploaded by

nugrohoisnandi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Introduction To Computational Fluid Dynamics

This document provides an introduction to computational fluid dynamics (CFD). It defines CFD as the simulation of fluid engineering systems using modeling based on conservation principles and numerical methods. CFD was enabled by advances in computing and is now used widely in fields like aerospace, automotive, biomedical and more. The document outlines the modeling process in CFD including defining governing equations, initial and boundary conditions, and selecting models. It also discusses various numerical methods used to discretize the modeling equations and solve them, including discretization methods, solvers, and grid generation techniques.

Uploaded by

nugrohoisnandi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Introduction to Computational

Fluid Dynamics
MSK Tony Suryo Utomo
Thermo Fluid Laboratory
Department of Mechanical Engineering
Diponegoro University
LOGO
2
What is CFD?
CFD is the simulation of fluids engineering systems using
modeling (mathematical physical problem formulation) and
numerical methods (discretization methods, solvers, numerical
parameters, and grid generations, etc.) based on three
fundamental principles:
1. Mass is conserved (continuity eq.)
2. Newtons second law (momentum eq.)
3. Energy is conserved (energy eq.)
Historically only Analytical Fluid Dynamics (AFD) and
Experimental Fluid Dynamics (EFD).
CFD made possible by the advent of digital computer and
advancing with improvements of computer resources

LOGO
3
Why use CFD?
Analysis and Design
1. Simulation-based design instead of build & test
More cost effective and more rapid than EFD
CFD provides high-fidelity database for diagnosing flow
field
2. Simulation of physical fluid phenomena that are
difficult for experiments
Full scale simulations (e.g., ships and airplanes)
Environmental effects (wind, weather, etc.)
Hazards (e.g., explosions, radiation, pollution)
Physics (e.g., planetary boundary layer, stellar evolution)
Knowledge and exploration of flow physics

LOGO
4
Where is CFD used?
Where is CFD used?
Aerospace
Automotive
Biomedical
Chemical
Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
F18 Store Separation

Temperature and natural
convection currents in the eye
following laser heating.

Aerospa
ce
Automotive
Biomedical
LOGO
5
Where is CFD used?
Polymerization reactor vessel - prediction
of flow separation and residence time
effects.

Streamlines for workstation
ventilation
Where is CFD used?
Aerospacee
Automotive
Biomedical
Chemical
Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
HVAC
Chemical Processing
Hydraulics
LOGO
6
Where is CFD used?
Where is CFD used?
Aerospace
Automotive
Biomedical
Chemical Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
Flow of lubricating
mud over drill bit
Flow around cooling
towers
Marine
Oil & Gas
Sports
Power Generation
LOGO
7
Modeling
Modeling is the mathematical physics problem
formulation in terms of a continuous initial
boundary value problem (IBVP)
IBVP is in the form of Partial Differential
Equations (PDEs) with appropriate boundary
conditions and initial conditions.
Modeling includes:
1. Geometry and domain
2. Coordinates
3. Governing equations
4. Flow conditions
5. Initial and boundary conditions
6. Selection of models for different applications


LOGO
8
Modeling (geometry and domain)
Simple geometries can be easily created by few geometric
parameters (e.g. circular pipe)
Complex geometries must be created by the partial
differential equations or importing the database of the
geometry(e.g. airfoil) into commercial software
Domain: size and shape
Typical approaches
Geometry approximation
CAD/CAE integration: use of industry standards such as
Parasolid, ACIS, STEP, or IGES, etc.
The three coordinates: Cartesian system (x,y,z), cylindrical
system (r, , z), and spherical system(r, , ) should be
appropriately chosen for a better resolution of the geometry (e.g.
cylindrical for circular pipe).

LOGO
9
Modeling (coordinates)
x
y
z
x
y
z
x
y
z
(r,u,z)
z
r u
(r,u,|)
r u
|
(x,y,z)
Cartesian
Cylindrical Spherical
General Curvilinear Coordinates General orthogonal
Coordinates
LOGO
10
Modeling (governing equations)
Navier-Stokes equations (3D in Cartesian coordinates)
(

c
c
+
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
+
c
c
2
2
2
2
2
2

z
u
y
u
x
u
x
p
z
u
w
y
u
v
x
u
u
t
u

(

c
c
+
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
+
c
c
2
2
2
2
2
2

z
v
y
v
x
v
y
p
z
v
w
y
v
v
x
v
u
t
v

( ) ( ) ( )
0 =
c
c
+
c
c
+
c
c
+
c
c
z
w
y
v
x
u
t

RT p =
L
v
p p
Dt
DR
Dt
R D
R

= +
2
2
2
) (
2
3
Convection Piezometric pressure gradient Viscous terms
Local
acceleration
Continuity equation
Equation of state
Rayleigh Equation
(

c
c
+
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
+
c
c
2
2
2
2
2
2

z
w
y
w
x
w
z
p
z
w
w
y
w
v
x
w
u
t
w

LOGO
11
Modeling (flow conditions)
Based on the physics of the fluids phenomena, CFD can be distinguished
into different categories using different criteria
Viscous vs. inviscid (Re)
External flow or internal flow (wall bounded or not)
Turbulent vs. laminar (Re)
Incompressible vs. compressible (Ma)
Single- vs. multi-phase (Ca)
Thermal/density effects (Pr, , Gr, Ec)
Free-surface flow (Fr) and surface tension (We)
Chemical reactions and combustion (Pe, Da)
etc
LOGO
12
Modeling (initial conditions)
Initial conditions (ICS, steady/unsteady flows)
ICs should not affect final results and only
affect convergence path, i.e. number of
iterations (steady) or time steps (unsteady)
need to reach converged solutions.
More reasonable guess can speed up the
convergence
For complicated unsteady flow problems,
CFD codes are usually run in the steady
mode for a few iterations for getting a better
initial conditions
LOGO
13
Modeling(boundary conditions)
Boundary conditions: No-slip or slip-free on walls,
periodic, inlet (velocity inlet, mass flow rate, constant
pressure, etc.), outlet (constant pressure, velocity
convective, numerical beach, zero-gradient), and non-
reflecting (for compressible flows, such as acoustics), etc.
No-slip walls: u=0,v=0
v=0, dp/dr=0,du/dr=0
Inlet ,u=c,v=0
Outlet, p=c
Periodic boundary condition
in spanwise direction of an
airfoil
o
r
x
Axisymmetric
LOGO
14
Modeling (selection of models)
CFD codes typically designed for solving certain fluid
phenomenon by applying different models
Viscous vs. inviscid (Re)
Turbulent vs. laminar (Re, Turbulent models)
Incompressible vs. compressible (Ma, equation of state)
Single- vs. multi-phase (Ca, cavitation model, two-fluid
model)
Thermal/density effects and energy equation
(Pr, , Gr, Ec, conservation of energy)
Free-surface flow (Fr, level-set & surface tracking model) and
surface tension (We, bubble dynamic model)
Chemical reactions and combustion (Chemical reaction
model)
etc
LOGO
15
Modeling (Turbulence and free surface models)
Turbulent models:
DNS: most accurately solve NS equations, but too expensive
for turbulent flows
RANS: predict mean flow structures, efficient inside BL but excessive
diffusion in the separated region.
LES: accurate in separation region and unaffordable for resolving BL
DES: RANS inside BL, LES in separated regions.
Free-surface models:
Surface-tracking method: mesh moving to capture free surface,
limited to small and medium wave slopes
Single/two phase level-set method: mesh fixed and level-set
function used to capture the gas/liquid interface, capable of
studying steep or breaking waves.
Turbulent flows at high Re usually involve both large and small scale
vortical structures and very thin turbulent boundary layer (BL) near the wall
LOGO
16
Examples of modeling (Turbulence and free
surface models)
DES, Re=10
5
, Iso-surface of Q criterion (0.4) for
turbulent flow around NACA12 with angle of attack
60 degrees
URANS, Re=10
5
, contour of vorticity for
turbulent flow around NACA12 with angle of attack
60 degrees
DES, Athena
barehull
LOGO
17
Numerical methods
The continuous Initial Boundary Value Problems
(IBVPs) are discretized into algebraic equations
using numerical methods. Assemble the system of
algebraic equations and solve the system to get
approximate solutions
Numerical methods include:
1. Discretization methods
2. Solvers and numerical parameters
3. Grid generation and transformation
4. High Performance Computation (HPC) and post-
processing
LOGO
18
Discretization methods
Finite difference methods (straightforward to apply,
usually for regular grid) and finite volumes and finite
element methods (usually for irregular meshes)
Each type of methods above yields the same solution if
the grid is fine enough. However, some methods are
more suitable to some cases than others
Finite difference methods for spatial derivatives with
different order of accuracies can be derived using
Taylor expansions, such as 2
nd
order upwind scheme,
central differences schemes, etc.
Higher order numerical methods usually predict higher
order of accuracy for CFD, but more likely unstable due
to less numerical dissipation
Temporal derivatives can be integrated either by the
explicit method (Euler, Runge-Kutta, etc.) or implicit
method (e.g. Beam-Warming method)

LOGO
19
Discretization methods (Contd)
Explicit methods can be easily applied but yield
conditionally stable Finite Different Equations (FDEs),
which are restricted by the time step; Implicit methods
are unconditionally stable, but need efforts on
efficiency.
Usually, higher-order temporal discretization is used
when the spatial discretization is also of higher order.
Stability: A discretization method is said to be stable if
it does not magnify the errors that appear in the course
of numerical solution process.
Pre-conditioning method is used when the matrix of the
linear algebraic system is ill-posed, such as multi-phase
flows, flows with a broad range of Mach numbers, etc.
Selection of discretization methods should consider
efficiency, accuracy and special requirements, such as
shock wave tracking.

LOGO
20
Solvers and numerical parameters
Solvers include: tridiagonal, pentadiagonal solvers,
PETSC solver, solution-adaptive solver, multi-grid
solvers, etc.
Solvers can be either direct (Cramers rule, Gauss
elimination, LU decomposition) or iterative (Jacobi
method, Gauss-Seidel method, SOR method)
Numerical parameters need to be specified to control
the calculation.
Under relaxation factor, convergence limit, etc.
Different numerical schemes
Monitor residuals (change of results between
iterations)
Number of iterations for steady flow or number of
time steps for unsteady flow
Single/double precisions
LOGO
21
Numerical methods (grid generation)
Grids can either be structured
(hexahedral) or unstructured
(tetrahedral). Depends upon type of
discretization scheme and application
Scheme
Finite differences: structured
Finite volume or finite element:
structured or unstructured
Application
Thin boundary layers best
resolved with highly-stretched
structured grids
Unstructured grids useful for
complex geometries
Unstructured grids permit
automatic adaptive refinement
based on the pressure gradient,
or regions interested (FLUENT)
structured
unstructured
LOGO
22
Solvers and numerical parameters
Solvers include: tridiagonal, pentadiagonal solvers,
PETSC solver, solution-adaptive solver, multi-grid
solvers, etc.
Solvers can be either direct (Cramers rule, Gauss
elimination, LU decomposition) or iterative (Jacobi
method, Gauss-Seidel method, SOR method)
Numerical parameters need to be specified to control
the calculation.
Under relaxation factor, convergence limit, etc.
Different numerical schemes
Monitor residuals (change of results between
iterations)
Number of iterations for steady flow or number of
time steps for unsteady flow
Single/double precisions
LOGO
23
Types of CFD codes
Commercial CFD code: FLUENT, Star-
CD, CFDRC, CFX/AEA, etc.
Research CFD code: CFDSHIP-IOWA
Public domain software (PHI3D,
HYDRO, and WinpipeD, etc.)
Other CFD software includes the Grid
generation software (e.g. Gridgen,
Gambit) and flow visualization software
(e.g. Tecplot, FieldView)
CFDSHIPIOWA

You might also like