Top Banner
School of Mechanical Aerospace and Civil Engineering Msc CFD-1 CFD-1 T. J. Craft George Begg Building, C41 Reading: J. Ferziger, M. Peric, Computational Methods for Fluid Dynamics H.K. Versteeg, W. Malalasekara, An Introduction to Computational Fluid Dynamics: The Finite Volume Method S.V. Patankar, Numerical Heat Transfer and Fluid Flow Notes: http://cfd.mace.manchester.ac.uk/tmcfd - People - T. Craft - Online TeachingMaterial Introduction: What is CFD? CFD: Computational Fluid Dynamics Many modern engineering systems require a detailed knowledge of fluid flow behaviour. Experiments provide useful data, but are often costly and time-consuming. It can also be difficult to measure the details required: Measurement probes may disturb the flow excessively, and/or optical access may not be convenient. Obtaining the correct parameter scaling may be difficult. Reproducing some flow conditions safely (eg. explosions) may be difficult. Empirical correlations can be useful for simple problems – or first estimates – but are usually not available or applicable for complex problems. CFD-1 2010/11 2 / 21 The equations governing fluid flows are a set of coupled, non-linear partial differential equations: Continuity: ∂ρ t + ∂ρUi xi = 0 Momentum: ∂ρUi t + ∂ρUi Uj xj = - P xi + xj μ Ui xj Many real problems include additional terms and/or equations, governing heat-transfer, chemical species, turbulence models, etc. Analytic solutions are known only for a few very simple laminar flow cases. An alternative is to “solve” the governing equations numerically, on a computer. Computational Fluid Dynamics (CFD) is this process of obtaining numerical approximations to the solution of the governing fluid flow equations. CFD-1 2010/11 3 / 21 Note the use of the word “approximations”: all CFD solutions have some error associated with them. CFD does not remove the need for experiments: numerical models need to be validated to ensure they produce reliable and accurate results. With the growth of available computing power it has become possible to apply CFD even to very complex flowfields, giving detailed information about the velocity field, pressure, temperature, etc. The key to successful use of CFD is an understanding of where the errors come from; their implications, and how to ensure they are small enough to be acceptable in a particular application. The main aims of this course are thus to: Give an understanding of the processes involved in approximating differential equations by a set of algebraic (discretized) equations. Allow an appreciation of the accuracy and stability issues associated with different approximations. Provide an understanding of how the resulting set of equations are solved, and how coupled sets of equations are handled. CFD-1 2010/11 4 / 21
6

CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

Mar 26, 2018

Download

Documents

trankhanh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

School of Mechanical Aerospace and Civil Engineering

Msc CFD-1

CFD-1

T. J. CraftGeorge Begg Building, C41

Reading:J. Ferziger, M. Peric, Computational Methods for FluidDynamicsH.K. Versteeg, W. Malalasekara, An Introduction toComputational Fluid Dynamics: The Finite VolumeMethodS.V. Patankar, Numerical Heat Transfer and Fluid FlowNotes: http://cfd.mace.manchester.ac.uk/tmcfd

- People - T. Craft - Online Teaching Material

Introduction: What is CFD?

◮ CFD: Computational Fluid Dynamics

◮ Many modern engineering systems require a detailed knowledge of fluidflow behaviour.

◮ Experiments provide useful data, but are often costly andtime-consuming. It can also be difficult to measure the details required:

◮ Measurement probes may disturb the flow excessively, and/or opticalaccess may not be convenient.

◮ Obtaining the correct parameter scaling may be difficult.

◮ Reproducing some flow conditions safely (eg. explosions) may bedifficult.

◮ Empirical correlations can be useful for simple problems – or firstestimates – but are usually not available or applicable for complexproblems.

CFD-1 2010/11 2 / 21

◮ The equations governing fluid flows are a set of coupled, non-linearpartial differential equations:

Continuity:∂ρ∂ t

+∂ρUi

∂xi= 0

Momentum:

∂ρUi

∂ t+

∂ρUiUj

∂xj=−

∂P∂xi

+∂

∂xj

(

µ∂Ui

∂xj

)

◮ Many real problems include additional terms and/or equations, governingheat-transfer, chemical species, turbulence models, etc.

◮ Analytic solutions are known only for a few very simple laminar flowcases.

◮ An alternative is to “solve” the governing equations numerically, on acomputer.

◮ Computational Fluid Dynamics (CFD) is this process of obtainingnumerical approximations to the solution of the governing fluid flowequations.

CFD-1 2010/11 3 / 21

◮ Note the use of the word “approximations”: all CFD solutions have someerror associated with them.

◮ CFD does not remove the need for experiments: numerical models needto be validated to ensure they produce reliable and accurate results.

