fluent lecture dr. thomas j. barber engr.uconn/~barbertj

48
Fluent Lecture Dr. Thomas J. Barber www.engr.uconn.edu/~barbertj

Upload: fonda

Post on 05-Jan-2016

68 views

Category:

Documents


0 download

DESCRIPTION

Fluent Lecture Dr. Thomas J. Barber www.engr.uconn.edu/~barbertj. Outline. Background Issues Codes, Flow Modeling, and Reduced Equation Forms Numerical Methods: Discretize, Griding, Accuracy, Error Data Structure, Grids Turbulence Fluent. CFD Connection to Other Solution Approaches. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Lecture

Dr. Thomas J. Barberwww.engr.uconn.edu/~barbertj

Page 2: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Outline

• Background Issues• Codes, Flow Modeling, and Reduced

Equation Forms• Numerical Methods: Discretize, Griding,

Accuracy, Error• Data Structure, Grids• Turbulence• Fluent

Page 3: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

CFD Connection to Other Solution Approaches

Approach Advantages Disadvantages Experimental Capable of being most realistic Costly Long lead times Scaling problems Tunnel corrections Measurement difficulties Theoretical Analytical forms Restricted geometry and physics Usually for linear problems Numerical Complicated geoms. can be treated Ability to describe physics Unsteady flows can be treated Truncation errors B.C. problems Computer costs

CFD (numerical) approach is most closely related to experimental approach, i.e. can arbitrarily select physical parameters (tunnel conditions) output is in form of discrete or point data results have to be interpreted (corrected) for errors in simulation.

Page 4: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

BackgroundLimiting Factors - I Computer size:

– Moore’s law: First postulated by Intel CEO George Moore. Observation that logic density of silicon integrated circuits has closely followed curve: Bits per sq. in.(and MIPS) doubles power of computing (speed and reduced size), thereby quadrupling computing power every 24 months.

Calculations per second per year for $1000.

Page 5: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Date Device Add Time Calculations cost cost CPS/$1000(sec) per sec then $'s 1998 $'s

1946 ENIAC 2.00E-04 5.00E+03 $750,000 $6,265,000 7.98E-01

1951 Univac I 1.20E-04 8.33E+03 $930,000 $5,827,000 1.43E+00

1960 IBM 1620 6.00E-04 1.67E+03 $200,000 $1,101,000 1.51E+00

1966 IBM 360 Model 75 8.00E-07 1.25E+06 $5,000,000 $25,139,000 4.97E+01

1976 DEC PDP-11Model 70 3.00E-06 333000 $150,000 $429,000 7.77E+02

1977 Cray I 1.00E-08 1.00E+08 $10,000,000 $26,881,000 3.72E+03

1977 Apple II 1.00E-05 1.00E+05 $1,300 $3,722 2.69E+04

1979 DEC VAX I IModel 780 2.00E-06 5.00E+05 $200,000 $449,000 1.11E+03

1980 Sun-i 3.00E-06 3.33E+05 $30,000 $59,300 5.62E+03

1982 IBM PC 1.56E-06 6.41E+05 $3,000 $5,064 1.27E+05

1993 Pentium PC 1.00E-07 1.00E+07 $2,500 $2,818 3.55E+06

1996 Pentium PC 1.00E-08 1.00E+08 $2,000 $2,080 4.81E+07

1998 Pentium II PC 5.00E-09 2.00E+08 $1,500 $1,500 1.33E+08

Page 6: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Outline

• Background Issues• Codes, Flow Modeling, and Reduced

Equation Forms• Numerical Methods: Discretize, Griding,

Accuracy, Error• Data Structure, Grids• Turbulence• Fluent

Page 7: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

What is a CFD code?

GeometryDefinition

Computational Grid and Domain

Definition

Boundary Conditions

DiscretizationApproach

SolutionApproach

Performance Analysis

SolutionDisplay

Preprocessing

Processing

Postprocessing

Converts chosen physics into discretized forms and solves over chosen physical domain

Computer Usage

Strategy

SolutionAssessment

Page 8: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Problem FormulationEquations of Motion

Conservation of mass (continuity) = particle identityConservation of linear momentum = Newton’s lawConservation of energy = 1st law of thermo (E)

2nd law of thermo (S)Any others?????

Most General Form: Navier-Stokes Equations• Written in differential or integral (control volume) form. • Dependent variables typically averaged over some time scale,

shorter than the mean flow unsteadiness (Reynolds-averaged Navier-Stokes - RANS equations).

Page 9: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Reduced Forms of Governing Equations

v vE FQ E F

t x y x y

2

2

0 0 0

u v

uvu puQ E F

uv v pv

e e p u e p v

00

xx

vxy

xy

xx xy xxx xy x

u

yE

u v qu v q

Critical issue: modelingviscous and turbulentflow behavior

Page 10: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Complex Aircraft Analysis, Circa 1968B747-100 with space shuttle Enterprise

What is different with these aircraft from normal operation?

Page 11: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Reduced Forms of Governing Equations

