Applications of CFD Lubbock, Texas Oct 18 2013 1 /35. Past, present & future of CFD: a limited...

35
Applications of CFD Lubbock, Texas Oct 18 2013 1/35. Past, present & future of CFD: a limited review by Brian Spalding About the past: •focussing on contributions made by Imperial College Mechanical Engineering Department. About the future: •Population models of turbulence, •FVM for fluid~solid interactions, •The APParition, •Partially-parabolic applications. About the present, observations about: • the FVM versus FEM contest, • computational-grid trends, • turbulence-model trends.

Transcript of Applications of CFD Lubbock, Texas Oct 18 2013 1 /35. Past, present & future of CFD: a limited...

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

1/35. Past, present & future of CFD:

a limited reviewby Brian Spalding

About the past: •focussing on contributions made by Imperial College Mechanical Engineering Department.

About the future: •Population models of turbulence,•FVM for fluid~solid interactions,•The APParition,•Partially-parabolic applications.

About the present, observations about:• the FVM versus FEM contest,• computational-grid trends,• turbulence-model trends.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

2/35. The Past:Before the digital age

Airplanes appeared years before digital computers.

Yet designers could even then predict their lift and drag. They used a combination of potential-flow theory with boundary-layer theory.

This proceeded by iteration: 1. First source-sink distributions were sought which caused streamlines to fit the airplane, which led to

2. distributions of pressure over the surface.

3.They then used boundary-layer theory to calculate the ‘displacement thickness’ of the layer, i.e. the extent to which the airplane seemed bigger than first assumed.

4. Then they repeated steps 1, 2, 3; until convergence.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

3/35. The Past: Is the pre-digital method relevant today?

Their boundary-layer theory was crude:• two-dimensional,• integral,• with assumed velocity profiles.

Therefore wind-tunnel tests were needed in addition. But the principle was sound. And it still is;

for computers remain too small to allow adequately fine elliptic grids,despite the use of many levels ofsub-division.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

4/35. The Past: CFD at IC MED;How we stumbled into it

Prior to 1965, IC Mech Eng still used integral-profile methods for 2D boundary-layer flows.

Profiles were polynomials, with coefficients deduced from weighted-integral conservation equations.

Then the Eureka-insight flash: piece-wise-linear profiles were more flexible; with integration over ‘pieces’; i.e. with unity weighting factors.We had invented (our own kind of) finite-volume CFD.

The rest is history.A remark aside: The finite-element community still uses

non-unity weighting factors; to their great disadvantage. One day they’ll learn. More about this later.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

5/35. The Past at IC MED:Features of the first computer

program

It first appeared in Patankar’s PhD Thesis of 1967, later published as a book.

The grid width expanded and contracted to cover only the region of interest. So it was ‘self-adaptive’.

It handled turbulence via Prandtl’s mixing-length model.

It used the TDMA, without iteration, for cross-stream solution; and it ‘marched’ in the main-flow direction.

It simulated 2D parabolic flows, using axial distance and dimensionless stream function as co-ordinates, so minimising false diffusion.

Wall functions made their first appearance in it.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

6/35. The Past at IC MED:More about 2D parabolic

computer programs

A second computer program, GENMIX, applied the same method to more general 2D parabolic flows, e.g. wakes, plumes, wall jets for film-cooling, flames, etc.

A major use was for systematic validation studies of the then-emerging two-equation turbulence models.

It too was published as a book, with coding; and therefore used by non-IC researchers.

We sought therefore a method to escape its restrictions viz. to two dimensions; and to uniform density.

However the IC group had already developed and published a stream-function~vorticity program for simulating 2D elliptic flows.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

7/35. The Past at IC MED:SIVA, SIMPLE and 3D

Our first success was with SIVA (= Simultaneous Variable Adjustment) ( Caretto et al 1971). But it worked point-by-point and converged slowly.

So SIMPLE came into existence, purloining elements from predecessors, but surpassing them all (being later surpassed in its turn by SIMPLER, SIMPLEST, SIMPLEC, etc.)

