Sie sind auf Seite 1von 204

Computational Tools for Aircraft Design

ITA Aircraft Design Department

V 18

Contents

CFD What It is? Overview on Mesh Technology Turbulence Modeling

ME33 : Fluid Flow

Chapter 15: Computational Fluid Dynamics

CFD What It Is?

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.

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 :-)
ME33 : Fluid Flow 5 Chapter 15: Computational Fluid Dynamics

Introduction

What is?

Practice of engineering and science has been dramatically altered by the development of
Scientific computing Mathematics of numerical analysis Tools like neural networks The Internet

Computational Fluid Dynamics is based upon the logic of applied mathematics


provides tools to unlock previously unsolved problems is used in nearly all fields of science and engineering
Aerodynamics, acoustics, bio-systems, cosmology, geology, heat transfer, hydrodynamics, river hydraulics, etc

ME33 : Fluid Flow

Chapter 15: Computational Fluid Dynamics

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, 194720 teraflops, 2003)

ME33 : Fluid Flow

Chapter 15: Computational Fluid Dynamics

Introduction Why Use CFD?


Analysis and Design
1. 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
ME33 : Fluid Flow 8 Chapter 15: Computational Fluid Dynamics

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
ME33 : Fluid Flow 9 Chapter 15: Computational Fluid Dynamics

Introduction
Scientific method
Aristotle (384-322 BCE)
Greek philosopher, student of Plato Logic and reasoning was the chief instrument of scientific investigation; Posterior Analytics To possess scientific knowledge, we need to know the cause of which we observe
Through their senses humans encounter facts or data Through inductive means, principles created which will explain the data Then, 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 Aristotles work lost to Europe during Dark Ages. Preserved by Mesopotamian (modern day Iraq) libraries.
ME33 : Fluid Flow 10 Chapter 15: Computational Fluid Dynamics

Introduction
Scientific 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.

ME33 : Fluid Flow

11

Chapter 15: Computational Fluid Dynamics

Introduction
Mathematics Isaac Newton (1643 1727)
Laid the foundation (along with Leibniz) for differential and integral calculus It has been claimed that the Principia is the greatest work in the history of the physical sciences. Book I: general dynamics from a mathematical standpoint Book II: treatise on fluid mechanics Book 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.
12 Chapter 15: Computational Fluid Dynamics

ME33 : Fluid Flow

Introduction
Fluid 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
ME33 : Fluid Flow

Navier
13

Stokes

Reynolds

Prandtl

Chapter 15: Computational Fluid Dynamics

Introduction
Fluid Mechanics
From mid-1800s to 1960s, research in fluid mechanics focused upon
Analytical methods
Exact 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 methods
Scale models: wind tunnels, water tunnels, towing-tanks, flumes,... Measurement techniques: pitot probes; hot-wire probes; anemometers; laser-doppler velocimetry; particle-image velocimetry Most man-made systems (e.g., airplane) engineered using buildand-test iteration.

1950s present : rise of computational fluid dynamics (CFD)


ME33 : Fluid Flow 14 Chapter 15: Computational Fluid Dynamics

Introduction
History of computing

Computing, 1945-1960
Early computer engineers thought that only a few dozen computers required worldwide Applications: cryptography (code breaking), fluid dynamics, artillery firing tables, atomic weapons ENIAC, 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
ME33 : Fluid Flow 15 Chapter 15: Computational Fluid Dynamics

Introduction
History of computing

Ultra Project

Left. The Colossus computer at Bletchley Park, Buckinghamshire, England, c. 1943. Funding for this code-breaking machine came from the Ultra project.

In the early 1930s Polish cryptographers first broke the code of Germany's cipher machine Enigma. They were led by mathematician Marian Rejewski and assisted by material provided to them by agents of French intelligence. For much of the decade, the Poles were able to decipher their neighbour's radio traffic, but in 1939, faced with possible invasion and difficulties decoding messages because of changes in Enigma's operating procedures, they turned their information over to the Allies. Early in 1939 Britain's secret service set up the Ultra project at Bletchley Park, 50 miles (80 km) north of London, for the purpose of intercepting the Enigma signals, deciphering the messages, and controlling the distribution of the resultant secret information. Strict rules were established to restrict the number of people who knew about the existence of the Ultra information and to ensure that no actions would alert the Axis powers that the Allies possessed knowledge of their 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 orders of battle, forming the basis of war plans both strategic and tactical. Ultra intercepts of signals helped the Royal Air Force to win the Battle of Britain. Intercepted signals between Hitler and General Gnther von Kluge led to the destruction of a large part of the German forces in Normandy in 1944 after the Allied landing. ME33 : Fluid Flow 16 Chapter 15: Computational Fluid Dynamics

Introduction
High-performance computing
Top 500 computers in the world compiled: www.top500.org Computers located at major centers connected to researchers via Internet

ME33 : Fluid Flow

17

Chapter 15: Computational Fluid Dynamics

Outline CFD What It is?


CFD Process
Model Equations Discretization Grid Generation Boundary Conditions Solve Post-Processing Uncertainty Assessment

ME33 : Fluid Flow

18

Chapter 15: Computational Fluid Dynamics

Where is CFD used?


Where is CFD used?
Aerospace Automotive Biomedical Chemical Processing HVAC Hydraulics Marine Oil & Gas Power Generation Sports
Aerospace

Biomedical
F18 Store Separation

Automotive

Temperature and natural convection currents in the eye following laser heating.

ME33 : Fluid Flow

19

Chapter 15: Computational Fluid Dynamics

Where CFD Is Used?

Aircraft Design

ME33 : Fluid Flow

20

Chapter 15: Computational Fluid Dynamics

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

ME33 : Fluid Flow

21

Chapter 15: Computational Fluid Dynamics

Where CFD Is Used?

Aircraft Design

Comparison of Computed Wake Vortex Evolution Flowfield (OVERFLOW Code) with Experiment (2-pair)

ME33 : Fluid Flow

22

Chapter 15: Computational Fluid Dynamics

Where CFD Is Used?

Aircraft Design

Stagnation pressure loss at the fan face of an airintake at the fixed point submitted to crosswind. M = 0.045, = 0o, = 9o, Re = 3.9x106. Airbus France, NSMB code.

ME33 : Fluid Flow

23

Chapter 15: Computational Fluid Dynamics

Where is CFD used?


Where is CFD used?
Aerospacee Automotive Biomedical Chemical Processing HVAC Hydraulics Marine Oil & Gas Power Generation Sports
HVAC
Streamlines for workstation ventilation

Chemical Processing

Polymerization reactor vessel - prediction of flow separation and residence time effects.

Hydraulics

ME33 : Fluid Flow

24

Chapter 15: Computational Fluid Dynamics

Where is CFD used?


Marine Sports

Where is CFD used?


Aerospace Automotive Biomedical Chemical Processing HVAC Hydraulics Oil & Gas Marine Oil & Gas Power Generation Sports
Flow of lubricating mud over drill bit ME33 : Fluid Flow 25

Power Generation

Flow around cooling towers Chapter 15: Computational Fluid Dynamics