◮ With the growth of available computing power it has become possible toapply CFD even to very complex flowfields, giving detailed informationabout the velocity field, pressure, temperature, etc.

◮ The key to successful use of CFD is an understanding of where theerrors come from; their implications, and how to ensure they are smallenough to be acceptable in a particular application.

◮ The main aims of this course are thus to:

◮ Give an understanding of the processes involved in approximatingdifferential equations by a set of algebraic (discretized) equations.

◮ Allow an appreciation of the accuracy and stability issues associatedwith different approximations.

◮ Provide an understanding of how the resulting set of equations aresolved, and how coupled sets of equations are handled.

CFD-1 2010/11 4 / 21

Page 2: CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

◮ A number of commercial CFD codes are available (Fluent, Star-CD,CFX,. . . ).

◮ These may appear “easy -to-use”, but to do so reliably requires a goodunderstanding of the above issues and of the numerical methodsemployed by the programs. Only with this can one select appropriateoptions for particular problems.

◮ For example, the ‘default’ numerical approximations in such codes areoften rather diffusive (a term that will be explained later). This makes thesolution more stable, so an inexperienced user is more likely to get aconverged result, but the errors in it may be large, so the result may notcorrespond closely to the true flow.

◮ Informed use of CFD codes also requires a good understanding of basicfluid mechanics – so one can choose appropriate physical models for aparticular problem and recognise whether “solutions” coming fromsimulations make sense or not.

CFD-1 2010/11 5 / 21

The CFD Process

◮ Grid Generation

◮ Structured, unstructured,. . .

◮ Depending on the numerical scheme, values of variables may bestored at cell centres, cell vertices, or a combination.

CFD-1 2010/11 6 / 21

◮ Discretization

◮ Approximating the differential equations by a set of algebraic oneslinking the variable nodal values.

For example, a central differencescheme might use:

∂ 2U∂x2 ≈

(UE −UP)/∆x− (UP −UW )/∆x∆x

U U UP EW

◮ This process involves approximating derivatives, and often entailsinterpolating variable values.

◮ The methods employed for these approximations can affect both theaccuracy and stability of the numerical scheme.

◮ The result is a (large) set of algebraic equations.

CFD-1 2010/11 7 / 21

◮ Solution of Discretized Equations

◮ The discretized equations can be written in matrix form

Ax = b

x is the vector of unknowns (the nodal variable values). The valuesin A and b depend on the discretization method adopted.

◮ Different methods can be employed to solve this set of equations(usually in an iterative fashion).

◮ The choice of method depends on the particular type of problem,form of the matrix A, etc.

◮ Post-Processing

CFD-1 2010/11 8 / 21

Page 3: CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

Flow Over 2-D Hills

◮ Well-resolved LES byTemmerman & Leschziner(2001)

◮ Re ≡ UbH/ν = 10590

◮ Separation from curved surface, followed by reattachment.

◮ Few models return the correct separation and reattachment points.

CFD-1 2010/11 9 / 21

Flow Over 3-D Hill

◮ Experiments by Simpson et al(2002).

◮ Complex separation andvortex pattern downstream ofhill.

◮ Re = UH/ν = 130000

CFD-1 2010/11 10 / 21

Flow Around Simplified Car Hatchback

◮ Experiments by Lienhart et al (2000).

◮ A rear slope angle of 25o.

◮ Strong vortices roll up off the cornersof the upper roof.

CFD-1 2010/11 11 / 21

Wing-Tip Vortex Development – 1

◮ Near-field development of the wing-tip vortex off a NACA 0012 aerofoil at10o incidence.

◮ Experiments by Chow et al (1994) show an accelerated core region.

◮ Linear and non-linear EVM’s, and stress transport schemes have beentested (all with wall-functions over the wing surface).

◮ Adequate resolution of the downstream vortex requires grids of 5-6Mcells (even with wall-functions on all walls).

CFD-1 2010/11 12 / 21

Page 4: CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

Wing-Tip Vortex Development – 2

Streamwise Velocity at x/c = 0.678

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

z/c

y/c

Exptl Meas.

Kok k−

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

z/c

y/c

Linear k−

TCL

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

z/c

y/c

Non−linear k−

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

−0.1 −0.05 0.0 0.05

−0.1 −0.05 0.0 0.05

0.0

0.025

0.05

0.075

0.1

0.125

0.15

0.0

0.025

0.05

0.075

0.1

0.125

0.15

z/c

y/c

TCL

Vortex Centre Development

◮ Fine downstream grid required to resolve vortex development.◮ Advanced stress transport scheme (TCL) does capture the flow

development.

CFD-1 2010/11 13 / 21

Transonic Afterbody Flows

◮ Measurements reported byBerrier (1988).

◮ Freestream M = 0.944 withnozzle pressure ratio 1.98.

◮ Computed with 1.4M nodes.