Later it was extended to two-phase, free-surface, magneto-hydrodynamics, and much more.

Harlow and Welch (1965) had published 3D methods for unsteady compressible flows; but our 2D methods handled practically more-important steady and incompressible ones. We wanted to continue.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

8/35. The Past at IC MED:3D parabolic and partially parabolic

Eager to show SIMPLE’s elliptic capability, we too quickly exemplified it. The world followed, and scarcely noticed its parabolic capability. Who uses it nowadays?

The first publication of SIMPLE (1972) was for 3D parabolic flows. This is fact seldom remembered.

However, finding our computers too small (they still are; and may be forever), we later created the partially-parabolic method. This stores 3D only pressures, but velocities 2D, saving memory at the expense of time.There were numerous publication; but little world-wide following.Our fault, no doubt; but the world’s loss (I believe). More about this below.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

9/35. The Past at IC MED:More about partially-parabolic

Their authors (I was one) compared partially-parabolic with fully-parabolic (and therefore incorrect) solutions, rather than with more accurate fully-elliptic ones.

IC’s publications concerned flows in curved and coiled tubes, rotating ducts, 2D turbines, and around ship’s hulls. Too few! And with wrong emphasis.

Another distraction was: did the turbulence models used fit the experiments? Beside the point.What should have been stressed was:Replacing fully-elliptic by partially-parabolic,1. scarcely affected accuracy or computer time, but 2. greatly reduced computer memory requirement.When authors forget the point, most readers will miss it.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

10/35. The Past at IC MED:starting the CFD software industry

As engineers our aim was to be useful. So we offered our services to industry; with success.

Imperial College was ill-suiteded to industrial contracts; so CHAM Ltd was founded as a pioneering ‘spin-off’.

Soon came another ‘Eureka’ moment: Why not create a general-purpose package, with a closed-off core and open-to-users outside? Then the customers’ own staff could use it.

Hence: PHOENICS (1981); followed by many emulators: FLUENT, Star-CD, Flow-3D, CFX, etc., etc.

At first, each task was treated as a ‘start from scratch’; and only CHAM personnel could use the software.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

11/35. Present: some trends:FVM versus FEM

Starting with FIDAP, finite-element-based codes appeared in the CFD-software market; and multplied.

The burgeoning FEM literature implied that differential equations not multiplied by non-unity weighting functions (NUWFs) could’t be solved. Else why do it?

Those who never understood the FEM literature can now take heart: FEM-based CFD codes are no more.

Yet Finite-Volume codes use unity weighting factors (UWFs), i.e. they use no weighting at all.

The UWFists have at last prevailed …. … for CFD.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

12/35. Present trends:FVM for solid stress?

FEM still dominates the solid-stress field; but FVM can solve the problems just as well, calculating displacements in place of velocities.

So a single FVM computer code can solve fluid-solid-interaction problems, e.g. thermal and mechanical stresses in a gas-turbine blade.

Slides extracted from an earlier lecture will now illustrate this.

The computer code used is PHOENICS which has a built-in SSFT, i.e. simultaneous-solid-fluid-thermal capability.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

Hot gas flows outside an internally-cooled blade-like solid.

13/35. A typical SSFT problem:blade in hot gas, cooled internally

The un-structured grid which is used is shown below.

The picture above shows the whole calculation domain, with gas inlet on the left and outlet on the right.

The smallest cells are placed near the curved solid-fluid interfaces.

Also visible is the central tube, which introduces the cooling air.The problem is illustrative, with idealised geometry.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

Velocity vectors in the gas stream. Red is fast and green slow.

14/35. FVM solution for velocities

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

Displacement vectors computed at same time and in the same (SIMPLE) way as velocities.

15/35. Displacement and thermal strain in solid

Thermal-strain distributions here shown as contours are also computed simultaneously.Repetition for sake of emphasis: The simulation is performed by a single FVM-based code as part of a single calculation, with full compatibility between conditions in solid and fluid?

Can any FEM code do the same?

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

Pressure contours in the flowing gas.

Red is high; blue is low.

