Grid generation for the multigrid method

7.7.4 Grid generation for the multigrid method

As illustrated in the above example, grid generation is required to create the coarse grids. The most straightforward method is to combine control vol- umes or regenerate the mesh using half the number of nodes of the mesh above that level. For 2D structured grids, such as the Cartesian grid shown in Figure 7.12, coarse grids can be readily generated by deleting alternate grid lines. Thus one coarse grid control is constructed from every four fine grid control volumes. This can easily be extended to 3D meshes using eight fine grid control volumes per coarse grid control volume.

Figure 7.12 A 2D Cartesian mesh – the coarse grid is constructed by deleting alternate grid lines or combining groups of four control volumes

In the above example we computed the coarse grid system matrix and other required quantities using actual geometrical properties of the coarse mesh (Table 7.12). This type of multigrid procedure is called a geometric multigrid procedure. In the other variation to this method, the coefficients are not recomputed from the grid geometry to save calculation effort, but approximated as linear combinations of coefficients of the fine grid equations. Such multigrid methods are called algebraic multigrid and are widely used in commercial CFD solvers. The technique known as the additive correction multigrid (ACM) strategy of Hutchinson and Raithby (1986) is also a popular multigrid method used in many CFD procedures.

242 CHAPTER 7 SOLUTION OF DISCRETISED EQUATIONS

7.8 Summary Multigrid acceleration of the Gauss–Seidel point-iterative method is cur-

rently the solution algorithm of choice for commercial CFD codes. The rate of convergence of this procedure can be optimised by specific choices for: (i) interpolation of the residual vector and coefficient matrix from fine to coarse meshes during restriction, (ii) interpolation of the error vector from coarse to fine meshes during prolongation, (iii) cycles of coarsening and refinement with special schedules of restriction and prolongation at different refinement levels. For further details of more advanced multigrid procedures the reader should consult the appropriate literature (see e.g. Wesseling, 1992; Briggs, 1987). There are also several excellent learning resources avail- able on the Internet for multigrid methods: see for example the multigrid network MGNET at http://www.mgnet.org/.

Several other solution algorithms are available for CFD problems with discretised equations that contain a large number of contributions from sur- rounding nodes. The Strongly Implicit Procedure (SIP) due to Stone (1968), in particular with the improvements suggested by Schneider and Zedan (1981), is more suitable in this case. Details are not presented here in the interest of brevity and the interested reader is referred to Anderson et al.

(1984). Another solution procedure which is being used in CFD calculations is the conjugate gradient method (CGM) of Hestenes and Stiefel (1952). This method is based on matrix factorisation techniques. Improvements by Reid (1971), Concus et al. (1976) and Kershaw (1978) ensure accelerated convergence in the CFD calculations. The CGM requires greater storage than other iterative methods described earlier. Further details of the method can also be found in Press et al. (1992).

Chapter eight The finite volume method for

unsteady flows

8.1 Introduction Having finished the task of developing the finite volume method for steady

flows we are now in a position to consider the more complex category of time-dependent problems. The conservation law for the transport of a scalar in an unsteady flow has the general form

( ρφ) + div(ρuφ) = div(Γ grad φ) + S φ

∂t The first term of the equation represents the rate of change term and is zero

for steady flows. To predict transient problems we must retain this term in the discretisation process. The finite volume integration of equation (8.1) over a control volume (CV) must be augmented with a further integration over a finite time step ∆t. By replacing the volume integrals of the convective

and diffusive terms with surface integrals as before (see section 2.5) and changing the order of integration in the rate of change term we obtain

A t +∆t

D t +∆t A D

B ∂ ( ρφ) dt dV + E B n.( ρuφ)dA dt 冮 E

B 冮 ∂t E 冮 B 冮

CV C t

F t C A F t +∆t A D t +∆t

B n.( Γ grad φ)dA dt + E S

dV dt (8.2)

C A F t CV So far we have made no approximations but to make progress we need tech-

niques for evaluating the integrals. The control volume integration is essen- tially the same as in steady flows and the measures explained in Chapters 4 and 5 are again adopted to ensure successful treatment of convection, diffusion and source terms. Here we focus our attention on methods necessary for the time integration. The process is illustrated below using the one-dimensional unsteady diffusion (heat transfer) equation and is later extended to multi- dimensional unsteady diffusion and convection–diffusion problems.

