Chapter 5. The Finite Volume Method for Convection-Diffusion Problems. The steady convection-diffusion equation is

Similar documents
Solution Methods. Steady convection-diffusion equation. Lecture 05

Discretization of Convection Diffusion type equation

5. FVM discretization and Solution Procedure

One Dimensional Convection: Interpolation Models for CFD

Finite volume method for CFD

Solution Methods. Steady State Diffusion Equation. Lecture 04

Comparison of some approximation schemes for convective terms for solving gas flow past a square in a micorchannel

On A Comparison of Numerical Solution Methods for General Transport Equation on Cylindrical Coordinates

3.4. Monotonicity of Advection Schemes

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

Numerical Methods for Problems with Moving Fronts Orthogonal Collocation on Finite Elements

Introduction to numerical simulation of fluid flows

VALIDATION OF ACCURACY AND STABILITY OF NUMERICAL SIMULATION FOR 2-D HEAT TRANSFER SYSTEM BY AN ENTROPY PRODUCTION APPROACH

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

In Proc. of the V European Conf. on Computational Fluid Dynamics (ECFD), Preprint

AN UNCERTAINTY ESTIMATION EXAMPLE FOR BACKWARD FACING STEP CFD SIMULATION. Abstract

Answers to Exercises Computational Fluid Dynamics

Effects of the Jacobian Evaluation on Direct Solutions of the Euler Equations

Computation of Incompressible Flows: SIMPLE and related Algorithms

FINITE-VOLUME SOLUTION OF DIFFUSION EQUATION AND APPLICATION TO MODEL PROBLEMS

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

Solving the Euler Equations!

CHAPTER 7 NUMERICAL MODELLING OF A SPIRAL HEAT EXCHANGER USING CFD TECHNIQUE

COMPUTATIONAL FLUID DYNAMICS

Numerical Heat and Mass Transfer

A Multi-Dimensional Limiter for Hybrid Grid

Enhancement of the momentum interpolation method on non-staggered grids

Project 4: Navier-Stokes Solution to Driven Cavity and Channel Flow Conditions

Basic Aspects of Discretization

A finite-volume algorithm for all speed flows

The Finite Difference Method

Introduction to CFD modelling of source terms and local-scale atmospheric dispersion (Part 1 of 2)

RANS Equations in Curvilinear Coordinates

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science. CASA-Report March2008

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations

One Dimensional Convection: Interpolation Models for CFD

Basic Fluid Mechanics

COMPUTATIONAL FLUID DYNAMICS

COMPUTATIONAL FLUID DYNAMICS

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

This section develops numerically and analytically the geometric optimisation of

Sung-Ik Sohn and Jun Yong Shin

Fluid Flow Modelling with Modelica

Limitations of Richardson Extrapolation and Some Possible Remedies

Due Tuesday, November 23 nd, 12:00 midnight

Draft Notes ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer

MATHEMATICAL RELATIONSHIP BETWEEN GRID AND LOW PECLET NUMBERS FOR THE SOLUTION OF CONVECTION-DIFFUSION EQUATION

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i

Numerical Oscillations and how to avoid them

ENGR Heat Transfer II

Numerical Solution Techniques in Mechanical and Aerospace Engineering

On the spectral and conservation properties of nonlinear discretization operators.

Non-linear least squares

Basics on Numerical Methods for Hyperbolic Equations

3.3. Phase and Amplitude Errors of 1-D Advection Equation

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

Comparative Study of Flux-limiters Based on MUST Differencing Scheme

arxiv: v1 [physics.comp-ph] 10 Aug 2015

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 13

Stabilization Techniques for Finite Element Analysis of Convection-Diffusion Problems

MATLAB Solution of Flow and Heat Transfer through a Porous Cooling Channel and the Conjugate Heat Transfer in the Surrounding Wall

Finite Difference Solution of the Heat Equation

Chapter 5. Formulation of FEM for Unsteady Problems

Advection in two dimensions

Non-linear Methods for Scalar Equations

Computational Fluid Dynamics Prof. Dr. SumanChakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

Lattice Boltzmann Method for Moving Boundaries

Module 3: BASICS OF CFD. Part A: Finite Difference Methods

THREE-DIMENSIONAL FINITE DIFFERENCE MODEL FOR TRANSPORT OF CONSERVATIVE POLLUTANTS

RECENT DEVELOPMENTS IN COMPUTATIONAL REACTOR ANALYSIS

ME Computational Fluid Mechanics Lecture 5

FINITE VOLUME METHOD: BASIC PRINCIPLES AND EXAMPLES

Open boundary conditions in numerical simulations of unsteady incompressible flow

Lecture 4.2 Finite Difference Approximation

MOTIONAL MAGNETIC FINITE ELEMENT METHOD APPLIED TO HIGH SPEED ROTATING DEVICES

Atwood number effects in buoyancy driven flows

Module 2: Introduction to Finite Volume Method Lecture 14: The Lecture deals with: The Basic Technique. Objectives_template

Study of Forced and Free convection in Lid driven cavity problem

Extremum-Preserving Limiters for MUSCL and PPM

Introduction to Physical Acoustics

Comparison of (Some) Algorithms for Edge Gyrokinetics

Calculating equation coefficients

5. Advection and Diffusion of an Instantaneous, Point Source

Fall Exam II. Wed. Nov. 9, 2005

A Critical Investigation of High-Order Flux Limiters In Multiphase Flow Problems

