Attribution Non-Commercial (BY-NC)

51 views

Attribution Non-Commercial (BY-NC)

- Phy CET-2012 Answer Key
- cfd5
- cfd4
- introcfd
- vol1no3-1_MacielE
- CFX12_01_Intro_CFD
- cfd2
- cfd3
- WPH02_01_que_20150604
- gce maths M1 J_ms.pdf
- cfd7
- ECOTECT Tutorial
- 1-s2.0-S0021863400906401-main
- Physics History
- Computational Analysis of an Axial Fan Wirh Large Eddy Simulation
- Mechanics
- Disse-AdditionLesson
- CFD Studies of Combustion in Diesel Engine
- A Jet Engine Noise Measurement Thru CFD and Acoustic Radiology
- 1-Polyflow_12.1-lecture02-intro-to-cfd

You are on page 1of 11

6.2 One-step methods

6.3 Multi-step methods

6.4 Uses of time-marching in CFD

Summary

Examples

d

(amount ) + net flux = source (1)

dt

where:

amount total quantity in a cell = mass × concentration = Vφ;

flux is the rate of transport through the boundary .

In Section 4 it was shown how the flux and source terms could be discretised as

net flux − source = a P φ P − ∑ a F φ F − bP (2)

F

In this Section the time derivative will also be discretised.

dφ

=F, φ(0) = φ 0 (3)

dt

where F is an arbitrary function of t and φ. Then we extend the methods to CFD.

new

∆φ

• φ old

one-step methods: use the value from the previous time

level only; ∆t

t

t old t new

φ

φ

(n+1)

φ (n)

φ (n-2) φ (n-1)

t

t(n-2) t(n-1) t(n) t(n+1)

φ new

φ

6.2 One-Step Methods

∆φ

dφ

=F (3) φold

dt

the one-step problem is: ∆t

given φ at time t(n) … compute φ at time t(n+1)

t

t old t new

The following notation is used:

• identify everything at t(n) by a superscript “old” – this is what we currently know;

• identify everything at t(n+1) by a superscript “new” – this is what we seek.

φ = F av t (4)

or

φ new = φ old + F av t (5)

These are exact. However, since the average derivative, F , isn’t known until the solution φ

av

This is the commonest class of time-stepping scheme in general-purpose CFD. There are

three obvious methods of making a single estimate of the average derivative.

(Euler Method) (Backward Euler) (Crank-Nicolson)

Take Fav as the derivative at the Take Fav as the derivative at Take Fav as the average of

start of the time-step: the end of the time-step: derivatives at the beginning and end.

φ new = φ old + F old t φ new = φ old + F new t φ new = φ old + 12 ( F old + F new ) t

φ φ φnew φ

φnew

φ new

1 1

2∆ t 2∆ t

t t t

t old t new t old t new t old t new

For: For: For:

• Easy to implement because • In CFD, no time-step • Second-order accurate in t.

explicit (the RHS is known). restrictions;

Against: Against: Against:

• Only first-order in t; • only first-order in t; • Implicit;

• In CFD, stability imposes • implicit (although, in CFD, • In CFD, stability imposes time-

time-step restrictions. no more so than steady case). step restrictions.

Classroom Example 1

dφ

=t −φ, φ( 0 ) = 1

dt

Solve this numerically, with a step size t = 0.2 using:

(a) forward differencing;

(b) backward differencing;

(c) Crank-Nicolson.

Solve the equation analytically and compare with the numerical approximations.

Classroom Example 2

dφ

= t 3 − φ3 , φ(0) = 1

dt

in the interval 0 ≤ t ≤ 1 using a timestep t = 0.25 by:

(a) the forward differencing (fully-explicit) method;

(b) the backward-differencing (fully-implicit) method;

(c) the Crank-Nicolson (semi-implicit) method.

Note that, since the equation is non-linear, the implicit methods (parts (b) and (c)) will

require iteration at every timestep.

6.2.2 Other Methods

dφ

For equations of the form = F , improved solutions may be obtained by making

dt

successive estimates of the average gradient. Important examples include:

φ1 = t F (φ old , t old )

φ 2 = t F (φ old + φ1 , t old + t )

φ = 12 ( φ1 + φ 2 )

φ1 = t F (φ old , t old )