8.2 One-dimensional unsteady heat

Unsteady one-dimensional heat conduction is governed by the equation conduction

∂T ∂ A ∂T D

ρc

∂t ∂x B E +S

C ∂x F

244 CHAPTER 8 THE FINITE VOLUME METHOD FOR UNSTEADY FLOWS

Figure 8.1

In addition to the usual variables we have c, the specific heat of the material ( J/kg.K).

Consider the one-dimensional control volume in Figure 8.1. Integration of equation (8.3) over the control volume and over a time interval from t to t+ ∆t gives

冮 冮 ∂t

∂T

∂ A ∂T D

冮 冮 ∂x B F 冮

ρc dV dt =

dV dt + S dV dt (8.4)

t CV t CV C ∂x

t CV

This may be written as

K 冮 dt

H 冮 ∂t K 冮 H

In equation (8.5), A is the face area of the control volume, ∆V is its volume, which is equal to A ∆x, where ∆x = δx we is the width of the control volume,

and D is the average source strength. If the temperature at a node is assumed to prevail over the whole control volume, the left hand side can be written as

t G +∆t J

冮 H 冮 ∂t K

H ρc ∂T dt dV K = ρc(T −T o P P ) ∆V

CV I t

In equation (8.6) superscript ‘o’ to refers to temperatures at time t; tempera- tures at time level t + ∆t are not superscripted. The same result as (8.6) would be obtained by substituting (T −T o P P )/ ∆t for ∂T/∂t, so this term has

been discretised using a first-order (backward) differencing scheme. Higher- order schemes, which may be used to discretise this term, will be discussed briefly later in this chapter. If we apply central differencing to the diffusion terms on the right hand side equation (8.5) may be written as

H A T E −T P D A T P −T ρc(T J P −T P ) ∆V = W D

t +∆t G

E t I WP

k e A E −k w A K dt

C δx

F C δx

PE

t +∆t

D∆V dt

8.2 ONE-DIMENSIONAL UNSTEADY HEAT CONDUCTION 245

To evaluate the right hand side of this equation we need to make an assump- tion about the variation of T P ,T E and T W with time. We could use tempera- tures at time t or at time t + ∆t to calculate the time integral or, alternatively,

a combination of temperatures at time t and t + ∆t. We may generalise the approach by means of a weighting parameter θ between 0 and 1 and write the integral I T of temperature T P with respect to time as

t +∆t

I T = T P dt =[ θT P + (1 − θ)T P o ] ∆t (8.8)

Hence θ

T P ∆t We have highlighted the following values of integral I T : if θ = 0 the tem

I T T o P ∆t

– 1 2 o (T P +T P ) ∆t

perature at (old) time level t is used; if θ = 1 the temperature at new time level t + ∆t is used; and finally if θ = 1/2, the temperatures at t and t + ∆t are equally weighted.

Using formula (8.8) for T W and T E in equation (8.7), and dividing by A ∆t throughout, we have

L which may be rearranged to give

P o + D∆x (8.10)

Now we identify the coefficients of T W and T E as a W and a E and write equation (8.10) in the familiar standard form:

P P =a W [ θT W + (1 − θ)T W ] +a o E [ θT E + (1 − θ)T E ] + [a P − (1 − θ)a W − (1 − θ)a ]T o E P +b

(8.11) where

a P o = θ(a W +a E ) +a P

246 CHAPTER 8 THE FINITE VOLUME METHOD FOR UNSTEADY FLOWS

∆t with

The exact form of the final discretised equation depends on the value of θ. When θ is zero, we only use temperatures T o o

P , T W and T E at the old time level t on the right hand side of equation (8.11) to evaluate T P at the new time and the resulting scheme is called explicit. When 0 < θ ≤ 1 temperatures at

the new time level are used on both sides of the equation and the resulting schemes are called implicit. The extreme case of θ = 1 is termed fully implicit and the case corresponding to θ = 1/2 is called the Crank– Nicolson scheme (Crank and Nicolson, 1947).