16/35. Pressure distribution in gas

Pressure is computed by SIMPLE for gas only.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

X-, y- and z-direction thermally-induced-stress contours within the ‘blade’.

17/35. Thermally and mechanically- induced stresses

Note their strongly three-dimensional variation.

Red is compressive, blue – tensile.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

18/35. Summary of experiences with FVM applied to solid-stress problems

Many comparisons with both analytical and finite-elementsolutions have been made.

They confirm that FVM for stress-in-solids problems is practicable, accurate and economical; it is at least as good as FEM.

Other questions remaining to be answered concern:relative advantages of staggered and collocated structured grids;

SIMPLE works well for both fluid flow and solid stress; but surely better SSFT-specific algorithms can be found.

This is a fertile field for research, still almost explored.

and of (various kinds of) unstructured grids.

Extensions are also required to time-dependent phenomena:

• to large (enough to influence the flow) displacements; and

• to non-linear and plastic deformations.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

19/35. Present trends:grids for arbitrary body shape

First used were body-fitted-coordinate grids which were topologically Cartesian, i.e. still ‘structured’; but sometimes hard to create.

These too present creation difficulties; and the current trend is back to Cartesian, albeit sub-divided as in just-shown solid-stress example.

Therefore unstructured grids with tetrahedral cells (copied from FEM) were popular for many years. Polyhedral cells followed.

Then surface curvature may be allowed for by use of the ‘Immersed-Boundary Method’ (IBM).

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

20/35. Present trends: early IBM examples

The PHOENICS IBM viz. PARSOL, simulates, on the right, flow through a louvred wall. It looks realistic. But quantitative accuracy is improbable.

The same is true of the football stadium on the left.Plausibility is easy to get.Reliable accuracy - muchharder.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

21/35. Present trends:SPARSOL (Structured PARSOL)

However realism can indeed be procured, with sufficient care (see below).

Some versions of the IBM perform poorly for solids which are thin compared with grid cells; careful calculation of the intersection locations is necessary.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

22/35. Present grid trends:Various storage locations

1. Staggered: pressures and scalars at cell centres;velocities on cell boundaries. This is the natural choice.

2. Collocated: all variables at cell centres. Sometimes (unwisely?) preferred.

In grid on right, scalars , e.g. temperatures are stored at triangle centroids.

So they are 4 times (8 in 3D) as numerous as pressures and velocities.

3.Other: Xcell (various). Seldom used, but having merit.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

23/35. Present grid trends:How Xcell reduces false diffusion

Blue fluid flows in from left, red from below. Grid is Cartesian staggered.

Interface is blurred, with diagonally- directed flow, as seen on right.

Less well known is that upwind differencing with Xcell grid causes no blurring at all for flow angles at 0, 90 or 45 degrees, as shown on right.

False diffusion does exist at other angles, but less than without Xcell.

This is well known false diffusion due to upwind differencing.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

24/35. Present grid trends:More-advanced Xcell

Not all cells need to be ‘triangularised’; only those where scalar gradients are large.

Cartesian sub-divided grids can also be ‘triangularised’: see right.

Because pressures and velocities are not stored at the same points, it is free from the ‘checker-boarding’ ailment of conventionally collocated grids.

What might be termed a ‘smart-grid’ technology is emerging which is ‘solution adaptive’.

In another version of Xcell, velocities are also stored at triangle centroids. This is ‘semi-collocated’ Xcell.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

25/35. Present: turbulence-model trends in terms of

how many population members

Variables of popular turbulence models, e.g. k-e, LES, are local averages; implied population has 1 member.

Only 2-(or more)-member-population models can represent chemical reaction, swirling-flows, and un-mixing.

Will any one accept the challenge?

The next three slides concern an un-mixing experiment, first performed in 1978, which no 1-member (i.e. conventional) model has ever been able to simulate.

Eddy-break-up model for combustion (1971) is most-used 2-member example. Population theory is not new.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

26/35. Turbulence trends:The Stafford experiment

Fill the lower half of a glass-sided vessel with coloured salty water, and the top half with clear fresh water.Connect electrodes to a battery.

