Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Tao Xing, Shanti Bhushan and Fred Stern, The University of Iowa
Outline
1.
2.
3.
4.
5.
6.
7.
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.)
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
(500 flops, 194720 teraflops, 2003 1.3 pentaflops, Roadrunner at
Las Alamos National Lab, 2009.)
Aerospace
Biomedical
Chemical
Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
Automotive
Aerospacee
Automotive
Biomedical
Chemical
Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
Hydraulics
HVAC
Streamlines for workstation
ventilation
Sports
Aerospace
Automotive
Biomedical
Chemical Processing
HVAC
Hydraulics
Marine
Oil & Gas
Power Generation
Sports
Oil & Gas
Flow of lubricating
mud over drill bit
Power Generation
Flow around cooling
towers
Modeling
Modeling is the mathematical physics problem
Modeling (coordinates)
z
Cartesian
(x,y,z)
Cylindrical
(r,,z)
z Spherical
(r,,)
z
y
General orthogonal
Coordinates
10
u
v
w
2 2 2
t
x
y
z
x
y
z
x
2v 2v 2v
v
v
v
v
p
u v w 2 2 2
t
x
y
z
y
y
z
x
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
(Re)
12
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 nonreflecting (for compressible flows, such as acoustics), etc.
Inlet ,u=c,v=0
r
v=0, dp/dr=0,du/dr=0
Axisymmetric
14
(Re)
etc
15
Turbulent models:
Free-surface models:
17
Numerical methods
The continuous Initial Boundary Value Problems
Discretization methods
Solvers and numerical parameters
Grid generation and transformation
High Performance Computation (HPC) and postprocessing
18
Discretization methods
Finite difference methods (straightforward to apply,
19
20
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
y
m=MM+1
m=MM
(L,m)
m=1
m=0
(L,m-1)
L-1
2u
u vml
uml 1 uml FD Sign( v l )<0
v
m
y y
vml
uml uml 1 BD Sign( l )>0
y
vm
21
3
1
B1
B2
FD
ul
l
vml
vml
2 l
y
l
m
2 um 2
FD um1 2
BD uml 1
vm
1
y
x
y
y y
BD y
l
p
/
e
m
x
uml l 1
um ( p / e)lm
x
x
B4
Solve it using
l 1
B4u1
l
B
B
0
0
0
0
0
0
x e 1 Thomas algorithm
u1
2
B B B
0
0
0
0
0
1
2
3
0
0
0
0
0
B
B
B
1
2
3
l
l
0 0 0 0 0 0 B1 B2 umm
p
l 1
B4umm
x e mm
Diagonally dominant.
22
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
unstructured
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)
24
Transform
x
Physical domain
Computational domain
f f f
f
f
x
x
x x x
y
y
derivatives at these two domains have the
y y y
25
Strong scalability, main bottleneck pressure Poisson solver for incompressible flow.
Weak scalability, limited by the memory requirements.
26
Post-Processing
Post-processing: 1. Visualize the CFD results (contour, velocity
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
32
Physics
Flow conditions and fluid properties
Mesh
Meshes should be well designed to resolve
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 residuals
of the velocity, pressure and temperature, etc.
Report the integral quantities, such as total
pressure drop, friction factor (pipe flow), lift
and drag coefficients (airfoil flow), etc.
XY plots could present the centerline
velocity/pressure distribution, friction factor
distribution (pipe flow), pressure coefficient
distribution (airfoil flow).
AFD or EFD data can be imported and put on
top of the XY plots for validation
36
Post-processing
Analysis and visualization
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
S S T SM SN
Uncertainty:
2
2
U S2 U SM
U SN
SN I G T P I j
j 1
2
U SN
U I2 U G2 UT2 U P2
U
V
D
SN
E D S ( )
D
SM
SN
E UV
Validation achieved
38
k 21 Sk 2 Sk1
k 32 Sk 3 Sk 2
Monotonic Convergence
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
40
km
Skm SC xkm
pk( i )
Sk1 SC xk1
pk
ln k32 k21
ln rk
pk(1)
(1)
k
j 1, j k
*
k1
j 1, j k
*
jm
k* xk
m
i 1
g ki
Sk2 SC rk xk1
*
j1
pk i
(1)
k
g
(i )
k
i 1
pk(1)
j 1, j k
pk(1)
(1)
k
j 1, j k
*
j2
j 1, j k
*
RE k 1
*
j3
21
rkpk 1
41
ln k 32 k 21
pk
ln rk
1. Correction
factors
*
RE
k1
Ck
rkpk 1
pkest
k
k 21
pk
k
pkest
Ck
2nd
9.6 1 C 2 1.1 *
k
REk 1
U k
*
2
1
k
RE
k1
U kc 1C 1 * *
[| 1 kCk |] |REkRE1 |
k1
1 Ck 0.125
1 Ck 0.125
1 Ck 0.25
| 1 Ck | 0.25
*
FS: Factor of Safety
U kc Fs 1 RE
k1
Oscillatory Convergence: Uncertainties can1 be estimated, but without
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 Uk will be Ug
2. GCI approach
*
U k Fs RE
k1
42
Post-processing (Verification,
Asymptotic Range)
Asymptotic Range: For sufficiently small xk, the
43
defined ratios, L2 norm of the G21 and G32 are used to define RG
and PG
ln G
G
RG G21
32
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
(b)
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
UV U SN
U D2
Validation example
Example: Grid study
and validation of
wave profile for
series 60
46
47
48
50
51
52