Upload
brian-xistos
View
39
Download
9
Tags:
Embed Size (px)
DESCRIPTION
Computational fluid dynamics (CFD) is one of the branches of fluid mechanics that uses numerical methods and algorithms to solve and analyze problems that involve fluid flows. Computers are used to perform the millions of calculations required to simulate the interaction of liquids and gases with surfaces defined by boundary conditions. Even with high-speed supercomputers only approximate solutions can be achieved in many cases. Ongoing research, however, may yield software that improves the accuracy and speed of complex simulation scenarios such as transonic or turbulent flows. Initial validation of such software is often performed using a wind tunnel with the final validation coming in flight test.
Computational Tools for Aircraft DesignITA – Aircraft Design Department
V 18
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 2
• CFD What It is?• Overview on Mesh Technology• Turbulence Modeling
Contents
3
CFD What It Is?
4
Fluid (gas and liquid) flows are governed by partial differential equations (PDE) which represent conservation laws for the mass, momentum, and energy. Computational Fluid Dynamics (CFD) is the art of replacing such PDE systems by a set of algebraic equations which can be solved using digital computers. The object under study is also represented computationally in an approximate discretized form.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 5
Introduction Why use CFD?
Numerical simulations of fluid flow (will) enable
• architects to design comfortable and safe living environments• designers of vehicles to improve the aerodynamic characteristics• chemical engineers to maximize the yield from their equipment• petroleum engineers to devise optimal oil recovery strategies• surgeons to cure arterial diseases (computational hemodynamics)• meteorologists to forecast the weather and warn of natural
disasters• safety experts to reduce health risks from radiation and other
hazards• military organizations to develop weapons and estimate the
damage• CFD practitioners to make big bucks by selling colorful pictures :-)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 6
Introduction
Practice of engineering and science has been dramatically altered by the development of
Scientific computingMathematics of numerical analysisTools like neural networksThe Internet
Computational Fluid Dynamics is based upon the logic of applied mathematics
provides tools to unlock previously unsolved problemsis used in nearly all fields of science and engineering
Aerodynamics, acoustics, bio-systems, cosmology, geology, heat transfer, hydrodynamics, river hydraulics, etc…
What is?
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 7
Introduction – What It is?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.)
CFD made possible by the advent of digital computer and advancing with improvements of computer resources (500 flops, 1947à20 teraflops, 2003)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 8
Introduction – Why Use CFD?
Analysis and Design1. 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* Experimental Fluid Dynamics
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 9
Introduction
“We are in the midst of a new Scientific Revolution as significant as that of the 16th and 17th centuries when Galilean methods of systematic experiments and observation supplanted the logic-based methods of Aristotelian physics”
“Modern tools, i.e., computational mechanics, are enabling scientists and engineers to return to logic-based methods for discovery and invention, research and development, and analysis and design”
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 10
IntroductionScientific method
Aristotle (384-322 BCE)Greek philosopher, student of PlatoLogic and reasoning was the chief instrument of scientific investigation; Posterior AnalyticsTo possess scientific knowledge, we need to know the cause of which we observe
Through their senses humans encounter facts or dataThrough inductive means, principles created which will explain the dataThen, from the principles, work back down to the facts
Example: Demonstration of the fact (Demonstratio quia) » The planets do not twinkle» What does not twinkle is near the earth» Therefore the planets are near the earth
Knowledge of Aristotle’s work lost to Europe during Dark Ages. Preserved by Mesopotamian (modern day Iraq) libraries.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 11
IntroductionScientific method
Galileo Galilei (1564-1642)Formulated the basic law of falling bodies, which he verified by careful measurements. He constructed a telescope with which he studied lunar craters, and discovered four moons revolving around Jupiter.Observation-based experimental methods: required instruments & tools ; e.g., telescope, clocks.Scientific Revolution took place in the sixteenth and seventeenth centuries, its first victories involved the overthrow of Aristotelian physics
Convicted of heresy by Catholic Church for belief that the Earth rotates round the sun. In 1992, 350 years after Galileo's death, Pope John Paul II admitted that errors had been made by the theological advisors in the case of Galileo.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 12
IntroductionMathematics
Isaac Newton (1643 – 1727)Laid the foundation (along with Leibniz) for differential and integral calculusIt has been claimed that the Principiais the greatest work in the history of the physical sciences. Book I: general dynamics from a mathematical standpoint Book II: treatise on fluid mechanicsBook III: devoted to astronomical and physical problems. Newton addressed and resolved a number of issues including the motions of comets and the influence of gravitation. For the first time, he demonstrated that the same laws of motion and gravitation ruled everywhere under a single mathematical law.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 13
IntroductionFluid Mechanics
Faces of Fluid Mechanics : some of the greatest minds of history have tried to solve the mysteries of fluid mechanics
Archimedes Da Vinci Newton Leibniz Euler
Bernoulli Navier Stokes Reynolds Prandtl
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 14
From mid-1800’s to 1960’s, research in fluid mechanics focused upon
Analytical methodsExact solution to Navier-Stokes equations (~80 known for simple problems, e.g., laminar pipe flow)Approximate methods, e.g., Ideal flow, Boundary layer theory
Experimental methodsScale models: wind tunnels, water tunnels, towing-tanks, flumes,...Measurement techniques: pitot probes; hot-wire probes; anemometers; laser-doppler velocimetry; particle-image velocimetryMost man-made systems (e.g., airplane) engineered using build-and-test iteration.
1950’s – present : rise of computational fluid dynamics (CFD)
IntroductionFluid Mechanics
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 15
IntroductionHistory of computing
Computing, 1945-1960Early computer engineers thought that only a few dozen computers required worldwideApplications: cryptography (code breaking), fluid dynamics, artillery firing tables, atomic weaponsENIAC, or Electronic Numerical Integrator Analyzor and Computer, was developed by the Ballistics Research Laboratory in Maryland and was built at the University of Pennsylvania's Moore School of Electrical Engineering and completed in November 1945
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 16
IntroductionHistory of computing
In the early 1930s Polish cryptographers first broke the code of Germany's cipher machine Enigma. They were led bymathematician Marian Rejewski and assisted by material provided to them by agents of French intelligence. For much ofthe decade, the Poles were able to decipher their neighbour's radio traffic, but in 1939, faced with possible invasion anddifficulties decoding messages because of changes in Enigma's operating procedures, they turned their information over tothe Allies. Early in 1939 Britain's secret service set up the Ultra project at Bletchley Park, 50 miles (80 km) north ofLondon, for the purpose of intercepting the Enigma signals, deciphering the messages, and controlling the distribution ofthe resultant secret information. Strict rules were established to restrict the number of people who knew about the existenceof the Ultra information and to ensure that no actions would alert the Axis powers that the Allies possessed knowledge oftheir plans.The incoming signals from the German war machine (more than 2,000 daily at the war's height) were of the highest level,even from Adolf Hitler himself. Such information enabled the Allies to build an accurate picture of enemy plans and ordersof battle, forming the basis of war plans both strategic and tactical. Ultra intercepts of signals helped the Royal Air Force towin the Battle of Britain. Intercepted signals between Hitler and General Günther von Kluge led to the destruction of alarge part of the German forces in Normandy in 1944 after the Allied landing.
Left. The Colossus computer at Bletchley Park,Buckinghamshire, England, c. 1943. Funding for thiscode-breaking machine came from the Ultra project.
Ultra Project
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 17
IntroductionHigh-performance computing
Top 500 computers in the world compiled: www.top500.orgComputers located at major centers connected to researchers via Internet
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 18
Outline – CFD What It is?
CFD ProcessModel EquationsDiscretizationGrid GenerationBoundary ConditionsSolvePost-ProcessingUncertainty Assessment
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 19
Where is CFD used?
Where is CFD used?
AerospaceAutomotiveBiomedicalChemical ProcessingHVACHydraulicsMarineOil & GasPower GenerationSports
F18 Store Separation
Temperature and natural convection currents in the eye following laser heating.
Aerospace
Automotive
Biomedical
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 20
Where CFD Is Used? Aircraft Design
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 21
Where CFD Is Used? Aircraft Design
Prediction of the wake vortices up to 6.5 wingspans generated by the DLR-F11 aircraft model making use of a 4th-order central scheme and the automatic mesh refinement technique. Inviscid simulation, M∞=0.2, α=10°
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 22
Where CFD Is Used? Aircraft Design
Comparison of Computed Wake Vortex Evolution Flowfield (OVERFLOW Code) with Experiment (“2-pair”)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 23
Where CFD Is Used? Aircraft Design
Stagnation pressure loss at the fan face of an air-intake at the fixed point submitted to crosswind. M∞ = 0.045, α = 0o,β = 9o, Re = 3.9x106. Airbus France, NSMB code.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 24
Where is CFD used?
Polymerization reactor vessel - prediction of flow separation and residence time effects.
Streamlines for workstation ventilation
Where is CFD used?AerospaceeAutomotiveBiomedicalChemical ProcessingHVACHydraulicsMarineOil & GasPower GenerationSports
HVAC
Chemical Processing
Hydraulics
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 25
Where is CFD used?
Where is CFD used?AerospaceAutomotiveBiomedicalChemical ProcessingHVACHydraulicsMarineOil & GasPower GenerationSports
Flow of lubricating mud over drill bit
Flow around cooling towers
Marine
Oil & Gas
Sports
Power Generation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 26
Where is CFD used?
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 27
Getting Started: CFD Notation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 28
Getting Started: Tensorial Quantities in Fluid Dynamics
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 29
Getting Started: Vector Multiplication Rules
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 30
Getting Started: Elementary Tensor Calculus
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 31
Getting Started: Divergence Theorem of Gauss
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 32
Getting Started: Governing Equations of Fluid Dynamics
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 33
Getting Started: Description of Fluid Motion
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 34
Getting Started: Flow Models and Reference Frames
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 35
Getting Started: Eulerian vs. Langrangian Viewpoint
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 36
Getting Started: governing equations
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 37
Getting Started: classification of PDEs
PDEs can be classified into hyperbolic, parabolic and elliptic ones• each class of PDEs models a different kind of physical processes• the number of initial/boundary conditions depends on the PDE ype• different solution methods are required for PDEs of different type
Hyperbolic equations Information propagates in certain directions at finite speeds; the solution is a superposition of multiple single wavesParabolic equations Information travels downstream/forward in time; directions at finite speeds; the solution can be constructed using a marching/time-stepping methodElliptic equations Information propagates in all directions at infinite speed; describe equilibrium phenomena (unsteady problems are never elliptic
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 38
Getting Started: classification of PDEs
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 39
Getting Started: classification of PDEs
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 40
CFD Process
Viscous Model
Boundary Conditions
Initial Conditions
Convergent Limit
Contours
Precisions(single/double)
Numerical Scheme
Vectors
StreamlinesVerification
Geometry
Select Geometry
Geometry Parameters
Physics Mesh Solve Post-Processing
CompressibleON/OFF
Flow properties
Unstructured(automatic/
manual)
Steady/Unsteady
Forces Report(lift/drag, shear stress, etc)
XY Plot
Domain Shape and
Size
Heat Transfer ON/OFF
Structured(automatic/
manual)
Iterations/Steps
Validation
Reports
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 41
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 domain2. Coordinates3. Governing equations4. Flow conditions5. Initial and boundary conditions6. Selection of models for different applications
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 42
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).
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 43
Modeling (governing equations) – Navier-stokes Equations
∂∂
+∂∂
+∂∂
+∂∂
−=∂∂
+∂∂
+∂∂
+∂∂
2
2
2
2
2
2ˆzu
yu
xu
xp
zuw
yuv
xuu
tu µρρρρ
∂∂
+∂∂
+∂∂
+∂∂
−=∂∂
+∂∂
+∂∂
+∂∂
2
2
2
2
2
2ˆzv
yv
xv
yp
zvw
yvv
xvu
tv
µρρρρ
( ) ( ) ( ) 0=∂
∂+
∂∂
+∂
∂+
∂∂
zw
yv
xu
tρρρρ
RTp ρ=
L
v ppDtDR
DtRDR
ρ−
=+ 22
2
)(23
Convection Piezometric pressure gradient Viscous termsLocalacceleration
Continuity equation
Equation of state
Rayleigh Equation
∂∂
+∂∂
+∂∂
+∂∂
−=∂∂
+∂∂
+∂∂
+∂∂
2
2
2
2
2
2ˆzw
yw
xw
zp
zww
ywv
xwu
tw
µρρρρ
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 44
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 (Mach number)
• 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…
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 45
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
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 46
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 airfoilo
r
xAxisymmetric
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 47
Modeling (selection of models)
• CFD codes typically designed for solving certain fluidphenomenon 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…
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 48
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
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 49
Examples of modeling (Turbulence and free surface models)
DES, Re=105, Iso-surface of Q criterion (0.4) for turbulent flow around NACA12 with angle of attack 60 degrees
URANS, Re=105, contour of vorticity for turbulent flow around NACA12 with angle of attack 60 degrees
URANS, Wigley Hull pitching and heaving
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 50
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 methods2. Solvers and numerical parameters3. Grid generation and transformation4. High Performance Computation (HPC) and post-
processing
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 51
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 2nd 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 implicitmethod (e.g. Beam-Warming method)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 52
Discretization methods (Cont’d)
• Explicit methods can be easily applied but yield conditionally stable Finite Different Equations (FDEs), which are restricted by the time step; Implicit methodsare 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.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 53
Discretization methods (Cont’d)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 54
Discretization methods (Cont’d)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 55
Discretization methods (Cont’d)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 56
Discretization methods (Cont’d)
Analysis of trunctation errors
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 57
Discretization methods (Cont’d)
Approximation of second-order derivatives
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 58
Discretization methods (Cont’d)
Approximation of mixed derivatives
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 59
Discretization methods (Cont’d)
High-order approximations
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 60
Discretization methods (example)
0=∂∂
+∂∂
yv
xu
2
2
yu
ep
xyuv
xuu
∂∂
+
∂∂
−=∂∂
+∂∂
µ
• 2D incompressible laminar flow boundary layer
m=0m=1
L-1 L
y
x
m=MMm=MM+1
(L,m-1)
(L,m)
(L,m+1)
(L-1,m)
1l
l lmm m
uuu u ux x
−∂ = − ∂ ∆
1
ll lmm m
vuv u uy y +
∂ = − ∂ ∆
1
ll lmm m
v u uy − = − ∆
FD Sign( )<0lmv
lmvBD Sign( )>0
2
1 12 2 2l l lm m m
u u u uy y
µµ + −
∂ = − + ∂ ∆
2nd order central differencei.e., theoretical order of accuracyPkest= 2.
1st order upwind scheme, i.e., theoretical order of accuracy Pkest= 1
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 61
Discretization methods (example)
1 12 2 2
12
1
l l ll l l lm m mm m m m
FDu v vyv u FD u BD u
x y y y y yBDy
µ µ µ+ −
− ∆+ − + + + − ∆ ∆ ∆ ∆ ∆ ∆ ∆
1 ( / )l
l lmm m
u u p ex x
− ∂= −
∆ ∂
B2 B3 B1
B4( )11 1 2 3 1 4 / ll l l l
m m m m mB u B u B u B u p ex
−− +
∂+ + = −
∂1
4 112 3 1
1 2 3
1 2 3
1 2 14
0 0 0 0 0 00 0 0 0 0
0 0 0 0 00 0 0 0 0 0
ll
l
l lmm l
mmmm
pB uB B x euB B B
B B BB B u pB u
x e
−
−
∂ − ∂ •• × =• • • • •• •• ∂ − ∂
Solve it usingThomas algorithm
To be stable, Matrix has to be Diagonally dominant.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 62
Solvers and numerical parameters• Solvers include: tridiagonal, pentadiagonal solvers,
PETSC solver, solution-adaptive solver, multi-grid solvers, etc.
• Solvers can be either direct (Cramer’s 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
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 63
DiscretizationGrid Generation
Flow field must be treated as a discrete set of points (or volumes) where the governing equations are solved.Many types of grid generation: type is usually related to capability of flow solver.
Structured gridsUnstructured gridsHybrid grids: some portions of flow field are structured (viscous regions) and others are unstructuredOverset (Chimera) grids
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 64
DiscretizationGrid Generation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 65
DiscretizationGrid Generation
Block-structured meshes• Multilevel subdivision of the domain with structured grids within blocks• Can be non-matching, special treatment is necessary at block interfaces• Provide greater flexibility, local refinement can be performed blockwiseUnstructured meshes• Suitable for arbitrary domains and amenable to adaptive mesh refinement• Consist of triangles or quadrilaterals in 2D, tetrahedra or hexahedra in 3D• Complex data structures, irregular sparsity pattern, difficult to implement
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 66
DiscretizationGrid Generation: examples of cell types
2D Cell Types
3D Cell Types
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 67
Structured Grids
Structured multi-block grid around a multi-element airfoil
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 68
Structured Grids
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 69
Structured Overset Grids
Submarine
Moving Control Surfaces
Artificial Heart Chamber
Surface Ship Appendages
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 70
Unstructured Grids
Branches in Human LungStructured-Unstructured Nozzle Grid
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 71
Unstructured Grids
Unstructured surface mesh for external aerodynamics – PT cruiser – 12 millions cells
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 72
DiscretizationAlgebraic equations
To solve NSE, we must convert governing PDE’s to algebraic equations
Finite difference methods (FDM)Each term in NSE approximated using Taylor series, e.g.,
Finite volume methods (FVM)Use CV form of NSE equations on each grid cell ! ME 33 students already know the fundamentals !Most popular approach, especially for commercial codes
Finite element methods (FEM)Solve PDE’s by replacing continuous functions by piecewise approximations defined on polygons, which are referred to as elements. Similar to FDM.
( )
( )( )
1
221 1
22
2
i i
i i i
U U U O xx xU U U U O xx x
+
+ −
∂ −= + ∆
∂ ∆∂ − +
= + ∆∂ ∆
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 73
Solve
Run CFD code on computer
2D and small 3D simulations can be run on desktop computers (e.g., FlowLab)Unsteady 3D simulations still require large parallel computers
Monitor ResidualsDefined two ways
Change in flow variables between iterationsError in discrete algebraic equation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 74
Post-processing Pressure Distribution
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 75
Post-processing Pathlines
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 76
Post-processing Pathlines
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 77
Post-processing Trajectory
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 78
Post-processing Unsteady flow
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 79
Uncertainty Assessment
Process of estimating errors due to numerics and modeling
Numerical errors Iterative non-convergence: monitor residualsSpatial errors: grid studies and Richardson extrapolationTemporal errors: time-step studies and Richardson extrapolation
Modeling errors (Turbulence modeling, multi-phase physics, closure of viscous stress tensor for non-Newtonian fluids)
Only way to assess is through comparison with benchmark data which includes EFD uncertainty assessment.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 80
Limitations of Current Technology
For fluid mechanics, many problems not adequately described by Navier-Stokes equations or are beyond current generation computers.
TurbulenceMulti-phase physics: solid-gas (pollution, soot), liquid-gas (bubbles, cavitation); solid-liquid (sediment transport)Combustion and chemical reactionsNon-Newtonian fluids (blood; polymers)
Similar modeling challenges in other branches of engineering and the sciences
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 81
Conclusions
Because of limitations, need for experimental research is greatHowever, focus has changed
From Research based solely upon experimental observationsBuild and test (although this is still done)
ToHigh-fidelity measurements in support of validation and building new computational models.
Currently, the best approach to solving engineering problems often uses simulation and experimentation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 82
Applications
Capabilities of Current TechnologyComplex real-world problems solved using Scientific ComputingCommercial software available for certain problemsSimulation-based design (i.e., logic-based) is being realized.Ability to study problems that are either expensive, too small, too large, or too dangerous to study in laboratory
Very small : nano- and micro-fluidicsVery large : cosmology (study of the origin, current state, and future of our Universe)Expensive : engineering prototypes (ships, aircraft)Dangerous : explosions, fires
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 83
Some important Links
http://www.cfd-online.com
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 84
Some important Links
http://www.fluent.com
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 85
Some important Links
http://www.aoe.vt.edu/~mason/Mason_f/MRsoft.html
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 86
Some important Links
http://www.ensight.com/
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 87
Some important Linkshttp://www.metacomptech.com
ProductsCFD++
CFD++ is a superset of the various CFD methodologies available and provides accuracy, robustness and ease of use over all flow regimes.
MIME
Multipurpose Intelligent Meshing Environment for CFD++, CAA++ and ED. Powerful mesh generation software, yet it is so simple to use.
CAA++
Computational Aeroacoustics Software Suite. Metacomp's cost effective solution to noise prediction.
ED Designer
Computational Electrostatic Paint Deposition tool from Metacomp. Developed in collaboration with Delight Inc., Japan.
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 88
Some important Links
http://www.sai.msu.su/sal/sal1.shtml
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 89
Some important Links
http://gd.tuwien.ac.at/study/baum-lse/node2.html
Linux Software Encyclopedia
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 90
Literature
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 91
Literature
9. Fletcher, C. A. J. “Computational Techniques for Fluid Dynamics,” SpringerSeries in Computational Physics, Vols. 1-2, 2nd Edition, 1991.
92
Overview on Mesh Technology
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 93
Single Block Grids – Creating the Mapping
Conformal MappingTransfinite InterpolationSolving PDEs
EllipiticParabolic/Hyperbolic
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 94
Single Block Grids – Creating the Mapping
Conformal Mapping
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 95
Single Block Grids – Creating the Mapping
Conformal Mapping Transformations
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 96
Single Block Grids – Creating the Mapping
Conformal Mapping – Schwarz Christoffel
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 97
Single Block Grids – Creating the Mapping
Algebraic Mappings
• Construct mapping between the boundaries of the unit square (cube) and the boundaries of an “arbitrary” region which is topologically equivalent
• Combine 1 D interpolants using Boolean sums to construct mapping-Transfinite interpolation (TFI)
• Not guaranteed to be one-to-one• Orthogonality not guaranteed• Very fast• Quite General• Grid quality not always assured
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 98
Single Block Grids – Creating the Mapping
Algebraic Mappings – 1D Interpolants
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow 99
Single Block Grids – Creating the Mapping
Algebraic Mappings – Transfinite Interpolation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow100
Single Block Grids – Creating the Mapping
Algebraic Mappings – Transfinite Interpolation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow101
Single Block Grids – Creating the Mapping
Algebraic Mappings – Example
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow102
Single Block Grids – Creating the Mapping
Algebraic Mappings – Example
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow103
Single Block Grids – Creating the Mapping
Algebraic Mappings – Example
Numerically generated airfoil transformation [(x, y) ↔ (ξ, η)] showing a “C” grid topology
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow104
Single Block Grids – Creating the Mapping
Algebraic Mappings – Example
Numerically generated wing transformation [(x, y, z) ↔ (ξ, η, ζ)] showing a “O” grid topology
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow105
Single Block Grids – Creating the Mapping
PDE Grid Generation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow106
CFD Perspective on Meshing Technology
CFD initiated in structured grid contextTransfinite interpolationElliptic grid generationHyperbolic grid generation
Smooth, orthogonal structured gridsRelatively simple geometries
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow107
Unstructured meshes initially confined to FE community
CFD Discretizations based on directional splittingLine relaxation (ADI) solversStructured Multigrid solvers
Sparse matrix methods not competitiveMemory limitationsNon-linear nature of problems
CFD Perspective on Meshing Technology
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow108
Current State of Unstructured Mesh CFD Technology
Method of choice for many commercial CFD vendors
Fluent, StarCD, CFD++, …Advantages
Complex geometries ßAdaptivityParallelizability
Enabling factorsMaturing grid generation technologyBetter Discretizations and solvers
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow109
Maturing Unstructured Grid Generation Technology (1990-2000)
Isotropic tetrahedral grid generationDelaunay point insertion algorithmsSurface recoveryAdvancing front techniquesOctree methods
Mature technologyNumerous available commercial packagesRemaining issues
Grid qualityRobustnessLinks to CAD
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow110
Maturing Unstructured Grid Generation Technology (1990-2000)
Anisotropic unstructured grid generationExternal aerodynamics
Boundary layers, wakes: O(10**4)Mapped Delaunay triangulationsMin-max triangulationsHybrid methods ß
Advancing layersMixed prismatic – tetrahedral meshes
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow111
Anisotropic Unstructured Grid Generation
Hybrid methodsSemi-structured natureLess mature: issues
Concave regionsNeighboring boundariesConflicting resolutionConflicting Stretchings VGRIDns Advancing Layers
c/o S. Pirzadeh, NASA Langley
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow112
Evolved to Sophisticated Multiblock and Overlapping Structured Grid Techniques for Complex Geometries
Overlapping grid system on space shuttle (Slotnick, Kandula and Buning 1994)
CFD Perspective on Meshing Technology
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow113
Enabling CFD Solver Developments (1990 – 2000)
Edge-based data structureBuilding block for all element typesReduces memory requirementsMinimizes indirect addressing / gather-scatterGraph of grid = Discretization stencil
Implications for solvers, Partitioners
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow114
Multigrid solversMultigrid techniques enable optimal O(N) solution complexityBased on sequence of coarse and fine meshesOriginally developed for structured grids
Enabling CFD Solver Developments (1990 – 2000)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow115
Agglomeration Multigrid solvers for unstructured meshes
Coarse level meshes constructed by agglomerating fine grid cells/equations
Enabling CFD Solver Developments (1990 – 2000)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow116
Agglomeration Multigrid
•Automated Graph-Based Coarsening Algorithm
•Coarse Levels are Graphs
•Coarse Level Operator by Galerkin Projection
•Grid independent convergence rates (order of magnitude improvement)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow117
Enabling CFD Solver Developments
Line solvers for Anisotropic problemsLines constructed in mesh using weighted graph algorithmStrong connections assigned large graph weight(Block) Tridiagonal line solver similar to structured grids
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow118
Graph-based Partitioners for parallel load balancing
Metis, Chaco, JostleEdge-data structure à graph of gridAgglomeration Multigrid levels = graphsExcellent load balancing up to 1000’s of processors
Homogeneous data-structures(Versus multi-block / overlapping structured grids)
Enabling CFD Solver Developments (1990 – 2000)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow119
NASA Langley Energy Efficient Transport
Complex geometryWing-body, slat, double slotted flaps, cutouts
Experimental data from Langley 14x22ft wind tunnel
Mach = 0.2, Reynolds=1.6 millionRange of incidences: -4o to 24o
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow120
Boundary Conditions
Typical conditionsWall
No-slip (u = v = w = 0)Slip (tangential stress = 0, normal velocity = 0)With specified suction or blowingWith specified temperature or heat flux
InflowOutflowInterface Condition, e.g., Air-water free surfaceSymmetry and Periodicity
Usually set through the use of a graphical user interface (GUI) – click & set
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow121
Initial Mesh Generation (VGRIDns)S. Pirzadeh, NASA Langley
Combined advancing layers- advancing frontAdvancing layers: thin elements at wallsAdvancing front: isotropic elements elsewhere
Automatic switching from AL to AF based on:Cell aspect ratioProximity of boundaries of other frontsVariable height for advancing layers
Background Cartesian grid for smooth spacing controlSpanwise stretching
Factor of 3 reduction in grid size
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow122
VGRID Tetrahedral Mesh
3.1 million vertices, 18.2 million tets, 115,489 surface ptsNormal spacing: 1.35E-06 chords, growth factor=1.3
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow123
Prism Merging OperationCombine Tetrahedra triplets in advancing-layers region into prisms
Prisms entail lower complexity for solver
VGRIDns identifies originating boundary point for ALR vertices
Used to identify candidate elementsPyramids required as transitional elements
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow124
Prism Merging Operation
Initial mesh: 18.2M TetrahedraMerged mesh: 3.9M prisms, 6.6M Tets, 47K pyramids
64% of Tetrahedra merged
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow125
Global Mesh Refinement
High-resolution meshes require large parallel machinesParallel mesh generation difficult
Complicated logicAccess to commercial preprocessing, CAD tools
Current approachGenerate coarse (O(10**6) vertices on workstationRefine on supercomputer
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow126
Global Mesh Refinement
Refinement achieved by element subdivisionGlobal refinement: 8:1 increase in resolutionIn-Situ approach obviates large file transfersInitial mesh: 3.1 million vertices
3.9M prisms, 6.6M Tets, 47K pyramidsRefined mesh: 24.7 million vertices
31M prisms, 53M Tets, 281K pyramidsRefinement operation: 10 Gbytes, 30 minutes sequentially
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow127
NSU3D Unstructured Mesh Navier-Stokes Solver
Mixed element gridsTetrahedra, prisms, pyramids, hexahedra
Edge data-structureLine solver in BL regions near wallsAgglomeration Multigrid accelerationNewton Krylov (GMRES) acceleration optionSpalart-Allmaras 1 equation turbulence model
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow128
Parallel Implementation
Domain decomposition with OpenMP/MPI communication
OpenMP on shared memory architecturesMPI on distributed memory architecturesHybrid capability for clusters of SMPs
Weighted graph partitioning (Metis) (Chaco)Coarse and fine MG levels partitioned independently
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow129
Computed Pressure Contours on Coarse Grid
Mach=0.2, α=10 degrees, Re=1.6M
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow130
Computed Versus Experimental Results
Good drag predictionDiscrepancies near stall
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow131
Multigrid Convergence History
Mesh independent property of MultigridGMRES effective but requires extra memory
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow132
Parallel Scalability
Good overall Multigrid scalabilityIncreased communication due to coarse grid levelsSingle grid solution impractical (>100 times slower)
1 hour soution time on 1450 PEs
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow133
AIAA Drag Prediction Workshop (2001)
Transonic wing-body configurationTypical cases required for design study
Matrix of mach and CL valuesGrid resolution study
Follow on with engine effects (2003)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow134
Cases Run
Baseline grid: 1.6 million pointsFull drag polars for Mach=0.5,0.6,0.7,0.75,0.76,0.77,0.78,0.8Total = 72 cases
Medium grid: 3 million pointsFull drag polar for each mach numberTotal = 48 cases
Fine grid: 13 million pointsDrag polar at mach=0.75Total = 7 cases
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow135
Sample Solution (1.65M Pts)
Mach=0.75, CL=0.6, Re=3M2.5 hours on 16 Pentium IV 1.7GHz
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow136
Drag Polar at Mach = 0.75
Grid resolution studyGood comparison with experimental data
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow137
Cases Run on ICASE Cluster
120 Cases (excluding finest grid)About 1 week to compute all cases
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow138
Current and Future Issues
Adaptive mesh refinementMoving geometry and mesh motionMoving geometry and overlapping meshesRequirements for gradient-based designImplications for higher-order Discretizations
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow139
Adaptive Meshing
Potential for large savings through optimized mesh resolution
Well suited for problems with large range of scalesPossibility of error estimation / controlRequires tight CAD coupling (surface pts)
Mechanics of mesh adaptationRefinement criteria and error estimation
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow140
Mechanics of Adaptive Meshing
Various well know isotropic mesh methodsMesh movement
Spring analogyLinear elasticity
Local RemeshingDelaunay point insertion/RetriangulationEdge-face swappingElement subdivision
Mixed elements (non-simplicial)Anisotropic subdivision required in transition regions
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow141
Subdivision Types for Tetrahedra
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow142
Subdivision Types for Prisms
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow143
Subdivision Types for Pyramids
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow144
Subdivision Types for Hexahedra
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow145
Adaptive Tetrahedral Mesh by Subdivision
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow146
Adaptive Hexahedral Mesh by Subdivision
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow147
Adaptive Hybrid Mesh by Subdivision
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow148
Anisotropic Adaptation Methods
Large potential savings for 1 or 2D features
Directional subdivisionAssumes element faces to line up with flow featuresCombine with mesh motion
Mapping techniquesHessian basedGrid quality
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow149
Refinement Criteria
Weakest link of adaptive meshing methodsObvious for strong featuresDifficult for non-local (ie. Convective) features
eg. Wakes
Analysis assumes in asymptotic error convergence region
Gradient based criteriaEmpirical criteria
Effect of variable discretization error in design studies, parameter sweeps
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow150
Adjoint-based Error Prediction
Compute sensitivity of global cost function to local spatial grid resolutionKey on important output, ignore other features
Error in engineering output, not discretization errore.g. Lift, drag, or sonic boom …
Captures non-local behavior of errorGlobal effect of local resolution
Requires solution of adjoint equationsAdjoint techniques used for design optimization
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow151
Adjoint-based Mesh Adaptation Criteria
Reproduced from Venditti and Darmofal (MIT, 2002)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow152
Adjoint-based Mesh Adaptation Criteria
Reproduced from Venditti and Darmofal (MIT, 2002)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow153
Adjoint-based Mesh Adaptation Criteria
Reproduced from Vendittiand Darmofal(MIT, 2002)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow154
Overlapping Unstructured Meshes
Alternative to moving mesh for large scale relative geometry motionMultiple overlapping meshes treated as single data-structure
Dynamic determination of active/inactive/ghost cells
Advantages for parallel computingObviates dynamic load rebalancing required with mesh motion techniquesIntergrid communication must be dynamically recomputed and rebalanced
Concept of Rendez-vous grid (Plimpton and Hendrickson)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow155
Overlapping Unstructured Meshes
Simple 2D transient example
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow156
Gradient-based Design Optimization
Minimize Cost Function F with respect to design variables v, subject to constraint R(w) = 0
F = drag, weight, costv = shape parametersw = Flow variablesR(w) = 0à Governing Flow Equations
Gradient Based Methods approach minimum along direction :
vF
∂∂
−
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow157
Grid Related Issues for Gradient-based Design
Parametrization of CAD surfacesConsistency across disciplines
eg. CFD, structures,…Surface grid motionInterior grid motionGrid sensitivitiesAutomation / Parallelization
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow158
Preliminary Design Geometry X34 CAD Model
23,555 curves and surfaces
c/o J. Samareh, NASA Langley
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow159
Launch Vehicle Shape Parameterization
c/o J. Samareh, NASA Langley
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow160
Sensitivity Analysis
• Manual differentiation
• Automatic differentiation tools (e.g., ADIFOR and ADIC)
• Complex variables
• Finite-difference approximations
analysis codefield grid generator
geometry modeler (CAD)
surface grid generator
Gridv
GridGe
GeometryvGrid Gr m yid o etr
f
f s
sF x x xF ∂ ∂∂
∂=
∂∂∂ ∂∂ ∂
142431424 1 14243 3 4243v design variables
(e.g., span, camber)
objective function
(e.g., Stress, CD)
c/o J. Samareh, NASA Langley
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow161
Finite-Difference Approximation Error for Sensitivity Derivatives
ParameterizedHSCT Model
c/o J. Samareh, NASA Langley
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow162
Grid Sensitivities
Ideally should be available from grid/cad software
Analytical formulation most desirableBurden on grid / CAD softwareDiscontinous operations present extra challenges
Face-edge swappingPoint addition / removalMesh regeneration
vGeometry
Geometry Grid
Grid Grid
v Grid
∂∂
∂∂
∂∂
=∂
∂ xx s
s
ff
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow163
High-Order Accurate Discretizations
Uniform X2 refinement of 3D mesh:Work increase = factor of 82nd order accurate method: accuracy increase = 44th order accurate method: accuracy increase = 16
For smooth solutions
Potential for large efficiency gainsSpectral element methodsDiscontinuous Galerkin (DG)Streamwise Upwind Petrov Galerkin (SUPG)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow164
Higher-Order Accurate Discretizations
Transfers burden from grid generation to Discretization
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow165
Spectral Element Solution of Maxwell’s Equations
J. Hesthaven and T. Warburton
(Brown University)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow166
High-Order Discretizations
Require more complete surface definitionCurved surface elements
Additional element pointsSurface definition (for high p)
Chapter 15: Computational Fluid DynamicsME33 : Fluid Flow167
Combined H-P Refinement
Adaptive meshing (h-ref) yields constant factor improvement
After error equidistribution, no further benefitOrder refinement (p-ref) yields asymptotic improvement
Only for smooth functionsIneffective for inadequate h-resolution of featureCannot treat shocks
H-P refinement optimal (exponential convergence)Requires accurate CAD surface representation
168
Modeling Turbulent Flows
u Unsteady, aperiodic motion in which all three velocity components fluctuate ⌫ mixing matter, momentum, and energy.
u Decompose velocity into mean and fluctuating parts:Ui(t) ≡ Ui + ui(t)
u Similar fluctuations for pressure, temperature, and species concentration values.
What is Turbulence?
Time
U i (t)Ui
ui(t)
Why Model Turbulence?
u Direct numerical simulation of governing equations is only possible for simple low-Re flows.
u Instead, we solve Reynolds Averaged Navier-Stokes (RANS) equations:
where (Reynolds stresses)
(steady, incompressible flow w/o body forces)
jiij uuR ρ−=
j
ij
jj
i
ik
ik x
Rxx
Uxp
xUU
∂∂
+∂∂
∂+
∂∂
−=∂∂ 2
µρ
Is the Flow Turbulent?
External Flows
Internal Flows
Natural Convection
5105×≥xRe along a surface
around an obstacle
where
µρULReL ≡where
Other factors such as free-stream turbulence, surface conditions, and disturbances may cause earlier transition to turbulent flow.
L = x, D, Dh, etc.
,3002 ≥hD Re
108 1010 −≥Ra µαρβ 3
Pr TLgGrRa x∆
≡=
20,000≥DRe
∞−=∆ TTT s
Ts= temperature of the wallT∞= fluid temperature far from the surface of the object
Grashof Prandtl
How Complex is the Flow?
u Extra strain ratesl Streamline curvaturel Lateral divergencel Acceleration or decelerationl Swirll Recirculation (or separation)l Secondary flow
u 3D perturbationsu Transpiration (blowing/suction)u Free-stream turbulenceu Interacting shear layers
Choices to be Made
Turbulence Model&
Near-Wall Treatment
Flow Physics
AccuracyRequired
ComputationalResources
TurnaroundTime
Constraints
ComputationalGrid
Zero-Equation Models
One-Equation ModelsSpalart-Allmaras
Two-Equation ModelsStandard k-εRNG k-εRealizable k-ε
Reynolds-Stress Model
Large-Eddy Simulation
Direct Numerical Simulation
Turbulence Modeling Approaches
IncludeMorePhysics
IncreaseComputationalCostPer Iteration
Availablein FLUENT
RANS-basedmodels
u RANS equations require closure for Reynolds stresses.
u Turbulent viscosity is indirectly solved for from single transport equation of modified viscosity for One-Equation model.
u For Two-Equation models, turbulent viscosity correlated with turbulent kinetic energy (TKE) and the dissipation rate of TKE.
u Transport equations for turbulent kinetic energy and dissipation rate are solved so that turbulent viscosity can be computed for RANS equations.
Reynolds Stress Terms in RANS-based Models
Turbulent Kinetic Energy:
Dissipation Rate of Turbulent Kinetic Energy:
ερµ µ
2kCt ≡Turbulent Viscosity:
Boussinesq Hypothesis:(isotropic stresses)
∂∂
+∂∂
+−=−=i
j
j
itijjiij x
UxUkuuR µδρρ
32
2/iiuuk ≡
∂
∂+
∂∂
∂∂
≡i
j
j
i
j
i
xu
xu
xu
νε
u Turbulent viscosity is determined from:
u is determined from the modified viscosity transport equation:
u The additional variables are functions of the modified turbulent viscosity and velocity gradients.
One Equation Model: Spalart-Allmaras
( ) 21
2
2~
1
~~~~1~~~
dfc
xc
xxSc
DtD
wwj
bjj
bν
ρν
ρν
νρµσ
νρν
ρν
−
∂∂
+
∂∂
+∂∂
+=
( )( )
+= 3
13
3
/~/~~
ννννννρµ
ct
ν~
Generation Diffusion Destruction
One-Equation Model: Spalart-Allmaras
u Designed specifically for aerospace applications involving wall-bounded flows.l Boundary layers with adverse pressure gradientsl turbomachinery
u Can use coarse or fine mesh at walll Designed to be used with fine mesh as a “low-Re” model, i.e., throughout
the viscous-affected region.l Sufficiently robust for relatively crude simulations on coarse meshes.
Two Equation Model: Standard k-ε Model
Turbulent Kinetic Energy
Dissipation Rate
εεεσσ 21, ,, CCk are empirical constants
(equations written for steady, incompressible flow w/o body forces)
Convection Generation DiffusionDestruction{ρεσµµρ −
∂∂
∂∂
+∂
∂
∂∂
+∂
∂=
∂∂
444 3444 21444 3444 2143421 ikt
ii
j
j
i
i
jt
ii x
kxx
UxU
xU
xkU )(
DestructionConvection Generation Diffusion43421444 3444 2144444 344444 2143421
−
∂∂
∂∂
+∂∂
∂∂
+∂
∂
=
∂∂
kC
xxxU
xU
xU
kC
xU
it
ii
j
j
i
i
jt
ii
2
21 )( ερ
εσµµ
εερ εεε
Two Equation Model: Standard k-ε Model
u “Baseline model” (Two-equation)l Most widely used model in industryl Strength and weaknesses well documented
u Semi-empiricall k equation derived by subtracting the instantaneous mechanical energy
equation from its time-averaged valuel ε equation formed from physical reasoning
u Valid only for fully turbulent flowsu Reasonable accuracy for wide range of turbulent flows
l industrial flowsl heat transfer
Two Equation Model: Realizable k-ε
u Distinctions from Standard k-ε model:l Alternative formulation for turbulent viscosity
where is now variable
n (A0, As, and U* are functions of velocity gradients)
n Ensures positivity of normal stresses;
n Ensures Schwarz’s inequality;
l New transport equation for dissipation rate, ε:
ερµ µ
2kCt ≡
ε
µ kUAAC
so
*1
+=
0u2i ≥
2j
2i
2ji u u)uu( ≤
bj
t
j
Gck
ck
cScxxDt
Dεε
ε
ενε
ερερεσµµερ 31
2
21 ++
−+
∂∂
+
∂∂
=
GenerationDiffusion Destruction Buoyancy
u Shares the same turbulent kinetic energy equation as Standard k-εu Superior performance for flows involving:
l planar and round jetsl boundary layers under strong adverse pressure gradients, separationl rotation, recirculationl strong streamline curvature
Two Equation Model: Realizable k-ε
Two Equation Model: RNG k-ε
Turbulent Kinetic Energy
Dissipation Rate
Convection DiffusionDissipation
{ {ρεµαµρ −
∂∂
∂∂
+=∂∂
44 344 2143421 ik
it
ii x
kx
SxkU eff
2
Generation
∂∂
+∂
∂≡≡
j
i
i
jijijij x
UxU
SSSS21,2
where
are derived using RNG theoryεεεαα 21, ,, CCk
(equations written for steady, incompressible flow w/o body forces)
Additional termrelated to mean strain& turbulence quantities
Convection Generation Diffusion Destruction
{RkC
xxS
kC
xU
iit
ii −
−
∂∂
∂∂
+
=
∂∂
4342144 344 21443442143421
2
2eff2
1ε
ρε
µαµεε
ρ εεε
Two Equation Model: RNG k-ε
u k-ε equations are derived from the application of a rigorous statistical technique (Renormalization Group Method) to the instantaneous Navier-Stokes equations.
u Similar in form to the standard k-ε equations but includes:l additional term in ε equation that improves analysis of rapidly strained flowsl the effect of swirl on turbulencel analytical formula for turbulent Prandtl numberl differential formula for effective viscosity
u Improved predictions for:l high streamline curvature and strain ratel transitional flowsl wall heat and mass transfer
Reynolds Stress Model
k
ijkijijij
k
jik x
JP
xuu
U∂∂
+−Φ+=∂
∂ερ
Generationk
ikj
k
jkiij x
UuuxU
uuP∂∂
+∂∂
≡
∂
∂+
∂∂′−≡Φ
i
j
j
iij x
uxup
k
j
k
iij x
uxu
∂∂
∂∂
≡ µε 2
Pressure-StrainRedistribution
Dissipation
TurbulentDiffusion
(modeled)
(related to ε)
(modeled)
(computed)
(equations written for steady, incompressible flow w/o body forces)
Reynolds StressTransport Eqns.
Pressure/velocityfluctuations
Turbulenttransport
)( jikijkkjiijk uupuuuJ δδ +′+=
Reynolds Stress Model
u RSM closes the Reynolds-Averaged Navier-Stokes equations by solving additional transport equations for the Reynolds stresses.l Transport equations derived by Reynolds averaging the product of the
momentum equations with a fluctuating propertyl Closure also requires one equation for turbulent dissipationl Isotropic eddy viscosity assumption is avoided
u Resulting equations contain terms that need to be modeled.u RSM has high potential for accurately predicting complex flows.
l Accounts for streamline curvature, swirl, rotation and high strain ratesn Cyclone flows, swirling combustor flowsn Rotating flow passages, secondary flows
Large Eddy Simulation
u Large eddies:l Mainly responsible for transport of momentum, energy, and other scalars,
directly affecting the mean fields.l Anisotropic, subjected to history effects, and flow-dependent, i.e., strongly
dependent on flow configuration, boundary conditions, and flow parameters.u Small eddies:
l Tend to be more isotropic and less flow-dependentl More likely to be easier to model than large eddies.
u LES directly computes (resolves) large eddies and models only small eddies (Subgrid-Scale Modeling).
u Large computational effortl Number of grid points, NLES ∝l Unsteady calculation
2Reτu
Comparison of RANS Turbulence Models
Model Strengths WeaknessesSpalart-Allmaras
Economical (1-eq.); good track recordfor mildly complex B.L. type of flows
Not very widely tested yet; lack ofsubmodels (e.g. combustion,buoyancy)
STD k-εRobust, economical, reasonablyaccurate; long accumulatedperformance data
Mediocre results for complex flowsinvolving severe pressure gradients,strong streamline curvature, swirland rotation
RNG k-εGood for moderately complexbehavior like jet impingement,separating flows, swirling flows, andsecondary flows
Subjected to limitations due toisotropic eddy viscosityassumption
Realizablek-ε
Offers largely the same benefits asRNG; resolves round-jet anomaly
Subjected to limitations due toisotropic eddy viscosityassumption
ReynoldsStressModel
Physically most complete model(history, transport, and anisotropy ofturbulent stresses are all accountedfor)
Requires more cpu effort (2-3x);tightly coupled momentum andturbulence equations
Near-Wall Treatments
u Most k-ε and RSM turbulence models will not predict correct near-wall behavior if integrated down to the wall.
u Special near-wall treatment is required.l Standard wall functionsl Nonequilibrium wall functionsl Two-layer zonal model
Boundary layer structure
Standard Wall Functions
ρτµ
/
2/14/1
w
PP kCUU ≡∗
( )
>
+
<= ∗
∗
∗
)(ln1Pr
)(Pr**
**
Tt
T
yyPEy
yyyT
κ
µρ µ PP ykC
y2/14/1
≡∗
qkCcTT
T PpPw
′′−
≡&
2/14/1)(* µρ
Mean Velocity
Temperature
where
where and P is a function of the fluid and turbulent Prandtl numbers.
thermal sublayer thickness
( )∗∗ = EyU ln1κ
Nonequilibrium Wall Functions
u Log-law is sensitized to pressure gradient for better prediction of adverse pressure gradient flows and separation.
u Relaxed local equilibrium assumptions for TKE in wall-neighboring cells.
u Thermal law-of-wall unchanged
=
µρ
κρτµµ ykCEkCU
w
2/14/12/14/1
ln1/
~
+
−+
−= ∗∗ µρκρκ
ykyy
yy
ky
dxdpUU vv
v
v2
2/12/1 ln21~where
Two-Layer Zonal Model
u Used for low-Re flows or flows with complex near-wall phenomena.
u Zones distinguished by a wall-distance-based turbulent Reynolds number
u High-Re k-ε models are used in the turbulent core region.u Only k equation is solved in the viscosity-affected region.u ε is computed from the correlation for length scale.u Zoning is dynamic and solution adaptive.
µρ ykRey ≡
200>yRe
200<yRe
Comparison of Near Wall Treatments
Strengths Weaknesses
Standard wallFunctions
Robust, economical,reasonably accurate
Empirically based on simplehigh-Re flows; poor for low-Reeffects, massive transpiration,∇p, strong body forces, highly3D flows
Nonequilibriumwall functions
Accounts for ∇p effects,allows nonequilibrium:
-separation-reattachment-impingement
Poor for low-Re effects, massivetranspiration, severe ∇p, strongbody forces, highly 3D flows
Two-layer zonalmodel
Does not rely on law-of-the-wall, good for complexflows, especially applicableto low-Re flows
Requires finer mesh resolutionand therefore larger cpu andmemory resources
Computational Grid Guidelines
Wall Function Approach
Two-Layer Zonal Model Approach
l First grid point in log-law region
l At least ten points in the BL.
l Better to use stretched quad/hex cells for economy.
l First grid point at y+ ≈ 1.
l At least ten grid points within buffer & sublayers.
l Better to use stretched quad/hex cells for economy.
50050 ≤≤ +y
Estimating Placement of First Grid Point
u Estimate the skin friction coefficient based on correlations either approximate or empirical:
l Flat Plate-
l Pipe Flow-
u Compute the friction velocity:
u Back out required distance from wall:
l Wall functions • Two-layer model
u Use post-processing to confirm near-wall mesh resolution
2.0Re0359.02/ −≈ Lfc2.0Re039.02/ −≈ Dfc
2// few cUu =≡ ρττ
y1 = 50ν/uτ y1 = ν/ uτ
Setting Boundary Conditions
u Characterize turbulence at inlets & outlets (potential backflow)l k-ε models require k and εl Reynolds stress model requires Rij and ε
u Several options allow input using more familiar parametersl Turbulence intensity and length scale
n length scale is related to size of large eddies that contain most of energy.n For boundary layer flows: l ≈ 0.4δ99
n For flows downstream of grids /perforated plates: l ≈ opening sizel Turbulence intensity and hydraulic diameter
n Ideally suited for duct and pipe flowsl Turbulence intensity and turbulent viscosity ratio
n For external flows:
u Input of k and ε explicitly allowed (non-uniform profiles possible).10/1 << µµ t
GUI for Turbulence Models
Define⌫Models⌫ Viscous...
Turbulence Model options
Near Wall Treatments
Inviscid, Laminar, or Turbulent
Additional Turbulence options
Example: Channel Flow with Conjugate Heat Transfer
adiabatic wallcold airV = 50 fpmT = 0 °F
constant temperature wall T = 100 °F
insulation
1 ft
1 ft
10 ft
P
Predict the temperature at point P in the solid insulation
Turbulence Modeling Approach
u Check if turbulent ⌫ ReDh= 5,980
u Developing turbulent flow at relatively low Reynolds number and BLs on walls will give pressure gradient ⌫ use RNG k-ε with nonequilibrium wall functions.
u Develop strategy for the gridl Simple geometry ⌫ quadrilateral cellsl Expect large gradients in normal direction to horizontal walls ⌫
fine mesh near walls with first cell in log-law region.l Vary streamwise grid spacing so that BL growth is captured.l Use solution-based grid adaption to further resolve temperature
gradients.
Velocitycontours
Temperaturecontours
BLs on upper & lower surfaces accelerate the core flow
Prediction of Momentum & Thermal Boundary Layers
Important that thermal BL was accurately resolved as well
P
Example: Flow Around a Cylinder
wall
wall
1 ft
2 ft
2 ft
airV = 4 fps
Compute drag coefficient of the cylinder
5 ft 14.5 ft
u Check if turbulent ⌫ ReD = 24,600
u Flow over an object, unsteady vortex shedding is expected, difficult to predict separation on downstream side, and close proximity of side walls may influence flow around cylinder ⌫ use RNG k-ε with 2-layer zonal model.
u Develop strategy for the gridl Simple geometry & BLs ⌫ quadrilateral cells.l Large gradients near surface of cylinder & 2-layer model ⌫ fine mesh near surface & first cell at y+ = 1.
Turbulence Modeling Approach
Grid for Flow Over a Cylinder
Prediction of Turbulent Vortex Shedding
Contours of effective viscosity µeff = µ + µt
CD = 0.53 Strouhal Number = 0.297
UDSt
τ≡where
Summary: Turbulence Modeling Guidelines
u Successful turbulence modeling requires engineering judgement of:l Flow physicsl Computer resources availablel Project requirements
n Accuracyn Turnaround time
l Turbulence models & near-wall treatments that are availableu Begin with standard k-ε and change to RNG or Realizable k-ε if
needed.u Use RSM for highly swirling flows.u Use wall functions unless low-Re flow and/or complex near-wall
physics are present.