Block-Structured Adaptive Mesh Refinement

A recovery-assisted DG code for the compressible Navier-Stokes equations

Vector and scalar variables laminar natural convection in 2D geometry arbitrary angle of inclination

1.061 / 1.61 Transport Processes in the Environment

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

Godunov methods in GANDALF

CapSel Roe Roe solver.

CFD Analysis of Mixing in Polymerization Reactor. By Haresh Patel Supervisors: Dr. R. Dhib & Dr. F. Ein-Mozaffari IPR 2007

q t = F q x. (1) is a flux of q due to diffusion. Although very complex parameterizations for F q

Finite Volume Schemes: an introduction

The RAMSES code and related techniques I. Hydro solvers

CORBIS: Code Raréfié Bidimensionnel Implicite Stationnaire

Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer C2 b 2

Problem Set 4 Issued: Wednesday, March 18, 2015 Due: Wednesday, April 8, 2015

ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer. q 0 = εσ ( T 4 T 4) Figure 1: Computational Domain for Problem 1.

Transcription:

Chapter 5 The Finite Volume Method for Convection-Diffusion Problems Prepared by: Prof. Dr. I. Sezai Eastern Mediterranean University Mechanical Engineering Department Introduction The steady convection-diffusion equation is div( ρφu) = div( Γ gradφ) + S φ Integration over the control volume gives : n ( ρφ u ) da = n ( Γ grad φ ) da + S dv A A CV This equation represents the flux balance in a control volume. The main problem in the discretisation of the convective terms is the calculation of φ at CV faces and its convective flux across these boundaries. Diffusion process affects the distribution of φ in all directions. Convection spreads influence only in the flow direction. This sets a limit on the grid size for stable convection-diffusion calculations with central difference method. φ ME555 : Computational Fluid Dynamics 1

Steady one-dimensional convection and diffusion In the absence of sources, the steady convection and diffusion of a property φ in a given one-dimensional flow field u is governed by d d dφ ( ρφ u ) = ( Γ ) (5.3) dx dx dx The flow must also satisfy continuity, so d ( u) 0 dx ρ = Integrating Eqn. (5.3) over the CV φ φ ( ρuaφ) e ( ρuaφ) w = ΓA ΓA x x Integrating continuity Eqn. ( ρua) ( ρua) = 0 e ME555 : Computational Fluid Dynamics 3 w e w (5.5) (5.6) Let F = ρua convective mass flux at cell faces D = ΓA/δx diffusion conductance At cell faces: Fw = ( ρua) w Fe = ( ρua) e Γw Aw Γe Ae Dw = De = δx δx WP Using central difference approach for the diffusion terms, Eqn (5.5) becomes PE Continuity i equation becomes Fφ F φ = D ( φ φ ) D ( φ φ ) e e w w e E P w P W F F = 0 e We assume that velocity field is known F e, F w known. We need to calculate φ at faces e and w. w (5.9) (5.10) ME555 : Computational Fluid Dynamics 4

The Central Differencing Scheme Works well for diffusion terms. Let us use this method to compute the convective terms by linear interpolation. For a uniform grid, cell face values are: φe = ( φp + φe)/ φ = ( φ + φ )/ w W P Substituting into eqn (5.9) Fe Fw ( φp + φe) ( φw + φp) = De( φe φp) Dw( φp φw) ME555 : Computational Fluid Dynamics 5 Rearranging, Fw Fe Fw Fe Dw De φp Dw φw De φe + + = + + Fw Fe Fw Fe Dw + + De + ( Fe Fw) φp = Dw + φw + De φe which is of the form where a φ = a φ + a φ P P W W E E (5.14) a a a W E P Fw Fe Dw + De aw + ae + ( Fe Fw) This equation has the same general form as the diffusion eqn. (4.11). ME555 : Computational Fluid Dynamics 6 3

Example 5.1 A property φ is transported by convection and diffusion through the one dimensional domain shown below. Using central difference scheme, find the distribution of φ for (L =1, ρ = 1, Γ = 0.1) (i) Case 1: u = 0.1 m/s (use 5 CV s) (ii) Case : u =.5 m/s (use 5 CV s) Compare the results with the analytical solution. φ φo exp( ρux / Γ) 1 = φ φ exp( ρ / Γ) 1 L o ul (iii) Case 3: u =.5 m/s (0 CV s) ME555 : Computational Fluid Dynamics 7 The governing equation is: d d dφ ( ρuφ) = Γ A dx dx dx B 1 3 w 4 e 5 6 7 φ = 1 W P E φ = 0 δx/ δx WP = δx δx PE =δx δx/ δx apφp = awφw + aeφe + Su For interior nodes: δ WP = δ PE = δ where ap = aw + ae + ( Fe Fw) SP For node : δxwp = δx/ Fw = ( ρua) w Fe = ( ρua) e For node 6: δxpe = δx/ Γ wa w Γ ea e Dw = De = δx δx WP Node a a S S PE W E P u 0 De Fe / ( Dw + Fw/ ) ( Dw + Fw / ) φa 3, 4,5 Dw + Fw / De Fe / 0 0 6 D + F / 0 ( D F /) ( D F /) φ w w e e e e B x x x ME555 : Computational Fluid Dynamics 8 4