Surface Pressure coefficients

0.6 0.8 1.0x/l

−0.4

−0.2

0.0

0.2

0.4

0.6

Cp

θ=0ο

0.6 0.8 1.0x/l

0

θ=45ο

0.6 0.8 1.0x/l

θ=180ο

Exp.MCL

◮ TCL scheme shows goodagreement with the limitedavailable data.

CFD-1 2010/11 14 / 21

3-D Duct with Staggered Ribs

◮ Local heat transfer measurements taken on ribbed wall.

◮ Non-orthogonal grid of76×64×30 cells.

CFD-1 2010/11 15 / 21

Important Concepts in CFD

Accuracy

◮ This can be thought of as three issues:

◮ Modelling accuracy. How well do the differential equations representthe physical system.For single phase laminar flow this is not usually an issue, but may beonce models are introduced for turbulence, etc.

◮ Discretization accuracy: How well does the discretized solution (thecollection of velocity, pressure, temperature,. . . values at grid nodes)represent the true solution of the original differential equations.

◮ Solver Accuracy: How close does the matrix solver get to the truesolution of the discretized system.

◮ The second is the accuracy question that will addressed in most detail inthis course. Different approximation schemes and grid arrangements canhave a significant effect on the accuracy of the solution.

CFD-1 2010/11 16 / 21

Page 5: CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

Stability

◮ Most CFD schemes employ an iterative solution procedure to solve theresulting system of discretized algebraic equations. Stability in thiscontext refers to the convergence (or otherwise) of this process.

◮ In time-dependent problems stability refers to whether the methodproduces a bounded solution (assuming the exact solution should remainbounded).

◮ A stable scheme thus ensures that small errors (which inevitably appearin a numerical solution) do not get magnified.

◮ Stability of a scheme can be analysed analytically for very simpleequations, but there are few such results for non-linear coupled systems.

◮ In practise, stability often places a restriction on the time step that can beused, or the level of under-relaxation applied.

CFD-1 2010/11 17 / 21

Stability vs. Accuracy

◮ In general, there is often a trade-off between accuracy and stability.

◮ A numerical scheme that is very diffusive, for example, can be very stablebecause it is effectively adding too much “viscosity” to the problem.

◮ However, by doing so it may be smoothing out steep gradients, and willnot, therefore, be very accurate.

◮ Understanding these effects, and how to get the right balance betweenthe two, is a crucial aspect of CFD.

Consistency

◮ If the discretization scheme is consistent, then it should formally becomeexact as the grid spacing/time step tends to zero.

◮ Truncation errors (see later lectures) are generally proportional to (∆x)n

or (∆t)n for some n (which depends on the discretization scheme); aconsistent scheme will have n > 0.

CFD-1 2010/11 18 / 21

Conservation

◮ The equations being solved arise from physical conservation laws. Aconservative numerical scheme will retain this property on both a local(cell) and global (domain) level.

◮ For example, in a steady state problem there should be a balancebetween mass inflow and outflow over each cell, and over the entiredomain.

Boundedness

◮ Ensures that the numerical solution lies within physical bounds.

◮ For example, in a heat conduction problem the minimum and maximumtemperatures should occur on the domain boundaries. A boundedscheme would not produce spurious maxima/minima within the domain.

◮ Higher order discretization schemes can often produce unboundedsolutions in the form of undershoots and overshoots, which cansometimes lead to stability and convergence problems.

CFD-1 2010/11 19 / 21

Course Structure

◮ Content:◮ Basic numerical solution techniques◮ Finite difference methods◮ Finite volume methods◮ Solving sets of linear equations◮ Handling coupled sets of equations◮ Time dependent problems◮ Body-fitted grids for complex geometries◮ Considerations in turbulent flows

◮ Two laboratory exercises.

◮ Suggested Reading:

J. Ferziger, M. Peric, Computational Methods for Fluid DynamicsH.K. Versteeg, W. Malalasekara, An Introduction to Computational FluidDynamics: The Finite Volume MethodS.V. Patankar, Numerical Heat Transfer and Fluid Flow

CFD-1 2010/11 20 / 21

Page 6: CFD-1 - University of Manchestercfd.mace.manchester.ac.uk/.../TimCraftNotes_All_Access/cfd1-intro.pdf · Msc CFD-1 CFD-1 T. J. Craft ... I CFD: Computational Fluid Dynamics ... I

Course Delivery and Assessment

◮ Lectures given by Dr Tim Craft and Prof Dominique Laurence.

◮ Monday 11:00-13:00 SSB/G41◮ Thursday 11:00-12:00 R/F1

◮ Two lab sessions to be arranged.

◮ Assessment:

◮ Three hour examination in January (80%)◮ Reports on lab exercises (20%)

CFD-1 2010/11 21 / 21