computational fluid dynamics (cfd) for built environment · cfd definition cfd is the simulation of...
TRANSCRIPT
Computational Fluid
Dynamics (CFD) for Built
Environment
Dr. Ahmad Sleiti, Ph.D., P.E., CEM
Qatar University
Seminar 4 (For ASHRAE Members)
Date: Sunday 20th March 2016
Time: 18:30 - 21:00
Venue: Millennium Hotel
Sponsored by: ASHRAE Oryx Chapter
Outline
CFD Definition and Applications
CFD Modeling
Numerical methods
Types of CFD codes
CFD Process
Examples
2
CFD Definition
CFD is the simulation of fluid dynamics and heat transfer
Traditional approaches to flow and heat transfer:
Advancements in computational resources made CFD attractive
3
Analytical Fluid
Dynamics (AFD)
Source: Fox and McDonalds
Experimental
Fluid Dynamics
(EFD) Source: Sleiti and Idem, 2016
CFD for Design and Research
Design and Analysis
Simulation-based design instead of costly experiments
Simulation of phenomena that are difficult to solve by EFD or AFD
Large and full scale simulations (e.g., HVAC, airplanes, equipment)
Environmental simulations
Contamination, explosions, radiation
Research and exploration of flow and heat transfer physics
4
5
www.mechanical3dmodelling.com www.predictiveengineering.com
CFD Applications
HVAC Chemical Processing Hydraulics Automotive
Biomedical
www.mechanical3dmodelling.com
Aerospace Marine (movie) Sports
www.formula1-dictionary.net
Oil and Gas
www.enginsoft.com
Power Generation
www.coltgroup.com
Hydro Power
www.numeca.com
6
Impingement
Internal cooling
passages Pin-fin
cooling
Film cooling
holes Blade platform
Cooling air
Tip cap heat
transfer
IGV
CFD Applications in Turbomachinery
Source: Dr. Sleiti various projects
7
CFD Applications in Built
Environment
Atmospheric modeling
www.symscape.com
Thermal comfort and air quality
www.thinkfluid.eu
Smoke and fire propagation
www.aerotherm.co.za
Support HVAC design
www.mentor.com
Wind engineering
tmcporch.com
Duct fittings
Source: Dr. Sleiti various projects
Heat Exchangers
blogs.rand.com Operation
room
machinedesign.com
Example
8
www.mentor.com
Dynamic temperature and flow results, enable engineers to pinpoint
thermal and ventilation issues and visualize design improvements quickly
and effectively.
CFD 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:
o Geometry and domain
o Governing equations
o Flow conditions
o Initial and boundary conditions
o Solution model(s)
9
Geometry
Simple geometries easy to create
Complex geometries created using CAD software
then imported into commercial CFD code
Domain: size and shape
Typical approaches
• Geometry approximation
• CAD/CAE integration: use of industry
standards such as IGES, STEP, etc.
10
Governing equations
Navier-Stokes equations (3D in Cartesian coordinates)
2
2
2
2
2
2ˆ
z
w
y
w
x
w
z
p
z
ww
y
wv
x
wu
t
w
11
2
2
2
2
2
2ˆ
z
u
y
u
x
u
x
p
z
uw
y
uv
x
uu
t
u
2
2
2
2
2
2ˆ
z
v
y
v
x
v
y
p
z
vw
y
vv
x
vu
t
v
0
z
w
y
v
x
u
t
RTp
Convection Pressure gradient Viscous terms Local
acceleration
Continuity equation
Equation of state
Energy equation if needed
Flow conditions
12
Internal flow or external flow
Viscous vs. inviscid
Turbulent vs. laminar (Re)
Incompressible vs. compressible (Ma)
Single- vs. multi-phase
Thermal/density effects (Pr, g, Gr, Ec)
Combustion and Chemical reactions
Other
Initial conditions
Initial conditions (ICs) for transient flows
ICs affect convergence
To speed up the convergence, reasonable initial
guess is needed
For complicated unsteady flow problems, CFD
codes are usually run in steady mode for a few
iterations to get better initial conditions
13
Boundary conditions
14
Boundary conditions: o No-slip or slip-free on walls, periodic,
o inlet (velocity inlet, mass flow rate, pressure inlet, etc.),
o outlet (pressure, velocity, zero-gradient), and non-reflecting (for compressible flows, such as acoustics), etc.
Use of Periodic Boundaries to Define
Swirling Flow in a Cylindrical Vessel
Turbulence models
15
DNS: most accurate, but too expensive
RANS: predict mean flow structures, efficient inside
BL but excessive diffusion in the separated region.
LES: accurate in separation region
DES: RANS inside BL, LES in separated regions.
Numerical methods
Numerical methods include:
1. Discretization methods
2. Numerical parameters
3. Grid generation
4. Solver
5. Post-processing
16
Discretization methods (example)
• 2D incompressible laminar flow boundary layer
17
0
y
v
x
u
2
2
y
u
e
p
xy
uv
x
uu
m=0 m=1
L-1 L
y
x
m=MM m=MM+1
(L,m-1)
(L,m)
(L,m+1)
(L-1,m)
1l
l lmm m
uuu u u
x x
1
ll lmm m
vuv u u
y y
1
ll lmm m
vu u
y
2
1 12 22l l l
m m m
uu u u
y y
2nd order central difference
1st order upwind scheme, i.e.
18
1 12 2 2
1
2
1
l l ll l l lm m mm m m m
FDu v vy
v u FD u BD ux y y y y y
BDy
1 ( / )l
l lmm m
uu p e
x x
B2 B3 B1
B4 1
1 1 2 3 1 4 /ll l l l
m m m m mB u B u B u B u p e
x
1
4 1
12 3 1
1 2 3
1 2 3
1 2 1
4
0 0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 0
l
l
l
l lmm l
mm
mm
pB u
B B x eu
B B B
B B B
B B u pB u
x e
Matrix has to be Diagonally
dominant.
…Discretization methods (example)
Grid generation
Grids can either be structured (hexahedral) or unstructured (tetrahedral)
Scheme
o Finite differences: structured
o Finite volume or finite element: structured or unstructured
Application
o Thin boundary layers best resolved with highly-stretched structured grids
o Unstructured grids useful for complex geometries
o Unstructured grids permit automatic adaptive refinement based on the pressure gradient, or regions of interest
19
structured
unstructured
Types of CFD codes
Commercial CFD code
Research CFD code
Public domain software
Other CFD software includes the Grid generation software and flow visualization software
20
CFD Process: Geometry
Determine the domain size
and shape
Simplifications needed
21 Source: ANSYS - FLUENT
www.greenroofs.com
• Should be well designed to resolve
important flow features which are
dependent upon flow condition
parameters
22
CFD Process: Mesh
Source: Dr. Sleiti various projects
• Solve the momentum, pressure and other equations and get flow
field quantities, such as velocity, turbulence intensity, pressure
and integral quantities (lift, drag forces)
23
CFD Process: Solve
CFD Process: Post-processing
• Analysis and visualization
Calculation of derived variables
Vorticity
Wall shear stress
Calculation of integral parameters: forces, moments
Visualization
contour plots
Vector plots and streamlines
Animations
24
Source: Ansys Fluent
CFD Process: Verification and
Validation
• Simulation error: the difference between a simulation result S and the truth T (objective reality),
• Verification: process for assessing simulation numerical uncertainties
• Validation: process for assessing simulation modeling uncertainty by using benchmark experimental data
25
Example of CFD Process using
FLUENT
26
Turbulent Pipe Flow
Problem Specification
1. Pre-Analysis & Start-Up
2. Geometry
3. Mesh
4. Physics Setup
5. Numerical Solution
6. Numerical Results
7. Verification & Validation
27
Problem Specification
Inlet velocity = 1 m/s,
The fluid exhausts into the ambient atmosphere
density = 1 kg/m3.
µ = 2 x 10 -5 kg/(ms),
Reynolds Number = 10,000
Solve for: centerline velocity, skin friction coefficient
and the axial velocity profile at the outlet.
…Example of CFD Process
28
Geometry
…Example of CFD Process
29
Mesh
…Example of CFD Process
30
Physics Setup
…Example of CFD Process
31
Physics Setup
…Example of CFD Process
32
Numerical Solution
…Example of CFD Process
33
Numerical Results …Example of CFD Process
34
Numerical Results
…Example of CFD Process
35
Numerical Results
…Example of CFD Process
36
Verification and Validation
Comparing
Meshes:
100 X 60
and
100 X 30
…Example of CFD Process
37
Verification and Validation
Comparing
Meshes:
100 X 60
and
100 X 30
…Example of CFD Process
38
Verification and Validation
Comparing
Meshes:
100 X 60
and
100 X 30
…Example of CFD Process
Turbulence Modeling
• Choosing a Turbulence Model No single turbulence model is universally accepted as being superior for all classes of
problems.
The choice of turbulence model depends on considerations such as flow physics, the established practice for a specific class of problem, accuracy required, computational
resources, and time available for the simulation. • Reynolds-Averaged Approach vs. LES
• Two methods can be employed to transform the Navier-Stokes equations in such a way that the small-scale turbulent fluctuations do not have to be directly simulated: Reynolds averaging and filtering. Both methods introduce additional terms in the governing equations that need to be modeled in order to achieve “closure".
• The Reynolds-averaged approach is generally adopted for practical engineering calculations, and uses models such as, k-e, k-w and the RSM.
• LES provides an alternative approach in which the large eddies are computed in a time-dependent simulation that uses a set of “filtered" equations.
39
• Reynolds Averaging
40
Velocity components:
Pressure and other scalar quantities:
Reynolds-averaged Navier-Stokes (RANS) equations
Turbulence Modeling
Turbulence Modeling
• The Standard k-e Model
• The RNG k-e Model
• The Realizable k-e Model
41
Two-equation model in which the solution of two separate transport equations
allows the turbulent velocity and length scales to be independently determined.
Robust, economic, and reasonable accuracy for a wide range of turbulent flows
High Re model
Derived using a rigorous statistical technique (called renormalization group theory). Has an additional term in its e equation that significantly improves the accuracy for
rapidly strained flows. The effect of swirl on turbulence is included. Accounts for low-Reynolds-number effects.
Contains a new formulation for the turbulent viscosity.
A new transport equation for the dissipation rate, e.
Accurately predicts the spreading rate of both planar and round jets.
Flows involving rotation, boundary layers under strong adverse pressure
gradients, separation, and recirculation.
Turbulence Modeling
• The Standard k-w Model
• The Shear-Stress Transport (SST) k-w Model
• The Reynolds Stress Model (RSM)
42
Incorporates modifications for low-Reynolds-number effects,
compressibility, and shear flow spreading.
Predicts free shear flow spreading rates for far wakes, mixing layers,
and plane, round, and radial jets.
Developed to effectively blend the robust and accurate formulation of
the k-w model in the near-wall region with the free-stream
accurate and reliable for a wider class of flows (e.g., adverse
pressure gradient flows, airfoils, transonic shock waves)
4 additional transport equations are required in 2D flows and 7 in 3D.
Accounts for the effects of streamline curvature, swirl, rotation, and rapid
changes in strain rate
limited by the closure assumptions employed to model various terms in
the exact transport equations for the Reynolds stresses.
• Near-Wall Treatments for Wall-Bounded Turbulent Flows
43
The k-e models, the RSM, and
the LES model are primarily
valid for turbulent core flows
(i.e., the flow in the regions
somewhat far from walls).
Consideration therefore needs
to be given as to how to make
these models suitable for wall-
bounded flows.
The k-w models were designed
to be applied throughout the
boundary layer, provided that
the near-wall mesh resolution is
sufficient.
The near-wall region can be
subdivided into three layers:
Sources: http://jullio.pe.kr
• Wall Functions vs. Near-Wall Model
44
Sources: http://jullio.pe.kr
ASHRAE RP-1682
Study to Identify CFD Models for Use in
Determining HVAC Duct Fitting Loss
Coefficients
Principal Investigators:
Ahmad Sleiti, Ph.D., PE
Qatar University
Stephen Idem, Ph.D.
Tennessee Tech University
Straight Duct
46
CFD k-e Smooth:
60 x 200 grid
Enhanced near wall
treatment
Results: accurate within 5%
for Re < 250,000.
For higher Re the error >
10%
The reason: Y plus
CFD k-e Smooth,
Modified Y Plus:
The grid points were
increased to maintain Y
plus less than 25
The error became < 3 %
CFD k-e for e/D = 0.009
rough duct:
60 x 200 grid size and
standard wall functions
Results: CFD accurate
within 7% error for high Re
(more than 250,000) and
within 12% for low Re (less
than 250,000).
Figure 1. 203 mm (8.0 in.) Diameter Straight Duct Moody Diagram. Comparison of CFD k-e
turbulence model to experimental results
Source: work done by Drs Sleiti and Idem
47
CFD RNG k-e for e/D =
0.009 rough duct:
60 x 200 grid size and
standard wall functions
Results: error ranges
from 6% to more than
17%
CFD Realizable k-e for
e/D = 0.009 rough
duct:
60 x 200 grid size and
standard wall functions
Results: error ranges
from 10% to more than
21%
Figure 2. 203 mm (8.0 in.) Diameter Straight Duct Moody Diagram. Comparison of CFD k-
eRealizable k-e and RNG k-e turbulence models with wall roughness to experimental results
Straight Duct
Source: work done by Drs Sleiti and Idem
Single Elbow
48
CFD Standard k-e for
e/D = 0.009 rough
duct:
grid size of 60 x 200 in
the entrance region, 60
x 22 in the curve region
and 60 x 160 in the exit
region and with standard
wall functions
Results: error ranges
from 5% to more than
18%
CFD Standard k-w for
e/D = 0.009 rough
duct:
grid size of 60 x 200 in
the entrance region, 60
x 22 in the curve region
and 60 x 160 in the exit
region and with standard
wall functions
Results: ranges from 9%
to more than 19% Figure 5. 203 mm (8.0 in.) Diameter Single Elbow Loss Coefficient. Comparison of CFD k-e and
k-w turbulence models to experimental results Source: work done by Drs Sleiti and Idem
• Double Elbow Loss Coefficient: Z-Configuration
49
CFD Standard k-e for e/D
= 0.009 rough duct:
grid size of 60 x 200 in the
entrance region, 60 x 22 in
the curve regions and 60 x
160 in the exit region and
with standard wall
functions.
Results: error ranges from
0.1% to more than 18%.
CFD Standard k-w for e/D
= 0.009 rough duct:
grid size of 60 x 200 in the
entrance region, 60 x 22 in
the curve regions and 60 x
160 in the exit region and
with standard wall
functions.
Results: error ranges from
7% to more than 24%.
0
20
40
60
80
100
120
140
160
180
0 50 100 150 200 250 300 350 400 450 500
Tota
l Pre
ssu
re L
oss
(P
a)
Velocity Pressure (Pa)
Experimental Data
CFD k-e
CFD k-w
Figure 6. 203 mm (8.0 in.) Diameter Double Elbow Loss Coefficient: Z-Configuration Lint =
2.52 m (8.28 ft). Comparison of CFD k-e and k-w turbulence models to experimental results Source: work done by Drs Sleiti and Idem
U-Configuration
50
ANSI/ASHRAE Standard
120-2008: Figure 17
y = 0.352xR² = 0.994
0
20
40
60
80
100
120
140
160
180
0 100 200 300 400 500
To
tal
Pre
ssu
re L
os
s (
Pa
)
Velocity Pressure (Pa)
Experimental
CFD
Linear (Experimental)
203 mm (8.0 in.) Diameter Double Elbow Loss
Coefficient: U-Configuration Lint = 2.52 m (8.28 ft)
51
Results: Static Pressure
Contours of static pressure in Pa
CFD - U-Configuration for 12 in diameter - LoD = 10