Where is CFD used?

ME33 : Fluid Flow

26

Chapter 15: Computational Fluid Dynamics

Getting Started: CFD Notation

ME33 : Fluid Flow

27

Chapter 15: Computational Fluid Dynamics

Getting Started: Tensorial Quantities in Fluid Dynamics

ME33 : Fluid Flow

28

Chapter 15: Computational Fluid Dynamics

Getting Started: Vector Multiplication Rules

ME33 : Fluid Flow

29

Chapter 15: Computational Fluid Dynamics

Getting Started: Elementary Tensor Calculus

ME33 : Fluid Flow

30

Chapter 15: Computational Fluid Dynamics

Getting Started: Divergence Theorem of Gauss

ME33 : Fluid Flow

31

Chapter 15: Computational Fluid Dynamics

Getting Started: Governing Equations of Fluid Dynamics

ME33 : Fluid Flow

32

Chapter 15: Computational Fluid Dynamics

Getting Started: Description of Fluid Motion

ME33 : Fluid Flow

33

Chapter 15: Computational Fluid Dynamics

Getting Started: Flow Models and Reference Frames

ME33 : Fluid Flow

34

Chapter 15: Computational Fluid Dynamics

Getting Started: Eulerian vs. Langrangian Viewpoint

ME33 : Fluid Flow

35

Chapter 15: Computational Fluid Dynamics

Getting Started: governing equations

ME33 : Fluid Flow

36

Chapter 15: Computational Fluid Dynamics

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 waves Parabolic equations Information travels downstream/forward in time; directions at finite speeds; the solution can be constructed using a marching/time-stepping method Elliptic equations Information propagates in all directions at infinite speed; describe equilibrium phenomena (unsteady problems are never elliptic

ME33 : Fluid Flow

37

Chapter 15: Computational Fluid Dynamics

Getting Started: classification of PDEs

ME33 : Fluid Flow

38

Chapter 15: Computational Fluid Dynamics

Getting Started: classification of PDEs

ME33 : Fluid Flow

39

Chapter 15: Computational Fluid Dynamics

CFD Process
Geometry Physics Mesh Solve Reports PostProcessing
Contours Select Geometry Heat Transfer ON/OFF Unstructured (automatic/ manual) Steady/ Unsteady Forces Report
(lift/drag, shear stress, etc)

Geometry Parameters

Compressible ON/OFF

Structured (automatic/ manual)

Iterations/ Steps

XY Plot

Vectors

Domain Shape and Size

Flow properties

Convergent Limit

Verification

Streamlines

Viscous Model

Precisions (single/ double)

Validation

Boundary Conditions

Numerical Scheme

Initial Conditions

ME33 : Fluid Flow

40

Chapter 15: Computational Fluid Dynamics

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 domain 2. Coordinates 3. Governing equations 4. Flow conditions 5. Initial and boundary conditions 6. Selection of models for different applications
ME33 : Fluid Flow 41 Chapter 15: Computational Fluid Dynamics

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).

ME33 : Fluid Flow

42

Chapter 15: Computational Fluid Dynamics

Modeling (governing equations) Navier-stokes Equations


2u 2 u 2 u p u u u u r + m 2 + 2 + 2 =+ rw + rv + ru z y x z y x t x 2v 2v 2v p v v v v r + m 2 + 2 + 2 =+ rw + rv + ru z y y z y x t x

2 w 2 w 2 w w w w w p r + ru + rv + rw = - + m 2 + 2 + 2 t x y z z z x y
Local acceleration

Convection

Piezometric pressure gradient

Viscous terms

r ( r u ) ( r v ) ( r w ) + + + = 0 Continuity equation t x y z

p = rRT

Equation of state Rayleigh Equation

D 2R 3 DR 2 pv - p R + ( ) = Dt 2 2 Dt rL
ME33 : Fluid Flow 43

Chapter 15: Computational Fluid Dynamics

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, g, Gr, Ec) Free-surface flow (Fr) and surface tension (We) Chemical reactions and combustion (Pe, Da) etc
Chapter 15: Computational Fluid Dynamics

ME33 : Fluid Flow

44

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

ME33 : Fluid Flow

45

Chapter 15: Computational Fluid Dynamics

Modeling(boundary conditions)
Boundary conditions: No-slip or slip-free on walls,
periodic, inlet (velocity inlet, mass flow rate, constant pressure, etc.), outlet (constant pressure, velocity convective, numerical beach, zero-gradient), and nonreflecting (for compressible flows, such as acoustics), etc.

No-slip walls: u=0,v=0 Inlet ,u=c,v=0 r Outlet, p=c


Periodic boundary condition in spanwise direction of an airfoil

v=0, dp/dr=0,du/dr=0

Axisymmetric
46 Chapter 15: Computational Fluid Dynamics

ME33 : Fluid Flow

Modeling (selection of models)


CFD codes typically designed for solving certain fluid

phenomenon 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, g, 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
ME33 : Fluid Flow 47 Chapter 15: Computational Fluid Dynamics

Modeling (Turbulence and free surface models)

Turbulent flows at high Re usually involve both large and small scale
vortical structures and very thin turbulent boundary layer (BL) near the wall

Turbulent models:
DNS: most accurately solve NS equations, but too expensive
for turbulent flows

RANS: predict mean flow structures, efficient inside BL but excessive

LES: accurate in separation region and unaffordable for resolving BL


DES: RANS inside BL, LES in separated regions.

diffusion in the separated region.

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.
ME33 : Fluid Flow 48 Chapter 15: Computational Fluid Dynamics

Examples of modeling (Turbulence and free surface models)


URANS, Re=105, contour of vorticity for turbulent
flow around NACA12 with angle of attack 60 degrees

DES, Re=105, Iso-surface of Q criterion (0.4) for


turbulent flow around NACA12 with angle of attack 60 degrees URANS, Wigley Hull pitching and heaving

ME33 : Fluid Flow

49

Chapter 15: Computational Fluid Dynamics

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 methods 2. Solvers and numerical parameters 3. Grid generation and transformation 4. High Performance Computation (HPC) and postprocessing

ME33 : Fluid Flow

50

Chapter 15: Computational Fluid Dynamics

Discretization methods
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 implicit method (e.g. Beam-Warming method)

Finite difference methods (straightforward to apply,

ME33 : Fluid Flow

51

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)


Explicit methods can be easily applied but yield
conditionally stable Finite Different Equations (FDEs), which are restricted by the time step; Implicit methods are 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 multiphase 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.

ME33 : Fluid Flow

52

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)

ME33 : Fluid Flow

53

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)

ME33 : Fluid Flow

54

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)

ME33 : Fluid Flow

55

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)


Analysis of trunctation errors

ME33 : Fluid Flow

56

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)


Approximation of second-order derivatives

ME33 : Fluid Flow

57

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)


Approximation of mixed derivatives

ME33 : Fluid Flow

58

Chapter 15: Computational Fluid Dynamics

Discretization methods (Contd)


High-order approximations

ME33 : Fluid Flow

59

Chapter 15: Computational Fluid Dynamics

Discretization methods (example)