φ 2 = t F (φ old + 1

2 φ1 , t old + 1

2 t)

φ 3 = t F (φ old + 12 φ 2 , t old + 12 t )

φ 4 = t F (φ old + φ 3 , t old + t )

φ = 16 ( φ1 + 2 φ 2 + 2 φ 3 + φ 4 )

More details of these – and other advanced methods – can be found in the course notes for the

“Computational Mechanics” unit.

For scalar φ, such methods are popular. Runge-Kutta is probably the most widely-used

method in engineering. However, in CFD, φ and F represent vectors of nodal values, and

calculating the derivative F (evaluating flux and source terms) is very expensive. The

majority of CFD calculations are performed with the simpler methods of 6.2.1.

Exercise. Using Microsoft Excel (or other computational tool of your choice) solve the

Classroom Examples from the previous subsection using Modified-Euler or Runge-Kutta

methods.

d

( Vφ P ) + net flux − source = 0 (6)

dt

For one-step methods the time derivative is always discretised as

d ( Vφ P ) new − ( Vφ P ) old

( Vφ P ) → (7)

dt t

Flux and source terms could be discretised at any particular time level as

net flux − source = a P φ P − ∑ a F φ F − bP (8)

Different time-marching schemes arise from the time level at which (8) is evaluated.

Forward Differencing

( Vφ P ) new − ( Vφ P ) old

t

[

+ a P φ P − ∑ a F φ F − bP ]

old

=0

Rearranging, and dropping any “new” superscripts as tacitly understood:

old

V V

φ P = ( − a P )φ P + b P + ∑ a F φ F (9)

t t

Assessment.

• Explicit; no simultaneous equations to be solved.

V

• Timestep restrictions; for stability a positive coefficient of φ old

p requires − aP ≥ 0 .

t

Backward Differencing

( Vφ P ) new − ( Vφ P ) old

t

[

+ a P φ P − ∑ a F φ F − bP ]

new

=0

Rearranging, and dropping any “new” superscripts:

V Vφ P old

( + a P )φ P − ∑ a F φ F = b P + ( ) (10)

t t

Assessment.

• Straightforward to implement; amounts to a simple change of coefficients:

V V

aP → aP + bP → bP + ( ) old (11)

t t

• No timestep restrictions.

Crank-Nicolson

( Vφ P ) new − ( Vφ P ) old 1

t

[

+ 2 a P φ P − ∑ a F φ F − bP ]

old

[

+ 12 a P φ P − ∑ a F φ F − bP ]

new

=0

Rearranging, and dropping any “new” superscripts:

old

V 1 V 1

( + 2 a P )φ P − 12 ∑ a F φ F = 12 bP + ( − 2 a P )φ P + 12 (bP + ∑ a F φ F )

t t

or, multiplying by 2 for convenience:

old

V V

(2 + a P )φ P − ∑ a F φ F = b P + ( 2 − a P )φ P + (bP + ∑ a F φ F ) (12)

t t

Assessment.

• Fairly straightforward to implement; amounts to a change of coefficients:

old

V V

aP → aP + 2 , b P → b P + ( 2 − a P )φ P + (bP + ∑ a F φ F ) (13)

t t

V

• Timestep restrictions; for stability, a positive coefficient of φ old

p requires 2 − aP ≥ 0 .

t

In general, weightings 1 – and can be applied to derivatives at each end of the time step:

d

( Vφ P ) ≈ F new + (1 − ) F old (14)

dt

This includes the special cases of Forward Differencing ( = 0), Backward Differencing

( = 1) and Crank-Nicolson ( = ½).

coefficients. For 1 (i.e. anything other than fully-implicit Backward-Differencing),

stability imposes a timestep restriction

1 V

t< ( ) old (15)

1 − aP

∂ ∂ ∂φ

( φ) + ( uφ − )=S

∂t ∂x ∂x

with the first-order upwind advection scheme on a uniform grid of spacing x, it is readily

shown that at any time-level the coefficients in the flux-source discretisation are

aW = D + C , a E = D, a P = aW + a E = 2 D + C

where the mass flow rate C and diffusive transfer coefficient D are given by

A

C = uA, D=

x

In the 1-d case the cross-sectional area A = 1 and the time-step restriction (15) becomes

