Professional Documents
Culture Documents
Computational Fluid
Maysam
Mousaviraad,
Tao
Xing,
Shanti
Dynamics
(CFD)
Bhushan, and Frederick Stern
IIHRHydroscience & Engineering
C. Maxwell Stanley Hydraulics Laboratory
The University of Iowa
57:020 Mechanics of Fluids and Transport Processes
http://css.engineering.uiowa.edu/~fluids/
October 3, 2012
Outline
1.
2.
3.
4.
5.
6.
7.
8.
What is CFD?
Aerospace
used?
Aerospace
Automotive
Biomedical
Chemical
Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power
Generation
Sports
Biomedical
F18 Store Separation
Automotive
Where is CFD
used?
Aerospacee
Automotive
Biomedical
Chemical
Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
HVAC
Streamlines for workstation
ventilation
Hydraulics
Sports
Aerospace
Automotive
Biomedical
Chemical Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
http://gallery.ensight.com/keyword/sport/1/701168838_KVnHn#!i=701168838&k=KVnHn
Power Generation
Flow around cooling
towers
7
Modeling
Modeling is the mathematical physics
Typical approaches
Geometry approximation
CAD/CAE integration: use of industry standards such as
Parasolid, ACIS, STEP, or IGES, etc.
Modeling (coordinates)
z
Cartesian
(x,y,z)
Cylindrical
(r,,z)
z Spherical
(r,,)
z
y
x
y
x
General orthogonal
Coordinates
10
Modeling (governing
equations)
u
v
w
2 2
2
t
x
y
z
x
x
y
z
2v 2v 2v
v
v
v
v
p
u
v
w
2 2
2
t
x
y
z
y
x
y
z
2w 2w 2w
w
w
w
w
p
u
v
w
2 2
2
t
x
y
z
z
y
z
x
Local
acceleration
Convection
Viscous terms
u v w
0 Continuity equation
t
x
y
z
p RT
pv p
D 2 R 3 DR 2
R
(
)
Dt 2
2 Dt
L
Equation of state
Rayleigh Equation
11
12
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, zerogradient), and non-reflecting (for compressible
flows, such as acoustics), etc.
Inlet ,u=c,v=0
r
v=0, dp/dr=0,du/dr=0
Axisymmetric
14
Modeling (selection of
models)
CFD codes typically designed for solving
certain fluid
phenomenon by applying different models
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.
16
Examples of Modeling
Movie
Movie
Movie
17
Numerical methods
The continuous Initial Boundary Value
Discretization methods
Solvers and numerical parameters
Grid generation and transformation
High Performance Computation (HPC) and postprocessing
18
Discretization methods
Finite difference methods (straightforward to
Discretization methods
(Contd)
Explicit methods can be easily applied but yield
Discretization methods
(example)
2D incompressible laminar flow boundary layer
(L,m+1)
u v
0
x y
(L-1,m)
u
u
p
2u
u
v
2
x
y
x e
y
u uml
uml uml 1
u
x x
u vml
uml 1 uml
v
y y
vml
uml uml 1
y
m=MM+1
m=MM
(L,m)
m=1
m=0
(L,m-1)
L-1
2u
Discretization methods
(example)
B
B2
3
1
B1
FD
l
uml
vml
vml
2 l
y
l
vm
2 um
FD um 1
BD
uml 1
2
2
1
x
y
y
y y
BD y
l
p
/
e
m
x
B2
B
1
B3
B2
B3
B1
B2
B1
0
0
B4
Bu
l
1
p
x e 1
l 1
4 1
0
u
B3
B2
umm
uml l 1
um ( p / e)lm
x
x
Solve it using
Thomas algorithm
l 1
4 mm
Bu
p
x e mm
l
22
(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 highlystretched structured grids
Unstructured grids useful for
complex geometries
Unstructured grids permit
automatic adaptive
refinement based on the
structured
unstructured
24
Transform
o
Physical domain
Computational domain
f f f
f
f
x
x
x x x
25
incompressible flow.
Weak scalability, limited by the memory requirements.
Figure: Strong scalability of total times without I/O for CFDShipIowa V6 and V4 on NAVO Cray XT5 (Einstein) and IBM P6
(DaVinci) are compared with ideal scaling.
26
Post-Processing
Post-processing: 1. Visualize the CFD results (contour,
Figure: Isosurface of Q=300 colored using piezometric pressure, free=surface colored using z for fully appended Athena,
Fr=0.25, Re=2.9108. Tecplot360 is used for visualization.
27
CFDSHIPIOWA
28
29
CFD process
Purposes of CFD codes will be different for different
CFD Process
Geometry
Physics
Mesh
Solve
Reports
PostProcessing
Select
Geometry
Heat Transfer
ON/OFF
Unstructured
(automatic/
manual)
Steady/
Unsteady
Forces Report
Contours
Compressible
ON/OFF
Structured
(automatic/
manual)
Iterations/
Steps
XY Plot
Vectors
Flow
properties
Convergent
Limit
Verification
Streamlines
Viscous
Model
Precisions
(single/
double)
Validation
Boundary
Conditions
Numerical
Scheme
Geometry
Parameters
Domain
Shape and
Size
(lift/drag, shear
stress, etc)
Initial
Conditions
31
Geometry
Physics
Mesh
Meshes should be well designed to resolve
important flow features which are dependent
upon flow condition parameters (e.g., Re),
such as the grid refinement inside the wall
boundary layer
Mesh can be generated by either commercial
codes (Gridgen, Gambit, etc.) or research
code (using algebraic vs. PDE based,
conformal mapping, etc.)
The mesh, together with the boundary
conditions need to be exported from
commercial software in a certain format that
can be recognized by the research CFD code
or other commercial CFD software.
34
Solve
Setup appropriate numerical parameters
Choose appropriate Solvers
Solution procedure (e.g. incompressible flows)
Solve the momentum, pressure Poisson
equations and get flow field quantities,
such as velocity, turbulence intensity,
pressure and integral quantities (lift, drag
forces)
35
Reports
Reports saved the time history of the
36
Post-processing
Analysis and visualization
Calculation of derived variables
Vorticity
Wall
shear stress
Calculation of integral parameters:
forces, moments
Visualization (usually with
commercial software)
Simple 2D contours
3D contour isosurface plots
Vector plots and streamlines
(streamlines are the lines whose
tangent direction is the same as
the velocity vectors)
Animations
37
Post-processing (Uncertainty
Assessment)
Simulation error: the difference between a
Uncertainty:
U
V
SN
DS
D ( SMpermit,
SN ) estimating
and,E when
conditions
theD sign
and
magnitude of the modeling error
E SM
U Vitself.
Validation achieved
38
Post-processing (UA,
Verification)
Convergence studies: Convergence studies require a
minimum of m=3 solutions to evaluate convergence
with respective to input
parameters.
Consider the
solutions corresponding
,and S k 3
S k1 to fineS k 2 , medium
coarse meshes
Monotonic Convergence
k 21 S k 2 Sk 1
k 32 Sk 3 Sk 2
Rk k 21 k 32
(i). Monotonic convergence: 0<Rk<1
(ii). Oscillatory Convergence: Rk<0; | Rk|<1
(iii). Monotonic divergence: Rk>1
(iv). Oscillatory divergence: Rk<0; | Rk|>1
Monotonic Divergence
Oscillatory Convergence
rk xk 2 xk1 xk3 xk 2 xk m xk m1
39
*
S C S SN
SC
*
I km
Skm SC xkm
i 1
Sk1 S C xk1
pk(1)
Sk3 SC r xk1
pk
2
k
ln k3 2 k2 1
ln rk
pk(1)
(1)
k
pk( i )
(1)
k
j 1, j k
*
k1
j 1, j k
(i )
k
j 1, j k
j 1, j k
*
jm
k*m xk m
n
i 1
*
jm
*
j3
pk i
g k i
Sk 2 SC rk xk1
*
j1
*
REk 1
*
km
pk(1)
(1)
k
j 1, j k
*
j2
k2 1
rkpk 1
41
1. Correction
factors
pkest
Ck
*
RE
k1
Ck
rkpk 1
pkest
k
k 21
rkpk 1
nd
9.6 1 C 2 1.1 *
k
REk 1
Uk
*
2 1 Ck 1 RE
k1
U kc 1C 1 * *
[| 1 kC k |] RE| k 1RE |
k1
1 Ck 0.125
1 Ck 0.125
1 Ck 0.25
| 1 C k | 0.25
*
U kc Fs 1 RE
FS: Factor of Safety
k1
Oscillatory Convergence: Uncertainties can
be estimated, but without
1
signs and magnitudes of the errors. U k SU S L
2
Divergence
In this course, only grid uncertainties studied. So, all the variables with
subscribe symbol k will be replaced by g, such as U k will be Ug
2. GCI approach
*
U k Fs RE
k1
42
Post-processing (Verification,
Asymptotic Range)
Asymptotic Range: For sufficiently small xk,
the solutions are in the asymptotic range
such that higher-order terms
are negligible
i
i
gk
pk
and the assumption
that
and
are
independent of xk is valid.
pk
When Asymptotic Range reached,
will be
, and the
pk
close to the theoretical
value
Ck
correction
factor
will be close to 1.
To achieve the asymptotic range for practical
geometry and conditions is usually not
possible and number of grids m>3 is
undesirable from a resources point of view
est
43
To avoid
ill-defined ratios, L2 norm of the G21 and G32 are used to
define RG and PG
ln G
G
RG G2 1
G3 2
pG
32
ln rG
21
Where <> and || ||2 are used to denote a profile-averaged quantity (with ratio of
solution changes based on L2 norms) and L2 norm, respectively.
NOTE: For verification using AFD for axial velocity profile in laminar pipe flow (CFD
Lab1), there is no modeling error, only grid errors. So, the difference between CFD and
AFD, E, can be plot with +Ug and Ug, and +Ugc and Ugc to see if solution was
verified.
44
Post-processing (Verification:
Iterative Convergence)
Typical CFD solution techniques for obtaining steady state solutions
(a)
UI
1
( SU S L )
2
Iteration history for series 60: (a). Solution change (b) magnified view of total
resistance over last two periods of oscillation (Oscillatory iterative convergence)
45
E D S D ( SM SN )
2
U V U SN
U D2
Validation
example
Example: Grid study
and validation of
wave profile for
series 60
46
48
50
51
processing)
52
CFD PreLab1
CFD Lab1
Oct. 9, 11
Oct. 16, 18
CFD PreLab2
CFD Lab 2
Nov. 6, 8
Nov. 13, 15
53