2D incompressible laminar flow boundary layer
(L,m+1)

u v + =0 x y

(L-1,m)

(L,m)
m=1 m=0

y m=MM+1 m=MM

2u p u u u = - +m 2 +v y x e y x
l u um l l -1 u = u u m m x Dx

(L,m-1)

L-1

2u m l l l m 2 = 2 u 2 u + u m + 1 m m -1 y Dy
2nd order central difference i.e., theoretical order of accuracy Pkest= 2.

l u vm l l l v = u u FD Sign( vm )<0 m +1 m y Dy l vm l l BD Sign( l )>0 u u = m m -1 Dy vm

ME33 : Fluid Flow st

1 order upwind scheme, i.e., theoretical order of accuracy Pkest= 1

60

Chapter 15: Computational Fluid Dynamics

Discretization methods (example)


3 1 B1 B2 FD l l ul l m l vm vm 2m l m Dy l m - 2 um + 2 + FD um +1 + 2 BD um -1 + vm 1 D x D y D y D y D y D y BD Dy

l l l l -1 B1um + B u + B u = B u -1 2 m 3 m +1 4 m -

B2 B 1 0 0

B3 B2 0 0

0 B3 0 0

0 0 0 0

0 0 0 0

0 0 B1 0

0 0 B2 B1

To be stable, Matrix has to be ME33 : Fluid Flow Diagonally dominant.

l p Solve it using l -1 B4u1 - 0 u1l x e 1 Thomas algorithm 0 = B3 l l B2 umm p l -1 B4umm - x e mm

l p / e ( )m x

l um l -1 = um - ( p / e)lm Dx x

B4

61

Chapter 15: Computational Fluid Dynamics

Solvers and numerical parameters