The resulting system of equations are a a φ Su P E a W a a 3 p3 E 3 φ3 Su3 aw a 4 p a 4 E 4 φ 4 Su 4 = aw a i p a i E φ i i Sui aw a n Sun p a φ E n n n a n 1 Sun 1 W a φ n 1 p n 1 Solve the system of equations using Tri-diagonal matrix algorithm (TDMA) for φ, φ 3, φ 4, φ n-1, where (n = 7) ME555 : Computational Fluid Dynamics 9 The solution for case 1 is: φ1 1 φ 0.941 φ 3 0.8006 φ4 = 0.676 φ 5 0.4163 φ6 0.1573 0 φ7 Exact solution is:.7183 exp( x) φ( x) = 1.7183 ME555 : Computational Fluid Dynamics 10 Comparison of the numerical result with the analytical solution. 5

The solution for case : (u =.5 m/s, 5 CV s) Comparison of the numerical result with the analytical solution. The solution appears to oscillate about the exact solution. ME555 : Computational Fluid Dynamics 11 The solution for case 3: (u =.5 m/s, 0 CV s) Comparison of the numerical result with the analytical solution. Grid refinement has reduced the F/D ratio from 5 to 1.5. Central difference scheme yields accurate results when F/D ratio is low. ME555 : Computational Fluid Dynamics 1 6

Properties of Discretisation Schemes The numerical results will only be physically realistic when the discretisation scheme has certain fundamental properties. The most important ones are: Conservativeness Boundednes Transportiveness ME555 : Computational Fluid Dynamics 13 1. Conservativeness To ensure conservation of φ for the whole solution domain the flux of φ leaving a CV across a certain face must be equal to the flux of φ entering the adjacent CV through the same face. To achieve this the flux through a common face must be represented in a consistent manner (by one and the same expression) in adjacent CV s. ME555 : Computational Fluid Dynamics 14 7

Example of consistent specification of diffusive fluxes Γw( φ φ1) Γe( φ3 φ) δ x δ x Flux entering CV Flux leaving CV An overall flux balance may be obtained by summing the net flux through each CV ( φ φ1) ( φ3 φ) ( φ φ1) Γe 1 qa e w δx + Γ Γ δx δx ( φ4 φ3) ( φ3 φ) ( φ4 φ3) + Γe3 Γ w3 qb w4 qb qa δx δx + Γ = δx Γ e1 = Γ w, Γ e = Γ w3 and Γ e3 = Γ w4 Fluxes across CV faces are expressed in consistent manner, fluxes cancel out in pairs when summed over the entire domain. ME555 : Computational Fluid Dynamics 15 Flux Consistency ensures conservation of φ over the entire domain for the central difference formulation of the diffusive flux. Inconsistent flux interpolation formulae give rise to unsuitable schemes that do not satisfy overall conservation. For nodes 1, and 3 quadratic function 1 is used. For nodes, 3 and 4 quadratic function is used. If gradient of 1 gradient of at cell face flux leaving CV will not be equal to flux entering CV 3 overall conservation is not satisfied. ME555 : Computational Fluid Dynamics 16 8

) Boundedness The sufficient condition for a convergent iterative method is a nb 1 at all nodes a P < 1 at one node at least a P = ap Sp (5.) If eqn. (5.) is satisfied, resulting matrix coefficients are diagonally dominant. For diagonal dominance, (a P S p ) should be large and S p < 0. Diagonal dominance is a desirable feature for satisfying the boundedness criterion. This states that in the absence of sources the internal nodal values of φ should be bounded by its boundary values. In a steady conduction problem without sources for which the boundary temperatures are 00 and 500 o C, all interior values of T should be between these temperatures. ME555 : Computational Fluid Dynamics 17 Another essential requirement for boundedness is that all coefficients of the discretised equations should have the same sign. If the discretisation scheme does not satisfy the boundedness criteria the solution may not converge at all. Or if it converges it will contain wiggles. (See case of Example 5.1). In case most of the a E values were negative (Table 5.3). Table 5.3 Node 3 4 5 6 a E Fe ΓeAe ρueae = De = δ x PE ME555 : Computational Fluid Dynamics 18 9

3) Transportiveness The transportiveness property of a fluid flow can be illustrated by considering a constant source of φ at a point P F ρu Pe = = D Γ / δ x cell Peclet number Distribution of φ in the vicinity of a source at different Peclet numbers. Lines represent contours of constant φ. For no convection and pure diffusion Pe = 0 For no diffusion and pure convection Pe, φ E = φ P influenced only by P. E is ME555 : Computational Fluid Dynamics 19 Assesment of the Central Differencing Scheme for Convection Diffusion Problems Conservativeness The central differencing scheme uses consistent expressions to evaluate convective and diffusive fluxes at the CV faces. The scheme is conservative. ME555 : Computational Fluid Dynamics 0 10

Boundedness (i) The internal coefficients of discretised scalar transport equation (5.14) are aw ae ap Fw Fe Dw + De aw + ae + ( Fe Fw) (F e F w ) = 0 from continuity a P = a W + a E Thus, convergence criteria (5.) is satisfied by the central difference scheme. In the example of section 5.3: For case : Pe = 5 oscillatory For case 1 and 3: Pe < ME555 : Computational Fluid Dynamics 1 (ii) a E = D e F e / Fe For ae > 0 < De Fe or = Pee < to have positive ae. D e If Pe > CD scheme violates boundedness gives physically unrealistic solutions. ME555 : Computational Fluid Dynamics 11