Euler Equations• Coupled system of 5 nonlinear first order PDE’s• Describes conservation mass, momentum, energy• Describes wave propagation (convective) phenomena

Full Potential Equation• Single nonlinear second order PDE• Describes conservation mass, energy• Conservation of momentum not fully satisfied in presence of shocks

P:otential Flow Equation• Single linear second order PDE• Describes conservation mass, energy• Describes incompressible flow• Conservation of momentum not fully satisfied in presence of shocks

Navier-Stokes Equations• Coupled system of 5 nonlinear second order PDE’s• Describes conservation mass, momentum, energy• Describes wave propagation phenomena damped by viscosity

Neglect viscosity &heat conduction

Isentropic, irrotational flows

Neglect compressibility

More Physics(More complex equations)

More Geometry(More complex grid generation)

(More grid points)

Page 12: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Outline

• Background Issues• Codes, Flow Modeling, and Reduced

Equation Forms• Numerical Methods: Discretize, Griding,

Accuracy, Error• Data Structure, Grids• Turbulence• Fluent

Page 13: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

• Finite Difference

• Finite Volume

• Finite Element

All based ondiscretizationapproaches

P.D.E.Lu=f

DiscretizeSystem of LinearAlgebraic Eqns Up

Page 14: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Breakup Continuous Domain into a Finite Number of Locations

Boundary Condition

Boundary Condition

B. C.

B. C.

Page 15: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Discretization & Order of Accuracy

• Taylor Series Expansion

• Polynomial Function [Power Series]

• Accuracy Dependent on Mesh Size and Variable Gradients

2 2

2

( )( ) ( ) ...

2!

df x d ff x x f x x

dx dx

f

x

fi fi+1 fi+2

fi+3

xi+1xi+2 xi+3xi

x

2( ) ( ) ( ) ...f x A B x C x

Page 16: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Discretization Example

• Derivative approximation proportional to polynomial order• Order of accuracy: mesh spacing, derivative magnitude

– only reasonable if product is small

Page 17: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Numerical Error Sources - I

• Truncation error– Finite polynomial effect– Diffusion: acts like artificial viscosity & damps out

disturbances– Dispersion: introduces new frequencies to input

disturbance– Effect is pronounced near shocks

Exact Diffusion Dispersion

Page 18: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Numerical Error Sources - II

0 100 200 300 400Time

-0.1

0

0.1

0.2

0.3

0.4

Am

plit

ud

e

ux

0 5 23

2. exp (ln )( )

at t=0

at t=400

Traveling linear wave model problem

0u u

t x

Page 19: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

380 390 400 410 420Time

-0.1

0

0.1

0.2

0.3

0.4A

mp

litu

de

'1st''2nd''3rd''3tvd''exact'

Numerical Error Sources - III

at t=400

Page 20: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

380 390 400 410 420Time

-0.1

0

0.1

0.2

0.3

0.4

Am

plit

ud

e

'1st''2nd''3rd''3tvd''exact'

Numerical Error Sources - IV

at t=400

380 390 400 410 420Time

-0.1

0

0.1

0.2

0.3

0.4

Am

plit

ud

e

'5th''7th''9th''exact'

Page 21: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Time-Accurate vs. Time-Marching

• Time-marching: steady-state solution from unsteady equations– Intermediate solution has no meaning

• Time-accurate: time-dependent, valid at any time step

Page 22: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Numerical Properties of Method

• Stability– Tendency of error in solution of algebraic equations to decay– Implies numerical solution goes to exact solution of discretized

equations• Convergence

– Solution of approximate equations approaches exact set of algebraic eqns.

– Solutions of algebraic eqns. approaches exact solution of P.D.E.’s as x t 0

Exact SolutionU

GoverningP.D.E.’s

L(U)

System of Algebraic Equations

Approximate Solutionu

Discretization

Consistency

Convergence

as x t 0

Page 23: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

How good are the results?• Assess the calculation for

– Grid independence– Convergence (mathematical): residuals as measure of how

well the finite difference equation is satisfied.• Look for location of maximum errors• Look for non-monotonicity

2

2,

max

. . . 0

. . . ( , ) 0

1. . . ( )

,

n ni j ij

nij

i j

nij i j

P D E Lu

F D E Lu x y

R M S error L normN

Max error at x y

Page 24: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

How good are the results?

• Convergence (physical): Check conserved properties: mass (for internal flows), atom balance (for chemistry), total enthalpy, e.g.

2 2, ,H H O OH H constant

O constant

Page 25: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Outline

• Background Issues• Codes, Flow Modeling, and Reduced

Equation Forms• Numerical Methods: Discretize, Griding,

Accuracy, Error• Data Structure, Grids• Turbulence• Fluent

Page 26: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

2-D Problem Setup

• Structured Grid / Data

• Unstructured Data / Structured Grid

i,j+1

i-1,j i,j

i,j-1

i+1,j

X , i

Y, j

Ui,j

61

35 36

11

37

X

Y

U3660

10 12

62

Page 27: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

2-D Problem Setup