Solvers include: tridiagonal, pentadiagonal solvers,
PETSC solver, solution-adaptive solver, multi-grid solvers, etc. Solvers can be either direct (Cramers 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
ME33 : Fluid Flow 62 Chapter 15: Computational Fluid Dynamics

Discretization
Grid 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 grids Unstructured grids Hybrid grids: some portions of flow field are structured (viscous regions) and others are unstructured Overset (Chimera) grids
ME33 : Fluid Flow 63 Chapter 15: Computational Fluid Dynamics

Discretization
Grid Generation

ME33 : Fluid Flow

64

Chapter 15: Computational Fluid Dynamics

Discretization
Grid 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 blockwise Unstructured 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

ME33 : Fluid Flow

65

Chapter 15: Computational Fluid Dynamics

Discretization
Grid Generation: examples of cell types
3D Cell Types 2D Cell Types

ME33 : Fluid Flow

66

Chapter 15: Computational Fluid Dynamics

Structured Grids

Structured multi-block grid around a multi-element airfoil


ME33 : Fluid Flow 67 Chapter 15: Computational Fluid Dynamics

Structured Grids

ME33 : Fluid Flow

68

Chapter 15: Computational Fluid Dynamics

Structured Overset Grids


Surface Ship Appendages Submarine

Moving Control Surfaces Artificial Heart Chamber


ME33 : Fluid Flow 69 Chapter 15: Computational Fluid Dynamics

Unstructured Grids

Branches in Human Lung


ME33 : Fluid Flow 70

Structured-Unstructured Nozzle Grid


Chapter 15: Computational Fluid Dynamics

Unstructured Grids

Unstructured surface mesh for external aerodynamics PT cruiser 12 millions cells


ME33 : Fluid Flow 71 Chapter 15: Computational Fluid Dynamics

Discretization
Algebraic equations
To solve NSE, we must convert governing PDEs to algebraic equations
Finite difference methods (FDM)
Each term in NSE approximated using Taylor series, e.g.,

U U i +1 - U i = + O ( Dx ) x Dx 2U U i +1 - 2U i + U i -1 2 = + O D x ( ) 2 x 2 ( Dx ) 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 PDEs by replacing continuous functions by piecewise approximations defined on polygons, which are referred to as elements. Similar to FDM.
ME33 : Fluid Flow 72 Chapter 15: Computational Fluid Dynamics

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 Residuals
Defined two ways
Change in flow variables between iterations Error in discrete algebraic equation
ME33 : Fluid Flow 73 Chapter 15: Computational Fluid Dynamics

Post-processing

Pressure Distribution

ME33 : Fluid Flow

74

Chapter 15: Computational Fluid Dynamics

Post-processing

Pathlines

ME33 : Fluid Flow

75

Chapter 15: Computational Fluid Dynamics

Post-processing

Pathlines

ME33 : Fluid Flow

76

Chapter 15: Computational Fluid Dynamics

Post-processing

Trajectory

ME33 : Fluid Flow

77

Chapter 15: Computational Fluid Dynamics

Post-processing

Unsteady flow

ME33 : Fluid Flow

78

Chapter 15: Computational Fluid Dynamics

Uncertainty Assessment
Process of estimating errors due to numerics and modeling
Numerical errors
Iterative non-convergence: monitor residuals Spatial errors: grid studies and Richardson extrapolation Temporal errors: time-step studies and Richardson extrapolation

Modeling errors (Turbulence modeling, multi-phase physics, closure of viscous stress tensor for nonNewtonian fluids)
Only way to assess is through comparison with benchmark data which includes EFD uncertainty assessment.
ME33 : Fluid Flow 79 Chapter 15: Computational Fluid Dynamics

Limitations of Current Technology


For fluid mechanics, many problems not adequately described by Navier-Stokes equations or are beyond current generation computers.
Turbulence Multi-phase physics: solid-gas (pollution, soot), liquid-gas (bubbles, cavitation); solid-liquid (sediment transport) Combustion and chemical reactions Non-Newtonian fluids (blood; polymers)

Similar modeling challenges in other branches of engineering and the sciences

ME33 : Fluid Flow

80

Chapter 15: Computational Fluid Dynamics

Conclusions
Because of limitations, need for experimental research is great However, focus has changed
From
Research based solely upon experimental observations Build and test (although this is still done)

To
High-fidelity measurements in support of validation and building new computational models.

Currently, the best approach to solving engineering problems often uses simulation and experimentation
ME33 : Fluid Flow 81 Chapter 15: Computational Fluid Dynamics

Applications
Capabilities of Current Technology
Complex real-world problems solved using Scientific Computing Commercial software available for certain problems Simulation-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-fluidics Very large : cosmology (study of the origin, current state, and future of our Universe) Expensive : engineering prototypes (ships, aircraft) Dangerous : explosions, fires

ME33 : Fluid Flow

82

Chapter 15: Computational Fluid Dynamics

Some important Links


http://www.cfd-online.com

ME33 : Fluid Flow

83

Chapter 15: Computational Fluid Dynamics

Some important Links

http://www.fluent.com

ME33 : Fluid Flow

84

Chapter 15: Computational Fluid Dynamics

Some important Links


http://www.aoe.vt.edu/~mason/Mason_f/MRsoft.html

ME33 : Fluid Flow

85

Chapter 15: Computational Fluid Dynamics

Some important Links

http://www.ensight.com/

ME33 : Fluid Flow

86

Chapter 15: Computational Fluid Dynamics

http://www.metacomptech.com

Some important Links


Products
CFD++ 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.

ME33 : Fluid Flow

87

Chapter 15: Computational Fluid Dynamics

Some important Links

http://www.sai.msu.su/sal/sal1.shtml

ME33 : Fluid Flow

88

Chapter 15: Computational Fluid Dynamics

Some important Links


Linux Software Encyclopedia

http://gd.tuwien.ac.at/study/baum-lse/node2.html

ME33 : Fluid Flow

89

Chapter 15: Computational Fluid Dynamics

Literature

ME33 : Fluid Flow

90

Chapter 15: Computational Fluid Dynamics

Literature
9. Fletcher, C. A. J. Computational Techniques for Fluid Dynamics, Springer Series in Computational Physics, Vols. 1-2, 2nd Edition, 1991.

ME33 : Fluid Flow

91

Chapter 15: Computational Fluid Dynamics

Overview on Mesh Technology

92

Single Block Grids Creating the Mapping

Conformal Mapping Transfinite Interpolation Solving PDEs


Ellipitic Parabolic/Hyperbolic

ME33 : Fluid Flow

93

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Conformal Mapping

ME33 : Fluid Flow

94

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Conformal Mapping Transformations

ME33 : Fluid Flow

95

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Conformal Mapping Schwarz Christoffel

ME33 : Fluid Flow

96

Chapter 15: Computational Fluid Dynamics

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

ME33 : Fluid Flow

97

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings 1D Interpolants

ME33 : Fluid Flow

98

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings Transfinite Interpolation

ME33 : Fluid Flow

99

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings Transfinite Interpolation

ME33 : Fluid Flow 100

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings Example

ME33 : Fluid Flow 101

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings Example

ME33 : Fluid Flow 102

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings Example

Numerically generated airfoil transformation [(x, y) (, )] showing a C grid topology

ME33 : Fluid Flow 103

Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping Algebraic Mappings Example

Numerically generated wing transformation [(x, y, z) (, , )] showing a O grid topology


ME33 : Fluid Flow 104 Chapter 15: Computational Fluid Dynamics

Single Block Grids Creating the Mapping PDE Grid Generation

ME33 : Fluid Flow 105

Chapter 15: Computational Fluid Dynamics

CFD Perspective on Meshing Technology

CFD initiated in structured grid context


Transfinite interpolation Elliptic grid generation Hyperbolic grid generation

Smooth, orthogonal structured grids Relatively simple geometries

ME33 : Fluid Flow 106

Chapter 15: Computational Fluid Dynamics

CFD Perspective on Meshing Technology

Unstructured meshes initially confined to FE community


CFD Discretizations based on directional splitting Line relaxation (ADI) solvers Structured Multigrid solvers

Sparse matrix methods not competitive


Memory limitations Non-linear nature of problems

ME33 : Fluid Flow 107

Chapter 15: Computational Fluid Dynamics

Current State of Unstructured Mesh CFD Technology Method of choice for many commercial CFD vendors
Fluent, StarCD, CFD++,

Advantages
Complex geometries Adaptivity Parallelizability

Enabling factors
Maturing grid generation technology Better Discretizations and solvers

ME33 : Fluid Flow 108

Chapter 15: Computational Fluid Dynamics

Maturing Unstructured Grid Generation Technology (1990-2000)

Isotropic tetrahedral grid generation


Delaunay point insertion algorithms Surface recovery Advancing front techniques Octree methods

Mature technology
Numerous available commercial packages Remaining issues
Grid quality Robustness Links to CAD

ME33 : Fluid Flow 109

Chapter 15: Computational Fluid Dynamics

Maturing Unstructured Grid Generation Technology (1990-2000)

Anisotropic unstructured grid generation


External aerodynamics
Boundary layers, wakes: O(10**4)

Mapped Delaunay triangulations Min-max triangulations Hybrid methods


Advancing layers Mixed prismatic tetrahedral meshes

ME33 : Fluid Flow 110

Chapter 15: Computational Fluid Dynamics

Anisotropic Unstructured Grid Generation


Hybrid methods
Semi-structured nature Less mature: issues
Concave regions Neighboring boundaries Conflicting resolution Conflicting Stretchings

VGRIDns Advancing Layers c/o S. Pirzadeh, NASA Langley

ME33 : Fluid Flow 111

Chapter 15: Computational Fluid Dynamics

CFD Perspective on Meshing Technology


Evolved to Sophisticated Multiblock and Overlapping Structured Grid Techniques for Complex Geometries

Overlapping grid system on space shuttle (Slotnick, Kandula and Buning 1994)
ME33 : Fluid Flow 112 Chapter 15: Computational Fluid Dynamics

Enabling CFD Solver Developments (1990 2000) Edge-based data structure


Building block for all element types Reduces memory requirements Minimizes indirect addressing / gatherscatter Graph of grid = Discretization stencil
Implications for solvers, Partitioners

ME33 : Fluid Flow 113

Chapter 15: Computational Fluid Dynamics

Enabling CFD Solver Developments (1990 2000)

Multigrid solvers
Multigrid techniques enable optimal O(N) solution complexity Based on sequence of coarse and fine meshes Originally developed for structured grids

ME33 : Fluid Flow 114

Chapter 15: Computational Fluid Dynamics

Enabling CFD Solver Developments (1990 2000) Agglomeration Multigrid solvers for unstructured meshes
Coarse level meshes constructed by agglomerating fine grid cells/equations

ME33 : Fluid Flow 115

Chapter 15: Computational Fluid Dynamics

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)
ME33 : Fluid Flow 116 Chapter 15: Computational Fluid Dynamics

Enabling CFD Solver Developments


Line solvers for Anisotropic problems
Lines constructed in mesh using weighted graph algorithm Strong connections assigned large graph weight (Block) Tridiagonal line solver similar to structured grids

ME33 : Fluid Flow 117

Chapter 15: Computational Fluid Dynamics

Enabling CFD Solver Developments (1990 2000) Graph-based Partitioners for parallel load balancing
Metis, Chaco, Jostle

Edge-data structure graph of grid Agglomeration Multigrid levels = graphs Excellent load balancing up to 1000s of processors
Homogeneous data-structures (Versus multi-block / overlapping structured grids)

ME33 : Fluid Flow 118

Chapter 15: Computational Fluid Dynamics

NASA Langley Energy Efficient Transport


Complex geometry
Wing-body, slat, double slotted flaps, cutouts

Experimental data from Langley 14x22ft wind tunnel


Mach = 0.2, Reynolds=1.6 million Range of incidences: -4o to 24o

ME33 : Fluid Flow 119

Chapter 15: Computational Fluid Dynamics

Boundary Conditions
Typical conditions
Wall
No-slip (u = v = w = 0) Slip (tangential stress = 0, normal velocity = 0) With specified suction or blowing With specified temperature or heat flux

Inflow Outflow Interface Condition, e.g., Air-water free surface Symmetry and Periodicity

Usually set through the use of a graphical user interface (GUI) click & set
ME33 : Fluid Flow 120 Chapter 15: Computational Fluid Dynamics