Transportiveness The CD scheme does not recognise the direction of the flow or the strength of convection relative to diffusion. Thus, it does not posses the transportiveness property at high Pe. Accuracy The CD scheme is stable and accurate only if Pe = F/D <. The CD scheme satisfies this criteria for low Re numbers or for small grid spacings. Thus, CD scheme is not a suitable discretisation practice for general purpose flow calculations. ME555 : Computational Fluid Dynamics 3 5.6 The upwind differencing scheme The scheme takes into account the flow direction, φ at cell face = φ at upstream node formulation is used When the flow is in the positive direction, u w >0, u e >0 (F w >0, F e >0), the upwind scheme sets φ w = φ W and φ e = φ P (5.5) ME555 : Computational Fluid Dynamics 4 1

The discretised equation (5.9) becomes Feφ P Fwφw = De( φe φp) Dw( φp φw) (5.6) Which can be rearranged as D + D + F φ = D + F φ + D φ to give ( ) ( ) w e e P w w W e E ( ) ( ) ( ) Dw + Fw + De + Fe Fw φ P = Dw + Fw φw + DeφE (5.7) When the flow is in the negative direction, u w <0, u e <0(F w <0, F e <0), the scheme takes φw = φp and φe = φe (5.8) Now the discretised euqation is Fφ F φ = D ( φ φ ) D ( φ φ ) e E w P e E P w P W (5.9) or ( ) ( ) ( ) Dw + De Fe + Fe Fw φ P = DwφW + De Fe φe (5.30) ME555 : Computational Fluid Dynamics 5 the equations (5.7) and (5.30) can be written in the usual general form a φ = a φ + a φ (5.31) P P W W E E with central coefficient ap = aw + ae + ( Fe Fw) and neighbour coeffcients F w >0, F e >0 D w + F w D e F w <0, F e <0 D w D e - F e A form of notation for neighbour coefficients of the upwind differencing method that covers both flow directions is: a w aw a e ae D w + max(f w,0) D e + max(0, F e ) ME555 : Computational Fluid Dynamics 6 13

Example 5. Solve the problem considered in example 5.1 using the upwind differencing scheme for (i) u = 0.1 m/s, (ii) u =.5 m/s ( ) with the coarse five-point grid. ME555 : Computational Fluid Dynamics 7 The governing equation is: d d dφ ( ρuφ) = Γ dx dx dx A B 1 3 w 4 e 5 6 7 φ = 1 W P E φ = 0 δx/ δx WP = δx δx PE =δx δx/ δx apφp = awφw + aeφe + Su For interior nodes: δ WP = δ PE = δ where ap = aw + ae + ( Fe Fw) SP For node : δxwp = δx/ Fw = ( ρua) w Fe = ( ρua) e For node 6: δxpe = δx/ Γ wa w Γ ea e Dw = De = δx δx WP PE Node a a S S W E P u x x x 0 De + max(0, Fe) ( Dw + max( Fw,0)) ( Dw + max( Fw,0)) φa 3, 4,5 Dw + max( Fw,0) De + max(0, Fe) 0 0 6 D + max( F,0) 0 ( D + max(0, F )) ( D + max(0, F )) φ w w e e e e B ME555 : Computational Fluid Dynamics 8 14

u = 0.l m/s: ME555 : Computational Fluid Dynamics 9 u =.5 m/s Upwind scheme produced a much more realistic solution compared with central difference scheme. However, the solution is not very close to the exact value. ME555 : Computational Fluid Dynamics 30 15

5.6.1 Assessment of the upwind differencing scheme Conservativeness the upwind differencing scheme utilises consistent expressions to calculate fluxes through cell faces: therefore it can be easily shown that the formulation is conservative Boundedness the coefficients of the discretised equation are always positive and satisfy the requirements for boundedness F e F w = 0 a P = a W + a E Stable iterative solution All coefficients are positive No wiggles in Coefficient matrix is diagonally dominant solution Transportiveness The scheme accounts for the direction of the flow so transportiveness is build into the formulation. ME555 : Computational Fluid Dynamics 31 Accuracy the scheme is based on the backward differencing formula so the accuracy is only first order on the basis of the Taylor series truncation error (see Appendix A): A major drawback of the scheme: it produces erronous results when the flow is not aligned with the grid lines. φ is smeared error has a diffusion-like appearance false diffusion ME555 : Computational Fluid Dynamics 3 16

Consider pure convection without diffusion and no source term. the true solution is: all nodes above diagonal should be 100 all nodes below diagonal should be 0 Upwind method is not suitable for accurate flow calcualtions ME555 : Computational Fluid Dynamics 33 5.7 The hybrid differencing scheme Central differencing scheme: accurate to second order Not transportive Upwind differencing scheme: accurate to first order is transportive Hybrid difference scheme uses: central difference scheme for Pe < upwind difference scheme in which diffusion has been set to zero for Pe For a west face F ( ρu) w w Pew = = Dw Γ w/ δ x (5.35) WP The hybrid differencing formula for the net flux through the west face is as follows: 1 1 qw = Fw 1+ φw + 1 φp for < Pew < Pew Pew (5.36) q = F φ for Pe w w W w q = F φ for Pe w w P w ME555 : Computational Fluid Dynamics 34 17

