Computational Fluid Dynamics (CFD) for Built Environment Seminar 4 (For ASHRAE Members) Date: Sunday 20th March 2016 Time: 18:30-21:00 Venue: Millennium Hotel Sponsored by: ASHRAE Oryx Chapter Dr. Ahmad Sleiti, Ph.D., P.E., CEM Qatar University asleiti@qu.edu.qa
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: Analytical Fluid Dynamics (AFD) Source: Fox and McDonalds Experimental Fluid Dynamics (EFD) Source: Sleiti and Idem, 2016 Advancements in computational resources made CFD attractive 3
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
CFD Applications HVAC Chemical Processing Hydraulics Automotive www.mechanical3dmodelling.com www.predictiveengineering.com Biomedical Aerospace Marine (movie) Sports www.formula1-dictionary.net www.mechanical3dmodelling.com Oil and Gas Power Generation Hydro Power www.enginsoft.com www.coltgroup.com www.numeca.com 5
CFD Applications in Turbomachinery Tip cap heat transfer Impingement Pin-fin cooling Film cooling holes Internal cooling passages Blade platform IGV Cooling air Source: Dr. Sleiti various projects 6
CFD Applications in Built Environment Atmospheric modeling Thermal comfort and air quality Smoke and fire propagation www.symscape.com www.thinkfluid.eu www.aerotherm.co.za Support HVAC design Wind engineering Duct fittings www.mentor.com tmcporch.com Source: Dr. Sleiti various projects blogs.rand.com Operation room Heat Exchangers machinedesign.com 7
Example www.mentor.com Dynamic temperature and flow results, enable engineers to pinpoint thermal and ventilation issues and visualize design improvements quickly and effectively. 8
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 w w y w v x w u t w 11 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 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 z w y v x u t p RT Convection Pressure gradient Viscous terms Local acceleration Continuity equation Equation of state Energy equation if needed
Flow conditions 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 12
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 Boundary conditions: o o o No-slip or slip-free on walls, periodic, inlet (velocity inlet, mass flow rate, pressure inlet, etc.), 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 14
Turbulence models 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. 15
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 x y u v x u u 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) 1 l l l m m m u u u u u x x 1 l l l m m m v u v u u y y 1 l l l m m m v u u y 2 1 1 2 2 2 l l l m m m u u u u y y 2 nd order central difference 1 st order upwind scheme, i.e.
Discretization methods (example) B 2 B 3 B 1 1 FD u y 2 v v x 1 BD y y y y y y l l l m l l m l m l vm u 2 m FD u 2 m1 BD u 2 m1 l l l l1 l B1u m1 B2um B3u m1 B4 um p / e m x l1 l um u l1 m x l p l Bu 4 1 B2 B3 0 0 0 0 0 0 u x e 1 1 B1 B2 B3 0 0 0 0 0 0 0 0 0 0 B B B 1 2 3 l l 0 0 0 0 0 0 B1 B 2 u mm l1 p Bu 4 mm x e mm Matrix has to be Diagonally dominant. B 4 ( p / e ) x l m 18
Grid generation Grids can either be structured (hexahedral) or unstructured (tetrahedral) structured 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 unstructured 19
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 www.greenroofs.com Simplifications needed Source: ANSYS - FLUENT 21
CFD Process: Mesh Should be well designed to resolve important flow features which are dependent upon flow condition parameters Source: Dr. Sleiti various projects 22
CFD Process: Solve 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: 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 Source: Ansys Fluent Animations 24
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 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 26
Problem Specification Example of CFD Process Inlet velocity = 1 m/s, The fluid exhausts into the ambient atmosphere density = 1 kg/m 3. µ = 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. 27
Geometry Example of CFD Process 28
Mesh Example of CFD Process 29
Physics Setup Example of CFD Process 30
Physics Setup Example of CFD Process 31
Example of CFD Process Numerical Solution 32
Example of CFD Process Numerical Results 33
Example of CFD Process Numerical Results 34
Numerical Results Example of CFD Process 35
Verification and Validation Comparing Meshes: 100 X 60 and 100 X 30 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
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 Velocity components: Turbulence Modeling Pressure and other scalar quantities: Reynolds-averaged Navier-Stokes (RANS) equations 40
The Standard k-e Model The RNG k-e Model Turbulence Modeling 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. The Realizable k-e Model 41 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.
The Standard k-w Model Turbulence Modeling 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 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 wallbounded 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 43
Wall Functions vs. Near-Wall Model Sources: http://jullio.pe.kr 44
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 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). 46 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
Straight Duct 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% 47 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 Source: work done by Drs Sleiti and Idem
Single Elbow 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% 48 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
Total Pressure Loss (Pa) Double Elbow Loss Coefficient: Z-Configuration 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%. 180 160 140 120 100 Experimental Data CFD k-w 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%. 80 60 40 20 0 0 50 100 150 200 250 300 350 400 450 500 Velocity Pressure (Pa) CFD k-e 49 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
Total Pressure Loss (Pa) U-Configuration 180 160 140 120 Experimental CFD Linear (Experimental) y = 0.352x R² = 0.994 100 80 ANSI/ASHRAE Standard 120-2008: Figure 17 60 40 20 0 0 100 200 300 400 500 Velocity Pressure (Pa) 203 mm (8.0 in.) Diameter Double Elbow Loss Coefficient: U-Configuration L int = 2.52 m (8.28 ft) 50
CFD - U-Configuration for 12 in diameter - LoD = 10 Results: Static Pressure Contours of static pressure in Pa 51