Initial Mesh Generation (VGRIDns)


S. Pirzadeh, NASA Langley

Combined advancing layers- advancing front


Advancing layers: thin elements at walls Advancing front: isotropic elements elsewhere

Automatic switching from AL to AF based on:


Cell aspect ratio Proximity of boundaries of other fronts Variable height for advancing layers

Background Cartesian grid for smooth spacing control Spanwise stretching


Factor of 3 reduction in grid size
ME33 : Fluid Flow 121 Chapter 15: Computational Fluid Dynamics

VGRID Tetrahedral Mesh

3.1 million vertices, 18.2 million tets, 115,489 surface pts Normal spacing: 1.35E-06 chords, growth factor=1.3
ME33 : Fluid Flow 122 Chapter 15: Computational Fluid Dynamics

Prism Merging Operation


Combine 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 elements Pyramids required as transitional elements

ME33 : Fluid Flow 123

Chapter 15: Computational Fluid Dynamics

Prism Merging Operation


Initial mesh: 18.2M Tetrahedra Merged mesh: 3.9M prisms, 6.6M Tets, 47K pyramids
64% of Tetrahedra merged

ME33 : Fluid Flow 124

Chapter 15: Computational Fluid Dynamics

Global Mesh Refinement


High-resolution meshes require large parallel machines Parallel mesh generation difficult
Complicated logic Access to commercial preprocessing, CAD tools