The general form of the discretised equation is a φ = a φ + a φ (5.37) P P W W E E The central coefficient is given by a = a + a + ( F F ) P W E e w After some re-arrangement it is easy to establish that the neighbour coefficients for the hybrid differencing scheme for steady one - dimensional convection diffusion can be written as follows: a W Fw Fe max Fw, Dw +,0 max Fe, De,0 a E ME555 : Computational Fluid Dynamics 35 Example 5. Solve the problem considered in case of example 5.1 using the hybrid scheme for u=.5 m/s. Compare a 5 node solution with a 5 node solution ME555 : Computational Fluid Dynamics 36 18

Comparison with the analytical solution The numerical results are compared with the analytical solution in table 5.9 ME555 : Computational Fluid Dynamics 37 5.7.1 Assessment of the hybrid differencing scheme Is fully conservative Is unconditionally bounded (since the coefficients are always positive) Satisfies the transportiveness property Produces physical realistic solutions Highly stable compared with higher order scheme Is only first order accurate ME555 : Computational Fluid Dynamics 38 19

Hybrid differencing scheme for multi-dimensional convection-diffusion The discretised equation that covers all cases is given by a φ = a φ + a φ + a φ + a φ + a φ + a φ P P W W E E S S N N B B T T with central coefficient ap = aw + ae + as + an + ab + at +ΔF ME555 : Computational Fluid Dynamics 39 The coefficient of this equation for the hybrid differencing scheme are as follows: One-dimensional flow two-dimensional flow three-dimensional flow aw max[fw,(dw+fw/),0] max[fw,(dw+fw/),0] max[fw,(dw+fw/),0] ae max[-fe,(de-fe/),0] max[-fe,(de-fe/),0] max[-fe,(de-fe/),0] as - max[fs,(ds+fs/),0] max[fs,(ds+fs/),0] an - max[-fn,(dn-fn/),0] max[-fn,(dn-fn/),0] ab - - max[fb,(db+fb/),0] at - - max[-ft,(dt-ft/),0] ΔF Fe-Fw Fe-Fw+Fn-Fs Fe-Fw+Fn-Fs+Ft-Fb ME555 : Computational Fluid Dynamics 40 0

In the above expressions the value of F and D are calculated with the following formulae Face w e s n b t F (ρu) w A w (ρu) e A e (ρu) s A s (ρu) n A n (ρu) b A b (ρu) t A t D Γ w A w /δx WP Γ e A e /δx PE Γ s A s /δy SP Γ n A n /δy PN Γ b A b /δz PN Γ t A t /δz PT ME555 : Computational Fluid Dynamics 41 The Power Law Scheme Is a more accurate approximation to the 1-D exact solution Produces better results than the hybrid scheme for Pe > 10 diffusion is set to zero for 0 < Pe < 10 the flux is evaluated by a polynomial expression ME555 : Computational Fluid Dynamics 4 1

For example, the net flux per unit area at the west control volume face is evaluated using qw = Fw φw βw( φp φw ) for 0 < Pe< 10 (5.44a) where β ( 1 0.1 ) 5 w = Pew Pew (5.44b) and q = F φ for Pe > 10 w w W w The coefficients of the one-dimensional descretised equation utilising the power-law scheme for steady one-dimensional convection-diffusion are given by Central coefficient: ap = aw + ae + ( Fe Fw ) and a W 5 ( ) + [ ] D max w 0, 1 0.1 Pew max Fw, 0 ME555 : Computational Fluid Dynamics 43 a E 5 ( ) + [ ] D max e 0, 1 0.1 Pee max Fe, 0 5.9 Higher order differencing schemes for convectiondiffusion problems Hybrid and Upwind schemes are Stable Obey the transportiveness requirement But have first order accuracy Are prone to numerical diffusion errors Such errors can be minimized by employing higher order discretisations. CentralDifference scheme is second order accurate but is not stable. Formulations that do not take into account the flow direction are unstable For more accuracy: use higher order schemes, which preserve upwinding for stability ME555 : Computational Fluid Dynamics 44

5.9.1 Quadratic upwind differencing scheme: the QUICK scheme The quadratic upstream interpolation for convective kinetic (QUICK) scheme of Leonard(1979) uses a three-point upstream-weighted upstream quadratic interpolation for cell face values. The face value of φ is obtained from a quadratic function through two bracketing nodes (on each side of the face) and a node on the upstream side (Fig. 5.17) Two upstream nodes and one downstream node is used to calculate the face value of φ ME555 : Computational Fluid Dynamics 45 It can be shown that for a uniform grid the value of φ at the cell face between two bracketing nodes i and i-1, and upstream node i- is given by the following formula: 6 3 1 φ face = φi 1+ φi φi 8 8 8 (5.45) When u w > 0, the bracketing nodes for the west face w are W and P, the upstream node is WW (Figure 5.17), and 6 3 1 φw = φw + φp φ (5.46) WW 8 8 8 When u e > 0, the bracketing nodes for the east face e are P and E, the upstream node is W,so 6 3 1 φe = φp + φe φw 8 8 8 (5.47) The diffusion terms may be evaluated using the gradient of the appropriate parabola. It is interesting to note that on a uniform grid this practice gives the same expressions as central differencing for diffusion. ME555 : Computational Fluid Dynamics 46 3