2 t u t 1

+ <

( x) 2

x 1−

( / ) t 1

• explicit (forward differencing; = 0) and pure diffusion (u = 0): <

( x) 2 2

u t

• explicit (forward differencing; = 0) and pure advection ( = 0): <1

x

• implicit (backward differencing; = 1): no restrictions.

Courant Number

u t

c= (16)

x

It can be interpreted as the ratio of distance of travel in one time step (u t) to the mesh

spacing x.

For the fully-explicit method the Courant-number restriction c < 1 means that the distance

which information can be advected in one time step should not exceed the mesh spacing.

φ

φ

(n+1)

One-step methods use only information from time level t(n) to

calculate (dφ/dt)av.

φ (n)

Multi-step methods use the values of φ at earlier time levels as φ (n-2) φ (n-1)

well: t(n-1), t(n-2), ... .

t

t(n-2) t(n-1) t(n) t(n+1)

One example is Gear’s method:

3φ ( n ) − 4φ ( n −1) + φ ( n − 2 )

(n)

dφ

= (17)

dt 2 t

This is second-order in t; (exercise: prove it).

their initial prediction with one (or more) corrections. A popular example of this type is the

Adams-Bashforth-Moulton method:

+1

predictor: φ npred = φ n + 241 t [−9 F n −3 + 37 F n −2 − 59 F n−1 + 55F n ]

corrector: φ n +1 = φn + 1

24 t [ F n −2 − 5 F n −1 + 19 F n + 9 F pred

n +1

]

Just as three-point advection schemes permit greater spatial accuracy than two-point schemes,

so the use of multiple time levels allows greater temporal accuracy. However, there are a

number of disadvantages which limit their application in CFD:

• Storage; each computational variable has to be stored at all nodes at each time level.

• Start-up; initially, only data at time t = 0 is available; the first step inevitably requires

a single-step method.

(1) for a genuinely time-dependent problem;

(2) for time marching to steady state.

In case (1) accuracy and stability often impose restrictions on the time step and hence how

fast one can advance the solution in time. Because all nodal values must be updated at the

same rate the time step t is global; i.e. the same at all grid nodes.

In case (2) one is not seeking high accuracy so one simply adopts a stable algorithm, usually

Backward Differencing. Alternatively, if using an explicit scheme such as Forward

Differencing, the time step can be local, i.e. vary from cell to cell, in order to satisfy Courant-

number restrictions in each cell individually.

In practice, for incompressible flow, steady flow should be computable without time-

marching. This is not the case in compressible flow, where time-marching is necessary in

transonic calculations (flows with both subsonic and supersonic regions).

Summary

• The time-dependent fluid-flow equations are first-order in time and are solved by

time-marching.

• Time-marching schemes may be explicit (time derivative known at the start of the

time step) or implicit (require iteration at each time step).

Differencing (fully-implicit) and Crank-Nicolson (semi-implicit).

• One-step methods are easily implemented via changes to the matrix coefficients. For

the Backward-Differencing scheme the only concessions required are:

V ( Vφ P ) old

aP → aP + , b P → bP +

t t

(fully-implicit timestepping). Other schemes have time-step restrictions: typically

limitations on the Courant number

u t

c=

x

Differencing and Forward-Differencing schemes are both first order in t, which

means they need more time steps to achieve the same time accuracy.

• Multi-step methods may be used to achieve accuracy and/or stability. However, these

are less favoured in CFD because of large storage overheads.

• Time-accurate solutions require a global time step. A local time step may be used for

time-marching to steady state. In the latter case, high time accuracy is not required

and backward differencing is favoured as the most stable approach.

Examples

Q1.

Use: (a) forward-differencing; (b) backward-differencing to solve the equation

dφ

= t 2 − 2φ , φ(0) = 0

dt

numerically over the interval 0 ≤ t ≤ 1, using a timestep ∆t = 0.25.

Q2.

Gear’s scheme for the approximation of a time derivative is

3φ ( n ) − 4φ ( n −1) + φ ( n − 2 )

(n)

dφ

=

dt 2 t

where superscripts (n – 2), (n – 1), (n) denote successive time levels. Show that this scheme is

second-order accurate in time.

Q3.

The semi-discretised version of the scalar transport equation