• Semi -Structured Grid / Unstructured Data

• Unstructured Data / Unstructured Grid

61

35 36

11

37

X

Y

U3660

10 12

62

61

3536

11

37

X

Y

U3660

1012

62

Page 28: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Grid Generation Transformation to a new coordinate system Transformation to a stretched grid

Page 29: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Grid Generation - Generic Topologies

Block-structured O + H

• More complicated grids can be constructed by combining the basic grid topologies - cylinder in a duct

Overset or Chimera Cartesian + Polar

Both take advantage of natural symmetries of the geometry

Page 30: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Grid Generation - Generic Topologies

Cartesian-stepwise

• More complicated grids can be constructed taking advantage of simple elements

Unstructured-hybrid

Dimension Unstructured Structured 2D triangular quadrilateral 3D tetrahedra hexahedra

Page 31: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Outline

• Background Issues• Codes, Flow Modeling, and Reduced

Equation Forms• Numerical Methods: Discretize, Griding,

Accuracy, Error• Data Structure, Grids• Turbulence• Fluent

Page 32: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Viscosity and Turbulence

0.99e

Boundary Layer

uy

u

Page 33: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Viscosity and Turbulence

Laminar

Turbulent

Steady Unsteady

Steady Unsteady

Page 34: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Viscosity and TurbulenceProperties Averaged Over Time Scale Much Smaller Than Global

Unsteadiness

/ / / /

*

*

1/ 2

*

; 0;

1 2ln

w

u u u u uv uv u v

u yuu F F y

u

u

yu y B f

Page 35: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Viscosity and Turbulence

• Laminar viscosity modeled by algebraic law: Sutherland

• Turbulent viscosity modeled by 1 or 2 Eqn. Models– Realizable k- model is most reliable

• k=turbulence kinetic energy = turbulence dissipation

– Model near wall behavior by:• Wall integration; more mesh near wall, y+

1-2• Wall functions: less mesh, algebraic wall

model, y+ 30-50

Page 36: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Outline

• Background Issues• Codes, Flow Modeling, and Reduced

Equation Forms• Numerical Methods: Discretize, Griding,

Accuracy, Error• Data Structure, Grids• Turbulence• Fluent

Page 37: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Finite Volume• Basic conservation laws of fluid dynamics are expressed

in terms of mass, momentum and energy in control volume form.

• F.V. method: on each cell, conservation laws are applied at a discrete point of the cell [node].

– Cell centered

– Corner centered

Piecewise constant interpolation

Piecewise linear Interpolation

0QdV H n dAt

����������������������������

Page 38: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

2D Steady Flux Equation

1, 1, 2

,

, 1, , 1, 1, 1,2 2

,

0

( )2

( ) ( )2 2 2

i j i j

i j

i j i j i j i j i j i jE W

i j

F G

x y

Classical view

F FFO x

x x

Alternative view

F F F F F FF FFO x O x

x x x x x

Finite-difference: centered in space scheme

W E

N

S

X

i-1,j

i,j+1

i,j-1

Page 39: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Steady Governing Equations

( )

1, , ,

. . .'

jj i i

j j j

Tj i v

P P i iE W N S

u S Sx x x

where u H f

Coupled system of nonlinear P D E s

Discretizing over control volume yields

A A B

Start with generalized RANS equations = transport coeff. / = diffusivity

Page 40: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme

SIMPLE: Semi-Implicit Method for Pressure Linked Equations

Page 41: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme

( )

/ 2

...

...

...

P P i i

W W W

E

S

N

P E W N S

A A B S

A D F

A

A

A

A A A A A

Solution algorithm: • Staggered grid; convected on different grid from pressure. • Avoids wavy velocity solutions

Page 42: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme

CV for u-eqn.

Two sets of indices or one and one staggered at half-cell

Page 43: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme

CV for v-eqn.

Page 44: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme

CV for p-eqn.

Page 45: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme

5-point computational molecules for linearized system using geographical not index notation

Page 46: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Solution MethodSimple Scheme – Multidimensional Model

2-D and 3-D computational molecules using geographical not index notation

Page 47: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Fluent Operational Procedures

• Generate Geometry• Generate Computational Grid• Set Boundary Conditions• Set Flow Models: Equation of State, Laminar or Turbulent, etc.• Set Convergence Criteria or Number of Iterations• Set Solver Method and Solve• Check Solution Quality Parameters: Residuals, etc.• Post-process: Line Plots, Contour Plots• Export Data for Further Post-processing

Page 48: Fluent Lecture Dr. Thomas J. Barber engr.uconn/~barbertj

Suggested Fluent Development Path

• Read FlowLab FAQ notes [Barber Web site]

• Run FlowLab to familiarize yourself with GUI, solution process and post-processing

• Read Cornell University training notes [Handout]

• Develop a relevant validation-qualification process, i.e. compare with known analyses or data– Developing laminar flow in straight pipe– Developing turbulent flow in a straight pipe [if appropriate]– Convection process– Convergent-divergent nozzle flow– ….