If Fw>0 and Fe>0 and if we use equations (5.46-5.47) for the convective terms and central differencing for the diffusion terms, the discretised form of the one-dimensional convection-diffusion transport equation(5.9) may be written as Feφ e Fwφw= De( φe φp) Dw( φp φw) (5.9) 6 3 1 6 3 1 Fe φp + φe φw Fw φw + φp φww De( E P) Dw( P W ) 8 8 8 8 8 8 = φ φ φ φ which can be rearranged to give 3 6 6 1 3 1 Dw Fw + De + F e φp = Dw + Fw + F e φw + De F e φe FwφWW 8 8 8 8 8 8 (5.48) This is now written in the standard form for discretised equations ap φp = aw φw + ae φe + aww φww (5.49) where ME555 : Computational Fluid Dynamics 47 For Fw < 0 and Fe < 0 the flux across the west and east boundaries is given by the expressions 6 3 1 φw = φp + φw φe 8 8 8 (5.50) 50) 6 3 1 φe = φe + φp φee 8 8 8 Substitution of these two formulae for the convective terms in the discretised convection-diffusion equation (5.9) together with central differencing for the diffusion terms leads, after re-arrangement as above, to the following coefficients: ME555 : Computational Fluid Dynamics 48 4

General expressions, valid for positive and negative flow directions, can be obtained by combining the two sets of coefficients above. The QUICK scheme for one-dimensional convection-diffusion problems can be summarised as follows: apφp = awφw + aeφe + awwφww + aeeφee (5.51) With central coefficient ap = aw + ae + aww + aee + ( Fe Fw) And neighbour coefficients where α w =1 for F w > 0 and α e =1 for Fe > 0 α w =0 for F w < 0 and α e =0 for Fe < 0 ME555 : Computational Fluid Dynamics 49 Example 5.4 Using the QUICK scheme solve the problem considered in example 5.1 for u=0. m/s on a five-point grid. Compare the quick solution with the exact and central differencing solution. A B 1 3 w 4 e 5 6 7 φ = 1 W P E φ = 0 δx/ δx WP = δx δx PE =δx δx/ Boundary Points : δx Consider node. φ w = φ A To calculate φ e : φ w is needed. But there is no φ w use linear interpolation to create a mirror node at δx/ to the west of boundary A. ME555 : Computational Fluid Dynamics 50 5

Mirror Node Domain boundary Node It can be easily shown that the linearly extrapolated value at the minor node is given by (5.5) φ = φ φ 0 A P The extrapolation to the mirror node has given us the required W node for the formula (5.47) that calculates φ e at the east face of control volume : 6 3 1 7 3 φe = φp + φe ( φa φp) = φp + φe φa (5.53) 8 8 8 8 8 8 ME555 : Computational Fluid Dynamics 51 At the boundary nodes the gradients in diffusive flux terms can be evaluated using central difference scheme similar to calculation of diffusion terms in interior nodes. ME555 : Computational Fluid Dynamics 5 6

with The discretised equations for nodes, 3 and 6 are now written to fit into the standard form to give: a φ = a φ + a φ + a φ + S (5.59) The solution is P P WW WW W W E E u a = a + a + a + a + ( F F ) S P W E WW EE e w P φ 0.9648 φ 3 0.8707 φ 4 = 0.7309 φ5 0.56 φ 6 0.13 (5.60) ME555 : Computational Fluid Dynamics 53 ME555 : Computational Fluid Dynamics 54 7

5.9. Assessment of the QUICK scheme The scheme: Uses consistent quadratic profiles is conservative Is based on a quadratic function has 3 rd order truncation error Is based on upstream and 1 downstream nodes has transportiveness a P = Σ a nb if flow field satisfies continuity desirable for boundedness ae and aw may not be positive aww and aee are negative If uw > 0 and ue > 0 : Fe 8 Then ae = De 3 / 8 Fe becomes negative for Pee = > De 3 Gives rise to stability problems and unbounded solutions. QUICK scheme is conditionally stable Involves φ WW and φ EE which are not immediate-neighbour nodes ME555 : Computational Fluid Dynamics 55 5.9.3 Stability problems of the QUICK scheme and remedies May have negative main coefficients can be unstable Also other higher order schemes may be oscillatory and unstable under certain conditions In this case use: Method of deferred correction In this method the cell face value φ f is formulated as the sum of the upwind value and other higher order terms which are evaluated at the previous iteration. u o φ = φ +Δφ f f f HO o o o Δ φ f = φ f φ f where: u φ f = φ f value to be computed by 1 st order upwind method 0 φ HO f = φ f value computed by high order scheme from previous old values 0 φ u = φ value computed by 1 st order upwind method from previous old values f f u ME555 : Computational Fluid Dynamics 56 8

Let us apply the deferred correction method to QUICK scheme. For uw > 0 QUICK scheme is 6 3 1 φ w = φ W + φ P φ WW 8 8 8 This can be written as 1 φw = φw + [ 3 φp φw φww] For Fw > 0 8 u φ f Δφ 0 f is added to source term Similarly: 1 φ = φ + [ 3 φ φ φ ] For F > 0 e P E P W e 8 1 φw = φp + [ 3 φw φp φe] For Fw < 0 8 1 φe = φe + [ 3 φp φe φee] For Fe < 0 8 Su (5.6) ME555 : Computational Fluid Dynamics 57 The discretisation equation takes the form apφp = awφw + aeφe + Su (5.63) The central coefficient is a P = a W + a E + ( F e F w) (5.64) where a a S w e u D + max( F,0) D + max(0, F ) w w e e max[ Fw,0]( φw φw) max[ Fw,0]( φw φp) + max[ F,0]( φ φ ) max[ F,0]( φ φ ) e e E e e P (5.65) Note that a w and a e are the same as that of the upwind method. The advantage of this approach is that the coefficients are always positive and now satisfy the requirements for conservativeness, boundedness and transportiveness ME555 : Computational Fluid Dynamics 58 9