The salty water heats more rapidly than the fresh. The consequent Rayleigh-Taylor instability causes mixing. Soon the vessel appears to be filled with coloured fluid.

Quickly switch off the current; then the two fluids start to un-mix!

In the end, the original sharp interface is restored.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

27/35. Turbulence trends:Mixing followed by unmixing

(Sapozhnikov and Mitiakov, 2010)

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

28/35. Turbulence trends: A 2-member population model

can do it

At the start (on the left), the volume fraction is unity in the bottom half and zero in the top half.

Later (in the middle) fragments of salty fluid rise, and even begin to concentrate at the upper surface.

Each member has its own vertical- direction velocity. One is +ve the other –ve. Values are calculated from Navier Stokes.

Later still (on the right), the heating has stopped; so the salty fragments, lose heat to the fresh water and fall down to the bottom again. Just as the video showed.

Two-member models can simulate both mixing and un-mixing.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

29/35. The future – perhaps.Models of turbulence will use

multi-member populations

One-member models in effect represent temperature by one unity ordinate at calculated abscissa. They know nothing about PDFs.Multi-member models: 1. focus on several calculated ordinates at arbitrary abscissae. 2. simulate inter-member-physics; 3. calculate PDFs; 4. solve more equations; 5. generate much more information.

Computation is cheap: ignorance is expensive.

So surely multi-member models must become the norm.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

30/35. The future – perhapsUse one (FVM) code for both solid-stress and fluid/heat-flow problems?

Common sense says ‘Yes!’; for the world-wide cost of FEM-for-solid-but-FVM-for-fluid is enormous;

and all because FEM carried needless pre-computer baggage (the NUWFs) into the computer age:

and others have been gulled into using it.

And why? The picture answers.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

31/35. The future – perhapsWill general-purpose CFD codes

survive?

My answer? Yes, but underground.

Apps, aka SimScenes, apply CFD to special classes of equipment, i.e. Simulation Scenarios, via app-specific menus and buttons.

App users may know no more about CFD than apple eaters about arboriculture.

Apps will dominate.

Apps and apples can be equally healthy if the tree-roots are well nourished by the underlying CFD code.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

32/35. The future – perhaps:Revival ot the partially-

parabolic method?

The revived method would solve the simple potential-flow elliptic equation outside boundary layer, wake and jet.

Inside each of these it would solve 3D parabolic Navier-Stokes equations on as fine a grid as needed (easy because only 2D storage is required).

Why should this not work? Is it perhaps already used?

Elliptic and parabolic solutions would alternate, exchanging domain-boundary information each time.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

33/35. The future – perhaps:Partially parabolic for

automobiles?

Early (1988) PHOENICS needlessly solved elliptic Navier-Stokes far from the vehicle surface where the flow is inviscid.

Near much of surface the flow is 3D parabolic.

And behind wheels and wing mirrors.

But elliptic Navier-Stokes must be used for the wake.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

34/35. The future – perhaps:Implementation of partially- parabolic for automobiles

What is needed, in order to implement such a hybrid solution procedure, is:

• a CFD code with 2D and 3D, elliptic and parabolic capabilities (Note that PHOENICS is an acronym forParabolic Hyperbolic Or Elliptic Numerical Integration Code Series; so it will do);

• a flexible module for grid-to-grid transfer and interpolation of solved-for variables(PHOENICS has an embryonic one); and

• a user-friendly module for problem set-up and run-cycle control (coming soon).

Nothing of significant difficulty is involved.

Ap

plic

atio

ns

of

CF

D

Lubbock, Texas

Oct 18 2013

35/35. The future – perhaps:Terrestrial applications of

partially-parabolic

Grid fineness can be varied according to accuracy needs of each region.

Urban-air-flow and wind-farm simulations have a predominant flow direction.

Analysis can be parabolic over most of volume, withembedded elliptic sub-domains of recirculation.

This and many other possible extensions of the partially-parabolic method promises a highly profitable future. The EndLet’s help bring that about.