Current approach
Generate coarse (O(10**6) vertices on workstation Refine on supercomputer

ME33 : Fluid Flow 125

Chapter 15: Computational Fluid Dynamics

Global Mesh Refinement


Refinement achieved by element subdivision Global refinement: 8:1 increase in resolution In-Situ approach obviates large file transfers Initial mesh: 3.1 million vertices
3.9M prisms, 6.6M Tets, 47K pyramids

Refined mesh: 24.7 million vertices


31M prisms, 53M Tets, 281K pyramids Refinement operation: 10 Gbytes, 30 minutes sequentially

ME33 : Fluid Flow 126

Chapter 15: Computational Fluid Dynamics

NSU3D Unstructured Mesh Navier-Stokes Solver Mixed element grids


Tetrahedra, prisms, pyramids, hexahedra

Edge data-structure Line solver in BL regions near walls Agglomeration Multigrid acceleration Newton Krylov (GMRES) acceleration option Spalart-Allmaras 1 equation turbulence model

ME33 : Fluid Flow 127

Chapter 15: Computational Fluid Dynamics

Parallel Implementation
Domain decomposition with OpenMP/MPI communication
OpenMP on shared memory architectures MPI on distributed memory architectures Hybrid capability for clusters of SMPs

Weighted graph partitioning (Metis) (Chaco) Coarse and fine MG levels partitioned independently
ME33 : Fluid Flow 128 Chapter 15: Computational Fluid Dynamics

Computed Pressure Contours on Coarse Grid

Mach=0.2, =10 degrees, Re=1.6M


ME33 : Fluid Flow 129 Chapter 15: Computational Fluid Dynamics

Computed Versus Experimental Results

Good drag prediction Discrepancies near stall


ME33 : Fluid Flow 130 Chapter 15: Computational Fluid Dynamics

Multigrid Convergence History

Mesh independent property of Multigrid GMRES effective but requires extra memory
ME33 : Fluid Flow 131 Chapter 15: Computational Fluid Dynamics

Parallel Scalability

Good overall Multigrid scalability


Increased communication due to coarse grid levels Single grid solution impractical (>100 times slower)

1 hour soution time on 1450 PEs


ME33 : Fluid Flow 132 Chapter 15: Computational Fluid Dynamics

AIAA Drag Prediction Workshop (2001)

Transonic wing-body configuration Typical cases required for design study


Matrix of mach and CL values Grid resolution study

Follow on with engine effects (2003)

ME33 : Fluid Flow 133

Chapter 15: Computational Fluid Dynamics

Cases Run
Baseline grid: 1.6 million points
Full drag polars for Mach=0.5,0.6,0.7,0.75,0.76,0.77,0.78,0.8 Total = 72 cases

Medium grid: 3 million points


Full drag polar for each mach number Total = 48 cases

Fine grid: 13 million points


Drag polar at mach=0.75 Total = 7 cases

ME33 : Fluid Flow 134

Chapter 15: Computational Fluid Dynamics

Sample Solution (1.65M Pts)

Mach=0.75, CL=0.6, Re=3M 2.5 hours on 16 Pentium IV 1.7GHz


ME33 : Fluid Flow 135 Chapter 15: Computational Fluid Dynamics

Drag Polar at Mach = 0.75

Grid resolution study Good comparison with experimental data


ME33 : Fluid Flow 136 Chapter 15: Computational Fluid Dynamics

Cases Run on ICASE Cluster

120 Cases (excluding finest grid) About 1 week to compute all cases
ME33 : Fluid Flow 137 Chapter 15: Computational Fluid Dynamics

Current and Future Issues


Adaptive mesh refinement Moving geometry and mesh motion Moving geometry and overlapping meshes Requirements for gradient-based design Implications for higher-order Discretizations

ME33 : Fluid Flow 138

Chapter 15: Computational Fluid Dynamics

Adaptive Meshing
Potential for large savings through optimized mesh resolution
Well suited for problems with large range of scales Possibility of error estimation / control Requires tight CAD coupling (surface pts)

Mechanics of mesh adaptation Refinement criteria and error estimation


ME33 : Fluid Flow 139 Chapter 15: Computational Fluid Dynamics

Mechanics of Adaptive Meshing


Various well know isotropic mesh methods
Mesh movement
Spring analogy Linear elasticity

Local Remeshing Delaunay point insertion/Retriangulation Edge-face swapping Element subdivision


Mixed elements (non-simplicial) Anisotropic subdivision required in transition regions

ME33 : Fluid Flow 140

Chapter 15: Computational Fluid Dynamics

Subdivision Types for Tetrahedra

ME33 : Fluid Flow 141

Chapter 15: Computational Fluid Dynamics

Subdivision Types for Prisms

ME33 : Fluid Flow 142

Chapter 15: Computational Fluid Dynamics

Subdivision Types for Pyramids

ME33 : Fluid Flow 143

Chapter 15: Computational Fluid Dynamics

Subdivision Types for Hexahedra

ME33 : Fluid Flow 144

Chapter 15: Computational Fluid Dynamics

Adaptive Tetrahedral Mesh by Subdivision

ME33 : Fluid Flow 145

Chapter 15: Computational Fluid Dynamics

Adaptive Hexahedral Mesh by Subdivision

ME33 : Fluid Flow 146

Chapter 15: Computational Fluid Dynamics

Adaptive Hybrid Mesh by Subdivision

ME33 : Fluid Flow 147

Chapter 15: Computational Fluid Dynamics

Anisotropic Adaptation Methods


Large potential savings for 1 or 2D features
Directional subdivision
Assumes element faces to line up with flow features Combine with mesh motion

Mapping techniques
Hessian based Grid quality
ME33 : Fluid Flow 148 Chapter 15: Computational Fluid Dynamics

Refinement Criteria
Weakest link of adaptive meshing methods
Obvious for strong features Difficult for non-local (ie. Convective) features
eg. Wakes

Analysis assumes in asymptotic error convergence region


Gradient based criteria Empirical criteria

Effect of variable discretization error in design studies, parameter sweeps


ME33 : Fluid Flow 149 Chapter 15: Computational Fluid Dynamics

Adjoint-based Error Prediction


Compute sensitivity of global cost function to local spatial grid resolution Key on important output, ignore other features
Error in engineering output, not discretization error
e.g. Lift, drag, or sonic boom

Captures non-local behavior of error


Global effect of local resolution

Requires solution of adjoint equations


Adjoint techniques used for design optimization

ME33 : Fluid Flow 150

Chapter 15: Computational Fluid Dynamics

Adjoint-based Mesh Adaptation Criteria


Reproduced from Venditti and Darmofal (MIT, 2002)

ME33 : Fluid Flow 151

Chapter 15: Computational Fluid Dynamics

Adjoint-based Mesh Adaptation Criteria

Reproduced from Venditti and Darmofal (MIT, 2002)


ME33 : Fluid Flow 152 Chapter 15: Computational Fluid Dynamics

Adjoint-based Mesh Adaptation Criteria

Reproduced from Venditti and Darmofal (MIT, 2002)

ME33 : Fluid Flow 153

Chapter 15: Computational Fluid Dynamics

Overlapping Unstructured Meshes


Alternative to moving mesh for large scale relative geometry motion Multiple overlapping meshes treated as single data-structure
Dynamic determination of active/inactive/ghost cells

Advantages for parallel computing


Obviates dynamic load rebalancing required with mesh motion techniques Intergrid communication must be dynamically recomputed and rebalanced
Concept of Rendez-vous grid (Plimpton and Hendrickson)
ME33 : Fluid Flow 154 Chapter 15: Computational Fluid Dynamics

Overlapping Unstructured Meshes

Simple 2D transient example


ME33 : Fluid Flow 155 Chapter 15: Computational Fluid Dynamics

Gradient-based Design Optimization


Minimize Cost Function F with respect to design variables v, subject to constraint R(w) = 0
F = drag, weight, cost v = shape parameters w = Flow variables R(w) = 0 Governing Flow Equations

Gradient Based Methods approach minimum along direction : F


v

ME33 : Fluid Flow 156

Chapter 15: Computational Fluid Dynamics

Grid Related Issues for Gradient-based Design Parametrization of CAD surfaces Consistency across disciplines
eg. CFD, structures,

Surface grid motion Interior grid motion Grid sensitivities Automation / Parallelization

ME33 : Fluid Flow 157

Chapter 15: Computational Fluid Dynamics

Preliminary Design Geometry


X34 CAD Model

23,555 curves and surfaces c/o J. Samareh, NASA Langley


ME33 : Fluid Flow 158 Chapter 15: Computational Fluid Dynamics

Launch Vehicle Shape Parameterization


c/o J. Samareh, NASA Langley

ME33 : Fluid Flow 159

Chapter 15: Computational Fluid Dynamics

Sensitivity Analysis
objective function (e.g., Stress, CD)

v design variables (e.g., span, camber)

Grid f Grid s F F Geometry = x x x v Grid f Grid s Geometry 14243 v 1 424 3 1 4 24 3 1 4 24 3


geometry modeler (CAD) analysis code field grid generator surface grid generator

Manual differentiation Automatic differentiation tools (e.g., ADIFOR and ADIC) Complex variables Finite-difference approximations

c/o J. Samareh, NASA Langley


ME33 : Fluid Flow 160 Chapter 15: Computational Fluid Dynamics

Finite-Difference Approximation Error for Sensitivity Derivatives

Parameterized HSCT Model

c/o J. Samareh, NASA Langley


ME33 : Fluid Flow 161 Chapter 15: Computational Fluid Dynamics

Grid Sensitivities

Grid f Grid f Grid s Geometry = x x Grid s Geometry v v

Ideally should be available from grid/cad software


Analytical formulation most desirable Burden on grid / CAD software Discontinous operations present extra challenges
Face-edge swapping Point addition / removal Mesh regeneration
ME33 : Fluid Flow 162 Chapter 15: Computational Fluid Dynamics

High-Order Accurate Discretizations


Uniform X2 refinement of 3D mesh: Work increase = factor of 8 2nd order accurate method: accuracy increase = 4 4th order accurate method: accuracy increase = 16
For smooth solutions

Potential for large efficiency gains Spectral element methods Discontinuous Galerkin (DG) Streamwise Upwind Petrov Galerkin (SUPG)

ME33 : Fluid Flow 163

Chapter 15: Computational Fluid Dynamics

Higher-Order Accurate Discretizations


Transfers burden from grid generation to Discretization

ME33 : Fluid Flow 164

Chapter 15: Computational Fluid Dynamics

Spectral Element Solution of Maxwells Equations

J. Hesthaven and T. Warburton (Brown University)

ME33 : Fluid Flow 165

Chapter 15: Computational Fluid Dynamics

High-Order Discretizations
Require more complete surface definition Curved surface elements
Additional element points Surface definition (for high p)

ME33 : Fluid Flow 166

Chapter 15: Computational Fluid Dynamics

Combined H-P Refinement


Adaptive meshing (h-ref) yields constant factor improvement
After error equidistribution, no further benefit

Order refinement (p-ref) yields asymptotic improvement


Only for smooth functions Ineffective for inadequate h-resolution of feature Cannot treat shocks

H-P refinement optimal (exponential convergence)


Requires accurate CAD surface representation
ME33 : Fluid Flow 167 Chapter 15: Computational Fluid Dynamics

Modeling Turbulent Flows

168

What is Turbulence?
u

Unsteady, aperiodic motion in which all three velocity components fluctuate mixing matter, momentum, and energy. Decompose velocity into mean and fluctuating parts: Ui(t) Ui + ui(t)
ui(t) U i (t) Ui Time

Similar fluctuations for pressure, temperature, and species concentration values.

Why Model Turbulence?


u

Direct numerical simulation of governing equations is only possible for simple low-Re flows. Instead, we solve Reynolds Averaged Navier-Stokes (RANS) equations: R (steady, incompressible flow U i p 2U i =+m + ij w/o body forces) rU k xk xi x j x j x j where

Rij = - r ui u j

(Reynolds stresses)

Is the Flow Turbulent?


External Flows
where along a surface around an obstacle

Rex 510 5
ReD 20,000 Internal Flows
ReDh 2,300

Re L

rUL m

L = x, D, Dh, etc. Other factors such as free-stream turbulence, surface conditions, and disturbances may cause earlier transition to turbulent flow.

Grashof

Prandtl

Natural Convection
Ra 108 - 1010

3 g b D TL r where Ra=Gr Pr x ma

DT = Ts - T

Ts= temperature of the wall T= fluid temperature far from the surface of the object

How Complex is the Flow?


u

Extra strain rates


l l l l l l

Streamline curvature Lateral divergence Acceleration or deceleration Swirl Recirculation (or separation) Secondary flow

u u u u

3D perturbations Transpiration (blowing/suction) Free-stream turbulence Interacting shear layers

Choices to be Made
Flow Physics Computational Resources

Turbulence Model & Near-Wall Treatment

Computational Grid

Accuracy Required

Turnaround Time Constraints

Turbulence Modeling Approaches


Zero-Equation Models One-Equation Models
Spalart-Allmaras Include More Physics
RANS-based models

Two-Equation Models
Standard k-e RNG k-e Realizable k-e

Reynolds-Stress Model Large-Eddy Simulation Direct Numerical Simulation

Available in FLUENT

Increase Computational Cost Per Iteration

Reynolds Stress Terms in RANS-based Models


u

RANS equations require closure for Reynolds stresses.


Boussinesq Hypothesis:
(isotropic stresses)

U U 2 Rij = -ruiu j = -r kdij + mt i + j x 3 j xi

Turbulent viscosity is indirectly solved for from single transport equation of modified viscosity for One-Equation model. For Two-Equation models, turbulent viscosity correlated with turbulent kinetic energy (TKE) and the dissipation rate of TKE.
Turbulent Viscosity:

k2 mt rCm e

Transport equations for turbulent kinetic energy and dissipation rate are solved so that turbulent viscosity can be computed for RANS equations.
Turbulent Kinetic Energy: k uiui / 2
ui ui u j Dissipation Rate of e n + Turbulent Kinetic Energy: x j x j xi

One Equation Model: Spalart-Allmaras


u

Turbulent viscosity is determined from:


~ /n )3 ( n ~ mt = rn ~ 3 3 ( ) n / n + c n1

~ is determined from the modified viscosity transport equation: n


~ Dn ~~ 1 = rcb1S n + r Dt s n~
Generation

x j

2 ~ ~ ~ n n n ~ - rcw1 f w 2 (m + r n ) + rcb 2 x j d x j

Diffusion

Destruction

The additional variables are functions of the modified turbulent viscosity and velocity gradients.

One-Equation Model: Spalart-Allmaras


u

Designed specifically for aerospace applications involving wallbounded flows.


l l

Boundary layers with adverse pressure gradients turbomachinery Designed to be used with fine mesh as a low-Re model, i.e., throughout the viscous-affected region. Sufficiently robust for relatively crude simulations on coarse meshes.

Can use coarse or fine mesh at wall


l

Two Equation Model: Standard k-e Model


Turbulent Kinetic Energy
U j U i U j k k rU i m s re = mt + + ( ) - { t k xi xi xi x j xi xi 1 4 2 4 3 1 1 4 4 4 2 4 4 4 3 Destruction 444 2444 3
Generation Diffusion

Convection

Dissipation Rate
U j U i U j e2 e e e rU i = C1e m t + + ( m t s e ) - C 2e r k xi k x x x x x i j i i i 1 4 2 4 3 14444 4 24 3 4 244 4 3 1 4 244444 3 144
Convection Generation Diffusion Destruction

s k ,s e , C1e , C2e

are empirical constants

(equations written for steady, incompressible flow w/o body forces)

Two Equation Model: Standard k-e Model


u

Baseline model (Two-equation)


l l

Most widely used model in industry Strength and weaknesses well documented k equation derived by subtracting the instantaneous mechanical energy equation from its time-averaged value e equation formed from physical reasoning

Semi-empirical
l

u u

Valid only for fully turbulent flows Reasonable accuracy for wide range of turbulent flows
l l

industrial flows heat transfer

Two Equation Model: Realizable k-e


u

Distinctions from Standard k-e model:


l

Alternative formulation for turbulent viscosity


k2 m t rC m e
n n n

U k e (A0, As, and U* are functions of velocity gradients) Ao + A s

where

Cm =

1
*

is now variable

Ensures positivity of normal stresses; u 2 i 0 Ensures Schwarzs inequality; ( u i u j ) 2 u i2 u 2 j

New transport equation for dissipation rate, e:


De = r Dt x j mt + m se
Diffusion

e e2 e c S c c c3e Gb + r e r + 1 2 1e x k k + ne j
Generation Destruction Buoyancy

Two Equation Model: Realizable k-e


u u

Shares the same turbulent kinetic energy equation as Standard k-e Superior performance for flows involving:
l l l l

planar and round jets boundary layers under strong adverse pressure gradients, separation rotation, recirculation strong streamline curvature

Two Equation Model: RNG k-e


Turbulent Kinetic Energy

k k 2 rU i = mt S + a k m eff -{ re { xi xi xi 1 4 2 4 3 Generation 14 4 244 3 Dissipation


Convection Diffusion

Uj Ui 1 S 2SijSij , Sij + 2 xi xj

where

Dissipation Rate
e2 e e e 2 rU i a e m eff - C 2e r -{ R = C1e m t S + xi 142 xi xi k k 43 4 4 4 1 1 4 2 4 3 4 2 3 Additional term 44 244 3 1
Convection Generation Diffusion Destruction related to mean strain & turbulence quantities

ak,ae ,C1e ,C2e are derived using RNG theory


(equations written for steady, incompressible flow w/o body forces)

Two Equation Model: RNG k-e


u

k-e equations are derived from the application of a rigorous statistical technique (Renormalization Group Method) to the instantaneous NavierStokes equations. Similar in form to the standard k-e equations but includes:
l l l l

additional term in e equation that improves analysis of rapidly strained flows the effect of swirl on turbulence analytical formula for turbulent Prandtl number differential formula for effective viscosity high streamline curvature and strain rate transitional flows wall heat and mass transfer

Improved predictions for:


l l l

Reynolds Stress Model


ui u j J ijk Reynolds Stress rU k = Pij + F ij - e ij + Transport Eqns. xk xk
Generation Pressure-Strain Redistribution Dissipation Turbulent Diffusion
Pij ui uk U j xk + u j uk U i xk

(computed)

ui u j F ij - p + x j xi

(modeled) (related to e) (modeled)

e ij

ui u j 2m xk xk

J ijk = ui u j uk + p(d jk ui + d ik u j )
Turbulent transport Pressure/velocity fluctuations

(equations written for steady, incompressible flow w/o body forces)

Reynolds Stress Model


u

RSM closes the Reynolds-Averaged Navier-Stokes equations by solving additional transport equations for the Reynolds stresses.
l

l l

Transport equations derived by Reynolds averaging the product of the momentum equations with a fluctuating property Closure also requires one equation for turbulent dissipation Isotropic eddy viscosity assumption is avoided

u u

Resulting equations contain terms that need to be modeled. RSM has high potential for accurately predicting complex flows.
l

Accounts for streamline curvature, swirl, rotation and high strain rates
n n

Cyclone flows, swirling combustor flows 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. Anisotropic, subjected to history effects, and flow-dependent, i.e., strongly dependent on flow configuration, boundary conditions, and flow parameters. Tend to be more isotropic and less flow-dependent More likely to be easier to model than large eddies.

Small eddies:
l l

LES directly computes (resolves) large eddies and models only small eddies (Subgrid-Scale Modeling). Large computational effort
l l

Number of grid points, NLES Re 2 ut Unsteady calculation

Comparison of RANS Turbulence Models


Model SpalartAllmaras STD k-e RNG k-e Realizable k-e Reynolds Stress Model Strengths
Economical (1-eq.); good track record for mildly complex B.L. type of flows Robust, economical, reasonably accurate; long accumulated performance data Good for moderately complex behavior like jet impingement, separating flows, swirling flows, and secondary flows Offers largely the same benefits as RNG; resolves round-jet anomaly Physically most complete model (history, transport, and anisotropy of turbulent stresses are all accounted for)

Weaknesses
Not very widely tested yet; lack of submodels (e.g. combustion, buoyancy) Mediocre results for complex flows involving severe pressure gradients, strong streamline curvature, swirl and rotation Subjected to limitations due to isotropic eddy viscosity assumption Subjected to limitations due to isotropic eddy viscosity assumption Requires more cpu effort (2-3x); tightly coupled momentum and turbulence equations

Near-Wall Treatments
u

Most k-e and RSM turbulence models will not predict correct near-wall behavior if integrated down to the wall. Special near-wall treatment is required.
l l l

Standard wall functions Nonequilibrium wall functions Two-layer zonal model

Boundary layer structure

Standard Wall Functions


Mean Velocity

U * = 1 ln(Ey* ) k
Temperature

where

U*

/ 4 1/ 2 UP C1 m kP

tw / r

y*

/ 4 1/ 2 rC1 m k P yP

Pr y * T* = 1 * Pr ln Ey + P t k

* ( y * < yT ) * ( y * > yT )

thermal sublayer thickness

/ 4 1/ 2 (Tw - TP ) r c pC 1 m k P where T * & q

and P is a function of the fluid and turbulent Prandtl numbers.

Nonequilibrium Wall Functions


u

Log-law is sensitized to pressure gradient for better prediction of adverse pressure gradient flows and separation. Relaxed local equilibrium assumptions for TKE in wall-neighboring cells. Thermal law-of-wall unchanged

~ 1/ 4 1/ 2 1/ 4 1/ 2 U Cm k r y C m k 1 = ln E k tw / r m
2 y y y y ~ dp y 1 v v v where U = U ln + + * 1/ 2 * 1/ 2 2 dx y m v rk k rk k

Two-Layer Zonal Model


u

Used for low-Re flows or flows with complex near-wall phenomena. Zones distinguished by a walldistance-based turbulent Reynolds number

Rey > 200

Rey < 200

Re y
u u u u

r ky m

High-Re k-e models are used in the turbulent core region. Only k equation is solved in the viscosity-affected region. e is computed from the correlation for length scale. Zoning is dynamic and solution adaptive.

Comparison of Near Wall Treatments


Strengths Standard wall Functions
Robust, economical, reasonably accurate

Weaknesses
Empirically based on simple high-Re flows; poor for low-Re effects, massive transpiration, p, strong body forces, highly 3D flows Poor for low-Re effects, massive transpiration, severe p, strong body forces, highly 3D flows

Nonequilibrium Accounts for p effects, allows nonequilibrium: wall functions

-separation -reattachment -impingement Two-layer zonal Does not rely on law-of-the- Requires finer mesh resolution and therefore larger cpu and wall, good for complex model flows, especially applicable memory resources to low-Re flows

Computational Grid Guidelines


Wall Function Approach Two-Layer Zonal Model Approach

First grid point in log-law region

l l

First grid point at y+ 1. At least ten grid points within buffer & sublayers. Better to use stretched quad/hex cells for economy.

50 y + 500
l l

At least ten points in the BL. Better to use stretched quad/hex cells for economy.
l

Estimating Placement of First Grid Point


u

Estimate the skin friction coefficient based on correlations either approximate or empirical:
l

Flat PlatePipe Flow-

c f / 2 0.0359 Re L c f / 2 0.039 Re D

-0.2

-0.2

Compute the friction velocity:

ut t w / r = U e c f / 2

Back out required distance from wall:


l

Wall functions y1 = 50n/ut

Two-layer model y1 = n/ ut

Use post-processing to confirm near-wall mesh resolution

Setting Boundary Conditions


u

Characterize turbulence at inlets & outlets (potential backflow)


l l

k-e models require k and e Reynolds stress model requires Rij and e Turbulence intensity and length scale
n n n

Several options allow input using more familiar parameters


l

length scale is related to size of large eddies that contain most of energy. For boundary layer flows: l 0.4d99 For flows downstream of grids /perforated plates: l opening size Ideally suited for duct and pipe flows For external flows:
1<

Turbulence intensity and hydraulic diameter


n

Turbulence intensity and turbulent viscosity ratio


n

m /m
t

< 10

Input of k and e explicitly allowed (non-uniform profiles possible).

GUI for Turbulence Models


Define Models Viscous... Inviscid, Laminar, or Turbulent

Turbulence Model options

Near Wall Treatments Additional Turbulence options

Example: Channel Flow with Conjugate Heat Transfer

adiabatic wall cold air V = 50 fpm T = 0 F insulation constant temperature wall T = 100 F 10 ft 1 ft P 1 ft

Predict the temperature at point P in the solid insulation

Turbulence Modeling Approach


u u

Check if turbulent ReDh= 5,980 Developing turbulent flow at relatively low Reynolds number and BLs on walls will give pressure gradient use RNG k-e with nonequilibrium wall functions. Develop strategy for the grid
l l

l l

Simple geometry quadrilateral cells Expect large gradients in normal direction to horizontal walls fine mesh near walls with first cell in log-law region. Vary streamwise grid spacing so that BL growth is captured. Use solution-based grid adaption to further resolve temperature gradients.

Prediction of Momentum & Thermal Boundary Layers

Velocity contours BLs on upper & lower surfaces accelerate the core flow

Temperature contours Important that thermal BL was accurately resolved as well

Example: Flow Around a Cylinder

wall 2 ft air V = 4 fps 1 ft 2 ft wall 5 ft 14.5 ft

Compute drag coefficient of the cylinder

Turbulence Modeling Approach


u

Check if turbulent ReD = 24,600 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-e with 2-layer zonal model. Develop strategy for the grid
l l

Simple geometry & BLs quadrilateral cells. Large gradients near surface of cylinder & 2-layer model fine mesh near surface & first cell at y+ = 1.

Grid for Flow Over a Cylinder

Prediction of Turbulent Vortex Shedding

Contours of effective viscosity meff = m + mt CD = 0.53 Strouhal Number = 0.297 D where St tU

Summary: Turbulence Modeling Guidelines


u

Successful turbulence modeling requires engineering judgement of:


l l l

Flow physics Computer resources available Project requirements


n n

Accuracy Turnaround time

Turbulence models & near-wall treatments that are available

u u

Begin with standard k-e and change to RNG or Realizable k-e if needed. Use RSM for highly swirling flows. Use wall functions unless low-Re flow and/or complex near-wall physics are present.

Das könnte Ihnen auch gefallen