5.9.4 general comments on the QUICK differencing scheme QUICK scheme Has greater accuracy than central, upwind or power schemes Retains the upwind weighted characteristics Resultant false diffusion is small Can give (minor) undershoots and overshoots (see Fig. 5.0) ME555 : Computational Fluid Dynamics 59 To prevent this problem use: 1. Limiters Limit the scheme to have the face value φ f to be between certain values (ULTRA SHARP). Total variation diminishing schemes (TVD) ME555 : Computational Fluid Dynamics 60 30

Homework y H Consider a fluid at a uniform temperature T i entering a channel whose surface is maintained at a different temperature T s. A Thermal boundary layer along the tube developes, after which the form of the temperature profile does not change. Assume that the flow profile is constant in the channel where the velocities are given by u y = 1 1 and v = 0 umax H where u max = 1.5u mean. The energy equation is ( ρ ut) ( ρ vt) k T k T + = + x y x cp x y cp y Find the temperature profile in the channel for Re = ρu mean H/μ = 10, Pr = μc p /k = 1. Use L x /H = 5, where L x is the length of the solution domain. Use UPWIND method. (Note: k/c p = μ/pr for fluids.). Also, choosing ρ = 1, find μ from Re relation. Take T in = 0, T walls = 100, u mean = 1 m/s ME555 : Computational Fluid Dynamics 61 Generalisation of Upwind-biased Schemes For convection terms, an estimate of φ value at the faces of a CV is required. Consider east face, assuming u e > 0 1) Standard Upwind Differencing Scheme (UD) φ P φ e = φ P φ e WW W w P e E EE UPWIND v e The face value of φ is taken to be equal to the value of the upstream node; φ e = φ P (5.66) ME555 : Computational Fluid Dynamics 6 31

Generalisation of Upwind-biased Schemes ) Linear Upwind Differencing Scheme (LUD) also called the second order upwind differencing scheme (SOU) φ e = φ P +(φ P φ W ) / φ W φ P φ e WW W w SOU (LUD) P φ is assumed to vary linearly between W and e. Then φ e is found by extrapolating the two upstream node values φ W and φ P to face e. ( φ P φ W ) δ x φe = φp + δ x (5.67) 1 = φp + ( φp φw ) The term ½(φ P φ W ) can be thought as a second order correction to the standard upwind scheme. e v e E EE ME555 : Computational Fluid Dynamics 63 Generalisation of Upwind-biased Schemes 3) Central Differencing Scheme (CD) φ e = (φ P + φ W ) / φp φ e φ E WW W w P e E EE CENTRAL u e The value of φ is assumed to vary linearly between the two nodes straddling the face, that is; ( φ P + φ E ) φ e = (5.68) or 1 φe = φp + ( φe φp ) ME555 : Computational Fluid Dynamics 64 (5.69) 3

Generalisation of Upwind-biased Schemes 4) QUICK Scheme φ e = 6/8φ P + 3/8φ E 1/8φ W ) φ P φ e φ W φ E w e WW W P E EE QUICK The scheme is based on the assumption that φ varies in terms of a second degree polynomial between two upstream (W and P) and the downstream node E. 6 3 1 φe = φp + φe φ (5.70) W 8 8 8 1 or φe = φp + (3 φe φp φw ) (5.71) 8 u e ME555 : Computational Fluid Dynamics 65 Generalisation of Upwind-biased Schemes All higher order schemes can be expressed in the form: 1 φe = φp + ψ ( φe φp ) ψ = an appropriate p function (5.7) Convective flux at face e is F e φ e For a higher order scheme convective flux consist of two parts: 1) Upwind flux, Feφ P ) Additional flux, Feψ(φ E φ P)/ Additional flux is connected to the gradient of φ at face e, as indicated by (φ E φ P ) ME555 : Computational Fluid Dynamics 66 33

Generalisation of Upwind-biased Schemes ψ = 0 for UD scheme ψ = 1 for CD scheme LUD scheme may be written as 1 φp φ W φe = φp + ( φe φp) (5.73) φe φp φp φ W ψ = for LUD scheme (5.74) φe φp QUICK scheme may be written as 1 φp φ 1 W φe = φp + 3 + ( φe φp) (5.75) φe φp 4 φp φ W 1 ψ = 3 + for QUICK scheme (5.76) φe φp 4 ME555 : Computational Fluid Dynamics 67 Generalisation of Upwind-biased Schemes let φp φw r = φ φ E P r = ratio of upwind-side gradient to downwind-side gradient ψ is a function of r: ψ = ψ(r) ) A higher order convection scheme can be written as 1 φe = φp + ψ ()( r φe φp ) ψ = 0 for UD scheme ψ = 1 for CD scheme φp φ W ψ = for LUD scheme φe φp φp φ W 1 ψ = 3 + for QUICK scheme φe φp 4 (5.77) (5.78) ME555 : Computational Fluid Dynamics 68 34