d

(amount ) + net outward flux = source

dt

over a control volume, centred at node P and containing fluid mass V, can be written

d

( Vφ P ) + a P φ P − ∑ a F φ F = bP

dt

(a) Show that time integration using backward differencing, with a timestep t, can be

implemented by simple changes to the coefficients aP, {aF} and bP.

(b) Show that time integration using forward differencing is explicit, but imposes a

maximum timestep for stability, tmax.

(c) Show that time integration using the Crank-Nicolson method, with a timestep t, can

be implemented by changes to the coefficients aP, {aF} and bP and derive an

expression for the maximum stable timestep, tmax.

(a) Solve the first-order differential equation

1 dφ

= 1 − φt , φ(0) = 1

φ 2 dt

with a timestep t = 0.25 on the interval 0 t 1, using:

(i) forward differencing;

(ii) backward differencing.

(b) State (without mathematical detail) the advantages and disadvantages of using:

(i) forward-differencing

(ii) backward-differencing

methods in computational fluid dynamics.

Selected Answers

Classroom Example 1

t φ

(a) Forward (b) Backward (c) Crank-Nicolson Exact

differencing differencing ( φ = t − 1 + 2e −t )

0 1 1 1 1

0.2 0.8 0.866667 0.836364 0.837462

0.4 0.68 0.788889 0.738843 0.740640

0.6 0.624 0.757407 0.695417 0.697623

0.8 0.6192 0.764506 0.696250 0.698658

1.0 0.65536 0.803755 0.733296 0.735759

Classroom Example 2

(a) Forward-differencing

t(old) φ(old) t(new) φ(new)

0.00 1.0000 0.25 0.7500

0.25 0.7500 0.50 0.6484

0.50 0.6484 0.75 0.6115

0.75 0.6115 1.00 0.6598

(b) Backward-differencing:

t(old) φ(old) t(new) φ(new)

0.00 1.0000 0.25 0.8502

0.25 0.8502 0.50 0.7681

0.50 0.7681 0.75 0.7627

0.75 0.7627 1.00 0.8559

(c) Crank-Nicolson:

t(old) φ(old) t(new) φ(new)

0.00 1.0000 0.25 0.8104

0.25 0.8104 0.50 0.7156

0.50 0.7156 0.75 0.6960

0.75 0.6960 1.00 0.7737

Q1.

(a) Forward differencing:

told φold tnew φnew

0.00 0 0.25 0

0.25 0 0.50 0.01563

0.50 0.01563 0.75 0.07031

0.75 0.07031 1.00 0.1758

told φold tnew φnew

0.00 0 0.25 0.01042

0.25 0.01042 0.50 0.04861

0.50 0.04861 0.75 0.1262

0.75 0.1262 1.00 0.2508

Q4(a)

(i) Forward differencing

t old φ old t new φ new

0 1 0.25 1.2500

0.25 1.2500 0.50 1.5186

0.50 1.5186 0.75 1.6574

0.75 1.6574 1.00 1.4905

1.00 1.4905

t old φ old t new φ new

0 1 0.25 1.2778

0.25 1.2778 0.50 1.4238

0.50 1.4238 0.75 1.3995

0.75 1.3995 1.00 1.2830

1.00 1.2830