All of the above expressions assume that the flow direction is positive (from west to east). Similar expressions exist for negative flow direction. In that case, r is still the ratio of upwind-side gradient to downwind-side gradient. ME555 : Computational Fluid Dynamics 69 Total Variation and TVD Schemes UD scheme is the most stable scheme (no wiggles) CD and QUICK have higher order accuracy but give rise to wiggles under certain conditions. Our aim is to find a convection scheme with a higherorder accuracy but without wiggles. The desirable property for a stable, non-oscillatory, higher order scheme is monotonicity preserving. For a scheme to preserve to preserve monotonicity: 1. It must not create local extrema. The value of an existing local minimum must be non-decreasing and that of a local maximum must be non-increasing. Monotonicity preserving schemes do not create new undershoots and overshoots. ME555 : Computational Fluid Dynamics 70 35

Total Variation and TVD Schemes Consider the discrete data set shown in the figure. The total variation of this data set is TV ( φ) = φ φ1 + φ3 φ + φ4 φ3 + φ5 φ4 = φ φ + φ φ 3 1 5 3 For monotonicity, this TV must not increase with time. (5.79) ME555 : Computational Fluid Dynamics 71 Total Variation and TVD Schemes In other words TV must diminish with time. Hence, the term total variation diminishing or TVD. Originally TVD was developed for time-dependent flows. For TVD: TV(φ n+1 ) TV(φ n ) where n refer to time step. In the next section we show how TVD is also linked to desirable behaviour of discretisation schemes for steady convection-diffusion problems. ME555 : Computational Fluid Dynamics 7 36

Criteria for TVD Schemes Necessary and sufficient conditions for a scheme to be TVD 1) For 0 < r < 1 ψ(r) r ) For r 1 ψ(r) UD scheme is TVD LUD scheme is not TVD for r > CD scheme is not TVD for r < 0.5 QUICK scheme is not TVD for r < 3/7 and r > 5 ME555 : Computational Fluid Dynamics 73 Requirement for Second Order Accuracy For second order accuracy, the flux limiter function ψ should pass through the point (1, 1) in the r ψ diagram. Range of possible second-order schemes is bounded by the CD and LUD schemes: For 0 < r < 1 for TVD to be second order r ψ(r) 1 For r 1 for TVD to be second order 1 ψ(r) r Region for a second-order TVD scheme ME555 : Computational Fluid Dynamics 74 37

Symmetry Property for Limiter Functions Symmetry Property for limiter functions: ψ () r ψ (1/ r) r = (5.80) A limiter function that satisfies the symmetry property ensures that backward and forward-facing gradients are treated in the same fashion without the need for special coding. ME555 : Computational Fluid Dynamics 75 Flux Limiter Functions Name Limiter function Source Van Leer r+ r 1+ r Van Leer (1974) Van Albada r+ r 1+ r Van Albada et al. (198) Min-Mod min( r,1) if r > 0 ψ ( r) = 0 if r 0 Roe (1985) SUPERBEE max[0,min( r,1),min( r, )] Roe (1985) Sweby max[0, min( βr,1), min( r, β)] Sweby (1984) QUICK max[0,min( r,(3 + r) / 4, )] Leonard (1988) UMIST max[0,min( r,(1+ 3 r) / 4,(3 + r) / 4, )] Lien and Leschziner (1993) 0 β β = 1 Min-Mod Limiter β = SUPERBEE Limiter of Roe ME555 : Computational Fluid Dynamics 76 38

Flux Limiter Functions MIN MOD MIN MOD All Limiter functions in a r ψ diagram All limiter functions are symmetric except QUICK limiter. UMIST limiter function is a symmetric version of the QUICK limiter. ME555 : Computational Fluid Dynamics 77 Implementation of TVD Schemes For the one dimensional convection diffusion equation d d dφ ( ρuφ) = Γ dx dx dx (5.81) The coefficients of the discretized equation are written in the deferred correction approach. In this approach, the a E, a W, a P coefficients i are the same as of UD scheme. The extra terms resulting from the application of a limiter function is added to the source term S dc. The face values are: 1 ( + e P re )( E P ) + φp φ W For u > 0 φ = φ + ψ φ φ re = φe φp 1 (5.8) + + φw φ WW φ ( )( ) w = φw + ψ rw φp φ r = w W φp φw 1 ( )( ) φee φe For u < 0 φe = φe + ψ re φp φe re φe φp 1 φw φp ψ ( φ = + rw )( φw φp ) E φp rw φp φw ME555 : Computational Fluid Dynamics 78 = = (5.83) 39

where Implementation of TVD Schemes The discretisation equation takes the form a φ = a φ + a φ + S (5.84) P P W W E E dc The central coefficient is a = a + a + ( F F ) P W E e w a a S w e dc D + max( F,0) D + max(0, F ) w w e e (5.85) max[ Fw,0]( φw φw) max[ Fw,0]( φw φp) + max[ F,0]( φ φ ) max[ F,0]( φ φ ) e e E e e P (5.86) φ e and φ w are as defined in Eqs. (5.8) and (5.83) Note that S dc is the same as defined in Eq. (5.65). Note also that a w and a e are the same as that of the upwind method. The advantage of this approach is that the coefficients are always positive and now satisfy the requirements for conservativeness, boundedness and transportiveness ME555 : Computational Fluid Dynamics 79 Evaluation of TVD Schemes Comparison of TVD schemes for pure convection flowing 45 o to the grid direction. TVD schemes does not give unphysical overshoots or undershoots. However, TVD schemes require about 15% more CPU time. ME555 : Computational Fluid Dynamics 80 40