- Phy CET-2012 Answer KeyUploaded bypacesoft321
- cfd5Uploaded bycamaradiya
- cfd4Uploaded bycamaradiya
- introcfdUploaded bycamaradiya
- vol1no3-1_MacielEUploaded bySandra Powers
- CFX12_01_Intro_CFDUploaded byRafael Peres
- cfd2Uploaded bycamaradiya
- cfd3Uploaded bycamaradiya
- WPH02_01_que_20150604Uploaded byArnie
- gce maths M1 J_ms.pdfUploaded byayeshar123
- cfd7Uploaded bycamaradiya
- ECOTECT TutorialUploaded byJorge Machiguenga
- 1-s2.0-S0021863400906401-mainUploaded byAnonymous wWOWz9UnW
- Physics HistoryUploaded bybigboss
- Computational Analysis of an Axial Fan Wirh Large Eddy SimulationUploaded bydeniz7777
- MechanicsUploaded byjprgg24
- Disse-AdditionLessonUploaded byKira Disse
- CFD Studies of Combustion in Diesel EngineUploaded bydeepali0305
- A Jet Engine Noise Measurement Thru CFD and Acoustic RadiologyUploaded bysidhu12satpreet1
- 1-Polyflow_12.1-lecture02-intro-to-cfdUploaded bywoongs73
- pawel safuryn cvUploaded byapi-296200553
- Towing Tank ExperimentUploaded byEzra Jonathan
- 28TOMECHJUploaded byFernandoMartínIranzo
- 29994-110892-4-PBUploaded byLaura Lungu
- Ppr2015.0136md_coeff_rolling_friccion_DEM.pdfUploaded byDibujantes Proyectistas
- math lesson planUploaded byapi-351448195
- 05.AbstractUploaded byaravind991
- Experimental and Numerical Simulation as a Calibration Measure of a Venturi Tube.Uploaded byPablo Gonzalez
- Coal Combustion Injection Properties -- CFD Online Discussion ForumsUploaded byRajneesh Vachaspati
- Altair_HW_Gatefold_Brochure_HW14Uploaded byramkumar31

- 04 Heat Transfer From Extended SurfacesUploaded bycamaradiya
- Automobile Heat TransferUploaded bycamaradiya
- Mechanical Engg. Sem -VI Teaching SchemeUploaded byShivam Purohit
- Control EngineeringUploaded byhotnili
- 2 Pipe FricitionUploaded bycamaradiya
- IDP UDP Reporting SheetUploaded bycamaradiya
- OHPUploaded bycamaradiya
- R 12Uploaded bycamaradiya
- bio mass 1Uploaded bycamaradiya
- 2-_FriedeUploaded bycamaradiya
- PM Lecture 7Uploaded bycamaradiya
- PLC'SUploaded bycamaradiya
- 1Uploaded bynaruto20254663
- Thesis 1Uploaded bycamaradiya
- cfd7Uploaded bycamaradiya
- cfd3Uploaded bycamaradiya
- cfd2Uploaded bycamaradiya

- Santos-junior Problem SeminarUploaded byAaron Kow
- Davis EllipseUploaded byHelmi Mukti Wijaya
- 5-5_Solving_Polynomial_Equations[1].pdfUploaded byEnas Basheer
- Holzapfel-Uludag-Yoshida - Arithmetic and Geometry Around Hypergeometric FunctionsUploaded bychungsam19
- JEE Advanced 2019 Mathematics Sample Question Paper-IUploaded bymisostudy
- NCERT Class 12 Mathematics Part 1Uploaded byAdarsh Kumar
- examiner report a levelUploaded bysakhararshed
- Matpower Manual 1Uploaded bypj
- Peng G ExpectationUploaded byDjenga89
- 6040_lecture13Uploaded byAmit Ray
- AI - Feedforward NNUploaded byGirish Kumar Nistala
- GEOMETRIC THEOREMS, DIOPHANTINE EQUATIONS, AND ARITHMETIC FUNCTIONS (second ed.), by Jozsef SandorUploaded bymarinescu
- Algeb ResearchUploaded byAudrey Noelle Waje
- OutputUploaded byjranjanpattnaik
- Influence Maximization in Complex Networks Through Optimal PercolationUploaded byAndrés Tobelem
- Optimal Binary Search TreeUploaded byCá Chép Nhỏ
- 144300163-CLEP-College-Algebra.pdfUploaded byOwen Walker
- TotalUploaded byShubham Girdhar
- Differential Equations.pdfUploaded byRonaldo Vieira Lobato
- practicle loss resilient codes.pdfUploaded bypathmakerpk
- For FS TOSUploaded byluke
- Lectures Part1 probability theoryUploaded byseethamrajumukund
- UNIT2Uploaded bySanjay
- 12 Mathematics Impq CH01 Relations and Functions 01Uploaded byMritunjay Kumar
- Brahmagupta Ppt.Uploaded byYonyUtami
- Module 1 2016Uploaded bybjkhaw75
- 082187571X_GeometriesUploaded bypilili01
- On the Coding of a Turing Machines and Non - Recursive LanguagesUploaded byEditor IJRITCC
- Unit2b.pptUploaded byaarthy
- Chap_8Uploaded byapi-27259648