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

Size: px
Start display at page:

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

Transcription

1 Draft Notes ME 608 Numerial Methods in Heat, Mass, and Momentum Transfer Instrutor: Jayathi Y. Murthy Shool of Mehanial Engineering Purdue University Spring J.Y. Murthy and S.R. Mathur. All Rights Reserved

2 2

3 Contents 1 Mathematial Modeling Conservation Equations Disussion Conservation Form Governing Equations The Energy Equation The Momentum Equation The Speies Equation The General Salar Transport Equation Mathematial Classifiation of Partial Differential Equations Ellipti Partial Differential Equations Paraboli Partial Differential Equations Hyperboli Partial Differential Equations Behavior of the Salar Transport Equation Closure Numerial Methods Overview Mesh Terminology and Types Regular and Body-fitted Meshes Strutured, Blok Strutured, and Unstrutured Meshes Conformal and Non-Conformal Meshes Cell Shapes Node-Based and Cell-Based Shemes Disretization Methods Finite Differene Methods Finite Element Methods Finite Volume Method Solution of Disretization Equations Diret Methods Iterative Methods Auray, Consisteny, Stability and Convergene Auray Consisteny

4 2.5.3 Stability Convergene Closure The Diffusion Equation: A First Look Two-Dimensional Diffusion in Retangular Domain Disretization Disussion Boundary Conditions Dirihlet Boundary Condition Neumann Boundary Condition Mixed Boundary Condition Unsteady Condution The Expliit Sheme The Fully-Impliit Sheme The Crank-Niholson Sheme Diffusion in Polar Geometries Diffusion in Axisymmetri Geometries Finishing Touhes Interpolation of Γ Soure Linearization and Treatment of Non-Linearity Under-Relaxation Disussion Trunation Error Spatial Trunation Error Temporal Trunation Error Stability Analysis Closure The Diffusion Equation: A Closer Look Diffusion on Orthogonal Meshes Non-Orthogonal Meshes Disussion Seondary Gradient Calulation Disrete Equation for Non-Orthogonal Meshes Boundary Conditions Gradient Calulation Strutured Meshes Unstrutured Meshes Influene of Seondary Gradients on Coeffiients Implementation Issues Data Strutures Overall Solution Loop Closure

5 5 Convetion Two-Dimensional Convetion and Diffusion in A Retangular Domain Central Differening Upwind Differening Convetion-Diffusion on Non-Orthogonal Meshes Central Differene Approximation Upwind Differening Approximation Auray of Upwind and Central Differene Shemes An Illustrative Example False Diffusion and Dispersion First-Order Shemes Using Exat Solutions Exponential Sheme Hybrid Sheme Power Law Sheme Unsteady Convetion D Finite Volume Disretization Central Differene Sheme First Order Upwind Sheme Error Analysis Lax-Wendroff Sheme Higher-Order Shemes Seond-Order Upwind Shemes Third-Order Upwind Shemes Implementation Issues Higher-Order Shemes for Unstrutured Meshes Disussion Boundary Conditions Inflow Boundaries Outflow Boundaries Geometri Boundaries Closure Fluid Flow: A First Look Disretization of the Momentum Equation Disretization of the Continuity Equation The Staggered Grid Disussion Solution Methods The SIMPLE Algorithm The Pressure Corretion Equation Overall Algorithm Disussion Boundary Conditions Pressure Level and Inompressibility The SIMPLER Algorithm Overall Algorithm

6 6.7.2 Disussion The SIMPLEC Algorithm Optimal Underrelaxation for SIMPLE Disussion Non-Orthogonal Strutured Meshes Unstrutured Meshes Closure Fluid Flow: A Closer Look Veloity and Pressure Chekerboarding Disretization of Momentum Equation Disretization of Continuity Equation Pressure Chekerboarding Veloity Chekerboarding Co-Loated Formulation The Conept of Added Dissipation Auray of Added Dissipation Sheme Disussion Two-Dimensional Co-Loated Variable Formulation Disretization of Momentum Equations Momentum Interpolation SIMPLE Algorithm for Co-Loated Variables Veloity and Pressure Corretions Pressure Corretion Equation Overall Solution Proedure Disussion Underrelaxation and Time-Step Dependene Co-Loated Formulation for Non-Orthogonal and Unstrutured Meshes Fae Normal Momentum Equation Momentum Interpolation for Fae Veloity The SIMPLE Algorithm for Non-Orthogonal and Unstrutured Meshes Disussion Closure Linear Solvers Diret vs Iterative Methods Storage Strategies Tri-Diagonal Matrix Algorithm Line by line TDMA Jaobi and Gauss Seidel Methods General Iterative Methods Convergene of Jaobi and Gauss Seidel Methods Analysis Of Iterative Methods Multigrid Methods Coarse Grid Corretion Geometri Multigrid

7 8.9.3 Algebrai Multigrid Agglomeration Strategies Cyling Strategies and Implementation Issues Closure

8 8

9 Chapter 1 Mathematial Modeling In order to simulate fluid flow, heat transfer, and other related physial phenomena, it is neessary to desribe the assoiated physis in mathematial terms. Nearly all the physial phenomena of interest to us in this book are governed by priniples of onservation and are expressed in terms of partial differential equations expressing these priniples. For example, the momentum equations express the onservation of linear momentum; the energy equation expresses the onservation of total energy. In this hapter we derive a typial onservation equation and examine its mathematial properties. 1.1 Conservation Equations Typial governing equations desribing the onservation of mass, momentum, energy, or hemial speies are written in terms of speifi quantities - i.e., quantities expressed on a per unit mass basis. For example, the momentum equation expresses the priniple of onservation of linear momentum in terms of the momentum per unit mass, i.e., veloity. The equation for onservation of hemial speies expresses the onservation of the mass of the speies in terms of its mass fration Let us onsider a speifi quantity φ, whih may be momentum per unit mass, or the energy per unit mass, or any other suh quantity. Consider a ontrol volume of size x y z shown in Figure 1.1. We want to express the variation of φ in the ontrol volume over time. Let us assume that φ is governed by a onservation priniple that states Aumulation of φ in the ontrol volume over time t Net influx of φ into ontrol volume Net generation of φ inside ontrol volume (1.1) 9

10 y J x Jx+ x x z Figure 1.1: Control Volume The aumulation of φ in the ontrol volume over time t is given by ρφ t t ρφ t (1.2) Here, ρ is the density of the fluid, is the volume of the ontrol volume ( x y z) and t is time. The net generation of φ inside the ontrol volume over time t is given by S t (1.3) where S is the generation of φ per unit volume. S is also sometimes alled the soure term. Let us onsider the remaining term, the net influx of φ into the ontrol volume. Let J x represent the flux of φ oming into the ontrol volume through fae x, and J x x the flux leaving the fae x x. Similar fluxes exist on the y and z faes respetively. The net influx of φ into the ontrol volume over time t is J x J x x y z t J y J y y x z t J z J z z x y t (1.4) We have not yet said what physial mehanisms ause the influx of φ. For physial phenomena of interest to us, φ is transported by two primary mehanisms: diffusion due to moleular ollision, and onvetion due to the motion of fluid. In many ases, the diffusion flux may be written as J diffusion x Γ φ x (1.5) The onvetive flux may be written as J onvetion x ρuφ (1.6) 10

11 Here, the veloity field is given by the vetor V ui vj wk. Thus the net onvetive and diffusive flux may be written as J x ρuφ Γ φ x x J x x ρuφ Γ φ x x x (1.7) where ρu x is the mass flux through the ontrol volume fae at x. Similar expressions may be written for the y and z diretions respetively. Aumulating terms, and dividing by t Equation 1.1 may be written as ρφ t t t ρφ t Taking the limit x y z t ρφ t It is onvenient to write Equation 1.9 as ρφ t ρuφ x ρvφ y J x J x x x J z J z z z 0, we get J y J y y y S (1.8) J x x J y y J z z S (1.9) ρwφ z x Γ φ x z Γ φ z S y Γ φ y or, in vetor notation ρφ t ρvφ Γ φ S (1.10) Disussion It is worth noting the following about the above derivation: The differential form is derived by onsidering balanes over a finite ontrol volume. Though we have hosen hexahedral ontrol volume on whih to do onservation, we an, in priniple, hoose any shape. We should get the same final governing differential equation regardless of the shape of the volume hosen to do the derivation. 11

12 The onservation equation is written in terms of a speifi quantity φ, whih may be energy per unit mass (J/kg), or momentum per unit mass (m/s) or some similar quantity. The onservation equation is written on a per unit volume per unit time basis. The generation term in Equation 1.10 for example, is the generation of φ per unit volume per unit time. If φ were energy per unit mass, S would be the generation of energy per unit volume per unit time Conservation Form Equation 1.10 represents the onservative or divergene form of the onservation equation. This form is haraterized by the fat that in steady state, in the absene of generation, the divergene of the flux is zero: J 0 (1.11) where J = J x i J y j J z k. By using the ontinuity equation, we may write the nononservative form of Equation 1.10 ρφ t ρv φ Γ φ Γ φ S (1.12) The divergene of J represents the net efflux per unit volume of J. Thus, the onservative form is a diret statement about the onservation of φ in terms of the physial fluxes (onvetion and diffusion). The non-onservative form does not have a diret interpretation of this sort. Numerial methods that are developed with the divergene form as a starting point an be made to reflet the onservation property exatly if are is taken. Those that start from Equation 1.12 an be made to approximate onservation in some limiting sense, but not exatly. 1.2 Governing Equations The governing equations for fluid flow, heat and mass transfer, as well as other transport equations, may be represented by the onservative form, Equation Let us now onsider some speifi ases of the onservation equation for φ The Energy Equation The general form of the energy equation is quite elaborate, though it an also be ast into the general form of Equation For simpliity, let us assume low-speed flow and negligible visous dissipation. For this ase, the energy equation may be written in terms of the speifi enthalpy h as ρh ρvh k T S t h (1.13) 12

13 where k is the thermal ondutivity and T is the temperature. For ideal gases and inompressible substanes, dh C p dt (1.14) so that Equation 1.13 may be written as ρh t ρvh k C p h S h (1.15) Comparing Equation 1.15 with Equation 1.10 shows that the energy equation an be ast into the form of the general onservation equation, with φ h, Γ k C p and S S h The Momentum Equation The momentum equation for a Newtonian fluid in the diretion x may be written as ρu t ρvu µ u p x S u (1.16) Here, S u ontains those parts of the stress tensor not appearing diretly in the diffusion term, and p x is pressure gradient. We see that Equation 1.16 has the same form as the general onservation equation 1.10, with φ u, Γ µ and S p x S u The Speies Equation Consider the transport of a mixture of hemial speies. The equation for the onservation of mass for a hemial speie i may be written in terms of its mass fration, Y i, where Y i is defined as the mass of speies i per mass of mixture. If Fik s law is assumed valid, the governing onservation equation is ρy i t ρvy i Γ i Y i R i (1.17) Γ i is the diffusion oeffiient for Y i in the mixture and R i is the rate of formation of Y i through hemial reations. Again we see that Equation 1.17 has the same form as the general onservation equation 1.10, with φ Y i, Γ Γ i, and S R i. 1.3 The General Salar Transport Equation We have seen that the equations governing fluid flow, heat and mass transfer an be ast into a single general form whih we shall all the general salar transport equation: ρφ t ρvφ Γ φ S (1.18) If numerial methods an be devised to solve this equation, we will have a framework within whih to solve the equations for flow, heat, and mass transfer. 13

14 1.4 Mathematial Classifiation of Partial Differential Equations The general salar transport equation is a seond-order partial differential equation (PDE) governing the spatial and temporal variation of φ. If the properties ρ and Γ, or the generation term S φ are funtions of φ, it is non-linear. Ignoring non-linearities for the moment, we examine the behavior of this equation. It is instrutive to onsider a general seond-order PDE given by aφ xx bφ xy φ yy dφ x eφ y f φ g 0 (1.19) The oeffiients a,b,,d,e, f and g are funtions of the oordinates (x,y), but not of φ itself. The behavior of Equation 1.19 may be lassified aording to the sign on the disriminant! b 2 4a (1.20)!" If 0 the PDE is alled ellipti. If 0, the PDE is alled paraboli. If 0 the PDE is alled hyperboli. Let us onsider typial examples of eah type of equation Ellipti Partial Differential Equations Let us onsider steady heat ondution in a one-dimensional slab, as shown in Figure 1.2. The governing equation and boundary onditions are given by x k T x 0 (1.21) with For onstant k, the solution is given by T 0 # T 0 T L $ T L (1.22) T x T 0 T L T 0 L x (1.23) This simple problem illustrates important properties of ellipti PDEs. These are 1. The temperature at any point x in the domain is influened by the temperatures on both boundaries. 2. In the absene of soure terms, T x is bounded by the temperatures on the boundaries. It annot be either higher or lower than the boundary temperatures. It is desirable when devising numerial shemes that these basi properties be refleted in the harateristis of the sheme. 14

15 x L Figure 1.2: Condution in a One-Dimensional Slab 15

16 1.4.2 Paraboli Partial Differential Equations Consider unsteady ondution in the slab in Figure 1.2. If k, ρ and C p are onstant, Equation 1.13 may be written in terms of the temperature T as where α k given by T t α 2 T x 2 (1.24) ρc p is the thermal diffusivity. The initial and boundary onditions are T x 0 # T i x T 0 t % T 0 T L t # T 0 (1.25) Using a separation of variables tehnique, we may write the solution to this problem as where B n T x t & T 0 2 L ) 0 L T i n' 1 x T 0 sin We note the following about the solution: B n sin nπx L e( αn 2 π 2 L 2 t (1.26) nπx L dx n *,*,* (1.27) 1. The boundary temperature T 0 influenes the temperature T(x,t) at every point in the domain, just as with ellipti PDE s. 2. Only initial onditions are required (i.e., onditions at t 0). No final onditions are required, for example onditions at t. We do not need to know the future to solve this problem! 3. The initial onditions only affet future temperatures, not past temperatures. 4. The initial onditions influene the temperature at every point in the domain for all future times. The amount of influene dereases with time, and may affet different spatial points to different degrees. 5. A steady state is reahed for t. Here, the solution beomes independent of T i x 0. It also reovers its ellipti spatial behavior. 6. The temperature is bounded by its initial and boundary onditions in the absene of soure terms. It is lear from this problem that the variable t behaves very differently from the variable x. The variation in t admits only one-way influenes, whereas the variable x admits two-way influenes. t is sometimes referred to as the marhing or paraboli diretion. Spatial variables may also behave in this way, for example, the axial diretion in a pipe flow. 16

17 " Hyperboli Partial Differential Equations Let us onsider the one-dimensional flow of a fluid in a hannel, as shown in Figure 1.3. The veloity of the fluid, U, is a onstant; also U 0. For t - 0, the fluid upstream of the hannel entrane is held at temperature T 0. The properties ρ and C p are onstant and k 0. The governing equations and boundary onditions are given by: with t ρc p T x ρc p UT 0 (1.28) T x 0 # T i T x. 0 t # T 0 (1.29) You an onvine yourself that Equation 1.28 is hyperboli by differentiating it one with respet to either t or x and finding the disriminant. The solution to this problem is T x t & T + x Ut / 0 (1.30) or to put it another way T x t # T i for t T 0 for t - x U x U (1.31) The solution is essentially a step in T traveling in the positive x diretion with a veloity U, as shown in Figure 1.4. We should note the following about the solution: 1. The upstream boundary ondition (x 0) affets the solution in the domain. Conditions downstream of the domain do not affet the solution in the domain. 2. The inlet boundary ondition propagates with a finite speed, U. 3. The inlet boundary ondition is not felt at point x until t x U Behavior of the Salar Transport Equation The general salar transport equation we derived earlier (Equation 1.10) has muh in ommon with the partial differential equations we have seen here. The ellipti diffusion equation is reovered if we assume steady state and there is no flow. The same problem solved for unsteady state exhibits paraboli behavior. The onvetion side of the salar transport equation exhibits hyperboli behavior. In most engineering situations, the equation exhibits mixed behavior, with the diffusion terms tending to bring in ellipti influenes, and the unsteady and onvetion terms bringing in paraboli or hyperboli influenes. It is sometimes useful to onsider partiular oordinates to be ellipti or paraboli. For example, it is useful in paraboli problems to think about time as the paraboli oordinate and to think of spae as the ellipti oordinate. 17

18 T 0 T T i x U Figure 1.3: Convetion of a Step Profile T 0 T t = 0 T i t = x /U 1 x 1 t = x /U 2 x x 2 Figure 1.4: Temperature Variation with Time 18

19 Though it is possible to devise numerial methods whih exploit the partiular nature of the general salar transport equation in ertain limiting ases, we will not do that here. We will onentrate on developing numerial methods whih are general enough to handle the mixed behavior of the general transport equation. When we study fluid flow in greater detail, we will have to deal with oupled sets of equations, as opposed to a single salar transport equation. These sets an also be analyzed in terms similar to the disussion above. 1.5 Closure In this hapter, we have seen that many physial phenomena of interest to us are governed by onservation equations. These onservation equations are derived by writing balanes over finite ontrol volumes. We have seen that the onservation equations governing the transport of momentum, heat and other speifi quantities have a ommon form embodied in the general salar transport equation. This equation has unsteady, onvetion, diffusion and soure terms. By studying the behavior of anonial ellipti, paraboli and hyperboli equations, we begin to understand the behavior of these different terms in determining the behavior of the omputed solution. The ideal numerial sheme should be able to reprodue these influenes orretly. 19

20 20

21 Chapter 2 Numerial Methods In the previous hapter, we saw that physial phenomena of interest to us ould be desribed by a general salar transport equation. In this hapter, we examine numerial methods for solving this type of equation, and identify the main omponents of the solution method. We also examine ways of haraterizing our numerial methods in terms of auray, onsisteny, stability and onvergene. 2.1 Overview Our objetive here is to develop a numerial method for solving the general salar transport equation. Fundamental to the development of a numerial method is the idea of disretization. An analytial solution to a partial differential equation gives us the value of φ as a funtion of the independent variables (x y z t). The numerial solution, on the other hand, aims to provide us with values of φ at a disrete number of points in the domain. These points are alled grid points, though we may also see them referred to as nodes or ell entroids, depending on the method. The proess of onverting our governing transport equation into a set of equations for the disrete values of φ is alled the disretization proess and the speifi methods employed to bring about this onversion are alled disretization methods. The disrete values of φ are typially desribed by algebrai equations relating the values at grid points to eah other. The development of numerial methods fouses on both the derivation of the disrete set of algebrai equations, as well as a method for their solution. In arriving at these disrete equations for φ we will be required to assume how φ varies between grid points i.e., to make profile assumptions. Most widely used methods for disretization require loal profile assumptions. That is, we presribe how φ varies in the loal neighborhood surrounding a grid point, but not over the entire domain. The onversion of a differential equation into a set of disrete algebrai equations requires the disretization of spae. This is aomplished by means of mesh generation. A typial mesh is shown in Figure 2.1. Mesh generation divides the domain of interest into elements or ells, and assoiates with eah element or ell one or more disrete 21

22 Cell Vertex Figure 2.1: An Example of a Mesh values of φ. It is these values of φ we wish to ompute. We should also distinguish between the disretized equations and the methods employed to solve them. For our purposes, let us say that the auray of the numerial solution, i.e., its loseness to the exat solution, depends only on the disretization proess, and not on the methods employed to solve the disrete set (i.e., the path to solution). The path to solution determines whether we are suessful in obtaining a solution, and how muh time and effort it will ost us. But it does not determine the final answer. (For some non-linear problems, the path to solution an determine whih of several possible solutions is obtained. For simpliity, we shall not pursue this line of investigation here.) Sine we wish to get an answer to the original differential equation, it is appropriate to ask whether our algebrai equation set really gives us this. When the number of grid points is small, the departure of the disrete solution from the exat solution is expeted to be large. A well-behaved numerial sheme will tend to the exat solution as the number of grid points is inreased. The rate at whih it tends to the exat solution depends on the type of profile assumptions made in obtaining the disretization. No matter what disretization method is employed, all well-behaved disretization methods should tend to the exat solution when a large enough number of grid points is employed. 22

23 Node (Vertex) Cell Cell Centroid Fae Figure 2.2: Mesh Terminology 2.2 Mesh Terminology and Types The physial domain is disretized by meshing or gridding it.(we shall use the terms mesh and grid interhangeably in this book). We shall use the terminology shown in Figure 2.2 in desribing our meshes. The fundamental unit of the mesh is the ell (sometimes alled the element). Assoiated with eah ell is the ell entroid. A ell is surrounded by faes, whih meet at nodes or verties. In three dimensions, the fae is a surfae surrounded by edges. In two dimensions, faes and edges are the same. A variety of mesh types are enountered in pratie. These are desribed below Regular and Body-fitted Meshes In many ases, our interest lies in analyzing domains whih are regular in shape: retangles, ubes, ylinders, spheres. These shapes an be meshed by regular grids, as shown in Figure 2.3(a). The grid lines are orthogonal to eah other, and onform to the boundaries of the domain. These meshes are also sometimes alled orthogonal meshes. For many pratial problems, however, the domains of interest are irregularly shaped and regular meshes may not suffie. An example is shown in Figure 2.3(b). Here, grid lines are not neessarily orthogonal to eah other, and urve to onform to the irregular geometry. If regular grids are used in these geometries, stair stepping ours at domain boundaries, as shown in Figure 2.4. When the physis at the boundary are important in determining the solution, e.g., in flows dominated by wall shear, suh an approximation of the boundary may not be aeptable Strutured, Blok Strutured, and Unstrutured Meshes The meshes shown in Figure 2.3 are examples of strutured meshes. Here, every interior vertex in the domain is onneted to the same number of neighbor verties. Figure 2.5 shows a blok-strutured mesh. Here, the mesh is divided into bloks, and the 23

24 (a) (b) Figure 2.3: Regular and Body-Fitted Meshes Figure 2.4: Stair-Stepped Mesh 24

25 Blok Figure 2.5: Blok-Strutured Mesh mesh within eah blok is strutured. However, the arrangement of the bloks themselves is not neessarily strutured. Figure 2.6 shows an unstrutured mesh. Here, eah vertex is onneted to an arbitrary number of neighbor verties. Unstrutured meshes impose fewer topologial restritions on the user, and as a result, make it easier to mesh very omplex geometries Conformal and Non-Conformal Meshes An example of a non-onformal mesh is shown in Figure 2.7. Here, the verties of a ell or element may fall on the faes of neighboring ells or elements. In ontrast, the meshes in Figures 2.3,2.5 and 2.6 are onformal meshes Cell Shapes Meshes may be onstruted using a variety of ell shapes. The most widely used are quadrilaterals and hexahedra. Methods for generating good-quality strutured meshes for quadrilaterals and hexahedra have existed for some time now. Though mesh struture imposes restritions, strutured quadrilaterals and hexahedra are well-suited for flows with a dominant diretion, suh as boundary-layer flows. More reently, as omputational fluid dynamis is beoming more widely used for analyzing industrial flows, unstrutured meshes are beoming neessary to handle omplex geometries. Here, triangles and tetrahedra are inreasingly being used, and mesh generation tehniques for their generation are rapidly reahing maturity. As of this writing, there are no general 25

26 Cell Vertex Figure 2.6: Unstrutured Mesh 26

27 Figure 2.7: Non-Conformal Mesh 27

28 (a) (b) () (d) (e) (f) Figure 2.8: Cell Shapes: (a) Triangle, (b) Tetrahedron, () Quadrilateral, (d) Hexahedron, (e) Prism, and (f) Pyramid purpose tehniques for generating unstrutured hexahedra. Another reent trend is the use of hybrid meshes. For example, prisms are used in boundary layers, transitioning to tetrahedra in the free-stream. In this book, we will develop numerial methods apable of using all these ell shapes Node-Based and Cell-Based Shemes Numerial methods whih store their primary unknowns at the node or vertex loations are alled node-based or vertex-based shemes. Those whih store them at the ell entroid, or assoiate them with the ell, are alled ell-based shemes. Finite element methods are typially node-based shemes, and many finite volume methods are ell-based. For strutured and blok-strutured meshes omposed of quadrilaterals or hexahedra, the number of ells is approximately equal to the number of nodes, and the spatial resolution of both storage shemes is similar for the same mesh. For other ell shapes, there may be quite a big differene in the number of nodes and ells in the mesh. For triangles, for example, there are twie as many ells as nodes, on average. This fat must be taken into aount in deiding whether a given mesh provides adequate resolution for a given problem. From the point of view of developing numerial methods, both shemes have advantages and disadvantages, and the hoie will depend 28

29 " Flow Triangles Boundary Layer Quadrilaterals Figure 2.9: Hybrid Mesh in Boundary Layer on what we wish to ahieve. 2.3 Disretization Methods So far, we have alluded to the disretization method, but have not said speifially what method we will use to onvert our general transport equation to a set of disrete algebrai equations. A number of popular methods are available for doing this Finite Differene Methods Finite differene methods approximate the derivatives in the governing differential equation using trunated Taylor series expansions. Consider a one-dimensional salar transport equation with a onstant diffusion oeffiient and no unsteady or onvetive terms: Γ d2 φ dx 2 S 0 (2.1) We wish to disretize the diffusion term. Referring to the one-dimensional mesh shown in Figure 2.10, we write φ 1 φ 2 x dφ dx 2 x 2 2 d 2 φ dx 2 O x 3 (2.2) 2 and φ 3 φ 2 x dφ dx 2 x 2 2 d 2 φ dx 2 O x 3 (2.3) 2 The term O + x 3 indiates that the terms that follow have a dependene on x n where n 3. Subtrating Equations 2.2 from Equation 2.3 gives dφ dx 2 φ 3 φ 1 2 x O 0 x 2 (2.4) By adding the two equations together, we an write d 2 φ dx 2 2 φ 1 φ 3 2φ 2 x 2 O + x 2 (2.5) 29

30 1 2 3 x x Figure 2.10: One-Dimensional Mesh By inluding the diffusion oeffiient and dropping terms of O + x 2 or smaller, we an write The soure term S is evaluated at the point 2 using Γ d 2 φ dx 2 Γ φ 1 φ 3 2φ 2 2 x 2 (2.6) S 2 S φ 2 (2.7) Substituting Equations 2.6 and 2.7 into Equation 2.1 gives the equation 2Γ x 2 φ 2 Γ x 2 φ 1 Γ x 2 φ 3 S 2 (2.8) This is the disrete form of Equation 2.1. By obtaining an equation like this for every point in the mesh, we obtain an set of algebrai equations in the disrete values of φ. This equation set may be solved by a variety of methods whih we will disuss later in the book. Finite differene methods do not expliitly exploit the onservation priniple in deriving disrete equations. Though they yield disrete equations that look similar to other methods for simple ases, they are not guaranteed to do so in more ompliated ases, for example on unstrutured meshes Finite Element Methods We onsider again the one-dimensional diffusion equation, Equation 2.1. There are different kinds of finite element methods. Let us look at a popular variant, the Galerkin finite element method. Let φ be an approximation to φ. Sine φ is only an approximation, it does not satisfy Equation 2.1 exatly, so that there is a residual R: We wish to find a φ suh that d 2 φ dx 2 S R (2.9) W Rdx ) 0 (2.10) domain W is a weight funtion, and Equation 2.10 requires that the residual R beome zero in a weighted sense. In order to generate a set of disrete equations we use a family of 30

31 ) ) ) weight funtions W i, i 1 2+*,*,* N, where N is the number of grid points, rather than a single weight funtion. Thus, we require W ) i Rdx 0 i 1 2+*,*1* N (2.11) domain The weight funtions W i are typially loal in that they are non-zero over element i, but are zero everywhere else in the domain. Further, we assume a shape funtion for φ, i.e., assume how φ varies between nodes. Typially this variation is also loal. For example we may assume that φ assumes a piee-wise linear profile between points 1 and 2 and between points 2 and 3 in Figure The Galerkin finite element method requires that the weight and shape funtions be the same. Performing the integration in Equation 2.11 results in a set of algebrai equations in the nodal values of φ whih may be solved by a variety of methods. We should note here that beause the Galerkin finite element method only requires the residual to be zero in some weighted sense, it does not enfore the onservation priniple in its original form. We now turn to a method whih employs onservation as a tool for developing disrete equations Finite Volume Method The finite volume method (sometimes alled the ontrol volume method) divides the domain in to a finite number of non-overlapping ells or ontrol volumes over whih onservation of φ is enfored in a disrete sense. It is possible to start the disretization proess with a diret statement of onservation on the ontrol volume, as in Equation 1.9 in the previous hapter. Alternatively we may start with the differential equation and integrate it over the ontrol volume. Let us examine the disretization proess by looking at one-dimensional diffusion with a soure term: d dx Γdφ dx S 0 (2.12) Consider a one-dimensional mesh, with ells as shown in Figure Let us store disrete values of φ at ell entroids, denoted by W, P and E. The ell faes are denoted by w and e. Let us assume the fae areas to be unity. We fous on the ell assoiated with P. We start by integrating Equation 2.12 over the ell P. This yields w e d dx Γdφ dx dx w e Sdx 0 (2.13) so that Γ dφ dx e Γ dφ dx w w e Sdx 0 (2.14) We note that this equation an also be obtained by writing a heat balane over the ell P from first priniples. Thus far, we have made no approximation. 31

32 x W P E e w δ x w δ x e Figure 2.11: Arrangement of Control Volumes We now make a profile assumption, i.e., we make an assumption about how φ varies between ell entroids. If we assume that φ varies linearly between ell entroids, we may write Γ e φ E φ P Γ w φ P φ W δx e δx w S x 0 (2.15) Here S is the average value of S in the ontrol volume. We note that the above equation is no longer exat beause of the approximation in assuming that φ varies in a pieewise linear fashion between grid points. Colleting terms, we obtain where a P φ P a E φ E a W φ W b (2.16) a E Γ e a W Γ w δx e δx w a P a E a W b S x (2.17) Equations similar to Equation 2.16 may be derived for all ells in the domain, yielding a set of algebrai equations, as before; these may be solved using a variety of diret or iterative methods. We note the following about the disretization proess. 1. The proess starts with the statement of onservation over the ell. We then find ell values of φ whih satisfy this onservation statement. Thus onservation is guaranteed for eah ell, regardless of mesh size. 32

33 2. Conservation does not guarantee auray, however. The solution for φ may be inaurate, but onservative. 3. The quantity Γdφ dx e is diffusion flux on the e fae. The ell balane is written in terms of fae fluxes. The gradient of φ must therefore be evaluated at the faes of the ell. 4. The profile assumptions for φ and S need not be the same. We will examine additional properties of this disretization in the next hapter. 2.4 Solution of Disretization Equations All the disretization methods desribed here result in a set of disrete algebrai equations whih must be solved to obtain the disrete values of φ. These equations may be linear (i.e. the oeffiients are independent of φ) or they may be non-linear (i.e. the oeffiients are funtions of φ). The solution tehniques are independent of the disretization method, and represent the path to solution. For the linear algebrai sets we will enounter in this book, we are guaranteed that there is only one solution, and if our solution method gives us a solution, it is the solution we want. All solution methods (i.e. all paths to solution) whih arrive at a solution will give us the same solution for the same set of disrete equations. For non-linear problems, we do not have this guarantee, and the answer we get may depend on fators like the initial guess, and the atual path to solution. Though this is an important issue in omputing fluid flows, we will not address it here. Solution methods may be broadly lassified as diret or iterative. We onsider eah briefly below Diret Methods Using one of the disretization methods desribed previously, we may write the resulting system of algebrai equations as Aφ B (2.18) where A is the oeffiient matrix, φ 32 φ 1 φ 2 +*,*,* 4 T is a vetor onsisting of the disrete values of φ, and B is the vetor resulting from the soure terms. Diret methods solve the equation set 2.18 using the methods of linear algebra. The simplest diret method is inversion, whereby φ is omputed from φ A5 1 B (2.19) A solution for φ is guaranteed if A5 1 an be found. However, the operation ount for the inversion of an N N matrix is O N 2. Consequently, inversion is almost never employed in pratial problems. More effiient methods for linear systems are available. For the disretization methods of interest here, A is sparse, and for strutured meshes it is banded. For ertain types of equations, for example, for pure diffusion, the 33

34 matrix is symmetri. Matrix manipulation an take into aount the speial struture of A in devising effiient solution tehniques for Equation We will study one suh method, the tri-diagonal matrix algorithm (TDMA), in a later hapter. Diret methods are not widely used in omputational fluid dynamis beause of large omputational and storage requirements. Most industrial CFD problems today involve hundreds of thousands of ells, with 5-10 unknowns per ell even for simple problems. Thus the matrix A is usually very large, and most diret methods beome impratial for these large problems. Furthermore, the matrix A is usually non-linear, so that the diret method must be embedded within an iterative loop to update nonlinearities in A. Thus, the diret method is applied over and over again, making it all the more time-onsuming Iterative Methods Iterative methods are the most widely used solution methods in omputational fluid dynamis. These methods employ a guess-and-orret philosophy whih progressively improves the guessed solution by repeated appliation of the disrete equations. Let us onsider an extremely simple iterative method, the Gauss-Seidel method. The overall solution loop for the Gauss-Seidel method may be written as follows: 1. Guess the disrete values of φ at all grid points in the domain. 2. Visit eah grid point in turn. Update φ using φ P a E φ E a W φ W b a P (2.20) The neighbor values, φ E and φ W are required for the update of φ P. These are assumed known at prevailing values. Thus, points whih have already been visited will have reently updated values of φ and those that have not will have old values. 3. Sweep the domain until all grid points are overed. This ompletes one iteration. 4. Chek if an appropriate onvergene riterion is met. We may, for example, require that the maximum hange in the grid-point values of φ be less than 0* 1 %. If the riterion is met, stop. Else, go to step 2. The iteration proedure desribed here is not guaranteed to onverge to a solution for arbitrary ombinations of a P, a E and a W. Convergene of the proess is guaranteed for linear problems if the Sarborough riterion is satisfied. The Sarborough riterion requires that ae aw ap. 1 for all grid points 1 for at least one grid point (2.21) Matries whih satisfy the Sarborough riterion have diagonal dominane. We note that diret methods do not require the Sarborough riterion to be satisfied to obtain a 34

35 solution; we an always obtain a solution to our linear set of equations as long as our oeffiient matrix is not singular. The Gauss-Seidel sheme an be implemented with very little storage. All that is required is storage for the disrete values of φ at the grid points. The oeffiients a P, a E, a W and b an be omputed on the fly if desired, sine the entire oeffiient matrix for the domain is not required when updating the value of φ at any grid point. Also, the iterative nature of the sheme makes it partiularly suitable for non-linear problems. If the oeffiients depend on φ, they may be updated using prevailing values of φ as the iterations proeed. Nevertheless, the Gauss-Seidel sheme is rarely used in pratie for solving the systems enountered in CFD. The rate of onvergene of the sheme dereases to unaeptably low levels if the system of equations is large. In a later hapter, we will use a multigrid method to aelerate the rate of onvergene of this sheme and make it usable as a pratial tool. 2.5 Auray, Consisteny, Stability and Convergene In this setion, we turn to ertain important properties of numerial methods Auray Auray refers to the orretness of a numerial solution when ompared to an exat solution. In most ases, we do not know the exat solution. It is therefore more useful to talk of the trunation error of a disretization method. The trunation error assoiated with the diffusion term using the finite differene method is O + x 2, as shown by Equation 2.5.This simply says that if d 2 φ dx 2 is represented by the first term in Equation 2.5, the terms that are negleted are of O + x 2. Thus, if we refine the mesh, we expet the trunation error to derease as x 2. If we double the x-diretion mesh, we expet the trunation error to derease by a fator of four. The trunation error of a disretization sheme is the largest trunation error of eah of the individual terms in the equation being disretized. The order of a disretization method is n if its trunation error is O 0 x n. It is important to understand that the trunation error tells us how fast the error will derease with mesh refinement, but is not an indiator of how high the error is on the urrent mesh. Thus, even methods of very high order may yield inaurate results on a given mesh. However, we are guaranteed that the error will derease more rapidly with mesh refinement than with a disretization method of lower order Consisteny A onsistent numerial method is one for whih the trunation error tends to vanish as the mesh beomes finer and finer. (For unsteady problems, both spatial and temporal trunation errors must be onsidered). We are guaranteed this if the trunation error is some power of the mesh spaing x (or t). Sometimes we may ome aross shemes 35

36 where the trunation error of the method is O x t. Here, onsisteny is not guaranteed unless x is dereased faster than t. Consisteny is a very important property. Without it, we have no guarantee that mesh refinement will improve our solution Stability The previous two properties refer to the behavior of the disretization method. Stability is a property of the path to solution. For steady state problems, for example, we obtain a disretized set of algebrai equations whih must be solved. We may hoose to solve this set using an iterative method. Depending on the properties of the method, solution errors may be amplified or damped. An iterative solution method is unstable or divergent if it fails to yield a solution to the disrete set. It is also possible to speak of the stability of time-marhing shemes. When solving unsteady problems, we will use numerial methods whih ompute the solution at disrete instants of time, using the solution at one or more previous time steps as initial onditions. Stability analysis allow us to determine whether errors in the solution remain bounded as time marhing proeeds. An unstable time-marhing sheme would not be able to reah steady state in an unsteady heat ondution problem, for example (assuming that a steady state exists). It is possible to analyze iterative and time marhing methods using stability analysis. However, this is most onvenient for linear problems, and is usually too diffiult for most realisti problems. Here, non-linearities in the governing equations, boundary onditions, and properties, as well as oupling between multiple governing equations, make a formal analysis diffiult. In reality the pratitioner of CFD must rely on experiene and intuition in devising stable solution methods Convergene We distinguish between two popular usages of the term onvergene. We may say that an iterative method has onverged to a solution, or that we have obtained onvergene using a partiular method. By this we mean that our iterative method has suessfully obtained a solution to our disrete algebrai equation set. We may also speak of onvergene to mesh independene. By this, we mean the proess of mesh refinement, and its use in obtaining solutions that are essentially invariant with further refinement. We shall use the term in both senses in this book. 2.6 Closure In this hapter, we have presented a broad overview of disretization and introdued terminology assoiated with numerial methods. We have learned that there are a number of different philosophies for disretizing the salar transport equation. Of these, only the finite volume method enfores onservation on eah ell, and thus ensures that both loal and global onservation are guaranteed no matter how oarse the mesh. In the next hapter, we onsider the finite volume method in more detail, and study the properties of the disretizations it produes when applied to diffusion problems. 36

37 Chapter 3 The Diffusion Equation: A First Look In this hapter we turn our attention to an important physial proess, namely diffusion. Diffusion operators are ommon in heat, mass and momentum transfer and an also be used to model eletrostatis, radiation, and other physis. We onsider the disretization and solution of the salar transport equation for both steady and unsteady diffusion problems. We will attempt to relate the properties of our disrete equations with the behavior of the anonial partial differential equations we studied previously. The methodology we develop in this hapter will allow us to examine more ompliated mesh types and physis in later hapters. 3.1 Two-Dimensional Diffusion in Retangular Domain Let us onsider the steady two-dimensional diffusion of a salar φ in a retangular domain. From Equation 1.10, the governing salar transport equation may be written as J S (3.1) where J J x i J y j is the diffusion flux vetor and is given by In Cartesian geometries, the gradient operator is given by J Γ φ (3.2) x i y j (3.3) We note that Equation 3.1 is written in onservative or divergene form. When Γ is onstant and S is zero, the equation defaults to the familiar Laplae equation. When Γ is onstant and S is non-zero, the Poisson equation is obtained. 37

38 N A n δ y n W A w P A e E y A s δ y s S δ x w δ x e x Figure 3.1: Two-Dimensional Control Volume 38

39 3.1.1 Disretization The arrangement of ells under onsideration is shown in Figure 3.1. As in the previous hapter, we fous on ell P and its neighbors, the ells E, W, N and S. Disrete values of φ are stored at ell entroids. We also store the diffusion oeffiient Γ at ell entroids. The faes e,w, n and s are assoiated with area vetors A e, A w, A n and A s. The vetors are positive pointing outwards from the ell P. The volume of the ell P is 7 x y. We begin the proess of disretization by integrating Equation 3.1 over the ell P: ) 8 Jd 9 Next, we apply the divergene theorem to yield J ) da A ) 8 ) 8 Sd (3.4) Sd (3.5) The first integral represents the integral over the ontrol surfae A of the ell. We have made no approximations thus far. We now make a profile assumption about the flux vetor J. We assume that J varies linearly over eah fae of the ell P, so that it may be represented by its value at the fae entroid. We also assume that the mean value of the soure term S over the ontrol volume is S. Thus, or, more ompatly J A e J A w The fae areas A e and A w are given by J A n J A s S (3.6) J f A f S (3.7) f' e w n s A e y i The other area vetors may be written analogously. Further A w y i (3.8) J e A e Γ e y J w A w Γ w y φ x e φ x w (3.9) The transport in the other diretions may be written analogously. In order to omplete the disretization proess, we make one more round of profile assumptions. We assume that φ varies linearly between ell entroids. Thus, Equation 3.9 may be written as J e A e Γ e y φ E φ P δx e J w A w Γ w y φ P φ W δx w 39 (3.10)

40 Similar expressions may be written for the other fluxes. Let us assume that the soure term S has the form S S C S P φ (3.11) with S P. 0. We say that S has been linearized. We will see later how general forms of S an be written in this way. We write the volume-averaged soure term S in the ell P as S S C S P φ P (3.12) Substituting Equations 3.10, 3.8 and 3.12 into Equation 3.6 yields a disrete equation for φ P : a P φ P a E φ E a W φ W a N φ N a S φ S b (3.13) where a E a W a N a S Γ e y δx e Γ w y δx w Γ n x δy n Γ s x δy s a P a E a W a N a S S P x y b S C x y (3.14) Equation 3.13 may be written in a more ompat form as a P φ P a nb φ nb b (3.15) nb Here, the subsript nb denotes the ell neighbors E, W, N, and S Disussion We make the following important points about the disretization we have done so far: 1. The disrete equation expresses a balane of disrete flux (the J s) and the soure term. Thus onservation over individual ontrol volumes is guaranteed. However, overall onservation in the alulation domain is not guaranteed unless the diffusion transfer from one ell enters the next ell. For example, in writing the balane for ell E, we must ensure that the flux used on the fae e is J e, and that it is disretized exatly as in Equation The oeffiients a P and a nb are all of the same sign. In our ase they are all positive. This has physial meaning. If the temperature at E is inreased, we would expet the temperature at P to inrease, not derease. (The solution to our ellipti partial differential equation also has this property). Many higher order shemes do not have this property. This does not mean these shemes are wrong it means they do not have a property we would like to have if at all possible. 40

41 3. We require that S P in Equation 3.11 be negative. This also has physial meaning. If for example S is a temperature soure, we do not want a situation where as T inreases, S inreases indefinitely. We ontrol this behavior in the numerial sheme by insisting that S P be kept negative. 4. When S P 0, we have Equation 3.13 may then be written as a P a nb (3.16) nb φ P nb a nb a P φ nb (3.17) where nb a nb a P : 1. Sine φ P is the weighted sum of its neighbor values, it is always bounded by them. By extension, φ P is always bounded by the boundary values of φ. We notie that this property is also shared by our anonial ellipti equation. When S ; 0, φ P need not be bounded in this manner, and an overshoot or undershoot its boundary values, but this is perfetly physial. The amount of overshoot is determined by the magnitude of S C and S P with respet to the a nb s. 5. If S P 0 and a P nb a nb, we notie that φ and φ C are solutions to Equation This is also true of the original differential equation, Equation 3.1. The solution an be made unique by speifying boundary onditions on φ whih fix the value of φ at some point on the boundary. 3.2 Boundary Conditions A typial boundary ontrol volume is shown in Figure 3.2. A boundary ontrol volume is one whih has one or more faes on the boundary. Disrete values of φ are stored at ell entroids, as before. In addition, we store disrete values of φ at the entroids of boundary faes. Let us onsider the disretization proess for a near-boundary ontrol volume entered about the ell entroid P with a fae on the boundary. The boundary fae entroid is denoted by b. The fae area vetor of the boundary fae is A b, and points outward from the ell P as shown. Integrating the governing transport equation over the ell P as before yields J A b J A e J A n J A s S (3.18) The fluxes on the interior faes are disretized as before. The boundary area vetor A b is given by A b y i (3.19) Let us assume that the boundary flux J b is given by the boundary fae entroid value. Thus J b Γ b φ b (3.20) 41

42 A b b δx b P e E Figure 3.2: Boundary Control Volume so that J b A b yγ b φ b (3.21) Assuming that φ varies linearly between b and P, we write J b A b yγ b φ P φ b δx b (3.22) The speifiation of boundary onditions involves either speifying the unknown boundary value φ b, or alternatively, the boundary flux J b. Let us onsider some ommon boundary onditions next Dirihlet Boundary Condition The boundary ondition is given by φ b φ b given (3.23) Using φ b given in Equation 3.22, and inluding J b A b in Equation 3.18 yields the following disrete equation for boundary ell P: a P φ P a E φ E a N φ N a S φ S b (3.24) 42

43 where a E a N a S Γ e y δx e Γ n x δy n Γ s x δy s Γ a b b y δx b a P a E a N a S a b S P x y b a b φ b S C x y (3.25) We note the following important points about the above disretization: " 1. At Dirihlet boundaries, a P a E a N a S. This property ensures that the Sarborough riterion is satisfied for problems with Dirihlet boundary onditions. 2. φ P is guaranteed to be bounded by the values of φ E, φ N, φ S and φ b if S C and S P are zero. This is in keeping with the behavior of the anonial ellipti partial differential equation we enountered earlier Neumann Boundary Condition Here, we are given the normal gradient of φ at the boundary: We are in effet given the flux J b at Neumann boundaries: Γ φ b i q b given (3.26) J b A b q b given y (3.27) We may thus inlude q b given y diretly in Equation 3.18 to yield the following disrete equation for the boundary ell P: where a P φ P a E φ E a N φ N a S φ S b (3.28) a E a N a S Γ e y δx e Γ n x δy n Γ s x δy s a P a E a N a S S P x y b q b given y S C x y (3.29) We note the following about the disretization at the boundary ell P: 43

44 1. a P a E a N a S at Neumann boundaries if S If both q b given and S are zero, φ P is bounded by its neighbors. Otherwise, φ P an exeed (or fall below) the neighbor values of φ. This is admissible. If heat were being added at the boundary, for example, we would expet the temperature in the region lose to the boundary to be higher than that in the interior. 3. One φ P is omputed, the boundary value, φ b may be omputed using Equation 3.22: φ b q b given Γ b δx b φ P Γ b δx b (3.30) Mixed Boundary Condition The mixed boundary ondition is given by Sine A b yi, we are given that Γ φ b i h b φ φ (3.31) J b A b h b φ φ y (3.32) Using Equation 3.22 we may write Γ b φ P φ b δx b h b φ φ b (3.33) We may thus write φ b as φ b h b φ h b Γ b δx b φ P Γ b δx b (3.34) Using Equation 3.34 to eliminate φ b from Equation 3.33 we may write J b A b R eq φ φ P y (3.35) where R eq h b Γ b δx b Γ b δx b h b (3.36) We are now ready to write the disretization equation for the boundary ontrol volume P. Substituting the boundary flux from Equation 3.35 into Equation 3.18 given the following disrete equation for φ P : a P φ P a E φ E a N φ N a S φ S b (3.37) 44

45 where a E a N a S Γ e y δx e Γ n x δy n Γ s x δy s a b R eq y a P a E a N a S a b S P x y b R eq yφ S C x y (3.38) We note the following about the above disretization: " 1. a P a E a N a S for the boundary ell P if S 0. Thus, mixed boundaries are like Dirihlet boundaries in that the boundary ondition helps ensure that the Sarborough riterion is met. 2. The ell value φ P is bounded by its neighbor values φ E, φ N and φ S, and the external value, φ. 3. The boundary value, φ b, may be omputed from Equation 3.34 one a solution has been obtained. It is bounded by φ P and φ, as shown by Equation Unsteady Condution Let us now onsider the unsteady ounterpart of Equation 3.1: t ρφ J S (3.39) We are given initial onditions φ x y 0. As we saw in a previous hapter, time is a marhing oordinate. By knowing the initial ondition, and taking disrete time steps t, we wish to obtain the solution for φ at a eah disrete time instant. In order to disretize Equation 3.39, we integrate it over the ontrol volume as usual. We also integrate it over the time step t, i.e., from t to t t. ) t ) 8 t ρφ d dt ) t ) 8 Jd dt Applying the divergene theorem as before, we obtain ) 8 ρφ 1 0 ρφ d 3 J ) t ) dadt A ) t ) 8 ) t ) 8 Sd dt (3.40) Sd dt (3.41) The supersripts 1 and 0 in the first integral denote the values at the times t t and t respetively. Let us onsider eah term in turn. If we assume that ) 8 ρφ d < 45 ρφ P (3.42)

46 we may write the unsteady term as ρφ 1 P ρφ 0 P (3.43) We now turn to the flux term. If we assume as before that the flux on a fae is represented by its entroid value, we may write the term as ) J f A f dt (3.44) t f' e w n s We are now required to make a profile assumption about how the flux J varies with time. Let us assume that it an be interpolated between time instants t t and t using a fator f between zero and one: J ) Adt t f J 1 A 1 f J 0 A t (3.45) Proeeding as before, making linear profile assumptions for φ between grid points, we may write and J 1 e A e Γ e y φ E 1 φ P 1 δx e J 1 w A w Γ w y φ P 1 φ W 1 δx w J 0 e A e Γ e y φ E 0 φ P 0 δx e J 0 w A w Γ w y φ P 0 φ W 0 δx w (3.46) (3.47) Let us now examine the soure term. Linearizing S as S C S P φ and further assuming that we have ) 8 ) t ) 8 S C S P φ d 9 Sd dt ) t S C S P φ P (3.48) S C S P φ P dt (3.49) Again, interpolating S between t t and t using a weighting fator f between zero and one: ) t S C S P φ P dt 1 f S C S P φ P t 1 f S C S P φ P 0 t (3.50) For simpliity, let us drop the supersript 1 and let the un-supersripted value represent the value at time t t. The values at time t are represented as before with the supersript 0. Colleting terms and dividing through by t, we obtain the following disrete equation for φ: a P φ P a nb nb f φ nb 1 f φ 0 nb b 9= a 0 P 46 1 f a nb> φp 0 (3.51) nb

47 where nb denotes E,W, N and S. Further a E a W a N a S a 0 P Γ e y δx e Γ w y δx w Γ n x δy n Γ s x δy s ρ t a P f a nb f S P? a 0 P b nb f S C 1 f S 0 C 1 f S 0 Pφ 0 P (3.52) It is useful to examine the behavior of Equation 3.51 for a few limiting ases The Expliit Sheme If we set f 0, we obtain the expliit sheme. This means that the flux and soure terms are evaluated using values exlusively from the previous time step. In this limit, we obtain the following disrete equations: and a P φ P a nb φnb 0 b nb a E a W a N a S a 0 P Γ e y a P a 0 P b δx e Γ w y δx w Γ n x δy n Γ s x δy s ρ t We notie the following about the disretization: = a 0 P a nb> φp 0 (3.53) nb S 0 C S 0 Pφ 0 P (3.54) 1. The right hand side of Equation 3.53 ontains values exlusively from the previous time t. Thus, given the ondition at time t, it is possible for us to evaluate the right hand side ompletely, and find the value of φ P at time t t. 47

48 2. We do not need to solve a set of linear algebrai equations to find φ P. 3. When t, we see that the disrete equation for steady state is reovered. This is also true when steady state is reahed through time marhing, i.e., when φ P φp 0. Thus, we are assured that our solution upon reahing steady state is the same as that we would have obtained if we had solved a steady problem in the first plae. 4. The expliit sheme orresponds to the assumption that φ P 0 prevails over the entire time step. 5. We will see later in the hapter that the expliit sheme has a trunation error of O t. Thus, the error redues only linearly with time-step refinement. This type of sheme is very simple and onvenient, and is frequently used in CFD pratie. However, it suffers from a serious drawbak. We see that the term multiplying φ 0 P an beome negative when a 0 P a nb (3.55) nb When a 0 P nb a nb, we see that an inrease in φ at the previous time instant an ause a derease in φ at the urrent instant. This type of behavior is not possible with a paraboli partial differential equation. We an avoid this by requiring a 0 P - nb a nb. For a uniform mesh, and onstant properties, this restrition an be shown, for one-, two- and three-dimensional ases to be, respetively t. ρ x 2 2Γ (3.56) and t. t. ρ x 2 4Γ ρ x 2 6Γ (3.57) (3.58) This ondition is sometimes alled the von Neumann stability riterion in the literature. It requires that the forward time step be limited by the square of the mesh size. This dependene on x 2 is very restritive in pratie. It requires us to take smaller and smaller time steps as our mesh is refined, leading to very long omputational times The Fully-Impliit Sheme The fully-impliit sheme is obtained by setting f 1 in Equation In this limit, we obtain the following disrete equation for φ P. a P φ P a nb φ nb b a 0 PφP 0 (3.59) nb 48

49 with a E a W a N a S a 0 P Γ e y δx e Γ w y δx w Γ n x δy n Γ s x δy s ρ t a P a nb S P? a 0 P nb b S C (3.60) We note the following important points about the impliit sheme: 1. In the absene of soure terms, a P nb a nb a 0 P. Beause of this property, we are guaranteed that φ P is bounded by the values of its spatial neighbors at t t and by the value at point P at the previous time. This is in keeping with the behavior of anonial paraboli partial differential equation. We may onsider φp 0 to be the time neighbor of φ P. Also, the Sarborough riterion is satisfied. 2. The solution at time t t requires the solution of a set of algebrai equations. 3. As with the expliit sheme, as t, we reover the disrete equations governing steady state diffusion. Also, if we reah steady state by time marhing, i.e., φ 0 P φ P, we reover the disrete algebrai set governing steady diffusion. 4. The fully-impliit sheme orresponds to assuming that φ P prevails over the entire time step. 5. There is no time step restrition on the fully-impliit sheme. We an take as big a time step as we wish without getting an unrealisti φ P. However, physial plausibility does not imply auray it is possible to get plausible but inaurate answers if our time steps are too big. 6. We will see later in this hapter that the trunation error of the fully-impliit sheme is O t, i.e., it is a first-order aurate sheme. Though the oeffiients it produes have useful properties, the rate of error redution with time step is rather slow. 49

50 3.3.3 The Crank-Niholson Sheme The Crank-Niholson Sheme is obtained by setting f 0* 5. With this value of f, our disrete equation beomes with a P φ P a nb nb a E a W a N a S 0* 5φ nb 0* 5φnb 0 a 0 P 0* 5 a nb> φp 0 (3.61) nb Γ e y δx e Γ w y δx w Γ n x δy n Γ s x δy s a 0 P ρ t a P 0* 5 a nb 0* 5S P A a 0 P nb b 0* 5 S C SC 0 S 0 PφP 0 (3.62) We note the following about the Crank-Niholson sheme: 1. For a 0 P 0* 5 nb a nb the term multiplying φ 0 P beomes negative, leading to the possibility of unphysial solutions. Indeed, any value of f different from one will have this property. 2. The Crank-Niholson sheme essentially makes a linear assumption about the variation of φ P with time between t and t t. We will see later in this hapter that though this leads to a possibility of negative oeffiients for large time steps, the sheme has a trunation error of O + t 2. Consequently, if used with are, the error in the our solutions an be redued more rapidly with time-step refinement than the other shemes we have enountered thus far. 3.4 Diffusion in Polar Geometries Sine Equation 3.1 is written in vetor form, it may be used to desribe diffusive transport in other oordinate systems as well. Indeed muh of our derivation thus far an be applied with little hange to other systems. Let us onsider two-dimensional polar geometries next. A typial ontrol volume is shown in Figure 3.3. The ontrol volume is loated in the r θ plane and is bounded by surfaes of onstant r and θ. The grid point P is loated at the ell entroid. The volume of the ontrol volume is B r P θ r. 50

51 δ θw δ θe δ r n n N W w P δ r s e E s r S e r θ e θ Figure 3.3: Control Volume in Polar Geometry We assume φ x 0, so that all transport is onfined to the r θ plane. We also assume steady diffusion, though the unsteady ounterpart is easily derived. Integrating Equation 3.1 over the ontrol volume as before, and applying the divergene theorem yields Equation 3.6: J A e The fae area vetors are given by J A w J A n J A s S (3.63) We reall that the diffusive flux J is given by A e r e θ e A w r e θ w A n r n θ e r A s r s θ e r (3.64) J Γ φ (3.65) For polar geometries the gradient operator is given by r e r 51 1 r θ e θ (3.66)

52 Thus the fluxes on the faes are given by J e A e Γ e r 1 r e J w A w Γ w r 1 r w J n A n Γ n r n θ J s A s Γ s r s θ φ θ e φ θ w φ r n φ r s (3.67) Assuming that φ varies linearly between grid points yields J e A e Γ e r φ E φ P r e δθ e J w A w Γ w r φ P φ W r w δθ w J n A n Γ n r n θ φ N φ P δr n J s A s Γ s r s θ φ P φ S δr s (3.68) The soure term may be written as S C S P φ P (3.69) Colleting terms, we may write the disrete equation for the ell P as where a P φ P a E φ E a W φ W a N φ N a S φ S b (3.70) a E a W a N a S Γ e r r e δθ e Γ w r r w δθ w Γ n r n θ δr n Γ s r s θ δr s a P a E a W a N a S S P b S C (3.71) We note the following about the above disretization: 52

53 1. Regardless of the shape of the ontrol volume, the basi proess is the same. The integration of the onservation equation over the ontrol volume and the appliation of the divergene theorem results in a ontrol volume balane equation, regardless of the shape of the ontrol volume. 2. The only differenes are in the form of the fae area vetors and the gradient operator for the oordinate system. The latter manifests itself in the expressions for the distanes between grid points. 3. The polar oordinate system is orthogonal, i.e., e r and e θ are always perpendiular to eah other. Beause the ontrol volume faes are aligned with the oordinate diretions, the line joining the ell entroids (P and E, for example) is perpendiular the fae (e, for example). As a result, the flux normal to the fae an be written purely in terms of the ell entroid φ values for the two ells sharing the fae. We will see in the next hapter that additional terms appear when the mesh is non-orthogonal, i.e., when the line joining the ell entroids is not perpendiular to the fae. 3.5 Diffusion in Axisymmetri Geometries A similar proedure an be used to derive the disrete equation for axisymmetri geometries. We assume steady ondution. Sine the problem is axisymmetri, φ θ 0. A typial ontrol volume is shown in Figure 3.4, and is loated in the r x plane. The grid point P is loated at the ell entroid. The volume of the ontrol volume is 9 r P r x. The fae area vetors are given by A e r e r i A w r w r i A n r n x e r A s r s x e r (3.72) For axisymmetri geometries the gradient operator is given by Thus the fluxes on the faes are given by r e r J e A e Γ e r e r J w A w Γ w r w r J n A n Γ n r n x J s A s Γ s r s x 53 x i (3.73) φ x e φ x w φ r n φ r s (3.74)

54 N n δ r n W w P e E r δ r s s S x e r i r x Figure 3.4: Control Volume in Axisymmetri Geometry Assuming that φ varies linearly between grid points yields J e A e Γ e r e r φ E φ P δx e J w A w Γ w r w r φ P φ W δx w J n A n Γ n r n x φ N φ P δr n J s A s Γ s r s x φ P φ S δr s (3.75) The soure term may be written as S C S P φ P (3.76) Colleting terms, we may write the disrete equation for the ell P as a P φ P a E φ E a W φ W a N φ N a S φ S b (3.77) 54

55 where a E a W a N a S Γ e r e r δx e Γ w r w r δx w Γ n r n x δr n Γ s r s x δr s a P a E a W a N a S S P b S C (3.78) 3.6 Finishing Touhes A few issues remain before we have truly finished disretizing our diffusion equation. We deal with these below Interpolation of Γ We notie in our disretization that the diffusion flux is evaluated at the fae of the ontrol volume. As a result, we must speify the fae value of the diffusion oeffiient Γ. Sine we store Γ at ell entroids, we must find a way to interpolate Γ to the fae. Referring to the notation in Figure 3.5, it is possible to simple interpolate Γ linearly as: where Γ e f e Γ P f e 1 f e Γ E (3.79) 0* 5 x E δx e (3.80) As long as Γ e is smoothly varying, this is a perfetly adequate interpolation. When φ is used to represent energy or temperature, step jumps in Γ may be enountered at onjugate boundaries. It is useful to devise an interpolation proedure whih aounts for these jumps. Our desire is to represent the interfae flux orretly. Let J e be the magnitude of the flux vetor J e. Let us assume loally one-dimensional diffusion. In this limit, we may write J e φ E φ P (3.81) 0* 5 x P 0 Γ P 0* 5 x E 0 Γ E Thus, an equivalent interfae diffusion oeffiient may be defined as δx e Γ e 0* 5 x P Γ P 55 0* 5 x E Γ E (3.82)

56 δ x e P J e E e x P x E Figure 3.5: Diffusion Transport at Conjugate Boundaries The term δx e Γ e may be seen as a resistane to the diffusion transfer between P and E. We may write Γ e as Γ e C 1 f e Γ P f e Γ E 5 1 (3.83) Equation 3.83 represents a harmoni mean interpolation for Γ. The properties of this interpolation may be better understood if we onsider the ase f e 0* 5, i.e., the fae e lies midway between P and E. In this ase, Γ e 2Γ P Γ E Γ P Γ E (3.84) In the limit Γ P D Γ E, we get Γ e 2Γ E. This is as expeted sine the high-diffusion oeffiient region does not offer any resistane, and the effetive resistane is that offered by the ell E, orresponding to a distane of 0* 5 x E. It is important to realize that the use of harmoni mean interpolation for disontinuous diffusion oeffiients is exat only for one-dimensional diffusion. Nevertheless, its use for multi-dimensional situations has an important advantage. With this type of interpolation, nothing speial need be done to treat onjugate interfaes. We simply treat solid and fluid ells as a part of the same domain, with different diffusion oeffiients stored at ell entroids. With harmoni-mean interpolation, the disontinuity in temperature gradient at the onjugate interfae is orretly aptured. 56

57 E E Soure Linearization and Treatment of Non-Linearity Our goal is to redue our differential equation to a set of algebrai equations in the disrete values of φ. When the salar transport is non-linear, the resulting algebrai set is also non-linear. Non-linearity an arise from a number of different soures. For example, in diffusion problems, the diffusion oeffiient may be a funtion of φ, suh as in the ase of temperature-dependent thermal ondutivity. The soure term S may also be a funtion of φ. In radiative heat transfer in partiipating media, for example, the soure term in the energy equation ontains fourth powers of the temperature. There are many ways to treat non-linearities. Here, we will treat non-linearities through Piard iteration. In this method, the oeffiients a P, a nb, S C and S P are evaluated using prevailing values of φ. They are updated as φ is updated by iteration. We said previously that the soure term S ould be written in the form S S C S P φ (3.85) We now examine how this an be done when S is a non-linear funtion of φ. Let the prevailing value of φ be alled φ E. This is the value that exists at the urrent iteration. We write a Taylor series expansion for S about its prevailing value SE& S φef : so that S SE! S φ S C SE S P S φ E φ φe (3.86) S φ φe (3.87) Here, S φ GE is the gradient evaluated at the prevailing value φ E. For most problems of interest to us, S φ is negative, resulting in a negative S P. This ensures that the soure tends to derease as φ inreases, providing a stabilizing effet. However, this type of dependene is not always guaranteed. In an explosion or a fire, for example, the appliation of a high temperature (the lighting of a math) auses energy to be released, and inreases the temperature further. (The ounter-measure is provided by the fat that the fuel is eventually onsumed " and the fire burns out). From a numerial viewpoint, a negative S P makes a P nb a nb in our disretization, and allows us to satisfy the Sarborough riterion. It aids in the onvergene of iterative solution tehniques Under-Relaxation When using iterative methods for obtaining solutions or when iterating to resolve nonlinearities, it is frequently neessary to ontrol the rate at whih variables are hanging during iterations. When we have a strong non-linearity in a temperature soure term, for example, and our initial guess is far from the solution, we may get large osillations in the temperature omputed during the first few iterations, making it diffiult for the iteration to proeed. In suh ases, we often employ under-relaxation. 57

58 " " Let the urrent iterate of φ be φ EP. We know that φ P satisfies a P φ P a nb φ nb b (3.88) nb so that after the system has been solved for the urrent iteration, we expet to ompute a value of φ P of φ P nb a nb φ nb b (3.89) a P We do not, however, want φ P to hange as muh as Equation 3.89 implies. The hange in φ P from one iteration to the next is given by nb a nb φ nb b a P φep (3.90) We wish to make φ P hange only by a fration α of this hange. Thus φ P φep α Colleting terms, we may write nb a nb φ nb b a P φep (3.91) a P α φ P nb a nb φ nb b 1 α α a P φe P (3.92) We note the following about Equation 3.92: 1. When the iterations onverge to a solution, i.e., when φ P φep, the original disrete equation is reovered. So we are assured that under-relaxation is only a hange in the path to solution, and not in the disretization itself. Thus, both under-relaxed and un-underrelaxed equations yield the same final solution. 2. Though over-relaxation (α α. 1. With α. 1, we are assured that a P α the Sarborough riterion. 1) is a possibility, we will for the most part be using nb a nb. This allows us to satisfy 3. The optimum value of α depends strongly on the nature of the system of equations we are solving, on how strong the non-linearities are, on grid size and so on. A value lose to unity allows the solution to move quikly towards onvergene, but may be more prone to divergene. A low value keeps the solution lose to the initial guess, but keeps the solution from diverging. We use intuition and experiene in hoosing an appropriate value. 4. We note the similarity of under-relaxation to time-stepping. The initial guess ats as the initial ondition. The terms a P + α and 1 α 0 α a p φep represent the effet of the unsteady terms. 58

59 3.7 Disussion At this point, our disretized equation set is ready for solution. We have seen that our diffusion equation an be disretized to yield oeffiients that guarantee physial plausibility for the orthogonal meshes we have onsidered here. This property is very useful in a numerial sheme. However, we will see in the next hapter that it annot usually be obtained when meshes are non-orthogonal or unstrutured. We have thus far not addressed the issue of solving the disretization equations. For the moment, we shall use the simple Gauss-Seidel sheme to solve our equation set. This is admittedly slow for large meshes, and far better iteration shemes exist. These will be overed in a later hapter. 3.8 Trunation Error We now examine the various profile assumptions we have made in the ourse of disretizing our diffusion equation to quantify the trunation error of our finite volume sheme Spatial Trunation Error In oming up with our spatial approximations we made the following assumptions: 1. The fae flux (J e, for example) was represented by the fae entroid value. That is, the mean flux through the fae e was represented by the fae entroid value. 2. The soure term S was written as S C S P φ P,i.e., the ell entroid value φ P was used to represent the mean φ value in the ell. 3. The gradient at the fae was omputed by assuming that φ varies linearly between ell entroids. Thus dφ dx e was written as φ E φ P 0 δx e. Items 1 and 2 essentially involve the same approximation: that of representing the mean value of a variable by its entroid value. Item 3 involves an approximation to the fae gradient. Let us examine eah of these approximations in turn. We will onsider a one-dimensional ontrol volume and a uniform grid. Mean Value Approximation Consider the ontrol volume in Figure 3.6 and the funtion φ x in the ontrol volume. We expand φ x as φ x : φ P x x P H dφ dx P x x P 2 2! 59 d 2 φ dx 2 P x x P 3 3! d 3 φ dx 3 O x 4 P (3.93)

60 ) ) ) Integrating Equation 3.93 over the ontrol volume, we have so that x e x e x w φ x dx φ P ) x w φ x dx x e x w x φ P d 2 φ dx 2 P ) dφ dx P ) x e x w x e x x w x P dx x x P 2 dx O x 4 (3.94) 2! 1 x e 2 x P 2 For a uniform mesh, Equation 3.95 may be written as x e x w φ x dx Dividing through by x we get φ x w x P 2 dφ dx P 1 x e 6 x P 3 3 d x w x P 2 φ dx 2 P O x 4 (3.95) x φ P 1 x ) 1 x 3 24 d 2 φ dx 2 O x 4 (3.96) P x e φ x dx φ P O x 2 x w (3.97) Thus, we see that the entroid value φ P represents the mean value with a trunation error of O 0 x 2. For a onstant φ, all derivatives are zero. If φ x is linear, all derivatives of order higher than dφ dx are zero. For these two ases, φ φ P is true exatly. The same analysis an be applied to the fae flux J e, or indeed to any variable being represented by its entroid value. Gradient Approximation Let us now examine the trunation error in representing the gradient dφ dx e as φ E φ P 0 δx e. Referring to Figure 3.6, we write: φ E φ e φ P φ e x dφ 2 dx e O x 4 x 2 8 x 2 d 2 φ dx 2 e x 3 48 d 3 φ dx 3 e x dφ d 2 dx 2 φ d 3 φ e 8 dx 3 e O x 4 (3.98) dx 2 e x 3 48 Subtrating the seond equation from the first and dividing by x yields dφ dx e φ E φ P x 60 O x 2 (3.99)

61 ) x W w P e E x x Figure 3.6: Uniform Arrangement of Control Volumes Thus the assumption that φ varies linearly between grid points leads to a trunation error of O + x 2 in dφ dx. We see that all the approximations in a steady diffusion equation are O + x 2. So the disretization sheme has a trunation error of O + x 2. The mean-value approximation is O 0 x 2 even for a non-uniform mesh. The gradient approximations is O + x + 2 only for uniform meshes. For non-uniform meshes, the O 0 x 2 terms in the Taylor series expansion do not anel upon subtration, leaving a formal trunation error of O x on dφ dx Temporal Trunation Error Let us onsider the fully-impliit sheme. The profile assumptions made in disretizing the unsteady diffusion equation using this sheme are 1. The ell entroid values ρφ 1 P and ρφ 0 P in the unsteady term are assumed to represent the average value for the ell. 2. The spatial assumptions are as desribed above. 3. The flux and soure terms from time t t are assumed to prevail over the time step t. The first assumption is equivalent to the mean value assumption analyzed above and engenders a spatial error of O + x 2. We have already seen that the other spatial assumptions result in a trunation error of O + x 2. Let us examine the trunation error impliit in item 3. In effet, we wish to evaluate a term of the type t 1 t 0 S t dt (3.100) 61

62 ) Expanding S(t) about S 1, its value at t 1, we have S t S 1! ds dt 1 t t 1! d 2 S dt 2 1 t t O t 3 (3.101) Integrating over the time step t, i.e. from t 0 to t 1, we get t 1 t 0 S t dt S 1 t Integrating and dividing by t we get ds dt 1 ) t 0 t 1 t t 1 dt O t 3 (3.102) 1 t ) t 1 t 0 S t dt S S 1 ds dt 1 t 2 O t 2 (3.103) Thus the temporal trunation error of the fully impliit sheme is O t. We state without proof that the trunation error of the expliit sheme is also O t and that of the Crank-Niholson sheme is O + t Stability Analysis In this setion, we perform a von Neumann stability analysis. Stability an be understood in two ways. For steady state problems, we wish to determine whether the path to solution is stable, i.e., we wish to analyze a partiular iterative method for stability. For unsteady problems, we ask whether a partiular marhing sheme is stable. For example, for an unsteady heat ondution problem, we may want to determine whether taking suessive time steps ause the errors in the solution to grow. This similarity between iteration and time-stepping is not surprising. We may onsider any time-stepping sheme to be an iterative sheme, i.e., a way of obtaining a steady state solution, if one exists. Let us onsider the stability of the expliit sheme. For simpliity, let us onsider a one-dimensional ase with onstant properties and no soure term. The disretized diffusion equation may be written as: and a P φ P a E φ 0 E a W φ 0 W a E a W a 0 P a E a W φ 0 P (3.104) Γ e δx e Γ w δx w a 0 ρ x P t a P a 0 P (3.105) 62

63 Let Φ represent the exat solution to Equation By exat we mean that it is the solution to the disrete equation, obtained using a omputer with infinite preision. However, all real omputers available to us have finite preision, and therefore, we must ontend with round-off error. Let this finite-preision solution be given by φ. The error ε is given by ε φ Φ (3.106) We ask the following question: Will the expliit sheme ause our error ε to grow, or will the proess of time-stepping keep the error within bounds? Substituting Equation into Equation yields a P Φ P ε P & a E Φ 0 E εe 0 a W ΦW 0 εw 0 a 0 P a E a W Φ 0 P ε 0 P (3.107) As before, the Φ and ε terms supersripted 0 represent the values at the time step t, and the un-supersripted values represent the values at time t t. Sine Φ P is the exat solution, it satisfies Equation Therefore, the Φ terms in Equation anel, leaving a P ε P a E ε 0 E a W ε 0 W Let us expand the error ε in an infinite series ε x t e σmt e iλ mx m where σ m may be either real or omplex, and λ m is given by λ m a 0 P a E a W ε 0 P (3.108) m *1*,* M (3.109) mπ m *,*1* M (3.110) L L is the width of the domain. Equation essentially presents the spatial dependene of the error by the sum of periodi funtions e iλ mx, and the time dependene by e σ mt. If σ m is real and greater than zero, the error grows with time, and if σ m is real and less than zero, the error is damped. If σ m is omplex, the solution is osillatory in time. We wish to find the amplifiation fator ε x t t ε x t (3.111) If the amplifiation fator is greater than one, our error grows with time step, and our sheme is unstable. If it is less than one, our error is damped in the proess of time marhing, and our sheme is stable. Sine the diffusion equation for onstant Γ and zero S is linear, we may exploit the priniple of superposition. Thus, we an examine the stability onsequenes of a single error term ε e σmt e iλ mx (3.112) rather than the summation in Equation Substituting Equation into Equation 3.108, we get a P e σ mi t tj e iλ mx e σ mt a E e iλ mi x xj a W e iλ mi x 5 xj a 0 P a E a W e σ mt e iλ mx 63 (3.113)

64 " 6 6 Dividing through by a P e σ mt e iλ mx we get e σ m t a E a P e iλ m x a W a P e5 iλ m x a 0 P a E a W a P (3.114) For a uniform mesh a E a W Γ x and a 0 P ρ x t. Thus e σ m t Γ t ρ x 2 eiλ m x e5 iλ m x 1 2Γ t ρ x 2 (3.115) Using β λ m x and the identities e iλ m x e5 iλ m x 2osβ 2 4sin 2 β 2 (3.116) we get e σ m t 1 We reognize that the amplifiation fator is ε x t t ε x t We require that 6 or 6 If 1 4Γ t ρi xj 2 0, we require 4Γ t ρ x 2 sin2 β 2 e σ m t 1 ε x t t ε x t 1 4Γ t ρ x 2 (3.117) 4Γ t ρ x 2 (3.118). 1 (3.119). 1 (3.120) 4Γ t ρ x 2-0 (3.121) This is always guaranteed sine all terms are positive. If, on the other hand, 1 4Γ t ρi xj 2 K. 0, we require 4Γ t ρ x 2. 2 (3.122) or t. ρ x 2 2Γ (3.123) We reognize this riterion to be the same as Equation Using an error expansion of the type (3.124) ε x y t e σ mt e iλ mx e iλ ny 64

65 we may derive an equivalent riterion for two-dimensional uniform meshes ( x y) as ρ t. x 2 (3.125) 4Γ A similar analysis may also be done to obtain the riterion for three-dimensional situations. It is also possible to show, using a similar analysis, that the fully-impliit and Crank-Niholson shemes are unonditionally stable. Though the von Neumann stability analysis and our heuristi requirement of positive oeffiients have yielded the same riterion in the ase of the expliit sheme, we should not onlude that the two will always yield idential results. The von Neumann analysis yields a time-step limitation required to keep round-off errors bounded. It is possible to get bounded but unphysial solutions. This happens in the ase of the Crank-Niholson sheme, whih the von Neumann stability analysis lassifies as unonditionally stable. However, we know that for ρ x t 0* 5 nb a nb, it is possible to get unphysial results. In this ase, the von Neumann stability analysis tells us that the osillations in our solution will remain bounded, but it annot guarantee that they will be physially plausible. Von Neumann stability analysis is a lassi tool for analyzing the stability of linear problems. However, we see right away that it would be substantially more ompliated to do the above analysis if Γ were a funtion of φ, or if we had non-linear soure terms. It beomes very diffiult to use when we solve oupled non-linear equations suh as the Navier-Stokes equations. In pratie, we use von Neumann stability analysis to give us guidane on the baseline behavior of idealized systems, realizing that the oupled nonlinear equations we really want to solve will probably have muh stringent restritions. For these, we must rely on intuition and experiene for guidane Closure In this hapter, we have ompleted the disretization of the diffusion equation on regular orthogonal meshes for Cartesian, polar and axisymmetri geometries. We have seen that our disretization guarantees physially plausible solutions for both steady and unsteady problems. We have also seen how to handle non-linearities. For uniform meshes, we have shown that our spatial disretization is formally seond-order aurate, and that if we use the fully-impliit sheme, our temporal disretization is first-order aurate. We have also see how to ondut a stability analysis for the expliit sheme as applied to the diffusion equation. In the next hapter, we will address the issue of mesh non-orthogonality and understand the resulting ompliations. 65

66 66

67 Chapter 4 The Diffusion Equation: A Closer Look In the last hapter, we saw how to disretize the diffusion equation for regular (orthogonal) meshes omposed of quadrilaterals. In this hapter, we address non-orthogonal meshes, both strutured and unstrutured. We will see that non-orthogonality leads to extra terms in our disrete equations whih destroy some of the properties we had partiularly prized in our disretization sheme. We will also address the speial issues assoiated with the omputation of gradients on unstrutured meshes. 4.1 Diffusion on Orthogonal Meshes Let us onsider a mesh onsisting of onvex polyhedra, and partiularly, equilateral triangles, as shown in Figure 4.1. Regardless of the shape of the ells, any fae f in the mesh is shared by only two neighbor ells. We shall onsider the mesh to be orthogonal if the line joining the entroids of adjaent ells is orthogonal to the shared fae f. This is guaranteed for the equilateral triangular mesh in the figure. A detail of the ells C0 and C1 is shown in Figure 4.2. Consider the steady diffusion equation: where J S (4.1) J Γ φ (4.2) We fous on the ell C0. To disretize Equation 4.1, we integrate it over the ontrol volume C0 as before: Sd (4.3) ) Jd Applying the divergene theorem, we get J ) da A 67 ) 8 0 ) 8 0 Sd (4.4)

68 C0 f C1 Figure 4.1: Orthogonal Mesh y A f ξ C1 x C0 fae f e η e ξ Figure 4.2: Arrangement of Cells in Orthogonal Mesh 68

69 We now make a profile assumption. We assume that J an be approximated by its value at the entroid of the fae f. Also, let us assume that S S C S P φ 0 as before. Thus J f A f f S C S P φ 0 0 (4.5) The summation in the first term is over all the faes of the ontrol volume C0, and A f is the area vetor on the fae f pointing outwards from ell C0. Further, J f Γ f φ f φ Γ f x i φ y j f (4.6) In order to evaluate φ x and φ y at the fae f, we need ell entroid values of φ whih are suitably plaed along the x and y axes. This is easy to arrange for a retangular mesh, as we saw in the previous hapter. We see from Figure 4.2 that suh values are not available for the mesh under onsideration. We must take an alternative approah. Consider the oordinate diretions ξ and η in Figure 4.2. The unit vetor e ξ is aligned with the line joining the entroids. The unit vetor e η is tangential to the fae f. Beause the mesh is orthogonal, the unit vetors are perpendiular to eah other. We may write the fae flux vetor J f in the oordinate system ξ η as J f Γ f The area vetor A f may be written as φ ξ e φ ξ η e η (4.7) Therefore A f A f e ξ (4.8) J f A f Γ f A f φ ξ f (4.9) We see that if the line joining the entroids is perpendiular to the fae, the normal diffusion transport J f A f only depends on the gradient of φ in the oordinate diretion ξ and not on η. We realize that sine ell entroid values of φ are available along the e ξ diretion, it is easy for us to write φ ξ. As before, let us make a linear profile assumption for the variation of φ ξ between the entroids of ells C0 and C1. Thus φ J f A f Γ f A 1 φ 0 f (4.10) ξ where ξ is the distane between the ell entroids, as shown in Figure 4.2, and φ 0 and φ 1 are the disrete values of φ at the ell entroids. We see that if the mesh is orthogonal, the diffusion transport normal to the fae f an be written purely in terms of values of φ at the entroids of the ells sharing the fae. 69

70 So far we have looked at the transport through a single fae f. Substituting Equation 4.10 into Equation 4.5 and summing over all the faes of the ell C0 yields an equation of the form where a nb a P φ P a nb φ nb b (4.11) nb Γ f A f ξ nb nb 1 20*1*,* M a P a nb S P 0 nb b S C 0 (4.12) In the above equations, nb denotes the fae neighbors of the ell under onsideration, P. That is, the neighbor ells are those whih share faes with the ell under onsideration. The ell P shares verties with other ells, but these do not appear in the disretization. M is the number of fae neighbors. If the ell is a triangle, there are three fae neighbors, and M 3 in the above equation. We note the following: 1. In the development above, we have not used the fat that ell under onsideration is a triangle. All we have required is that the ell be a polyhedron and that line joining the ell entroids be orthogonal to the fae. 2. It is neessary for the mesh to onsist of onvex polyhedra. If the ells are not onvex, the ell entroid may not fall inside the ell. 3. We need not make the assumption of two-dimensionality. The above development holds for three dimensional situations. 4. We have not made any assumptions about mesh struture, though it is usually diffiult to generate orthogonal meshes without some type of struture. 5. The sheme is onservative beause we use the onservation priniple to derive the disrete equations. The fae flux J f leaves one ell and enters the adjaent ell. Thus overall onservation is guaranteed. It is worth noting here that J f should be thought of as belonging to the fae f rather that to either ell C0 or C1. Thus, whatever profile assumptions are used to evaluate J f are used onsistently for both ells C0 and C1. 6. As with our orthogonal retangular mesh in the previous hapter, we get a wellbehaved set of disrete equations. In the absene of soure terms, a P nb a nb. We are thus guaranteed that φ P is bounded by its fae neighbors when S All the development from the previous hapter regarding unsteady flow, interpolation of Γ f and linearization of soure terms may be arried over unhanged. 8. It is possible to solve the disrete equation set using the Gauss-Seidel iterative sheme, whih does not plae any restritions on the number of neighbors. 70

71 b A f y C0 e η e ξ C1 η ξ fae f x Figure 4.3: Non-Orthogonal Mesh 4.2 Non-Orthogonal Meshes In pratie, it is rarely possible to use orthogonal meshes in industrial geometries beause of their omplexity. Our interest therefore lies in developing methods whih an deal with non-orthogonal meshes, and preferably, with unstrutured meshes. We will start by looking at general non-orthogonal meshes and derive expressions for strutured meshes as a speial ase. Consider the ells C0 and C1 shown in Figure 4.3. We onsider this mesh to be nonorthogonal beause the line joining the ell entroids C0 and C1 is not perpendiular to the fae f. As before, we onsider the steady diffusion equation a J S (4.13) and fous on the ell C0. We integrate the equation over the ontrol volume C0 and apply the divergene theorem as before. Assuming that J f, the flux at the fae entroid, prevails over the fae f, we obtain: J f A f f S C S P φ 0 0 (4.14) Thus far, the proedure is the same as that for an orthogonal mesh. The area vetor A f is given by A f A x i A y j (4.15) As before, writing J f in terms of φ x and φ y is not useful sine we do not have ell entroid values of φ along these diretions. Let us onsider instead the oordinate system ξ η on the fae f. The unit vetor e ξ is parallel to the line joining the entroids. The unit vetor e η is tangential to the fae. However, sine the mesh is not 71

72 L orthogonal, e ξ and e η are not orthogonal to eah other. Writing J f in terms of the ξ η oordinate system seems promising sine we have ell entroid values aligned along the ξ diretion. As usual, we may write J f A f as J f A f Γ f φ x A x φ y A y f In order to express φ x and φ y in terms of ξ and η, we start be writing (4.16) φ ξ φ x x ξ φ y y ξ φ η φ x x η φ y y η (4.17) where φ ξ denotes φ ξ, x ξ denote x ξ and so on. Solving for φ x and φ y, we get φ x φ y φ ξ y η φ η y ξ L φ ξ x η φ η x ξ L (4.18) where Therefore J f A f Γ f x ξ y η x η y ξ (4.19) Γ f = A x y η A y x L η A x y ξ A y x ξ L > φ ξ f φ η f (4.20) Furthermore, we may write x ξ y ξ x η y η The unit vetors e ξ and e η may be written as e ξ e η x 1 x 0 ξ y 1 y 0 ξ x b x a η y b y a η A x y b y a A y x b x a (4.21) x 1 x 0 i ξ y 1 y 0 j x b x a i y b y a j η 72 (4.22)

73 L Q Q where ξ is the distane between the entroids and η is the distane between the verties a and b. We reognize that L η A f (4.23) Now, let us examine the Jaobian. Using the equations 4.21, we may write x ξ y η x η y ξ x 1 x 0 y b y a ξ η y 1 y 0 x b x a ξ η A f e ξ η The φ ξ term in Equation 4.20 may be written as φ ξ A x y η A y x L η A x φ ξ M y b y a A x x b x a ONP η A f e ξ η (4.24) φ ξ A f A f A e ξ (4.25) The φ η term in Equation 4.20 may be written as φ η = A x y ξ A y x L ξ y > φ 1 η y 0 M φ η η 2 e ξ e η A f e ξ y b y a x 1 x 0 A f e ξ η x b x a N ξ Colleting terms, we may write J f A f Γ f A f A f A f e ξ φ η A f A f A f e ξ e ξ e η (4.26) φ ξ f Γ f A f A f e A f e ξ e η φ η (4.27) f ξ We now need profile assumptions for φ. For the moment, we shall onsider only the φ ξ term. Assuming that φ varies linearly between ell entroids, we may write Furthermore, we define Therefore J f A f φ ξ f φ 1 φ 0 ξ (4.28) f Γ f A f A f A f e ξ e ξ e η φ η f (4.29) Γ f A f A f ξ A f e ξ φ 1 φ 0 f (4.30) 73

74 Q Q Disussion We have thus far derived an expression for the quantity J f A f for the fae f. We see that, unlike for orthogonal meshes, the flux annot be written in terms of φ ξ alone an additional gradient, φ η is involved. We all the term involving φ ξ the primary gradient or the primary diffusion term. The term f is alled the seondary gradient or the seondary diffusion term. For orthogonal meshes, e ξ e η is zero sine the line joining the entroids is perpendiular to the fae. Therefore f is zero for orthogonal meshes. Furthermore, from Equation 4.8, the term A f A f G A f e ξ redues to A f for an orthogonal mesh. Thus, we are assured that our formulation defaults to the right expression when the mesh is orthogonal. The seondary gradient term is a little problemati to ompute sine we do not have any ell entroid values of φ available in the η diretion. We must devise a method by whih φ η an be omputed on the fae f. Preisely how this is done will depend on whether our mesh is strutured or unstrutured Seondary Gradient Calulation For strutured meshes, the omputation of the gradient φ η poses no partiular problem. In two dimensions, the problem may be boiled down to either finding the φ a and φ b by interpolation and thus finding φ η, or alternatively, finding φ η at the ells C0 and C1 and interpolating these values to the fae f. For three-dimensional situations on strutured meshes, again, there is no partiular diffiulty. The strutured mesh shown in the x-y plane in Figure 4.4(a) onsists of mesh lines of ξ and η whih form the faes of the ell. In three dimensions, a ell is bounded by faes of onstant ξ, η and ζ. The gradient φ may be deomposed in these three non-orthogonal diretions, resulting in seondary gradient terms involving φ η and φ ζ. These tangential gradients may be written in terms of values of φ at the points a, b, and d shown in Figure 4.4(b). These values in turn may be interpolated from neighboring ell-entroid values. For unstrutured meshes, it is possible to write φ η in terms of φ a and φ b in two dimensions sine the oordinate diretion η an be uniquely defined. In three dimensions, however, it not possible to define the η diretion uniquely. The fae f is in general an n-sided polyhedron, with no unique mesh diretions, and the two tangential diretions η and ζ would have to be hosen arbitrarily. We should note however that the ξ diretion is uniquely defined as the entroid-to-entroid diretion. For unstrutured meshes, we write J f A f Γ f A f A f ξ A f e ξ φ 1 φ 0 Γ f φ f A f so that the seondary gradient term is given by Q f Γ f φ f A f Γ f A f A f ξ A f φ f e e ξ ξ (4.31) ξ Γ f A f A f ξ A f φ f e e ξ ξ (4.32) ξ 74

75 η = onstant C0 b C1 ζ η b a ξ ξ = onstant a d fae f (a) (b) Figure 4.4: Definition of Fae Tangential Diretions in (a) Two Dimensions and (b) Three Dimensions Equation 4.32 writes the seondary gradient term as the differene of the total transport through the fae f and the transport in the diretion e ξ. Both terms require the fae gradient φ f ; its omputation is addressed in a later setion. Thus the problem of omputing the seondary gradient is redued to the problem of omputing the fae gradient of φ. It is possible to ompute φ f diretly at the fae using the methods we will present in a later setion. It is often more onvenient to store φ at the ells C0 and C1. Assuming that the gradient of φ in eah ell is a onstant, we may find an average as φ f φ 0 φ 1 2 (4.33) The unstrutured mesh formulation an of ourse be applied to strutured meshes. However, it is usually simpler and less expensive to exploit mesh struture when it exists Disrete Equation for Non-Orthogonal Meshes The disretization proedure at the fae f an be repeated for eah of the faes of the ell C0. The resulting disrete equation may be written in the form a P φ P a nb φ nb b (4.34) nb 75

76 Q Q Q where a nb = a P nb Γ f A f A f ξ A f e > ξ a nb S P R 0 b S C 0 nb nb f nb nb 1 2+*,*1* M (4.35) As before, nb denotes the ell neighbors of the ell under onsideration, P. The quantities Γ f, e ξ, ξ, A f and f orrespond to the fae f shared by the ell P and the neighbor ell nb. We see that the primary terms result in a oeffiient matrix whih has the same struture as for orthogonal meshes. The above disretization ensures that a P nb a nb if S 0. However, we no longer have the guarantee that φ P is bounded by its ell neighbors. This is beause the seondary gradient term, f, involves gradients of φ whih must be evaluated from the ell entroid values by interpolation. As we will see later, this term an result in the possibility of spatial osillations in the omputed values of φ. Though the formulation has been done for steady diffusion, the methods for unsteady diffusion outlined in the previous hapter are readily appliable here. Similarly the methods for soure term linearization and under-relaxation are also readily appliable. The treatment of interfaes with step jumps in Γ requires a modest hange, whih we leave as an exerise to the reader. 4.3 Boundary Conditions Consider the ell C0 with the fae b on the boundary, as shown in Figure 4.5. The ell value φ 0 is stored at the entroid of the ell C0. As with regular meshes, we store a disrete value φ b at the entroid of the boundary fae b. The boundary area vetor A b points outwards from the ell C0 as shown. The ell balane for ell C0 is given as before by J f A f J b A b f S C S P φ 0 0 (4.36) Here the summation over f in the first term on the left hand side is over all the interior faes of ell C0, and the seond term represents the transport of φ through the boundary fae. We have seen how the interior fluxes are disretized. Let us now onsider the boundary term J b A b. The boundary transport term is written as J b A b Γ b φ b A b (4.37) We define the diretion ξ to be the diretion onneting the ell entroid to the fae entroid, as shown in Figure 4.5, and the diretion η to be tangential to the boundary 76

77 Q Q Q C0 d e η A b b e ξ ξ b Figure 4.5: Boundary Control Volume for Non-Orthogonal Mesh fae. Deomposing the flux J b in the ξ and η diretions as before, we obtain J b A b Γ b A b A b A b e ξ φ ξ b Γ f As before, we define the seondary Q diffusion term b Γ f A b A b A b e ξ e ξ e η A b A b e A b e ξ e η φ η (4.38) b ξ We note that if e ξ and e η are perpendiular to eah other, b is zero. Thus, the total transport aross the boundary fae b is given by J b A b Γ b A b A b A b e ξ φ ξ b φ η b (4.39) b (4.40) As before we make a linear profile assumption for the variation of φ between points C0 and b. This yields J b A b Γ b ξ b A b A b A b e ξ φ b φ 0 b (4.41) As with interior faes, we are faed with the question of how to ompute φ η at the fae b. For strutured meshes, and two-dimensional unstrutured meshes, we may use interpolation to obtain the vertex values φ and φ d in Figure 4.5. For three-dimensional unstrutured meshes, however, the boundary fae tangential diretions are not uniquely 77

78 Q Q Q defined. Consequently, we write the boundary seondary gradient term as the differene of the total and primary terms: Q b Γ b φ b A b Further assuming that φ b Γ b ξ b we may write the Q seondary gradient term at the boundary as b Γ b φ 0 A b Γ b ξ b We will see in a later setion how the ell gradient φ 0 A b A b A b φ e b e ξ ξ b (4.42) ξ φ 0 (4.43) A b A b A b φ 0 e e ξ ξ b (4.44) ξ is omputed. Having seen how to disretize the boundary flux, we now turn to the appliation of boundary onditions. Dirihlet Boundary Condition At Dirihlet boundaries, we are given the value of φ b φ b φ b given (4.45) Using φ b given in Equation 4.41 and inluding J b A b in the boundary ell balane yields a disrete equation of the following form: where a nb = a b a P nb a P φ P a nb φ nb b (4.46) nb Γ f A f A f ξ A f e > ξ Γ b ξ b A b A b A b e ξ nb a nb a b S P R 0 b S C 0 nb nb 1 20*1*,* M f nb a b φ b given b (4.47) Here, nb denotes the interior ell neighbors of the ell under onsideration, P. The quantities Γ f, e ξ, ξ, A f and f orrespond to the fae f shared by the ell P and the neighbor ell nb. In the a b term, e ξ orresponds to the diretion shown in Figure 4.5. As with interior ells, we see that the primary terms result in a oeffiient matrix whih has the" same struture as for orthogonal meshes. The above disretization ensures that a P nb a nb if S 0. However, we no longer have the guarantee that φ P 78

79 Q S S S S S S S S S S S S Q is bounded by its ell neighbors. This is beause the seondary gradient terms, f and b, involve gradients of φ whih must be evaluated from the ell entroid values by interpolation. As we will see later, this term an ause spatial osillations in the omputed values of φ. Equivalent disrete equations for Neumann and mixed boundary onditions may be derived starting with Equation 4.41 and following the proedures in the previous hapter. We leave this as an exerise for the reader. 4.4 Gradient Calulation As we saw in the previous setion, for non-orthogonal grids we need to determine gradients of φ at the ell fae entroids to ompute the seondary diffusion term. Gradients are also required in many other ases. For example, veloity derivatives are required to ompute the prodution term in turbulene models or to ompute the strain rate for non-newtonian visosity models. In this setion, we will learn about tehniques for evaluating gradients for different types of mesh topologies Strutured Meshes For a one-dimensional problem, a linear profile assumption for the variation of φ between ell enters results in the following expression for the derivative at the ell fae dφ dx S f φ E φ P x (4.48) In the same manner we an write the derivative at a ell enter using the values at the two adjaent ells. dφ φ E φ W (4.49) dx S 2 x P This expression is usually referred to as the entral differene approximation for the first derivative. For Cartesian grids in multiple dimensions, we an ompute the derivatives by applying the same priniple along the respetive oordinate diretions. Consider, for example the grid shown in Fig For simpliity, we restrit the following development to equispaed grids. Using the entral differene approximation introdued earlier we an write φ x S φ y S P P φ E φ W 2 x φ N φ S 2 y (4.50) (4.51) The proedure is similar in ase of general non-orthogonal strutured grids, where we use entral differene approximations to write the derivatives in the transformed 79

80 S S S S S S S S S S S S S S S S N NE W P b a E y S SE x Figure 4.6: Arrangement of Cells in Cartesian Mesh oordinates. Figure 4.7 shows a non-orthogonal mesh in the x y plane and the orresponding transformed mesh in the ξ η plane. We write φ ξ S φ η S P P φ E φ W 2 ξ φ N φ S 2 η (4.52) (4.53) Knowing the ell gradients, we an ompute the fae value required in the seondary diffusion term (Equation 4.29) by averaging. For example, for a uniform mesh φ η S f φ η S P 2 φ η S E (4.54) An alternative approah would be to write the fae derivative in terms of the values at the nodes a and b φ φ b φ a (4.55) η S η f For Cartesian grids, it is easy to show that the two approximations are equivalent if the nodal values are obtained by linear interpolation. For an equispaed Cartesian grid this means that the nodal value φ a is φ a φ P φ E φ SE φ S 4 (4.56) The seond interpretation (Equation 4.55) is useful beause it suggests one way of obtaining derivatives at faes for general unstrutured grid where we no longer have 80

81 η = onstant W S ξ N NE b P E η a SE N NE b W P E a S SE η y ξ = onstant η ξ x ξ Figure 4.7: Strutured Mesh in (a) Physial Spae and (b) Mapped Spae orthogonal diretions to apply the finite-differene approximation. Thus, we an use Equation 4.55 for the fae f shown in Figure 4.3. The nodal values in this ase are obtained by some averaging proedure over the surrounding ells Unstrutured Meshes The method outlined above is appliable for arbitrary unstrutured grids in two dimensions. However, as we ommented earlier, extension to three dimensions is not straightforward. This is beause in 3D we no longer have unique diretions in the plane of the fae to use a finite-differene approximation. Also, in many instanes we need to know all three omponents of the derivative at ell enters, not just derivatives in the plane of the ell fae. Therefore we need to seek other ways of alulating derivatives that are appliable for arbitrary grids. Gradient Theorem Approah One approah is suggested by the gradient theorem whih states that for any losed volume 0 surrounded by surfae A φ ) d B 8 0 φda (4.57) ) A where da is the outward-pointing inremental area vetor. To obtain a disrete version of Equation 4.57, we make our usual round of profile assumptions. First, we assume that the gradient in the ell is onstant. This yields φ 1 0 f φda ) f (4.58) A 81

82 Next, we approximate the integral over a ell fae by the fae entroid value times the fae area. Thus we an write φ 1 0 f φ f A f (4.59) We still need to define the fae value, φ f before we an use this formula. The simple approximation is to use the average of the two ells values sharing the fae: φ f φ 0 φ 1 2 (4.60) The advantage of this approah is that it is appliable for arbitrary ell shapes, inluding non-onformal grids. All the operations involved in this proedure are fae-based just like the operations involved in the disretization of the transport equations and do not require any additional grid onnetivity. Also, this proedure is easily extended to three-dimensional ases. One we have obtained the derivative by using Equations 4.59 and 4.60, we an improve on our initial approximation of the fae average by reonstruting from the ell. Thus, from Figure 4.8 we an write φ f φ 0 φ 0 r 0 2 φ 1 φ 1 r 1 (4.61) This suggests an iterative approah for omputing suessively better approximations to the gradients. During eah iteration, we an ompute the fae average value using the gradients omputed from the previous iteration and use these fae values to ompute new values of the gradients. However, this inreases the effetive stenil with inreasing iterations and an lead to osillatory results. In pratie, therefore only one or two iterations are typially used. In addition, as we will see in the next hapter, the gradients used to reonstrut fae values are also limited to the bounds ditated by suitable neighbor values, so as to avoid undershoots and overshoots in the solution. Note that in applying the gradient theorem we used the ell around the point C0 as the integration volume. While this pratie involves the smallest possible stenil, it is not mandatory that we use the same ontrol volume for omputing the gradient that we use for applying the disrete onservation laws. Other integration volumes are often used, speially in node-based disretization algorithms. The gradient resulting from the use of the ell as the integration volume involves values of φ only at the fae neighbors and is not always the most optimal solution. In the next setion we learn about the use of another approah that an use a bigger stenil. Least Squares Approah The idea here is to ompute the gradient at a ell suh that it reonstruts the solution in the neighborhood of the ell. For example, onsider ell C0. We would like the value of φ omputed at the entroid of ell C1 in Figure 4.9 to be equal to φ 1. By assuming a loally linear variation of φ, we write φ 0 φ 0 r 1 φ 1 (4.62) 82

83 S S S S S S S S S S S S [ C1 r 1 C0 r 0 Figure 4.8: Arrangement of Cells in Unstrutured Mesh Here r 1 s the vetor from the entroid of ell 0 to the entroid of ell 1 We rewrite Equation 4.62 as φ x 1 x S r 1 x 1 i y 1 j (4.63) φ y 1 0 y S 0 φ 1 φ 0 (4.64) We require that the same be true at all other ells surrounding ell C0. For a ell C j the equation reads φ x j x S φ y j 0 y S 0 φ j φ 0 (4.65) It is onvenient to assemble all the equations in a matrix form as follows Md φ (4.66) Here M is the J 2 matrix M UTV V WV x 1 y 1 x 2 y 2. x J. y J XZY Y Y (4.67) 83

84 a a a a [ C2 C3 r3 r 2 C0 r 4 r 1 C1 C4 Figure 4.9: Least Squares Calulation of Cell Gradient and d is the vetor of the omponents of gradients of φ at ell C0 d \^]_ `_ and φ is the vetor of differenes of φ φ \ ] `_ φ x a 0 φ y a 0 X Y Y φ 1 b φ 0 φ 2 b φ 0.. φ J b φ 0 [ (4.68) X Y Y Y (4.69) Equation 4.66 represents J equations in two unknowns. Sine in general J is larger than 2 this is an over-determined system. Physially, this means that we annot assume a linear profile for φ around the ell C0 suh that it exatly reonstruts the known solution at all of its neighbors. We an only hope to find a solution that fits the data in the best possible way, i.e., a solution for whih the RMS value of the differene between the neighboring ell values and the reonstruted values is minimized. From Equation 4.65 we know that the differene in the reonstruted value and the ell value 84

85 a a a a g a a a a for ell C j is given by R j \ x j φ x a a 0 y j φ The sum of the squares of error over all the neighboring ells is Let φ x a \ a and φ 0 y a 0 a y a bed φ j b φ i 0f (4.70) R \ R 2 j (4.71) j \ b. Equation 4.71 an then be written as R \ j a x j b y j bhd φ j b φ 0fji 2 (4.72) Our objetive is to find a and b suh that R is minimized. Reall that the standard way of solving the problem is to differentiate R with respet to a and b and set the result to zero, ie., R a R b \ 0 \ 0 (4.73) This gives us two equations in the two unknowns, viz. the omponents of the gradient at ell C0. It is easy to show that this equation set is the same as that obtained by multiplying Equation 4.66 by the transpose of the matrix M M T Md \ M T φ (4.74) M T M is a 2 k 2 matrix that an be easily inverted analytially to yield the required gradient φ. We should note here that sine M is purely a funtion of geometry, the inversion only needs to be done one. In pratial implementations, we would ompute a matrix of weights for eah ell. The gradient for any salar an then be omputed easily by multiplying the matrix with the differene vetor φ. Mathematially, for the solution to exist the matrix M must be non-singular, i.e., it should have linearly independent olumns and its rank must be greater than or equal to 2. Physially this implies that we must involve at least 3 non-ollinear points to ompute the gradient. Another way of understanding this requirement is to note that assuming a linear variation means that φ is expressed as φ \ A Bx Cy (4.75) Sine this involves three unknowns, we need at least three points at whih φ is speified in order to determine the gradient. The least squares approah is easily extended to three dimensions. We note that it plaes no restritions on ell shape, and does not require a strutured mesh. It also does not require us to hoose only fae neighbors for the reonstrution. At orner 85

86 m m boundaries, for example, it may not be possible to obtain a suffiient number of fae neighbor ells, and we may be fored to reonstrut at ells sharing verties with ell C0 in addition to the usual omplement of fae neighbors. In other ases, we may wish to involve more ells near ell C0 to get a better estimate of the gradient. This requires storing additional mesh onnetivity information. 4.5 Influene of Seondary Gradients on Coeffiients We noted earlier that the presene of seondary gradient terms introdues the possibility that φ P may not be bounded by its neighbors even when S \ 0. Here we examine this assertion in somewhat greater detail. For simpliity, let us onsider the alulation of seondary gradient the term on the strutured mesh shown in Figure 4.7. To omputed the seondary gradient term, we must find the gradient d φl ηf f. As we noted before, one way to find this is to write φ η n \ f φ b b φ a η For a uniform non-orthogonal mesh with ξ \ η, we may write (4.76) φ a \ φ b \ φ P φ P φ E φ SE 4 φ E φ NE 4 φ S φ N (4.77) so that φ η n \ f 0o 5 p φ N φ NEqrb 0o 5 p φ S 2 η φ SEq (4.78) We note that φ N, φ NE, φ S and φ SE do not all have the same sign in the above expression. When d φl ηf f is inluded in the ell balane as a part of the seondary gradient term for the fae, it effetively introdues additional neighbors φ NE and φ SE. These are not fae neighbors; the orresponding ells share verties with point P. These terms are hidden in s f. Notie that they do not all have positive oeffiients. Consequently it is possible for an inrease in one of the neighbor φ s to result in a derease in φ P. We are no longer guaranteed that φ P is bounded by its neighbors when S \ 0. Even though we have adopted a partiular gradient alulation method here, similar terms result from other alulation methods as well. The magnitude of the seondary gradient terms is proportional to e ξ t e η. For most good quality meshes, this term is nearly zero, and the influene of neighbors with negative oeffiients is relatively small. Thus, for good quality meshes, our disussions in the previous hapter about oeffiient positivity and boundedness of φ hold in large measure. However, we no longer have the absolute guarantee of boundedness and positivity that we had with orthogonal meshes. 86

87 4.6 Implementation Issues Data Strutures For both strutured and unstrutured meshes, the fae flux J f is most onveniently onstrued as belonging to the fae f rather than to either of the ells sharing the fae. Suh an interpretation is in keeping with the onservation idea, whereby the diffusive flux of φ out of ell C0 enters ell C1 without modifiation. We an ensure this by thinking of J f as belonging to the fae, and using it for the ell balane in ells C0 and C1 in turn. This assoiation of the flux with the fae and not the ell makes a fae-based data struture a onvenient one for implementing finite volume shemes. In a typial implementation, we would arry a linked list or array of faes. Eah fae would arry a pointer or index to eah of the two ells that share it, i.e., ells C0 and C1. The influene of ell C1 on the equation for ell C0 is given by a 01 ; the influene of ell C0 on the equation for ell C1 is given by a 10. Thus, we ompute the oeffiient a nb \ for the fae and make the assignment: Γ f A f t A f (4.79) ξ A f t e ξ a 01 u a nb a 10 u a nb (4.80) A visit to all the faes in the list ompletes the alulation of the neighbor oeffiients a nb for all the ells in the domain. If the ell gradient is available, the fae value of the gradient may be found by averaging, as in Equation The seondary gradient terms may then be omputed during the visit to the fae sine they are also assoiated with the fae. Eah fae ontributes a seondary gradient term to the b term for ells C0 and C1: b 0 u b 0 b s f b 1 u b 1 Notie that the seondary gradient term is added to one ell and subtrated from the other. This is beause the fae flux leaves one ell and enters the other. It is also useful to arry a linked list or array of ells. One the oeffiient alulation is omplete, a P for all ells may be omputed by visiting eah ell, omputing S P v and summing a nb. Similarly the S C ontribution to b may also be omputed. Not all gradient alulation proedures are amenable to a purely fae-based implementation. Calulations based on the gradient theorem are amenable to a fae-based alulation proedure. Here, the fae value is omputed using Equation 4.60 during the visit to the fae, as well as the ontribution to the sum in Equation 4.59 for eah of the ells sharing the fae. The reonstrution proedure desribed by Equation 4.61 may also be implemented in a fae-based manner. The least-squares approah for gradient alulation may be implemented by a mixture of fae and ell-based manipulations, depending on the alulation stenil hosen. 87 s f

88 y Overall Solution Loop It is onvenient to ompute and store ell gradients prior to oeffiient alulation. Using the gradient theorem to ompute ell gradients, for example, the overall solution loop takes the following nominal form. 1. Guess φ at all ell entroids and at boundary fae entroids as neessary. 2. For x f \ 1w n faes Find φ f by averaging neighbor ell values φ 0 and φ 1. Add gradient ontribution to ells C0 and C1. y A visit to all faes ompletes the ell gradient alulation. 3. For x f \ 1w n faes Find a 01 and a 10. Find s f ; find b 0 and b 1 by adding/subtrating seondary gradient ontributions to C0 and C1. 4. For x \ 1w n ells Find a P \ nb a nb b S P v Find b \ b S C v y At this point the oeffiient alulation is omplete. 5. Solve for φ at ell entroids using a linear solver suh as Gauss-Seidel iteration. 6. Chek for onvergene. If iterations are onverged, stop. Else go to 2. We refer to one pass through the above loop as an outer iteration. During an outer iteration, we make one all to a linear solver, suh as a Gauss-Seidel solver. The Gauss-Seidel solver may perform a number of inner iterations to obtain the solution to the nominally linear system. For linear problems on orthogonal meshes, only one outer iteration (with suffiient inner iterations of the linear solver) would be required to obtain the onverged solution. For non-linear problems, many outer iterations would be required. For non-orthogonal meshes, the above proedure employs a deferred omputation of seondary gradient terms. Consequently, many outer iterations are required for onvergene, even for linear problems. A omment on the Sarborough riterion is appropriate here. Sine the Sarborough riterion is satisfied by the primary diffusion terms when Dirihlet boundary onditions are present, we are guaranteed onvergene of the Gauss-Seidel solver during any outer iteration. In our deferred alulation proedure, the seondary gradient terms remain fixed during an outer iteration. Therefore, even though the negative oeffiients they introdue tend to violate the Sarborough riterion, they are not relevant sine the seondary gradient terms are held onstant during the Gauss-Seidel iteration. 88

89 4.7 Closure In this hapter, we have seen how to disretize the diffusion equation on non-orthogonal meshes, both strutured and unstrutured. The overall idea is the same as for regular meshes, and involves a balane of diffusive fluxes on the faes of the ell with the soure inside the ell. However, we have seen that the fae fluxes may no longer be written purely in terms of the neighbor ell values if the mesh is non-orthogonal; an extra seondary gradient term appears. To ompute this term, we require fae gradients of φ, whih may be averaged from ell gradients. We have seen how ell gradients may be omputed for strutured and unstrutured meshes. Finally, we have seen how muh of the alulation is amenable to a fae-based data struture. In the next hapter, we address the disretization of the onvetive term, and therefore, the solution of a omplete salar transport equation. 89

90 90

91 z z Chapter 5 Convetion In this hapter, we turn to the remaining term in the general transport equation for the salar φ, namely the onvetion term. We will see how to differene this term in the framework of the finite volume method, and the speial problems assoiated with it. We will address both regular and non-orthogonal meshes. One we have addressed this term, we will have developed a tool for solving the omplete salar transport equation, or the onvetion-diffusion equation, as it is sometimes alled in the literature. In the development that follows, we will assume that the fluid flow is known,i.e., the veloity vetor V is known at all the requisite points in the domain. We seek to determine how the salar φ is transported in the presene of a given fluid flow field. In reality, of ourse, the fluid flow would have to be omputed. We will address the alulation of the fluid flow in later hapters. 5.1 Two-Dimensional Convetion and Diffusion in A Retangular Domain Let us onsider a two-dimensional retangular domain suh as that shown in Figure 5.1. The domain has been disretized using a regular Cartesian mesh. For the sake of larity, let us assume that x and y are onstant, i.e., the mesh is uniform in eah of the diretions x and y. As before, we store disrete values of φ at ell entroids. The equation governing steady salar transport in the domain is given by where J is given by t J \ S (5.1) J \ ρvφ b Γ φ (5.2) Here, ρ is the density of the fluid and V is its veloity, and is given by V \ ui vj (5.3) As before, we integrate Equation 5.1 over the ell of interest, P, so that { t Jdv \ 91 { Sdv (5.4)

92 z m N W w n P e E y s V S x Figure 5.1: Convetion on a Cartesian Mesh Applying the divergene theorem, we write J t da \ S v P (5.5) A As usual, we assume that J is onstant over eah of the faes e, w, n and s of the ell P, and that the fae entroid value is representative of the fae average. Also, we assume S \ S C S P φ P as before. Thus J et A e J wt A w J nt A n J st A s \ p S C S P φ Pq v P (5.6) with A e \ y i A w \ b y i A n \ x j A s \ b x j (5.7) Thus far the disretization proess is idential to our proedure in previous hapters. Let us now onsider one of the transport terms, say, J et A e. This is given by J et A e \ d ρuφf e y b Γ e y φ x n e We see from Equation 5.8 that the onvetion omponent has the form (5.8) F e φ e (5.9) 92

93 where F e \ d ρuf e y (5.10) is the mass flow rate through the fae e. We note that the fae value, φ e, is required to determine the transport due to onvetion at the fae. For the purposes of this hapter, we shall assume that F e is given. We have seen that the diffusive term on the fae e may be written as where b D e d φ E b φ Pf (5.11) D e \ Γ e y d δxf e Similar diffusion terms an be written for other faes as well. The quantity Pe \ F D \ ρuδx Γ (5.12) (5.13) is alled the Pelet number, and measures the relative importane of onvetion and diffusion in the transport of φ. If it is based on a ell length sale, δx, it is referred to as the ell Pelet number. We see that writing the fae flux J e requires two types of information: the fae value φ e, and the fae gradient d φl xf e. We already know how to write the fae gradient. We turn now to different methods for writing the fae value φ e in terms of the ell entroid values. One φ e is determined, it is then simply a matter of doing the same operation on all the faes, olleting terms, and writing the disrete equation for the ell P Central Differening The problem of disretizing the onvetion term redues to finding an interpolation for φ e from the ell entroid values of φ. One approximation we an use is the entraldifferene approximation. Here, we assume that φ varies linearly between grid points. For a uniform mesh, we may write φ e \ φ E 2 φ P so that the onvetive transport through the fae is F e d φ E 2 φ Pf (5.14) (5.15) Similar expressions may be written for the onvetive ontributions on other faes. We note with trepidation that φ E and φ P appear with the same sign in Equation Colleting the onvetion and diffusion terms on all faes, we may write the following disrete equation for the ell P: a P φ P \ nb a nb φ nb 93 b

94 where a E \ D e b a W \ D w F e 2 F w 2 a N \ D n b F n 2 F s a S \ D s 2 a P \ a nb b S P v P nb d F e b F w F n b F s f b \ S C v P (5.17) In the above equations, D e \ Γ e y d δxf e D w \ Γ w y d δxf w D n \ Γ n x d δyf n D s \ Γ s x d δyf s F e \ d ρuf e y F w \ d ρuf w y F n \ d ρvf n x F s \ d ρvf s x (5.18) The term d F e b F w F n b F sf (5.19) represents the net mass outflow from the ell P. If the underlying flow field satisfies the ontinuity equation, we would expet this term to be zero. Let us onsider the ase when the veloity vetor V \ d ui vjf is suh that u } 0 and v } 0. For F e } 2D e, we see that a E beomes negative. Similarly for F n } 2D n, a N beomes negative. (Similar behavior would our with a W and a S if the veloity vetor reverses sign). These negative oeffiients mean that though a P \ nb a nb for S \ 0, we are not guaranteed that φ P is bounded by its neighbors. Furthermore, sine the equation violates the Sarborough riterion, we are not guaranteed the onvergene of the Gauss-Seidel iterative sheme. For u } 0 and v } 0, we see that as long as F e ~ 2D e and F n ~ 2D n, we are guaranteed positive oeffiients, and physially plausible behavior. That is, the fae Pelet numbers Pe e \ F e l D e ~ 2 and Pe n \ F n l D n ~ 2 are required for uniform meshes. For a given veloity field and physial properties we an meet this Pelet number riterion 94

95 by reduing the grid size suffiiently. For many pratial situations, however, the resulting mesh may be very fine, and the storage and omputational requirements may be too large to afford Upwind Differening When we examine the disretization proedure desribed above, we realize that the reason we enounter negative oeffiients is the arithmeti averaging in Equation We now onsider an alternative differening proedure all the upwind differening sheme. In this sheme, the fae value of φ is set equal to the upwind ell entroid value. Thus, for fae e in Figure 5.1, we write φ e \ φ P if F e 0 \ φ E if F e ~ 0 (5.20) These expressions essentially say that the value of φ on the fae is determined entirely by the mesh diretion from whih the flow is oming to the fae. Similar expressions may be written on the other faes. Using Equation 5.20 in the ell balane for ell P, and the diffusion term disretization in Equation 5.11, we may write the following disrete equation for ell P: where a P φ P \ nb a nb φ nb b a E \ D e Max b F e w 0 a W \ D w Max F w w 0 a N \ D n Max b F n w 0 a S \ D s Max F s w 0 a P \ a nb b S P v P nb d F e b F w F n b F sf b \ S C v P (5.22) Here Max aw b \ } \ a if a b b otherwise (5.23) We see that the upwind sheme yields positive oeffiients, and a P \ nb a nb if the flow field satisfies the ontinuity equation and S \ 0. Consequently, we are guaranteed that φ P is bounded by its neighbors. We will see in later setions that though the upwind sheme produes a oeffiient matrix that guarantees physially plausible results and is ideally suited for iterative linear solvers, it an smear disontinuous profiles of φ even in the absene of diffusion. We will examine other higher order differening shemes whih do not have this harateristi. 95

96 b z A f C0 V e ξ C1 ξ fae f Figure 5.2: Convetion on a Non-Orthogonal Mesh 5.2 Convetion-Diffusion on Non-Orthogonal Meshes For non-orthogonal meshes, both strutured and unstrutured, ounterparts of the entral differene and upwind shemes are easily derived. We start with the integration of the onvetion-diffusion equation as usual, integrate it over the ell C0 shown in Figure 5.2, and apply the divergene theorem to get A J t da \ p S C S P φ 0q v 0 (5.24) As before, we assume that the flux on the fae may be written in terms of the fae entroid value, so that J f t A f \ f p S C S P φ 0q v 0 (5.25) where the summation is over the faes f of the ell.the flux is given by J f \ d ρvφf f b Γ f d φf f (5.26) The transport of φ at the fae f may thus be written as We define the fae mass flow rate as J f t A f \ d ρvf f t A f φ f b Γ f d φf f t A f (5.27) F f \ d ρvf f t A f (5.28) This is the mass flow rate out of the ell C0. We have already seen in the previous hapter that the diffusion transport at the fae may be written as: Γ f A f t A f ξ A f t e ξ p φ 1 b φ 0q 96 s f (5.29)

97 Defining D f \ we write the net transport aross the fae f as J f t A f \ F f φ f b D f p φ 1 b φ 0q Γ f A f t A f (5.30) ξ A f t e ξ s f (5.31) We note that, as with regular meshes, the onvetive transport of φ at the fae requires the evaluation of the fae value φ f Central Differene Approximation As with regular meshes, we may find φ f through either a entral differene or an upwind approximation. The simplest entral differene approximation is to write φ f \ φ 0 2 With this approximation, the following disrete equation is obtained: where φ 1 a P φ P \ nb a nb φ nb b (5.32) F f 2 a nb \ D f b a P \ a nb b S P v nb 0 b \ S C v 0 b s f nb g i nb F f f (5.34) We see that, just as with strutured meshes, it is possible to get negative oeffiients using entral differening. If F f } 0, we expet a nb ~ 0 if F f l D f } 2, ie, if the Pelet number Pe f } 2. As before, the quantity f F f is the sum of the outgoing mass fluxes for the ell, and is expeted to be zero if the underlying flow field satisfies mass balane Upwind Differening Approximation Under the upwind differening approximation, φ f \ φ 0 if F f } 0 \ φ 1 otherwise (5.35) Using this approximation in the disrete ell balane we get a P φ P \ nb a nb φ nb 97 b

98 m m m m m m where a nb \ D f Max b F f w 0 a P \ a nb b S P v nb 0 b \ S C v 0 b s f nb g i nb F f f (5.37) As with strutured meshes, we see that the a nb is always guaranteed positive. Thus, we see that the disretization for unstrutured meshes yields a oeffiient struture that is very similar to that for regular meshes. In both ases, the entral differene sheme introdues the possibility of negative oeffiients for ell Pelet numbers greater than 2 for uniform meshes. The upwind sheme produes positive oeffiients, but, as we will see in the next setion, this omes at the ost of auray. 5.3 Auray of Upwind and Central Differene Shemes Let us onsider the trunation error assoiated with the upwind and entral differene shemes. Let us assume a uniform mesh, as shown in Figure 5.3. Using a Taylor series expansion about point e, we may write φ P \ φ e b φ E \ φ e x 2 n x 2 n From Equation 5.38, we see that dφ dx n e dφ dx n e m x 2 n x 2 n 2 m 2 m d 2 φ dx 2 n e d 2 φ dx 2 n e O g d xf O g d xf 3 i (5.38) 3 i (5.39) φ e \ φ P Od xf (5.40) Reall that we use Equation 5.40 when F e } 0. We see that upwind differening is only first order aurate. Adding Equations 5.38 and 5.39, dividing by two, and rearranging terms, we get φ e \ φ P φ E 2 b d xf 8 2 d 2 φ dx 2 n e O g d xf We see that the entral differene approximation is seond-order aurate An Illustrative Example 3 i (5.41) Consider onvetion of a salar φ over the square domain shown in Figure 5.4. The left and bottom boundaries are held at φ \ 0 and φ \ 1 respetively. The flow field in the domain is given by V \ 1o 0i 1o 0j (5.42) 98

99 x WW W w P e E x x Figure 5.3: One-Dimensional Control Volume so the veloity vetor is aligned with the diagonal as shown. We wish to ompute the distribution of φ in the domain using the upwind and entral differene shemes for. The flow is governed by the domain Pelet number Pe \ ρ ƒ Vƒ Ll Γ. For Γ \ 0, i.e., Pe, the solution is φ \ 1 below the diagonal and φ \ 0 above the diagonal. For other values of Pe, we expet a diffusion layer in whih 0 ~ φ ~ 1. The diffusion layer is wider for smaller Pe. We ompute the steady onvetion-diffusion problem in the domain using 13 k 16 quadrilateral ells to disretize the domain. We onsider the ase Pe. Figure 5.5 shows the predited φ values along the vertial enterline of the domain (x=0.5). We see that the upwind sheme smears the phi profile so that there is a diffusion layer even when there is no physial diffusion. The entral differene sheme, on the other hand, shows unphysial osillations in the value of phi. In this problem, it is not possible to ontrol these osillations by refining the mesh, sine the ell Pelet number is infinite no matter how fine the mesh False Diffusion and Dispersion We an gain greater insight into the behavior of the upwind and entral differene shemes through the use of model equations. The main drawbak of the first order upwind sheme is that it is very diffusive. To understand the reasons behind this we develop a model equation for the sheme. Consider ase of steady two-dimensional onvetion with no diffusion: x d ρuφf y d ρvφf \ 0 (5.43) Consider the ase of a onstant veloity field, with u } 0, v } 0, and ρ onstant. Using upwind differening, we obtain the following disrete form ρu φ P b φ W x ρv φ P b φ S y 99 \ 0 (5.44)

100 φ = 0 V L V y x φ = 1.0 Figure 5.4: Convetion and Diffusion in a Square Domain φ Exat Upwind Sheme Central Differene y Figure 5.5: Variation of φ Along Vertial Centerline 100

101 \ \ m Consider the omputational domain shown in Figure 5.1.Expanding φ W and φ S about φ P using a Taylor series, we get φ W \ φ P b x φ x d xf 2! 2 2 φ x b d xf 2 3! 3 3 φ x 3 o0o+o (5.45) φ S \ φ P b y φ 2 d yf 2 φ y 2! y b 3 d yf 3 φ o+o0o 2 3! y 3 (5.46) All derivatives in the above equations are evaluated at P. Rearranging, φ P b φ W x φ x b d xf 2! 2 φ x 2 d xf 3! 2 3 φ x 3 o+o0o (5.47) φ P b φ S φ y y b d yf 2 φ 2 d yf 3 φ o+o+o 2! y 2 3! y 3 (5.48) Using the above expressions in Eq 5.44 and rearranging we obtain ρu φ x ρv φ y \ ρu x 2 φ 2 x 2 ρv x 2 φ 2 y 2 O g d xf 2 i O g d yf 2 i (5.49) For simpliity let us onsider the ase when u \ v and x \ y. Equation 5.50 redues to ρu φ ρv φ x \ ρu x 2 φ 2 φ 2 y 2 x 2 y 2 O n d g xf i (5.50) The differential equation derived in this manner is referred to as the equivalent or modified equation. It represents the ontinuous equation that our finite-volume numerial sheme is effetively modeling. The left hand side of Equation 5.50 is our original differential equation and the right hand side represents the trunation error.the leading term in Equation 5.50 is Od xf, as expeted for a first-order sheme. It is interesting to ompare Equation5.50 with the one dimensional form of the onvetion-diffusion equation (Equation 5.1). We find that the leading order error term in Equation 5.50 looks similar to the diffusion term in the onvetion-diffusion equation. Thus we see that although we are trying to solve a pure onvetion problem, applying the upwind sheme means that effetively we are getting the solution to a problem with some diffusion. This phenomenon is variously alled artifiial, false or numerial diffusion (or visosity, in the ontext of momentum equations). In ase of the upwind sheme, the artifiial diffusion oeffiient is proportional to the grid size so we would expet its effets to derease as we refine the grid, but it is always present. The same analysis for the two-dimensional entral differene sheme starts with Equation 5.43 and the disrete equation ρu φ E b φ W 2 x ρv φ N b φ S 2 y Expanding φ W and φ E about φ P using a Taylor series, we get φ W \ φ P b x φ x d xf 2! φ x b d xf 2 3! \ 0 (5.51) 3 3 φ x 3 o0o+o (5.52)

102 \ \ m m φ E \ φ P x φ x Subtrating the two equations, we get d xf 2! 2 2 φ x b d xf 2 3! 3 3 φ x 3 o+o+o (5.53) φ E b φ W 2 x φ x A similar proedure in the y-diretion yields d xf 3! 2 3 φ x 3 o0o+o (5.54) φ N b φ S 2 y φ y d yf 3! 2 3 φ y 3 o+o0o (5.55) As before, we onsider the ase when u \ v and x \ y. Substituting Equations 5.54 and 5.55 into Equation 5.51 we get ρu φ x ρv φ y \ b ρu x 2 3! 3 φ x 3 3 φ y 3 n O g d xf 3 i (5.56) We see that the leading trunation term is Od x 2 f, as expeted in a seond order sheme. Though we set out to solve a pure onvetion equation, the effetive equation we solve using the entral differene sheme ontains a third derivative term on the right hand side. This term is responsible for dispersion, i.e., for the osillatory behavior of φ. Thus, the upwind sheme leads to false or artifiial diffusion whih tends to smear sharp gradients, whereas the entral-differene sheme tends to be dispersive. 5.4 First-Order Shemes Using Exat Solutions A number of first-order shemes for the onvetion-diffusion equation have been published in the literature whih treat the onvetion and diffusion terms together, rather than disretizing them separately. These shemes use loal profile assumptions whih are approximations to the exat solution to a loal onvetion-diffusion equation. We present these here for historial ompleteness. Their behavior in multi-dimensional situations has the same harateristis as the upwind sheme Exponential Sheme The one-dimensional onvetion diffusion equation with no soure term may be written as x d ρuφf b Γ φ x x n \ 0 (5.57) The boundary onditions are φ \ φ 0 atx \ 0 φ \ φ L atx \ L (5.58) 102

103 m The exat solution to the problem is φ b φ 0 φ L b φ 0 \ where Pe is the Pelet number given by expd+d Pef xl Lf b 1 expd Pef b 1 (5.59) Pe \ ρul Γ (5.60) We wiish to use this exat solution in making profile assumptions. Consider the one-dimensional mesh shown in Figure 5.3 and the onvetion-diffusion equation: x d ρuφf b x Γ φ x n \ S (5.61) We wish to obtain a disrete equation for point P. Integrating Equation 5.61 over the ell P yields J et A e Assuming, for this 1-D ase that J wt A w \ A e \ i p S C S P φ Pq v P (5.62) A w \ b i (5.63) we may write J et A e \ d ρuφf e b Γ e m J wt A w \ b d ρuφf w dφ dx n e m dφ Γ w dx n w (5.64) As before, we must make profile assumptions to write φ e, φ w and the gradients d dφl dxf e and d dφl dxf w. We assume that φ d xf may be taken from Equation We will use this profile to evaluate both φ and dφl dx at the fae. Thus m φ J et A e \ F P e b φ E (5.65) expd Pe e f b 1n Here Pe e \ φ P d ρuf eδx e Γ e \ F e D e (5.66) A similar expression may be written for the w fae. Colleting terms yields the following disrete equation for φ P : a P φ P \ a E φ E 103 a W φ W b

104 where a E \ F e expd F e l D e f b 1 F w expd F w l D wf expd F w l D w f b 1 a P \ a E a W b S P v P d F e b F wf b \ S C v P (5.68) a W \ This sheme always yields positive oeffiients and bounded solutions. For the ase of S \ 0, for one-dimensional situations, it will yield the exat solution regardless of mesh size or Pelet number. Of ourse, this is not true when a soure term exists or when the situation is multi-dimensional. It is possible to show that for these general situations the sheme is only first-order aurate. Beause exponentials are expensive to ompute, researhers have reated shemes whih approximate the behavior of the oeffiients obtained using the exponential sheme. These inlude the hybrid and power law shemes whih are desribed below Hybrid Sheme The hybrid sheme seeks to approximate the behavior of the disrete oeffiients from the exponential sheme by reproduing their limiting behavior orretly. The oeffiient a E in the exponential sheme may be written as a E D e \ P e expd Pe ef b 1 A plot of a E l D e is shown in Figure 5.6. It shows the following limiting behavior: a E D e 0 for Pe e a E D e b Pe e for Pe e b a E D e \ 1 b Pe e 2 (5.69) at Pe e \ 0 (5.70) The hybrid sheme models a E l D e using the three bounding tangents shown in Figure 5.6. Thus a E D e \ 0 for Pe e } 2 a E Pe e 2 \ 1 D e b for b 2 Pe e 2 a E \ D e b Pe e for Pe e ~ b 2 (5.71) The overall disrete equation for the ell P is given by a P φ P \ a E φ E 104 a W φ W b

105 m n a E / D e 6 a E /D e = -Pe e a E /D = e 1 - Pe e /2 1 Exat a E / De = Pe e Figure 5.6: Variation of a E l D e (Adapted from Patankar(1980)) where F e a E \ Max b F e w D e b w 0 2 F a W \ Max F w w w D w w 0 2 a P \ a E a W b S P v P d F e b F w f b \ S C v P (5.73) Power Law Sheme Here, the objetive is to urve-fit the a E l D e urve using a fifth-order polynomial, rather than to use the bounding tangents as the hybrid sheme does. The power-law expressions for a E l D e may be written as: a E D e \ Max 0w 1 b 0o 1ƒ F e ƒ D e 5 Max 0w b F e (5.74) This expression has the advantage that it is less expensive to ompute that the exponential sheme, while reproduing its behavior losely. 5.5 Unsteady Convetion Let us now fous our attention on unsteady onvetion. For simpliity we will set ρ to be unity and Γ \ 0. The onvetion-diffusion equation (Equation 5.1) then takes the 105

106 t=0 t= t=0 t= φ 0.0 φ x/l x/l Figure 5.7: Exat solutions for linear onvetion of (a) sine wave (b) square wave form φ uφ t \ x 0 (5.75) Equation 5.75 is also known as the linear advetion or linear wave equation. It is termed linear beause the onvetion speed u is not a funtion of the onveted quantity φ. We saw in a previous hapter that mathematially this is lassified as a hyperboli equation. To omplete the speifiation of the problem we need to define the initial and boundary onditions. Let us onsider a domain of length L and let the initial solution be given by a spatial funtion φ 0, i.e., The exat solution to this problem is given by φ d xw 0f \ φ 0d xf (5.76) φ d xw tf \ φ 0d x b utf (5.77) In other words, the exat solution is simply the initial profile translated by a distane b ut. Consider the onvetion of two initial profiles by a onvetion veloity u \ 1 in a domain of length L, as shown in Figure 5.7. One is a single sine wave and the other is a square wave, The boundary onditions for both problems are φ d 0w tf \ φ d Lw tf \ 0. Figure 5.7 shows the initial solution as well as the solution at t \ 0o 25. We see that the profiles have merely shifted to the right by 0o 25u. We will use these examples to determine whether our disretization shemes are able to predit this translation aurately, without distorting or smearing the profile. Even though Equation 5.75 appears to be quite simple, it is important beause it provides a great deal of insight into the treatment of the more omplex, non-linear, oupled equations that govern high speed flows. For these reasons, historially it has been one of the most widely studied equations in CFD. Many different approahes 106

107 m m have been developed for its numerial solution but in this book we will onentrate mostly on modern tehniques that form the basis of solution algorithms for the Euler and Navier-Stokes equations D Finite Volume Disretization For simpliity let us examine the disretization of Equation We assume a uniform mesh with a ell width x as shown in Figure 5.3. Integrating Equation 5.75 over the ell P yields φ x t n P d u e φ e b u w φ w f \ 0 (5.78) Sine u is onstant, we may rearrange the equation to write φ t n P u x d φ e b φ w f \ 0 (5.79) Sine for the linear problem the veloity u is known everywhere, the problem of determination of the fae flux simply redues to the determination of the fae values φ. In general, we are interested in two kinds of problems. In some instanes we might be interested in the transient evolution of the solution. Sine the equation is hyperboli in the time oordinate and the solution only depends on the past and not the future, it would seem logial to devise methods that yield the solution at suessive instants in time, starting with the initial solution, using time marhing. Often, however, only the steady-state solution (i.e., the solution as φ t 0) is of interest. In the previous hapter we saw that we ould obtain the steady-state solution by solving a sparse system of nominally linear algebrai equations, iterating for non-linearities. An alternative to iterations is to use time-marhing, and to obtain the steady state solution as the ulmination of an unsteady proess. With the general framework in hand, let s look at some speifi shemes Central Differene Sheme Using the expliit sheme we developed in a previous hapter, we may write φ P b φ 0 P t u d φ 0 E b φ 0 Wf 2 x \ 0 (5.80) where, as per our onvention, the un-supersripted values denote the values at the urrent time, and the terms arrying the supersript 0 denote the value at the previous time level. As we noted earlier, in the expliit sheme, φ P for every ell is only a funtion of the (known) solution at the previous time level. We have shown from a trunation error analysis that the entral differene sheme is seond-order aurate in spae; expliit time disretization is first order aurate in time. Thus the sheme desribed above is seond-order aurate in spae and firstorder aurate in time. Applying the von-neumann stability analysis to this sheme, however, shows that it is unonditionally unstable. As suh it is not usable but there are several important lessons one an learn from this. 107

108 The first point to note is that the instability is not aused by either the spatial or the temporal disretization alone but by the ombination of the two. Indeed, we get very different behavior if we simply using an impliit temporal disretization while retaining the entral differene sheme for the spatial term: φ P b φ 0 P t u d φ E b φ Wf 2 x \ 0 (5.81) It is easy to show that the resulting impliit sheme is unonditionally stable. However, it is important to realize that stability does not guarantee physial plausibility in the solution. We may rewrite the sheme in the following form: φ P \ u t d φ E b φ Wf 2 x φ 0 P (5.82) We see that a W is negative for u } 0 and a E is negative for u ~ 0. The solution is therefore not guaranteed to be bounded by the spatial and temporal neighbor values. Sine the sheme is impliit, it requires the solution of a linear equation set at eah time step. However, the Sarborough riterion is not satisfied, making it diffiult to use iterative solvers First Order Upwind Sheme Using the upwind differene sheme for spatial disretization and an expliit time disretization, we obtain the following sheme φ P b φ 0 P t u d φ 0 P b φ 0 Wf x \ 0 (5.83) We have shown that the upwind differening sheme is only first-order aurate and that the expliit sheme is also only first-order aurate. Stability analysis reveals that the sheme is stable as long as 0 u t x 1 (5.84) The quantity ν \ u t x is known as the Courant or CFL number (after Courant, Friedrihs and Lewy [1, 2]) who first analyzed the onvergene harateristis of suh shemes. Expliit shemes usually have a stability limit whih ditates the maximum Courant number that an be used. This limits the time step and makes the use of time marhing with expliit shemes undesirable for steady state problems. It is interesting to note that our heuristi requirement of all spatial and temporal neighbor oeffiients being positive is also met when the above ondition is satisfied. This is easily seen by writing Equation 5.83 in the form φ P \ d 1 b νf φ 0 P νφ W (5.85) We therefore the expet the sheme to also be monotone when it is stable. To see how well the upwind sheme performs for unsteady problems let us apply it to the problem of onvetion of single sine and square waves we desribed above. To 108

109 Exat Solution First Order Upwind Exat Solution First Order Upwind φ φ ν = ν = x/l x/l Figure 5.8: First order upwind solutions for linear onvetion of (a) sine wave (b) square wave ompute this numerial solution we use an equispaed solution mesh of 50 ells. Using ν \ 0o 5, we apply the expliit sheme for 25 time steps. We ompare the resulting solutions at t \ 0o 25 with the exat solutions in Figure 5.8. The exat solution, as expeted, is the initial profile translated to the right by a distane of Our numerial solution is similarly shifted but we note that the sharp disontinuities in either the slope of the variable itself have been smoothened out onsiderably. In ase of the sine wave, the peak amplitude has dereased but nowhere has the solution exeeded the initial bounds. We also observe that the profiles in both examples are monotoni Error Analysis We an develop a model equation for the transient form of the upwind sheme (Equation 5.83) using tehniques similar those we used for steady state to obtain φ t u φ x \ u x 2 d 1 b νf 2 φ x 2 o+o0o (5.86) We see that, just like steady state, the transient form of the upwind sheme also suffers from numerial dissipation, whih is now a funtion of the Courant number. We know that physially the effet of diffusion (or visosity) is to smoothen out the gradients. The numerial diffusion present in the upwind sheme ats in a similar manner and this is why we find the profiles in Figure 5.8 are smoothened. Although this results in a loss of auray, this same artifiial dissipation is also responsible for the stability of our sheme. This is beause the artifiial visosity also damps out any errors that might arise during the ourse of time marhing (or iterations) and prevents these errors from growing. Note also that for ν } 1 the numerial visosity of the upwind sheme would be negative. We an now appreiate the physial reason behind 109

110 b the CFL ondition; when it is violated the numerial visosity will be negative and thus ause any errors to grow. Let us now analyze the expliit entral differene sheme (Equation 5.80) we saw earlier. The orresponding modified equation is φ u φ t \ u x b 2 t 2 φ o+o0o 2 x 2 (5.87) This sheme has a negative artifiial visosity in all ases and therefore it is not very surprising that it is unonditionally unstable. It an also be shown that the impliit version (Equation 5.81 has the following modified equation φ u φ t \ u 2 t 2 φ o0o+o x 2 x 2 (5.88) Thus this sheme is stable but also suffers from artifiial diffusion Lax-Wendroff Sheme A large number of shemes have been developed to overome the shortomings of the expliit entral differene sheme that we disussed in the previous setion. Of these, the most important is the Lax-Wendroff sheme sine it forms the basis of several wellknown shemes used for solution of Euler and ompressible Navier-Stokes equations. The priniple idea is to remove the negative artifiial diffusion of the expliit entral differene sheme by adding an equal amount of positive diffusion. That is, we seek to solve φ u φ t \ u 2 t 2 φ x 2 x 2 (5.89) rather than the original onvetion equation. Disretizing the seond derivative using linear profiles assumptions, as in previous hapters, we obtain the following expliit equation for ell P φ P b φ 0 P t u d φ 0 E b φ 0 Wf 2 x u 2 t 2 d φ 0 E b 2φ 0P φ 0 Wf \ 0 (5.90) 2 d xf It is possible to show that this sheme is seond order aurate in both spae and time. Stability analysis shows that it is stable for ƒ ν ƒ 1. Applying it to the sine wave onvetion problem, we see that it resolves the smoothly varying regions of the profile muh better than the upwind sheme (see Figure 5.9(a)). However, in regions of slope disontinuity we see spurious wiggles. Suh non-monotoni behavior is even more pronouned in the presene of disontinuities, as shown in Figure 5.9(b). We also note that the solution in this ase exeeds the initial bounds. At some loations it is higher than one while in other plaes it is negative. If φ is a physial variable suh as speies onentration or the turbulene kineti energy that is always supposed to be positive, suh behavior ould ause a lot of diffiulties in our numerial proedure. The reasons for this behavior an one again be understood by examining the trunation error. The modified equation for the Lax-Wendroff sheme is φ t u φ t \ b u d 2 xf 6 d 1 b ν 2 f φ x 3 Od xf 3 (5.91)

111 ˆ ˆ ˆ Exat Solution Lax-Wendroff Exat Solution Lax-Wendroff φ φ ν = ν = x/l x/l Figure 5.9: Lax-Wendroff solutions for linear onvetion of (a) sine wave (b) square wave The leading order term is proportional to the third derivative of φ and there is no diffusion like term. This is harateristi of seond-order shemes and is the reason why wiggles in the solution do not get damped. The errors produed by seond-order terms are dispersive in nature whereas those produed by first-order shemes are dissipative. In wave-mehanis terms, dispersion refers to the phenomenon that alters the frequeny ontent of a signal and dissipation refers to the redution in amplitude. For smooth profiles that ontain few frequenies, seond-order shemes work very well; the lak of numerial diffusion preserves the amplitude. However, in ase of disontinuities (whih are omposed of many frequenies), the effet of numerial dispersion is to ause phase errors between the different frequenies. The first order upwind sheme, on the other hand, does not alter the phase differenes but damps all modes. All the numerial shemes we saw in previous setions were derived by separate profile assumptions for the spatial and temporal variations. The Lax-Wendroff sheme is different in that the spatial profile assumption is tied to the temporal disretization. This beomes more lear if we re-arrange Equation 5.90 in the following form φ P b φ 0 P t u x ˆ φ 0E φp 0 2 b u t 2 x d φ 0 E b φ 0 PfOŠ b φ 0P φw 0 2 b u t 2 x d φ 0 P b φ 0 W fošk \ 0 We reognize the terms in square brakets as the fae flux definitions for the e and w faes respetively. If we are using this sheme for omputing a steady state solution, the equation that is satisfied at onvergene is given by φ E φ P 2 b u t 2 x d φ E b φ Pf Š b φ P φ W 2 b u t 2 x d φ P b φ Wf Š \ 0 (5.92) The onsequene of this is that the final answer we obtain depends on the time-step size t! Although the solution still has a spatial trunation error of Od xf 2 f, this 111

112 dependene on the time step is learly not physial. In this partiular ase, the resulting error in the final solution maybe small sine stability requirements restrit the time step size. We will see in later hapters that similar path dependene of the onverged solution an our even in iterative shemes if we are not areful. 5.6 Higher-Order Shemes We have seen thus far that both the upwind and entral differene shemes have severe limitations, the former due to artifiial diffusion, and the latter due to dispersion. Therefore there has been a great deal of researh to improve the auray of the upwind sheme, by using higher-order interpolation. These higher-order shemes aim to obtain at least a seond-order trunation error, while ontrolling the severity of spatial osillations. Thus far, we have assume that, for the purposes of writing the fae value φ e, the profile of φ is essentially onstant. That is, for F e } 0, φ e \ φ P (5.93) Instead of assume a onstant profile assumption for φ, we may use higher-order profile assumptions, suh as linear or quadrati, to derive a set of upwind weighted higherorder shemes. If F e } 0, we write a Taylor series expansion for φ in the neighborhood of the upwind point P: φ d xf \ φ P d x b x Pf φ x d x b x Pf 2! 2 2 φ x 2 Od xf 3 (5.94) Seond-Order Upwind Shemes We may derive a seond-order upwind sheme by making a linear profile assumption. This is equivalent to retaining the first two terms of the expansion. Evaluating Equation 5.94 at x e \ x P d xf l 2, we obtain φ e \ φ P x φ 2 x (5.95) This assumption has a trunation error of Od xf 2. In order to write φ e in terms of ell entroid values, we must write φ x in terms of ell entroid values. On our onedimensional grid we an represent the derivative at P using either a forward, bakward or entral differene formula to give us three different seond-order shemes. If we write φ x using φ \ φ E b φ W (5.96) x 2 x we obtain φ e \ φ P 112 p φ E b φ Wq 4 (5.97)

113 or, adding and subtrating φ P l 4, we get φ e \ φ P p φ P b φ Wq 4 d φ E b φ Pf 4 This sheme is referred to as the Fromm sheme in the literature. If we write φ x using we obtain φ x \ φ e \ φ P φ P b φ W x p φ P b φ Wq 2 This sheme is referred to in the literature as the Beam-Warming sheme. (5.98) (5.99) (5.100) Third-Order Upwind Shemes We may derive third-order aurate shemes by retaining the seond derivative in the Taylor series expansion: φ d xf \ φ P d x b x Pf φ x d x b x Pf 2! 2 2 φ x 2 (5.101) and using ell-entroid values to write the derivatives φ x and 2 φ x 2. Using and we may write 2 φ x 2 \ φ e \ φ P Re-arranging, we may write φ e \ φ x \ d φ E p φ E p φ E b φ Wq 2 x φ W b 2φ Pq 2 d xf p φ E b φ Wq 4 φ Pf 2 b p φ E p φ E Od x 2 f (5.102) Od x 2 f (5.103) φ W b 2φ Pq 8 φ W b 2φ Pq 8 (5.104) (5.105) This sheme is alled the QUICK sheme (Quadrati Upwind Interpolation for Convetive Kinetis) [3]. This sheme may be viewed as a paraboli orretion to linear interpolation for φ e. We an emphasize this by introduing a urvature fator C suh that and C=1/8. φ e \ 1 2 d φ E φ Pf b Cd φ E 113 φ W b 2φ Pf (5.106)

114 The seond- and third-order shemes we have seen here may be ombined into a single expression for φ e using d 1 b κf 4 d φ P b φ Wf d 1 κf 4 d φ E b φ Pf (5.107) φ e \ φ P Here, κ \ b 1 yields the Beam-Warming sheme, κ \ 0 the Fromm sheme and κ \ 1l 2 the QUICK sheme. For κ \ 1 we get the familiar entral differene sheme. We see from the signs of the terms in Equation that it is possible to produe negative oeffiients in our disrete equation using these higher-order shemes. However, the extent of the resulting spatial osillations is substantially smaller than those obtained through the entral differene sheme, while retaining at least seond-order auray Implementation Issues If iterative solvers are used to solve the resulting set of disrete equations, it is important to ensure that the Sarborough riterion is satisfied by the nominally linear equations presented to the iterative solver. Consequently, typial implementations of higher-order shemes use deferred orretion strategies whereby the higher order terms are inluded as orretions to an upwind flux. For the QUICK sheme, for example, the onvetive transport F e φ e for F e } 0 is written as m F e φœpf (5.108) F e φ e \ F e φ P d φœe 2 b d φœe φœw b 2φŒPf 8 b φœp n Here, the first term on the right hand side represents the upwind flux. The seond term is a orretion term, and represents the differene between the QUICK and upwind fluxes. The upwind term is inluded in the alulation of the oeffiients a p and a nb while the orretion term is inluded in the b term. It is evaluated using the prevailing value of φ. At onvergene, φ P \ φœp, and the resulting solution satisfies the QUICK sheme. Sine the upwind sheme gives us oeffiients that satisfy the Sarborough riterion, we are assured that the iterative solver will onverge every outer iteration. Just as with non-linear problems, we have no guarantee that the outer iterations will themselves onverge. It is sometimes neessary to use good initial guesses and underrelaxation strategies to obtain onvergene. 5.7 Higher-Order Shemes for Unstrutured Meshes All the higher-order shemes we have seen so far assume line struture. In order to write φ e, we must typially know the values φ W, φ P and φ E ; a similar stenil is required for φ w, and involves the values φ WW, φ W, and φ P in Figure 5.3. Thus, we an no longer write the fae value purely in terms of ell entroid values on either side of the fae. This presents a big problem for unstrutured meshes sine no suh line struture exists. Higher-order shemes for unstrutured meshes are an area of ative researh and new ideas ontinue to emerge. We present here a seond-order aurate upwind sheme suitable for unstrutured meshes. 114

115 A f V C0 r 0 f C1 Figure 5.10: Shemati for Seond-Order Sheme Our starting point is the multi-dimensional equivalent of Equation If F f } 0, referring to Figure 5.10, we may write φ using a Taylor series expansion about the upwind ell entroid: Here, r is given by φ d xw yf \ φ 0 d φf 0 t r Od ƒ rƒ 2 f (5.109) r \ p x b x 0q i p y b y 0q j (5.110) To find the fae value φ f, we evaluate Equation at r \ r 0, as shown in Figure Od ƒ r 0 ƒ f (5.111) φ f \ φ 0 d φf 0 t r 0 As with strutured meshes, the problem now turns to the evaluation of d φf 0. We have already seen in the previous hapter several methods for the alulation of the ell entered gradient. Any of these methods may be used to provide d φf Disussion We have touhed upon a number of different first and seond-order shemes for disretizing the onvetion term. We have seen that all the shemes we have disussed here have drawbaks. The first-order shemes are diffusive, whereas the entral differene and higher-order differening shemes exhibit non-monotoniity to varying degrees. All the shemes we have seen employ linear oeffiients, i.e., the disrete oeffiients are independent of φ. Thus, for linear problems, we do not, in priniple, require outer iterations unless a deferred orretion strategy is adopted. A number of researhers have sought to ontrol the spatial osillations inherent in higher-order shemes by limiting ell gradients so as to ensure monotoniity. These shemes typially employ non-linear oeffiients whih are adjusted to ensure adjaent 115

116 g ell values are smoothly varying [4]. Though we do not address this lass of disretization sheme here, they nevertheless represent an important arena of researh. 5.9 Boundary Conditions When dealing with the diffusion equation, we lassified boundaries aording to what information was speified. At Dirihlet boundaries, the value of φ itself was speified whereas at Neumann boundaries, the gradient of φ was speified. For onvetion problems we must further distinguish between flow boundaries where flow enters or leaves the omputational domain, and geometri boundaries. Flow boundaries our in a problem beause we annot inlude the entire universe in our omputational domain and are fored to onsider only a subset. We must then supply the appropriate information that represents the part of the universe that we are not onsidering but that is essential to solve the problem we are onsidering. For example, while analyzing the exhaust manifold of an automobile we might not inlude the ombustion hamber and external airflow but then we must speify information about the temperature, veloity et. of the flow as it leaves the ombustion hamber and enters our omputational domain. The geometri boundaries in suh a problem would be the external walls of the manifold as well the surfaes of any omponents inside the manifold. Flow boundaries may further be lassified as inflow and outflow boundaries. We onsider eah in turn Inflow Boundaries At inflow boundaries, we are given the inlet veloity distribution, as well the value of φ V \ V b ; V bt A b 0 φ \ φ given (5.112) Consider the boundary ell shown in Fig The dashed line shows the inflow boundary. The disrete equation for the ell is given by J bt A b J f t A f \ p S C f S P φ 0q v 0 (5.113) The summation in the seond term is over the interior faes of the ell. We have already seen how to deal with the interior fluxes J f. The boundary flux may J b is given by J bt A b \ ρv bt A b φ b b Γ b d φf b t A b (5.114) Using φ b \ φ given, and writing the diffusion flux as in the previous hapter, J bt A b \ ρv bt A b φ given b Γ b A bt A b ξ A bt e ξ φ 0 b φ giveni This boundary flux may be inorporated into the ell balane for the ell C s b (5.115)

117 A b V b b ξ e ξ C0 Inflow Boundary Figure 5.11: Cell Near Inflow Boundary Outflow Boundaries At outflow boundaries, we assume b Γ b d φf b t A b \ 0 (5.116) That is, the diffusive omponent of the flux normal to the boundary is zero. Thus, the net boundary flux at the outflow boundary is J bt A b \ ρv bt A b φ b ; V bt A b } 0 (5.117) The ell balane for ell near an outflow boundary, suh as that shown in Figure 5.12 is given by Equation Using a first-order upwind sheme, we may write φ b \ φ 0, so that J bt A b \ ρv bt A b φ 0 (5.118) Thus, at outflow boundaries, we do not require the value of φ to be speified it is determined by the physial proesses in the domain, and onveted to the boundary by the exiting flow. This result makes physial sense. For example, if we were solving for temperature in an exhaust manifold where the fluid was ooled beause of ondution through the walls, we would ertainly need to know the temperature of the fluid where it entered the domain but the temperature at the outlet would be determined as part of the solution and thus annot be speified a priori. There are two key impliit assumptions in writing Equation The first is that onvetive flux is more important than diffusive flux. Indeed, we have assumed that the 117

118 A b C0 b V b Figure 5.12: Cell Near Outflow Boundary loal grid Pelet number at the outflow fae is infinitely large. For the exhaust manifold example, this means that the flow rate is high enough so that onditions downstream of our boundary do not affet the solution inside the domain. If the flow rate was not suffiiently high ompared to the diffusion, then we would expet that a lower temperature downstream of the our domain would ause a lower temperature inside the domain as well. The seond assumption is that the flow is direted out of the domain at all points on the boundary. Consider the flow past a bakward-faing step, as shown in Figure If we hoose loation A as the the outflow boundary, we ut aross the reirulation bubble. In this situation, we would have to speify the φ values assoiated with the inoming portions of the flow for the problem to be well-posed. These are not usually available to us. Loation B, loated well past the reirulation zone, is a muh better hoie for an outflow boundary. It is very important to plae flow boundaries at the appropriate loation. Inflow boundaries should be plaed at loations where we have suffiient data, either from another numerial simulation or from experimental observations. Outlet boundaries should be plaed suh that the onditions downstream have no influene on the solution Geometri Boundaries At geometri boundaries, suh as the external walls of an exhaust manifold, the normal omponent of the veloity is zero: V bt A b \ 0 (5.119) 118

119 A B Figure 5.13: Reirulation At Domain Boundary Consequently the boundary flux J b is purely diffusive and given by J b \ b Γ b d φf b (5.120) At geometri boundaries, we are typially given either Dirihlet, Neumann or mixed boundary onditions. We have already shown how these may be disretized in a previous hapter Closure In this hapter, we have addressed the disretization of the onvetion-diffusion equation. We have seen that the onvetion term requires the evaluation of φ at the faes of the ell for both strutured and unstrutured meshes. If the fae value is interpolated using a entral differene sheme, we have seen that our solution may have spatial osillations for high Pelet numbers. The upwind sheme on the other hand, smears disontinuities, though the solution is bounded. We have also examined a lass of upwindweighted seond-order and third order shemes. All these higher-order shemes yield solutions whih an have spatial osillations. In developing these shemes for onvetion, we have assumed that the flow field is known. In the next hapter we shall turn to the task of omputing the flow and pressure fields. 119

120 120

121 m m Chapter 6 Fluid Flow: A First Look We have thus far onsidered onvetion and diffusion of a salar in the presene of a known flow field. In this hapter, we shall examine the partiular issues assoiated with the omputation of the flow field. The momentum equations have the same form as the general salar equation, and as suh we know how to disretize them. The primary obstale is the fat that the pressure field is unknown. The extra equation available for its determination is the ontinuity equation. The alulation of the flow field is ompliated by the oupling between these two equations. We shall examine how to deal with this oupling, espeially for inompressible flows. We shall also see how to develop formulations suitable for unstrutured meshes. 6.1 Disretization of the Momentum Equation Consider the two-dimensional retangular domain shown in Figure 6.1. Let us assume for the moment that the veloity vetor V and the pressure p are stored at the ell entroids. Let us, for simpliity, assume a Newtonian fluid though the issues raised here apply to other rheologies as well. Let us also assume steady state. The momentum equations in the x and y diretions may be written as: t d ρvuf \ t d µ uf b p t i S u (6.1) t d ρvvf \ t d µ vf b p t j S v (6.2) In the above equations, the stress tensor term has been split so that a portion of the normal stress appears in the diffusion term, and the rest is ontained in S u and S v. The reader may wish to onfirm that and S u \ S v \ f u f v x m y µ u x n µ v yn y m x 121 µ v xn b µ u yn b x d µ t Vf (6.3) y d µ t Vf (6.4)

122 z z z z Here, f u and f v ontain the body fore omponents in the x and y diretions respetively. We see that Equations 6.1 and 6.2 have the same form as the general salar transport equation, and as suh we know how to disretize most of the terms in the equation. Eah momentum equation ontains a pressure gradient term, whih we have written separately, as well as a soure term (S u or S v ) whih ontains the body fore term, as well as remnants of the stress tensor term. Let us onsider the pressure gradient term. In deriving disrete equations, we integrate the governing equations over the ell volume. This results in the integration of the pressure gradient over the ontrol volume. Applying the gradient theorem, we get { pdv9\ pda (6.5) A Assuming that the pressure at the fae entroid represents the mean value on the fae, we write The fae area vetors are A pda \ p f A f (6.6) f A e \ yi A w \ b yi A n \ xj A s \ b xj (6.7) Thus, for the disrete u- momentum equation, the pressure gradient term is whih in turn is given by b i t { pdv9\ b i t p f A f (6.8) f b i t p f A f \ d p w b p e f y (6.9) f Similarly, for the disrete v-momentum equation, the pressure gradient term is b j t p f A f \ d p s b p nf x (6.10) f Completing the disretization, the disrete u- and v-momentum equations may be written as \ \ a P u P a nb u nb nb a P v P nb a nb v nb d p w b p ef y b u d p s b p nf x b v (6.11) 122

123 N W w n P e E y s S x Figure 6.1: Orthogonal Mesh The next step is to find the fae pressures p e, p w, p n and p s. If we assume that the pressure varies linearly between ell entroids, we may write, for a uniform grid p e \ p w \ p n \ p s \ p E 2 p W 2 p N 2 p S 2 Therefore the pressure gradient terms in the momentum equations beome p P p P p P p P (6.12) d p w b p e f y \ p p W b p Eq y d p s b p n f x \ p p S b p Nq x (6.13) Given a pressure field, we thus know how to disretize the momentum equations. However, the pressure field must be omputed, and the extra equation we need for its omputation is the ontinuity equation. Let us examine its disretization next. 6.2 Disretization of the Continuity Equation For steady flow, the ontinuity equation, whih takes the form t d ρvf \ 0 (6.14) 123

124 z z z Integrating over the ell P and applying the divergene theorem, we get { t d ρvf dv<\ ρv t da (6.15) A Assuming that the ρv on the fae is represented by its fae entroid value, we may write A ρv t da \ d ρvf f t A f (6.16) f Using V \ ui vj and Equations 6.7, we may write the disrete ontinuity equation as d ρuf e y bhd ρuf w y d ρvf n x bhd ρvf s x \ 0 (6.17) We do not have the fae veloities available to us diretly, and must interpolate the ell entroid values to the fae. For a uniform grid, we may assume d ρuf e \ d ρuf P d ρuf w \ d ρuf W d ρvf n \ d ρvf P d ρvf s \ d ρvf S d ρuf E d ρuf P d ρvf N d ρvf P 2 Gathering terms, the disrete ontinuity equation for the ell P is d ρuf E y b d ρuf W y (6.18) d ρvf N x bhd ρvf S x \ 0 (6.19) We realize that ontinuity equation for ell P does not ontain the veloity for ell P. Consequently, a hekerboard veloity pattern of the type shown in Figure 6.2 an be sustained by the ontinuity equation. If the momentum equations an sustain this pattern, the hekerboarding would persist in the final solution. Sine the pressure gradient is not given a priori, and is omputed as a part of the solution, it is possible to reate pressure fields whose gradients exatly ompensate the hekerboarding of momentum transport implied by the hekerboarded veloity field. Under these irumstanes, the final pressure and veloity fields would exhibit hekerboarding. We see also that the pressure gradient term in the u-momentum equation (Equation 6.13) involves pressures that are 2 x apart on the mesh, and does not involve the pressure at the point P. The same is true for the v-momentum equation. This means that if a hekerboarded pressure field were imposed on the mesh during iteration, the momentum equations would not be able to distinguish it from a ompletely uniform pressure field. If the ontinuity equation were onsistent with this pressure field as well, it would persist at onvergene. In pratie, perfet hekerboarding is rarely enountered beause of irregularities in the mesh, boundary onditions and physial properties. Instead, the tendeny towards hekerboarding manifests itself in unphysial wiggles in the veloity and pressure fields. We should emphasize that these wiggles are a property of the spatial disretization and would be obtained regardless of the method used to solve the disrete equations. 124

125 Figure 6.2: Chekerboard Veloity Field 6.3 The Staggered Grid A popular remedy for hekerboarding is the use of a staggered mesh. A typial staggered mesh arrangement is shown in Figure 6.3. We distinguish between the main ell or ontrol volume and the staggered ell or ontrol volume. The pressure is stored at entroids of the main ells. The veloity omponents are stored on the faes of the main ells as shown, and are assoiated with the staggered ells. The u veloity is stored on the e and w faes and the v veloity is stored on the n and s faes. Salars suh as enthalpy or speies mass fration are stored at the entroids of the ell P as in previous hapters. All properties, suh as density and Γ, are stored at the main grid points. The ell P is used to disretize the ontinuity equation as before: d ρuf e y bed ρuf w y d ρvf n x bed ρvf s x \ 0 (6.20) However, no further interpolation of veloity is neessary sine disrete veloities are available diretly where required. Thus the possibility of veloity hekerboarding is eliminated. For the momentum equations, the staggered ontrol volumes are used to write momentum balanes. The proedure is the same as above, exept that the pressure gradient term may be written diretly in terms of the pressures on the faes of the momentum ontrol volumes diretly, without interpolating as in Equation Thus for the disrete momentum equation for the veloity u e, the pressure gradient term is Similarly, for the veloity v n, the pressure gradient term is d p P b p Ef y (6.21) p p P b p Nq y (6.22) Thus, we no longer have a dependeny on pressure values that are 2 x apart. We note that the mesh for the u-momentum equation onsists of non-overlapping ells whih fill the domain ompletely. This is also true for the v-momentum equation and the ontinuity equation. The ontrol volumes for u and v overlap eah other and the ell P, but this is of no onsequene. 125

126 W N v n Ž Ž Ž Ž Ž Ž Ž Ž Ž Ž Ž Ž Ž Ž už Ž Ž Ž Ž Ž Ž p w Ž Ž Ž Ž Ž Ž Ž P, φ u e v s E main ell ell for u veloity S ell for v veloity Figure 6.3: Staggered Mesh We note further that the mass flow rates F e \ d ρuf e y F w \ d ρuf w y F n \ d ρvf n x F s \ d ρvf s x (6.23) are available at the main ell faes, where they are needed for the disretization of the onvetive terms in salar transport equations. 6.4 Disussion The staggered mesh provides an ingenious remedy for the hekerboarding problem by loating disrete pressures and veloities exatly where required. At this point, our disretization of the ontinuity and momentum equations is essentially omplete. The u e momentum equation may be written as a e u e \ a nb u nb nb Similarly the equation for v n may be written as: a n v n \ nb a nb v nb y d p P b p Ef x p p P b p Nq b e (6.24) b n (6.25) Here, nb refers to the momentum ontrol volume neighbors. For the e momentum equation, the neighbors nb would involve the u veloities at points ee, nne w and sse shown in Figure 6.4. A similar stenil influenes v n. The disrete ontinuity equation 126

127 NW N NE nne W P E w e ee EE SW S sse SE Figure 6.4: Neighbors for u e Momentum Control Volume is given by Equation (Note that beause of grid staggering, the oeffiients a p and a nb are different for the u and v equations). It is not yet lear how this equation set is to be solved to obtain u, v and p. We turn to this matter next. 6.5 Solution Methods Thus far, we have examined issues related to disretization of the ontinuity and momentum equations. The disretization affets the auray of the final answer we obtain. We now turn to issues related to the solution of these equations. The solution path determines whether we obtain a solution and how muh omputer time and memory we require to obtain the solution. For the purposes of this book, the final solution we obtain is onsidered independent of the path used to obtain it, and only dependent on the disretization. (This is not true in general for non-linear problems, where the solution path may determine whih of several possible solutions is aptured). Thus far, our solution philosophy has been to so solve our disrete equations iteratively. Though we have not emphasized this, when solving multiple differential equations, a onvenient way is to solve them sequentially. That is, when omputing the transport of N s hemial speies, for example, one option is to employ a solution loop of the type: 1. for speies i =1, N s Disretize governing equation for speies i 127

128 Solve for mass frations of speies i at ell entroids, assuming prevailing values to resolve non-linearities and dependenes on the mass frations of speies j 2. If all speies mass frations have onverged, stop; else go to step 1. Other alternatives are possible. If we are not worried about storage or omputational time, we may wish to solve the entire problem diretly using a linear system of the type Mφ \ b (6.26) where M is a oeffiient matrix of size d N k N s f k d N k N s f, where N is the number of ells and N s is the number of speies, φ is a olumn vetor of size N k N s, and b is a olumn vetor also of size N k N s. That is, our intent is to solve for the entire set of N k N s speies mass frations in the alulation domain simultaneously. For most pratial appliations, this type of simultaneous solution is still not affordable, espeially for non-linear problems where the M matrix (or a related matrix) would have to be reomputed every iteration. For pratial CFD problems, sequential iterative solution proedures are frequently adopted beause of low storage requirements and reasonable onvergene rate. However there is a diffiulty assoiated with the sequential solution of the ontinuity and momentum equations for inompressible flows. In order to solve a set of disrete equations iteratively, it is neessary to assoiate the disrete set with a partiular variable. For example, we use the disrete energy equation to solve for the temperature. Similarly, we intend to use the disrete u-momentum equation to solve for the u-veloity. If we intend to use the ontinuity equation to solve for pressure, we enounter a problem for inompressible flows beause the pressure does not appear in the ontinuity equation diretly. The density does appear in the ontinuity equation, but for inompressible flows, the density is unrelated to the pressure and annot be used instead. Thus, if we want to use sequential, iterative methods, it is neessary to find a way to introdue the pressure into the ontinuity equation. Methods whih use pressure as the solution variable are alled pressure-based methods. They are very popular in the inompressible flow ommunity. There are a number of methods in the literature [5] whih use the density as a primary variable rather than pressure. This pratie is espeially popular in the ompressible flow ommunity. For ompressible flows, pressure and density are related through an equation of state. It is possible to find the density using the ontinuity equation, and to dedue the pressure from it for use in the momentum equations. Suh methods are alled density-based methods. For inompressible flows, a lass of methods alled the artifiial ompressibility methods have been developed whih seek to asribe a small (but finite) ompressibility to inompressible flows in order to failitate numerial solution through density-based methods [6]. Conversely, pressure-based methods have also been developed whih may be used for ompressible flows [7]. It is important to realize that the neessity for pressure- and density-based shemes is diretly tied to our deision to solve our governing equations sequentially and iteratively. It is this hoie that fores us to assoiate eah governing differential equation with a solution variable. If we were to use a diret method, and solve for the disrete 128

129 veloities and pressure using a domain-wide matrix of size 3N k 3N, (three variables - u,v,p - over N ells), no suh assoiation is neessary. However, even with the power of today s omputers, diret solutions of this type are still out of reah for most problems of pratial interest. Other methods, inluding loal diret solutions at eah ell, oupled to an iterative sweep, have been proposed [8] but are not pursued here. In this hapter, we shall onentrate on developing pressure-based methods suitable for inompressible flows, but whih an be extended to ompressible flows as well. These methods seek to reate an equation for pressure by using the disrete momentum equations. They then solve for the ontinuity and momentum equations sequentially, with eah disrete equation set being solved using iterative methods. We emphasize here that these methods define the path to solution and not the disretization tehnique. 6.6 The SIMPLE Algorithm The SIMPLE (Semi-Impliit Method for Pressure Linked Equations) algorithm and its variants are a set of pressure-based methods widely used in the inompressible flow ommunity [9]. The primary idea behind SIMPLE is to reate a disrete equation for pressure (or alternatively, a related quantity alled the pressure orretion) from the disrete ontinuity equation (Equation 6.20). Sine the ontinuity equation ontains disrete fae veloities, we need some way to relate these disrete veloities to the disrete pressure field. The SIMPLE algorithm uses the disrete momentum equations to derive this onnetion. Let uœ and vœ be the disrete u and v fields resulting from a solution of the disrete u and v momentum equations. Let pœ represent the disrete pressure field whih is used in the solution of the momentum equations. Thus, uœe and vœ n satisfy a e uœe \ a nb uœnb y d pœp b pœef b e nb a n vœn \ a nb vœnb x d pœs b pœpf b n (6.27) nb Similar expressions may be written for uœw and vœs. If the pressure field pœ is only a guess or a prevailing iterate, the disrete uœ and vœ obtained by solving the momentum equations will not, in general, satisfy the disrete ontinuity equation (Equation 6.20). We propose a orretion to the starred veloity field suh that the orreted values satisfy Equation 6.20: u \ uœ u v \ vœ v (6.28) Correspondingly, we wish to orret the existing pressure field p Œ with p \ pœ p (6.29) If we subtrat Equations 6.27 from Equations 6.24 and 6.25 we obtain a e u e a u nb nb nb a n v a nb v nb nb 129 y p p P b p Eq x p p S b p Pq (6.30)

130 Similar expressions may be written for u w and v s. Equations 6.30 represent the dependene of the veloity orretions u and v on the pressure orretions p. In effet, they tell us how the veloity field will respond when the pressure gradient is inreased or dereased. We now make an important simplifiation. We approximate Equations 6.30 as or, defining a e u e y p p P b p Eq a n v n x p p S b p Pq (6.31) d e \ d n \ y a e x a n (6.32) we write Equations 6.31 as u e \ d e p p P b p Eq v n \ d n p p P b p Sq (6.33) so that u e \ uœe v n \ vœn d e p p P b p Eq d n p p P b p Sq (6.34) Further, using Equations 6.23 we may write the fae flow rates obtained after the solution of the momentum equations as The orreted fae flow rates are given by with \ FŒ FŒ n ρ n vœn e \ ρ e uœe y F e \ FŒ e F n \ FŒ n x (6.35) F e F n (6.36) F e \ ρ e d e y p p P b p Eq F n \ ρ n d n x p p P b p Sq (6.37) Similar expressions may be written for F w, F w, F s and F s. Thus far, we have derived expressions desribing how the fae flow rates vary if the pressure differene aross the fae is hanged. We now turn to the task of reating an equation for pressure from the disrete ontinuity equation. 130

131 6.6.1 The Pressure Corretion Equation We now onsider the disrete ontinuity equation. The starred veloities u Œ and vœ, obtained by solving the momentum equations using the prevailing pressure field p Œ do not satisfy the disrete ontinuity equation. Thus or, in terms of F, we have d ρuœ f e y bed ρuœ f w y FŒ e b FŒw d ρvœ f n x bed ρvœ f s x \ 0 (6.38) FŒ n b FŒ s \ 0 (6.39) We require our orreted veloities, given by Equations 6.28, to satisfy ontinuity. Alternately, the orreted fae flow rates, given by Equation 6.36, must satisfy ontinuity. Thus, FŒ e or using Equations 6.37 FŒ e FŒ n F e b FŒw b F w FŒ n F n b FŒ s b F s \ 0 (6.40) ρ e d e y p p P b p Eqrb FŒw b ρ w d w y p p W b p Pq (6.41) ρ n d n x p p P b p Nq&b FŒ s b ρ s d s x p p S b p Pq \ 0 (6.42) Rearranging terms, we may write an equation for the pressure orretion p P as: where a P p P \ p nb nb a E \ ρ e d e y a W \ ρ w d w y a N \ ρ n d n x a S \ ρ s d s x a P \ a nb nb b \ FŒw b FŒ e b FŒ s b FŒ n (6.44) We note that the soure term in the pressure orretion equation is the mass soure for the ell P. If the fae flow rates FŒ satisfy the disrete ontinuity equation (i,e, b is zero), we see that p \ onstant satisfies Equation Thus, the pressure orretion equation yields non-onstant orretions only as long as the veloity fields produed by the momentum equations do not satisfy ontinuity. One these veloity fields satisfy the disrete ontinuity equations, the pressure orretion equation will yield a onstant orretion. In this limit, differenes of p are zero and no veloity orretions are obtained. If the onstant orretion value is hosen to be zero (we will see why this is possible in a later setion), the pressure will not be orreted. Thus, onvergene is obtained one the veloities predited by the momentum equations satisfy the ontinuity equation. 131

132 6.6.2 Overall Algorithm The overall proedure for the SIMPLE algorithm is the following: 1. Guess the pressure field pœ. 2. Disretize and solve the momentum equations using the guessed value p Œ for the pressure soure terms. This yields the uœ and vœ fields. 3. Find the mass flow rates FŒ using the starred veloity fields. Hene find the pressure orretion soure term b. 4. Disretize and solve the pressure orretion equation, and obtain the p field. 5. Corret the pressure field using Equation 6.29 and the veloities using Equation The orreted veloity field satisfies the disrete ontinuity equation exatly. 6. Solve the disrete equations for salar φ if desired, using the ontinuity-satisfying veloity field for the onvetion terms. 7. If the solution is onverged, stop. Else go to step Disussion The pressure orretion equation is a vehile by whih the veloity and pressure fields are nudged towards a solution that satisfies both the disrete ontinuity and momentum equations. If we start with an arbitrary guess of pressure and solve the momentum equations, there is no guarantee that the resulting veloity field will satisfy the ontinuity equation. Indeed the b term in the ontinuity equation is a measure of the resulting mass imbalane. The pressure orretion equation orrets the pressure and veloity fields to ensure that the resulting field annihilates this mass imbalane. Thus, one we solve the pressure orretion equation and orret the uœ and vœ fields using Equations 6.28, the orreted veloity fields will satisfy the disrete ontinuity equations exatly. It will no longer satisfy the disrete momentum equations, and the iteration between the two equations ontinues until the pressure and veloity fields satisfy both equations. It is important to realize that beause we are solving for the pressure orretion terms in de- rather that the pressure itself, the omission of the nb a nb u nb and nb a v nb nb riving the pressure orretion equation is of no onsequene as far as the final answers are onerned. This is easily seen if we onsider what happens in the final iteration. In the final iteration, uœ, vœ and pœ satisfy the momentum equations, and the b term in the p equation is zero. As disussed earlier, the p equation does not generate any orretions, and u \ uœ, v \ vœ, p \ pœ holds true. Thus, the p equation plays no role in the final iteration. Only disrete momentum equation, and the disrete ontinuity equation (embodied in the b term) determine the final answer. The dropping of the nb a nb u nb and nb a v nb nb terms does have onsequenes for the rate of onvergene, however. The u-veloity orretion in Equation 6.30, for example, is a funtion of both the veloity orretion term nb a nb u nb and the pressure 132

133 orretion term. If we drop the nb a nb u nb term, we plae the entire burden of orreting the u-veloity upon the pressure orretion. The resulting orreted veloity will satisfy the ontinuity equation all the same, but the resulting pressure is over-orreted. Indeed, beause of this over-orretion of pressure, the SIMPLE algorithm is prone to divergene unless underrelaxation is used. We underrelax the momentum equations using underrelaxation fators α u and α v in the manner outlined in previous hapters. In addition, the pressure orretion is not applied in its entirety as in Equation Instead, only a part of the pressure orretion is applied: p \ pœ α p p (6.45) The underrelaxation fator α p is hosen to be less than one in order to orret for the over-orretion of pressure. It is important to emphasize that we do not underrelax the veloity orretions in the manner of Equation The entire point of the pressure orretion proedure is to reate veloity orretions suh that the orreted veloity fields satisfy ontinuity. Underrelaxing the veloity orretions would destroy this feature. Thus, the SIMPLE algorithm approahes onvergene through a set of intermediate ontinuity-satisfying fields. The omputation of transported salars suh as enthalpy or speies mass fration is therefore done soon after the veloity orretion step (Step 6). This ensures that the fae flow rates used in disretizing the φ transport equation are exatly ontinuity satisfying every single iteration Boundary Conditions We have already dealt with the boundary onditions for salar transport in the previous hapter. These apply to the momentum equations as well. We turn now to boundary onditions for pressure. Two ommon boundary onditions are onsidered here: given normal veloity and given stati pressure. A third ondition, given stagnation pressure and flow angle, is also enountered, but we will not address it here. At a given-veloity boundary, we are given the normal omponent of the veloity vetor V b at the boundary. This type of boundary ould involve inflow or outflow boundaries or boundaries normal to whih there is no flow, suh a walls. Consider the near-boundary ell shown in Figure 6.5. Out objetive is to derive the pressure orretion equation for C0. Integrating the ontinuity equation for the ell C0 in the usual fashion, we have F e b F b F n b F s \ 0 (6.46) We know how to write the interior fae flow rates F e, F n and F s in terms of the the pressure orretions. For F b, no suh expansion in terms of pressure orretion is neessary beause F b is known, and is given by F b \ ρ b u b y This known flow rate is inorporated diretly into the mass balane equation for ell C0. When all boundaries are given-veloity boundaries, we must ensure that the speified 133

134 n b V P e s Figure 6.5: Near-Boundary Cell for Pressure boundary veloities satisfy overall mass balane over the entire omputational domain; otherwise the problem would not be well-posed. At a given-pressure boundary, the pressure orretion p b is set equal to zero Pressure Level and Inompressibility For inompressible flows,where density is not a funtion of pressure, it is ommon to enounter situations whih are best modeled with given-veloity boundary onditions on all boundaries. In suh a ase, the level of pressure in the domain is not set. Differenes in pressure are unique, but the individual pressure values themselves are not. The reader may verify that p and p C are solutions to the governing differential equations. From a omputational viewpoint we may interpret this situation in the following way. We are given veloity boundary onditions that are ontinuity-satisfying in an overall sense. Thus, if we divide the omputational domain into N ells, and impose a mass balane on them, only N b 1 unique equations an result. Therefore we do not have enough equations for N pressure (or pressure orretion) unknowns. This situation may be remedied by setting the pressure at one ell entroid arbitrarily; alternatively, we may set p \ 0 in one ell in the domain. We should emphasize this situation only ours if all boundaries are given-veloity boundaries. When the stati pressure p is given on a boundary, the pressure is made unique, and the problem does not arise. For ompressible flows, where the density is a funtion of pressure, it is neessary to speify pressure boundary onditions on at least part of the domain boundary. Let us go bak to the pressure orretion equation, Equation 6.44 and its behavior at onvergene. We have said that the pressure orretion beomes a onstant at onvergene. If all boundaries are given-veloity boundaries, the pressure orretion has an arbitrary level, whih we are free to set equal to zero. Thus, the pressure p Œ sees no orretions at onvergene.(even if we did not set p to zero, the result is still onverged; the pressure level would rise by a onstant every iteration, but this is aeptable sine 134

135 only differenes of pressure are relevant with all given-veloity boundaries). If one or more given-pressure boundaries are present, p \ 0 is set at at least one boundary fae. Thus the onstant value predited by the pressure orretion will ome out to be zero. In this ase also, the pressure orretion predits zero orretions at onvergene. 6.7 The SIMPLER Algorithm The SIMPLE algorithm has been widely used in the literature. Nevertheless, there have been a number of attempts to aelerate its onvergene, and one suh algorithm is SIMPLER (SIMPLE-Revised) [10]. One of the drawbaks of the SIMPLE algorithm is the approximate nature of the pressure orretion equation. Beause the nb a nb u nb and nb a nb v nb terms are dropped in its derivation, the pressure orretions resulting from it are too large, and require under-relaxation. This slows down onvergene, sine optimal values are problem dependent and rarely know a priori. The veloity orretions, however, are good, and guarantee that the orreted veloities satisfy the ontinuity equation. Consequently, it would seem appropriate to use the pressure orretion equation to orret veloities, while finding another way to ompute the pressure. A good way of understanding this is to onsider what the SIMPLE algorithm does when we know the veloity field, but do not know the pressure field. If we solve the momentum equations with a guessed pressure field p Œ, we destroy the original (good) veloity field, and then embark on a long iterative proess to reover it. A good guess of the veloity field is no use when using the SIMPLE algorithm, unless aompanied by a good pressure guess. We would prefer an algorithm whih an reover the orret pressure field immediately if the exat veloity field is known. With SIMPLER, we derive the pressure equation by re-arranging the momentum equations as follows: By defining we may write u e \ v n \ Furthermore, we may define nb a nb u nb a e nb a nb v nb û e \ ˆv n \ a n u e \ û e v n \ ˆv n b e b n nb a nb u nb a u e d e d p P b p Ef d n p p P b p Nq (6.48) b e b n nb a nb v nb a e (6.49) d e d p P b p Ef d n p p P b p Nq (6.50) ˆF e \ ρ e û e y ˆF n \ ρ n ˆv n x (6.51) 135

136 so that F e \ ˆF e F n \ ˆF n ρ e d e y d p P b p Ef ρ n d n x p p P b p Nq (6.52) Substituting Equations 6.52 into the disrete ontinuity equation (Equation 6.20) we obtain the following equation for the pressure: where a P p P \ nb a nb p nb b a E \ ρ e d e y a W \ ρ w d w y a N \ ρ n d n x a S \ ρ s d s x \ \ b a P a nb nb b ˆF w ˆF e ˆF s b ˆF n (6.54) The form of the pressure equation is idential to that of the pressure orretion equation, and the a P and a nb oeffiients are idential to those governing the pressure orretion. The b term, however, is different, and involves the veloities û and ˆv rather than the prevailing veloities uœ and vœ. We should emphasize that although the b term looks similar in form to that in the p equation, it does not represent the mass imbalane. Another important differene is that no approximations have been made in deriving the pressure equation. Thus, if the veloity field is exat, the orret pressure field will be reovered Overall Algorithm The SIMPLER solution loop takes the following form: 1. Guess the veloity field. 2. Compute û and ˆv. 3. Solve the pressure equation (Equation 6.54) using the guessed field and obtain the pressure. 4. Solve the momentum equations using the pressure field just omputed, to obtain uœ, and vœ. 5. Compute the mass soure term b in the pressure orretion equation. 6. Solve the pressure orretion equation to obtain p. 7. Corret uœ and vœ using Equations Do not orret the pressure! 136

137 8. At this point we have a ontinuity satisfying veloity field. Solve for any salar φ s of interest. 9. Chek for onvergene. If onverged, stop. Else go to Disussion The SIMPLER algorithm has been shown to perform better than SIMPLE. This is primarily beause the SIMPLER algorithm does not require a good pressure guess (whih is diffiult to provide in any ase). It generates the pressure field from a good guess of the veloity field, whih is easier to guess. Thus, the SIMPLER algorithm does not have the tendeny to destroy a good veloity field guess like the SIMPLE algorithm. The SIMPLER algorithm solves for two pressure variables - the atual pressure and the pressure orretion. Thus, it uses one extra equation, and therefore involves more omputational effort. The pressure orretion solver in the SIMPLE loop typially aounts for half the omputational effort during an iteration. This is beause the pressure orretion equation is frequently solved with given-veloity boundary onditions. The lak of Dirihlet boundary onditions for p auses linear solvers to onverge slowly. The same is true of pressure. Thus, adding an extra pressure equation in the SIMPLER algorithm inreases the omputational effort by about 50%. The momentum equation oeffiients are needed in two plaes to find û and ˆv for the pressure equation, and later, to solve the momentum equations. To avoid omputing them twie, storage for eah of the oeffiient sets is required. This is also true for the pressure oeffiients. Beause the pressure orretion p is not used to orret the pressure, no underrelaxation of the pressure orretion in the manner of Equation 6.45 is required. The pressure equation may itself be underrelaxed if desired, but this is not usually required. The momentum equations must be underrelaxed to aount for non-linearities and also to aount for the sequential nature of the solution proedure. 6.8 The SIMPLEC Algorithm The SIMPLE-Correted (SIMPLEC) algorithm [11] attempts to ure the primary failing of the SIMPLE algorithm, i.e., the neglet of the nb a nb u nb and nb a v nb nb terms in writing Equations Instead of ignoring these ompletely, the SIMPLEC algorithm attempts to approximate the neighbor orretions by using the ell orretion as: nb nb a nb u nb u e a nb nb a nb v nb v e a nb (6.55) nb 137

138 Thus, the veloity orretions take the form Redefining d e and d n as b \ p b a e a nb u e y p P p Eq nb b \ p b a n a nb v n x p P p Nq (6.56) nb d e \ d n \ y p a e b nb a nbq x p a n b nb a nbq (6.57) The rest of the proedure is the same as that for the SIMPLE algorithm exept for the fat that the pressure orretion need not be underrelaxed as in Equation However, we should note that the d e and d n definitions require the momentum equations to be underrelaxed to prevent the denominator from going to zero. The SIMPLEC algorithm has been shown to onverge faster than the SIMPLE and does not have the omputational overhead of the SIMPLER algorithm. However, it does share with SIM- PLE the property that a good veloity field guess would be destroyed in the initial iterations unless aompanied by a good guess of the pressure field. 6.9 Optimal Underrelaxation for SIMPLE It is possible to make SIMPLE dupliate the speed-up exhibited by SIMPLEC through the judiious hoie of underrelaxation fators. The SIMPLE proedure employs a pressure orretion of the type p \ pœ α p p (6.58) whereas the SIMPLEC algorithm employs a pressure orretion of the type p \ pœ p (6.59) Rather than solve for p, let us make the SIMPLE algorithm solve for a variable ˆp defined as ˆp š\ α p p (6.60) Then its orretion equation takes the form of Equation We may think of SIM- PLEC as solving for ˆp rather than p. Now let us examine the p equation (or ˆp equation) solved by SIMPLEC. The equation has the form a P ˆp P \ a nb ˆp nb nb 138 b (6.61)

139 with the oeffiients a nb having the form a nb \ ρ y 2 a e b nb a nb (6.62) Let us assume for simpliity that the momentum equation oeffiients have no S P terms, so that a e \ nb a nb (6.63) α u Thus, the pressure orretion oeffiients in Equation 6.62 may be written as a nb \ ρ y 2 1 α u α u nb a nb (6.64) Now we turn to the SIMPLE algorithm. If we ast its p equation in ˆp form, we get b (6.65) with the oeffiients a nb having the form a P ˆp P \ a nb ˆp nb nb a nb \ ρ y 2 α p (6.66) α u nb a nb If we require the a nb oeffiient in Equation 6.64 to be equal to that in Equation 6.66, we onlude that α p \ 1 b α u (6.67) Thus, we see that if we use Equation 6.67 in underrelaxing the momentum equations and the pressure orretion, we would essentially reprodue the iterations omputed by SIMPLEC Disussion We have seen three different possibilities for a sequential solution of the ontinuity and momentum equations using a pressure-based sheme. A number of other variants and improvements of the basi SIMPLE proedure are also available in the literature. These are, however, variations on the basi theme of sequential solution, and the same basi advantages and disadvantages obtain. All these proedures have the advantage of low storage, and reasonably good performane over a broad range of problems. However, they are known to require a large number of iterations in problems with large body fores resulting from buoyany, swirl and other agents; in strongly non-linear ases, divergene may our despite underrelaxation. Many of these diffiulties are a result of the sequential nature of the momentum and ontinuity solutions, whih are strongly oupled through the pressure gradient term when strong body fores are present. For suh problems, the user would not find muh differene in the performane of the different SIMPLE variants. A variety of oupled solvers have been developed whih seek 139

140 (a) (b) Figure 6.6: Veloity Systems for Strutured Bodyfitted Meshes: (a) Cartesian, and (b) Grid-Following to replae the sequential solution of the momentum and ontinuity equations through tighter oupling of the two equations (see [8] for example). These proedures usually inur a storage penalty but exhibit substantial onvergene aeleration, at least for laminar flow problems. This area ontinues to be ative area for new researh, espeially in onnetion with unstrutured meshes Non-Orthogonal Strutured Meshes When strutured non-orthogonal meshes are used, the staggered mesh proedures desribed above may be used in priniple. However, great are must be taken in the hoie of veloity omponents. For example, it is not possible to use Cartesian veloity omponents with a staggered mesh, as illustrated in Figure 6.6(a). Here we onsider a 90œ elbow. If we store the u and v veloities on the faes as shown, similar to our pratie on regular meshes, it is possible to enounter ells where the stored fae veloity omponent is tangential to the fae, making it diffiult to disretize the ontinuity equation orretly. If staggered meshes are used, it is neessary to use grid following veloities, i.e., veloities whose orientation is defined with respet to the loal fae. In Figure 6.6(b), for example, we use veloity omponents normal to the fae in question. These veloity omponents are guaranteed to never beome tangential to the fae beause they turn as the mesh turns. Any veloity set with a fixed (non-zero) angle to the loal fae would do as well.(other options, suh as storing both omponents of the Cartesian veloities at all faes, have been tried; though formulations of this type an be worked out, the result is not very elegant; for example, overlapping momentum ontrol volumes result). Two primary grid-following or urvilinear veloity systems have been used in the literature for this purpose. These are the ovariant veloity and the ontravariant veloity systems. Consider the ells P and E is Figure 6.7(a). The vetors e ξ and e η are alled the ovariant basis vetors. The e ξ vetor is aligned along the line joining the ell entroids. The e η vetor is aligned tangential to the fae. The veloity omponents along these basis diretions are alled the ovariant veloity omponents. On eah fae, the omponent along the line joining the entroids is stored. Thus on Karki 140

141 P e η e ξ E (a) P e η e ξ E (b) Figure 6.7: Curvilinear Veloity Components (a) Covariant, and (b) Contravariant and Patankar [7] have use a ovariant veloity formulation to develop a staggered mesh SIMPLE algorithm for body-fitted strutured meshes. Alternatively, ontravariant basis vetors may be used, as shown in Figure 6.7(b). Here, the basis vetor e ξ is perpendiular to the fae, and the basis vetor e η is perpendiular to the line joining the ell entroids. The ontravariant veloities are aligned along these basis diretions. Eah fae stores one ontravariant omponent, the omponent perpendiular to the fae. The SIMPLE family of algorithms may be developed for a staggered mesh disretization using either of these two oordinate systems. Though these efforts have generally been suessful, urvilinear veloities are not partiularly easy entities to deal with. Sine Newton s laws of motion onserve linear momentum, the momentum equations written in Cartesian oordinates may always be ast in onservative form. Curvilinear oordinates do not have this property. Sine ovariant and ontravariant basis vetors hange diretion with respet to an invariant Cartesian system, the momentum equations written in these urvilinear diretions annot be written in onservative form; momentum in the urvilinear diretions is not onserved. As a result, additional urvature terms appear, just as they do in ylindrial-polar or spherial oordinates. Thus we are not guaranteed onservation. (Researhers have proposed lever ures for this problem; see Karki and Patankar [7], for example). Furthermore, veloity gradients are required in other equations, for example for prodution terms in turbulene models, or for strain rates in non-newtonian rheologies. These quantities are extremely umbersome to derive in urvilinear oordinates. To overome this, researhers have omputed the flow field in urvilinear oordinates and stored both Cartesian and urvilinear veloities. They use Cartesian veloity omponents for all suh manipulations. Despite these workarounds, urvilinear veloities remain umbersome and are diffiult 141

142 Pressure Storage Loation Veloity Storage Loation Figure 6.8: Sheme Storage Arrangement for Node-Based Unequal Order Finite Volume to interpret and visualize in omplex domains Unstrutured Meshes For unstrutured meshes, the staggered mesh disretization method we have derived so far is almost entirely useless sine no obvious mesh staggering is possible. In the finite element ommunity, a lass of unequal order methods have been developed whih interpolate pressure to lower order than veloity. This has been shown to irumvent heker-boarding. Node-based finite-volume shemes [12] have been developed whih employ the same unequal-order idea. In the work by Baliga and Patankar, for example, triangular maro-elements are employed, as shown in Figure 6.8. Pressure is stored at the nodes of the maroelement. The maroelement is subdivided into 4 sub-elements, and veloity is stored on the verties of the subelements. Though this arrangement has been shown to prevent hekerboarding, pressure is resolved to only one-fourth the mesh size as the veloity in two dimensions, prompting onerns about auray. For ell based shemes there is no obvious ounterpart of this unequal order arrangement Closure In this hapter, we have developed staggered mesh based disretization tehniques for the ontinuity and momentum equations. Staggering was shown to be neessary to prevent hekerboarding in the veloity and pressure fields. We then developed sequential and iterative pressure-based tehniques alled SIMPLE, SIMPLER and SIMPLEC for solving this set of disrete equations. We see that the staggered disretization developed in this hapter is not easily extended to body-fitted and unstrutured meshes. The use of staggered mesh methods based on urvilinear veloities is umbersome and uninviting for strutured meshes. For unstrutured meshes, it is not easy to identify a workable staggered mesh, even if we ould use urvilinear veloity omponents. Beause of these diffiulties, efforts have been underway to do away with staggering altogether and to develop tehniques known variously as non-staggered, equal-order, or o-loated methods. These teh- 142

143 niques store pressure and veloity at the same physial loation and attempt to solve the problem of hekerboarding through lever interpolation tehniques. They also do away with the neessity for urvilinear veloity formulations, and use Cartesian veloities in the development. We will address this lass of tehniques in the next hapter. We should emphasize that the material to be presented in the next hapter hanges only the disretization pratie. We may still use sequential and iterative tehniques suh as SIMPLE to solve the resulting set of disrete equations. 143

144 144

145 Chapter 7 Fluid Flow: A Closer Look In this hapter, we turn to the problem of disretizing the ontinuity and momentum equations using a non-staggered or o-loated mesh. We saw in the last hapter that storing pressure and veloity at the same loation, i.e., at the ell entroids, leads to hekerboarding in the pressure and veloity fields. We irumvented this in Cartesian meshes by using staggered storage of pressure and veloity. We also used Cartesian veloity omponents as our primary variables. For unstrutured meshes, it is not obvious how to define staggered pressure and veloity ontrol volumes. Furthermore, staggered meshes are somewhat umbersome to use. For Cartesian meshes, staggering requires the storage of geometry information for the main and staggered u and v ontrol volumes, as well inreased oding omplexity. For body-fitted meshes, we saw in the previous hapter that staggered meshes ould only be used if grid-following veloities were used; we saw that this option is also not entirely optimal. As a result, reent researh has foused on developing formulations whih employ Cartesian veloity omponents, storing both pressure and veloity at the ell entroid. Speialized interpolation shemes are used to prevent hekerboarding. The hange to a o-loated or non-staggered storage sheme is a hange in the disretization pratie. The iterative methods used to solve the resulting disrete set are the same as those in the previous hapter, albeit with a few minor hanges to aount for the hange in storage sheme. For the purposes of this hapter, we will ontinue to use the SIMPLE family of algorithms for the solution of the disrete equations. 7.1 Veloity and Pressure Chekerboarding Co-loated or non-staggered methods store pressure and veloity at the ell entroid. Furthermore, we use Cartesian veloity omponents u and v, defined in a global oordinate system. Thus, in Figure 7.1, u, v and p are stored at the ell entroid P, as are other salars φ. The priniple of onservation is enfored on the ell P. In the disussion that follows, let us assume an orthogonal one-dimensional uniform mesh. We will address two-dimensional and non-orthogonal meshes in a later setion, one the basi idea is lear. The mesh and assoiated nomenlature are shown 145

146 N W w n P e E EE u,v,p,φ s S Figure 7.1: Co-Loated Storage of Pressure and Veloity in Figure Disretization of Momentum Equation The disretization of the u-momentum equation for the ell P follows the priniples outlined in previous hapters and yields the following disrete equation: a P u P \ a nb u nb nb b u P d p w b p e f (7.1) Here, a unit area of ross setion y \ 1 has been assumed. The neighbors nb for this o-loated arrangement inlude the veloities at the points E and W. The pressure at the faes e and w are not known sine the pressure is stored at the ell entroids. u e W P e E EE Figure 7.2: Control Volumes for Veloity Interpolation 146

147 Consequently, interpolation is required. Adopting a linear interpolation, and a uniform mesh, we may write Similarly, for u E, we may write a P u P \ nb a nb u nb a E u E \ nb a nb u nb b u P b u E p p W b p Eq 2 d p P b p EEf 2 (7.2) (7.3) We see that the u-momentum equation at point P does not involve the pressure at the point P; it only involves pressures at ells on either side. The same is true for u E. Thus, the u-momentum equation an support a hekerboarded solution for pressure. If we retain this type of disretization for the pressure term in the momentum equation, we must make sure that the disretization of the ontinuity equation somehow disallows pressure hekerboarding Disretization of Continuity Equation In order to disretize the ontinuity equation, we integrate it over the ell P as before and apply the divergene theorem. This yields where F e b F w \ 0 (7.4) F e \ ρ e u e y F w \ ρ w u w y (7.5) As we disussed in the previous hapter, we must interpolate u from the ell entroid values to the fae in order to find u e and u w. If we use a linear interpolation u u e \ P u E 2 u u w \ W u P 2 Substituting these relations into Equation 7.4 and assuming unit y yields Pressure Chekerboarding (7.6) ρ e u E b ρ w u W \ 0 (7.7) Let us now onsider the question of whether Equation 7.7 an support a hekerboarded pressure field. Dividing Equations 7.2 and 7.3 by their respetive enter oeffiients a P and a E, we have u P \ û P u E \ û E 1 p p W b p Eq a P 2 1 d p P b p EEf a E (7.8)

148 m where û P \ û E \ nb a nb u nb a P b u P b u E nb a nb u nb a (7.9) E If we average u P and u E using Equation 7.8 to find u e in Equation 7.7 we obtain m m û u e \ P û E 1 1 p P b p EE (7.10) 2 a P a E 4 n p W b p E 4 n A similar equation an be written for u w : u w \ û W û P 2 1 a W p WW b p P 4 n m 1 a P p W b p E 4 n (7.11) We see right away that any hekerboarded pressure field whih sets p W \ p E and p P \ p EE \ p WW will be seen as a uniform pressure field by u e and u w. These fae veloities are used to write the one-dimensional disrete ontinuity equation (Equation 7.7). Sine the same type of hekerboarding is supported by the disrete momentum equations, a hekerboarded pressure field an persist in the final solution if boundary onditions permit. Our disrete ontinuity equation does nothing to filter spurious osillatory modes in the pressure field supported by the momentum equation Veloity Chekerboarding In addition to pressure hekerboarding, the linear interpolation of ell veloities also introdues hekerboarding. As we have seen in the previous hapter, the resulting disrete ontinuity equation, Equation 7.7, does not involve the ell-entered veloities u P. Thus, the ontinuity equation supports a hekerboarded veloity field. Suh a hekerboarded veloity field implies hekerboarded momenta in the ell momentum balane. If we enfore momentum balane on the ell, we will in effet reate a pressure field to offset these hekerboarded momenta; this pressure field must of neessity be hekerboarded. In order to prevent hekerboarding in the final solution, we must ensure that the disretization of either the momentum or the ontinuity equation provides a filter to remove these osillatory modes. 7.2 Co-Loated Formulation Co-loated formulations prevent hekerboarding by devising interpolation proedures whih express the fae veloities u e and u w in terms of adjaent pressure values rather than alternate pressure values. Furthermore the fae veloity u e is not defined purely as a linear interpolant of the two adjaent ell values; an additional term, alled the added dissipation prevents veloity hekerboarding. 148

149 \ \ As we saw in the previous setion, the disrete one-dimensional momentum equations for ells P and E yield where u P \ û P u E \ û E d P \ d E \ p p d W b p Eq P 2 d E d p P b p EEf 2 1 a P (7.12) 1 a E (7.13) Writing the ontinuity equation for ell P we have or equivalently F e b F w \ 0 (7.14) ρ e u e b ρ w u w \ 0 (7.15) As before, unit ross-setional area is assumed. If we interpolate u e linearly, we get m m u u e \ P u E û P û 2 E p d 2 P d P E b p EE (7.16) 4 n Instead of interpolating linearly, we use where u e \ u P m u E 2 b d P û P û E 2 p W b p E 4 n p W b p E 4 n b d E m p P b p EE 4 n d e d p P b p Ef d e d p P b p Ef (7.17) d e \ d P 2 d E (7.18) A similar expression may be written for u w. It is important to understand the manipulation that has been done in obtaining Equation We have removed the pressure gradient term resulting from linear interpolation of veloities (whih involves the pressures p W, p E, p P and p EE ) and added in a new pressure gradient term written in terms of the pressure differene d p P b p Ef. Another way of looking at this is to say that in writing u e, we interpolate the û omponent linearly between P and E, but write the pressure gradient term diretly in terms of the adjaent ell-entroid pressures p P an p E. This type of interpolation is sometimes referred to as momentum interpolation in the literature. It is also sometimes referred to as an added dissipation sheme. It was proposed, with small variations, by different researhers in the early 1980 s [13, 14, 15] 149

150 m for use with pressure-based solvers. Ideas similar to it have also been used in the ompressible flow ommunity with density-based solvers. Momentum interpolation prevents hekerboarding of the veloity field by not interpolating the veloities linearly. The fae veloities u e and u w are used to write the disrete ontinuity equation for ell P. Sine they are written in terms of adjaent pressures rather that alternate ones, a ontinuity-satisfying veloity field would not be able to ignore a hekerboarded pressure field. Thus, even though the momentum equation ontains a pressure gradient term that an support a hekerboarded pattern, the ontinuity equation does not permit suh a pressure field to persist. Another useful way to think about momentum interpolation is to onsider the fae veloity u e to be a sort of staggered veloity. The momentum interpolation formula, Equation 7.17, may be interpreted as a momentum equation for the staggered veloity u e. Instead of deriving the staggered momentum equation from first priniples, the momentum interpolation proedure derives it by interpolating û linearly, and adding the pressure gradient appropriate for the staggered ell. (Reall that the quantity û ontains the onvetion, diffusion and soure ontributions of the momentum equation.) By not using an atual staggered-ell disretization, momentum interpolation avoids the reation of staggered ell geometry and makes it possible to use the idea for unstrutured meshes. 7.3 The Conept of Added Dissipation It is useful to understand why momentum interpolation is also referred to as the added dissipation sheme. For simpliity, let us assume that d P \ d E \ d e. This would be the ase if the mesh were uniform, and the flow field, diffusion oeffiients and soure terms were onstant for the ells P and E. Let us onsider the first of the expressions in Equation 7.17: m u u e \ P u E p 2 b d W P b p E p P b p EE d 4 4 n P d p P b p Ef Let us look at the pressure terms b d P m p W b p E 4 Rearranging, we have \ b b d P m d P p W b p E 4 4 p p pw p P b p EE 4 n d P d p P b p Ef p P b p EE 4 bhd p P b p Ef n p E b 2p Pq&bhd p P Using a Taylor series expansion, we an show that 2 p x 2 n \ P p p W p E b 2p Pq x p EE b 2p Ef q (7.21) O p x 2 q (7.22)

151 m \ b m m m m m Similarly 2 p x 2 n \ d p P E p EE b 2p Ef x 2 O p x 2 q (7.23) The pressure term in the momentum interpolation sheme may thus be written as u e \ u P u E 2 b d P 4 mžm m 2 p x 2 n b P 2 p x 2 n En or, dividing and multiplying the pressure term by x, we may write u e \ u P u E 2 b d P 4 x 2 (7.24) 3 p x 3 x n 3 (7.25) e A similar expression may be written for u w : u w \ u W u P 2 b d P 4 3 p x 3 x n 3 (7.26) w Now, let us look at the ontinuity equation. If we write the ontinuity equation for onstant ρ, and dividing through by x we get u e b u w x Substituting for u e and u w from Equations 7.25 and 7.26 we get u E b u W 2 x Using a Taylor series expansion, we may show that u E b u W 2 x so that Equation 7.28 may be written as m u xn b d P P 4 d P 4 u x n P \ 0 (7.27) 4 p x 4 x n 3 (7.28) P Od x 2 f (7.29) 4 p x 4 x n 3 \ 0 (7.30) P We see that momentum interpolation is equivalent to solving a ontinuity equation with an added fourth derivative of pressure. Even derivatives are frequently referred to in the literature as dissipation; hene the name added dissipation sheme. 7.4 Auray of Added Dissipation Sheme Let us now examine the auray of the momentum interpolation or the added dissipation sheme. The interpolation sheme may be written using Equation 7.21 u e \ u P u E 2 b d P 4 p p pw p E b 2p Pq bhd p P p EE b 2p Ef q (7.31) 151

152 b m m m m m m Let us onsider the first term d u P may write u P \ u e b u E \ u e u Ef l 2. Using a Taylor series expansion about e, we u x x n e 2 u x x n e 2 Adding the two equations and dividing by two yields u e \ u P u E 2 n 2 u x 2 x 2 e 8 n 2 u x 2 x 2 e 8 Od x 3 f Od x 3 f (7.32) Od x 2 f (7.33) Thus the trunation error in writing the first term in Equation 7.31 is Od x 2 f. We already saw from Equation 7.22 that the pressure term may be written as d P 4 p p pw p E b 2p Pq bhd p P p EE b 2P Ef q \ b d P 4 3 p x 3 x n 3 (7.34) e so that the total expression for u e is u u e \ P u E 2 b d P 4 3 p x 3 n e x 3 Od x 2 f (7.35) We see that the pressure term we have added is Od x 3 f, whih is of higher order than the seond-order trunation error of the linear interpolation. Consequently, the added dissipation term does not hange the formal seond-order auray of the underlying sheme. 7.5 Disussion Thus far we have been looking at how to interpolate the fae veloity in order to irumvent the hekerboarding problem for o-loated arrangements. We have seen that momentum interpolation is equivalent to solving the ontinuity equation with an extra dissipation term for pressure. Adding this dissipation term does not hange the formal auray of our disretization sheme sine the term added has a dependene Od x 3 f whereas the other terms have a trunation error of Od x 2 f. Our intent is to write the ontinuity equation using this interpolation for the fae veloity. The disretization of the momentum equations retains the form of Equation 7.1. An extremely important point to be made is that the disrete ontinuity equation (Equation 7.14) is written in terms of the fae veloities u e and u w. It is not written diretly in terms of the ell-entered veloities u P and u E. Thus, at onvergene, it is the fae veloities that diretly satisfy the disrete ontinuity equation, not the ell-entered veloities. In a o-loated formulation, the ell-entered veloities diretly satisfy the disrete momentum equations. They satisfy the ontinuity equations only indiretly 152

153 through their role in defining u e and u w. Conversely, in a o-loated formulation, the fae veloities u e and u w diretly satisfy the ontinuity equation, but do not satisfy any disrete momentum equation sine no diret momentum onservation over a staggered ell is ever written for them. They satisfy momentum onservation only indiretly, in the sense that they satisfy the momentum interpolation formula. To omplete the development, let us look at regular two-dimensional meshes and derive the equivalent forms for the fae veloity interpolation. Though the properties of the momentum interpolation sheme are less learly evident in 2D, everything we have said about the one-dimensional ase is also true in two dimensions. We will use this development as a stepping stone to developing a SIMPLE algorithm for solving the disrete set of equations. 7.6 Two-Dimensional Co-Loated Variable Formulation Let us generalize our development to two-dimensional regular meshes before onsidering how to solve our disrete set of equations. We onsider the ell P in Figure Disretization of Momentum Equations Using the proedures desribed earlier, we may derive the disrete u- and v-momentum equations for the veloities u P and v P : a u P u P \ a u nb u nb nb a v Pv P \ a v nb v nb nb b u P b v P y p p W b p Eq 2 x p p S b p Nq 2 (7.36) Here, the oeffiients a u P and au nb are the oeffiients of the u-momentum equation for ell P. Similarly, a v P and av nb are the oeffiients of the v-momentum equation. We note that the pressure gradient terms involve pressures 2 x and 2 y apart respetively. Similar disrete equations may be written for the neighboring ells Momentum Interpolation Consider the fae e in Figure 7.1, and the u momentum equations for the ells P and E. Dividing the disrete momentum equations by the enter oeffiients we obtain: u P \ û P u E \ û E p dp u p W b p Eq 2 de u d p P b p EEf 2 (7.37) 153

154 where d u P \ d u E \ y a u P y a u E (7.38) The fator y appears beause the pressure gradient term is multiplied by it in a twodimensional mesh. By analogy we may define equivalent quantities at other faes: d u W \ d v N \ d v S \ y a u W x a v N x a v S (7.39) Using momentum interpolation for the fae veloity u e, we obtain u e \ û e where d e d p P b p Ef (7.40) û û e \ P 2 d d e \ up 2 By analogy, we may write fae veloities for the other faes as: û E d u E (7.41) u w \ û w v n \ ˆv n v s \ ˆv s d w p p W b p Pq d n p p P b p Nq d s p p S b p Pq (7.42) with d w \ d n \ d s \ d uw 2 d vp 2 d vs 2 d u P d v N d v P (7.43) 7.7 SIMPLE Algorithm for Co-Loated Variables Having defined the fae veloities as momentum-interpolants of ell entered values, we now turn to the question of how to write the disrete ontinuity equation, and how 154

155 to solve the disrete set. In keeping with our philosophy of using sequential iterative solutions, we wish to use the SIMPLE algorithm. We must now devise a way to formulate a pressure orretion equation that an be used with the o-loated variables. The proedure is similar to that adopted in the previous hapter, albeit with a few small hanges Veloity and Pressure Corretions As before, let uœ and vœ denote the solution to the disrete momentum equations using a guessed pressure field pœ. The fae veloities u e, u w, v n and v s found by interpolating the uœ and vœ to the fae using momentum interpolation are not guaranteed to satisfy the disrete ontinuity equation. Thus, FŒ e b FŒw FŒ n b FŒ s \ 0 (7.44) The fae mass flow rates F are defined in terms of the momentum-interpolated fae veloities as \ FŒ FŒ n ρ n vœn e \ ρ e uœe y x (7.45) Similar expressions may be written for F Œw and FŒ s. We wish to orret the fae veloities (and the fae flow rates) suh that the orreted flow rates satisfy the disrete ontinuity equation. Thus, we propose fae veloity orretions and the ell pressure orretions u e \ uœe v n \ vœn p P \ pœp Correspondingly, we may write fae flow rate orretions where F e \ FŒ e F n \ FŒ u e v n (7.46) p P (7.47) n F e F n (7.48) F e \ ρ e yu e F n \ ρ n xv n (7.49) We now seek to express u and v in terms of the ell pressure orretions p, and to use these expressions to derive a pressure orretion equation. From our fae veloity definitions, we write u e \ û e u w \ û w v n \ ˆv n v s \ ˆv s d e p p P b p Eq d w p p W b p Pq d n p p P b p Nq d s p p S b p Pq (7.50) 155

156 In keeping with the SIMPLE algorithm, we approximate Equations 7.50 as u e \ d e p p P b p Eq u w \ d w p p W b p Pq v n \ d n p p P b p Nq v s \ d s p p S b p Pq (7.51) by dropping the û and ˆv terms. This is analogous to dropping the nb a nb u nb the staggered formulation. The orresponding fae flow rate orretions are terms in F e \ ρ e yd e p p P b p Eq F w \ ρ w yd w p p W b p Pq F n \ ρ n xd n p p P b p Nq F s \ ρ s xd s p p S b p Pq (7.52) We notie that the veloity orretions in Equations 7.51 orret the fae veloities, but not the ell-entered veloities. For later use, we write the ell-entered veloity orretions by analogy: u P \ d u P d p W b p Ef v P \ d v P Pressure Corretion Equation 2 p p S b p Nq 2 (7.53) To derive the pressure orretion equation for the o-loated formulation, we write the ontinuity equation in terms of the orreted fae flow rates F as before: FŒ e F e b FŒw b F w FŒ n F n b FŒ s b F s \ 0 (7.54) Substituting from Equations 7.51 and 7.49 for the F values, we obtain the pressure orretion equation: b with a P p P \ a nb p nb nb a E \ ρ e d e y a W \ ρ w d w y a N \ ρ n d n x a S \ ρ s d s x a P \ a E b \ FŒw b FŒ e a W a N a S FŒ n b FŒ s (7.56) We see that the pressure orretion equation has the same struture as that for the staggered grid formulation. The soure term in the pressure orretion equation is the mass imbalane resulting from the solution of the momentum equations. 156

157 7.7.3 Overall Solution Proedure The overall SIMPLE solution proedure for o-loated meshes takes the following form: 1. Guess the pressure field pœ. 2. Solve the u and v momentum equations using the prevailing pressure field p Œ to obtain uœ and vœ at ell entroids. 3. Compute the fae mass flow rates F Œ using momentum interpolation to obtain fae veloities. 4. Solve the p equation. 5. Corret the fae flow rates using Equation Corret the ell-entered veloities uœp and vœ P using Equation Corret the ell pressure using Equation In keeping with the SIMPLE algorithm, underrelax the pressure orretion as: 8. Solve for other salars φ if desired. p \ pœ α p p 9. Chek for onvergene. If onverged, stop. Else go to Disussion We see that the overall SIMPLE proedure is very similar to that for staggered meshes. However, we should note a very important differene. The pressure orretion equation ontains a soure term b whih is the mass imbalane in the ell P. The omputed pressure orretions are designed to annihilate this mass imbalane. Thus, we are assured orreted fae flow rates in step 5 will satisfy the disrete ontinuity equation identially at eah iteration of the SIMPLE proedure. However, the ell-entered veloities either before or after the orretion in step 6 are never guaranteed to satisfy the disrete ontinuity equation. This is beause the flow rates F are not written diretly using u P and v P ; the momentum-interpolated values are used instead. Thus, in a o-loated formulation, the ell-entered veloities satisfy the disrete momentum equations, but not the disrete ontinuity equation. We should also note that the ell-veloity orretion in step 7 is designed to speed up onvergene, but does nothing to make u P and v P satisfy the disrete ontinuity equation. By the same token, the fae flow rates (and by impliation the fae veloities) satisfy the disrete ontinuity equation at step 5 in eah iteration, and also at onvergene. However, they do not satisfy a disrete momentum equation diretly. This urious disonnet between the ell-enter and fae veloities is an inherent property of o-loated shemes. The solution of passive salars φ in step 8 employs the ontinuity-satisfying fae flow rates F in disretizing the onvetive terms. The ell-entered veloities are never used for this purpose sine they do not satisfy the disrete ontinuity equation for the ell. 157

158 m 7.8 Underrelaxation and Time-Step Dependene We have thus far said very little about the role of underrelaxation in developing our o-loated formulation. Majumdar [16] has shown that unless are is taken in underrelaxing the fae veloities, the resulting o-loated formulation is underrelaxation dependent. That is, the final solution depends on the underrelaxation employed, and different underrelaxation fators may lead to different solutions. This is learly extremely undesirable. Consider the fae veloity u e, whih may be written as u e \ û e d e d p P b p Ef (7.58) Reall that d e involves the averages of 1l a u P and 1l au E, the enter oeffiients of the momentum equations at points P and E. Similarly, û e also ontains a u P and au E in the denominator. Let us say that û e and d e in Equation 7.40 orresponds to un-underrelaxed values of a u P and au E. If the momentum equations are underrelaxed, the ell-entered veloities satisfy u P \ α u E \ α û P û E d u P p p W b p Eq 2 d u E d p E b p EEf 2 n Using momentum interpolation as before, we obtain u e \ α d û e d e d p P b p Ef+f d 1 b αf d 1 b αf uœp d 1 b αf uœe (7.59) uœp 2 uœe (7.60) In order for a variable φ to be underrelaxation-independent at onvergene, the underrelaxation expression must have the form αφ d 1 b αf φœ (7.61) At onvergene, φ \ φ Œ, and the above expression reovers φ regardless of what underrelaxation is used. We see that the underrelaxed value of u e does not have this form. The underrelaxed fae veloity has the form d 1 b αf uœlinear (7.62) αu e where uœlinear is the prevailing linearly interpolated fae value. Sine u e is never equal to uœlinear, not even at onvergene, the value of u e is underrelaxation dependent. The remedy is to use an underrelaxation of the form u e \ α d û e d e d p P b p Ef0f d 1 b αf uœe (7.63) Here û e and d e are omputed using un-underrelaxed momentum equations for ells P and E. The fae veloity is then underrelaxed separately to obtain the desired form. We note that the interpolation requires the storage of the fae veloity u e, sine we annot underrelax u e without storing it. 158

159 b A f y C0 e η e ξ C1 η ξ fae f x Figure 7.3: Cell Cluster for Unstrutured Mesh a Similar arguments may be made about time-step dependene of o-loated shemes. Unless remedied, the steady state obtained by o-loated formulations will depend on the time step taken during the preeding unsteady proess. Reall that the unsteady shemes we used for salar transport (and indeed all reasonable time-stepping shemes) yield steady state solutions that are independent of the time-steps taken in getting to steady state. A remedy similar to that for underrelaxation may be devised. We should note that the differene between the momentum-interpolated and linearlyinterpolated fae value dereases as x 3, as shown by our error analysis of the added dissipation sheme. Thus, even if we did not take steps to remedy the situation, we expet the dependene to disappear progressively as the mesh is refined. 7.9 Co-Loated Formulation for Non-Orthogonal and Unstrutured Meshes The o-loated formulation presented above an be applied readily to non-orthogonal and unstrutured meshes. Consider the ells C0 and C1 in Figure 7.3. In keeping with the o-loated formulation, we store the Cartesian veloities u and v and the pressure p at the ell entroids. We note that the diretion e ξ is aligned with the line joining the entroids, and for general non-orthogonal meshes, is not parallel to the fae area vetor A f. The vetor e η is any diretion tangential to the fae. The proedures for disretizing the u and v momentum equations on the ell are similar to those adopted in previous hapters for the onvetion-diffusion equation. The only term that needs speial onsideration is the pressure gradient term. Sine the ell momentum equations are derived by integrating the governing equation over the ell, the pressure gradient term is also integrated over the ell. Applying the gradient 159

160 z z b z z theorem, we may write pdv9\ { b 0 pda (7.64) A Assuming that the pressure at the fae entroid prevails over the fae, the pressure gradient term in the u and v momentum equations may be written as The fae area vetor is given by b p f A f (7.65) f A f \ A x i A y j (7.66) The pressure gradient terms in the u and v momentum equations are b i t b j t { 0 { 0 pdv \ b i t f pdv \ b j t f p f A f \ b p f A x f p f A f \ b p f A y (7.67) f In keeping with our o-loated mesh tehnique, p f is interpolated linearly to the fae. For a uniform mesh this interpolation would take the form p f \ p 0 2 For non-uniform meshes, we may use the reonstruted value p f \ p 0 p 0t r 0 p 1 p 1 2 p 1t r 1 (7.68) (7.69) where r 0 and r 1 are the distanes from the ell entroids of ells C0 and C1 to the fae entroid. In either event, p f may be written in terms of the ell-entroid values of the pressure. Sine A f \ 0 (7.70) f it is lear that the summation in Equation 7.65 eliminates the ell pressure p 0. Thus, as with regular meshes, the momentum equations an support a hekerboarded pressure field. If p 0 and p 1 are omputed using the same type of linear assumptions, the reonstruted pressure value from Equation 7.69 will also behave in the same way. For future use, let us write the pressure gradient term in the ell as b p f A f \ b p 0 v 0 (7.71) f where p 0 denotes the average pressure gradient in the ell. Having disretized the pressure gradient term, the disrete momentum equations for the ell C0 may now be written: a u 0 u 0 \ nb a u nb u nb a v 0 v 0 \ nb a v nb v nb 160 b u 0 b p 0t i v 0 b v 0 b p 0t j v 0 (7.72)

161 m Here, a u 0 and av 0 denote the enter oeffiients of the u and v momentum equations and b u 0 and bv 0 the soure terms. The pressure gradient terms sum the fae pressures on all the faes of the ell Fae Normal Momentum Equation Let us onsider the fae f between the ells C0 and C1. Sine it is the fae normal veloity that appears in the disrete ontinuity equation for ells C0 and C1, it is neessary to understand the form taken by the momentum equation for the veloity in the fae normal diretion. The fae normal vetor n is given by n \ A f ƒ Aƒ f \ n x i n y j (7.73) Let V0 n denote the omponent of the ell-entered veloity at ell C0 in the diretion of the fae normal n. This veloity is given by V n 0 \ V 0t n \ u 0 n x v 0 n y (7.74) In a o-loated variable formulation, the oeffiients of the momentum equations are equal to eah other when there are no body fores present, and for most boundary onditions. This is beause the flow rates governing onvetion are the same for all φ s. The diffusion oeffiient for the u and v momentum equations is the same, and is equal to visosity µ. Away from the boundaries, the only differene between the enter oeffiients a u 0 and av 0 ours beause of soure terms with S p omponents whih at preferentially in the x or y diretions. At Dirihlet boundaries, the oeffiient modifiations for both veloity diretions are the same; the same is true at inlet and outflow boundaries. The main differene ours at symmetry boundaries aligned with either the x or y diretions. But for these exeptions, the u momentum oeffiient set ( a u 0 and a u nb ) are equal to the oeffiients of the v momentum equation ( a v 0 and av nb ). Under these irumstanes, the momentum equation in the ell C0 for the veloity in the fae normal diretion may be written as: where a n 0 V 0 n \ a n nb Vnb n nb The pressure gradient term may be written as We note further that b p f A f \ b f b n 0 b p 0t n (7.75) a n 0 \ a u 0 \ a v 0 a n nb \ a u nb \ a v nb (7.76) p n n v 0 \ b p 0 0t n v 0 (7.77) b n 0 \ b u 0 n x 161 b v 0 n y (7.78)

162 m Dividing Equation 7.75 by a n 0, we may write V n 0 \ ˆV n 0 b v 0 a n p 0 0t n (7.79) Using similar proedures, we may write, for ell C1 V n 1 \ ˆV n 1 b v 1 a n p 1 1t n (7.80) Here ˆV 0 n \ û 0 n x ˆV 1 n \ û 1 n x ˆv 0 n y ˆv 1 n y (7.81) Momentum Interpolation for Fae Veloity The momentum interpolation proedure is applied to the normal veloity at the fae. Let the linearly interpolated fae normal veloity be given by V f. On a uniform mesh V f \ V n0 2 V n 1 (7.82) For non-uniform meshes, fae values of u and v may be reonstruted to the fae and averaged in the manner of Equation 7.69, and a fae normal veloity found using Equation The momentum-interpolated fae normal veloity is given by V f \ V f v f a n f p t n b p n n f (7.83) Here, the quantities v f and an f represent the ell volume and enter oeffiient assoiated with the fae. These may be hosen in a number of different ways, as long as the assoiated trunation error is kept Od x 3 f. For the purposes of this hapter, we hoose them as v f \ v v 0 1 a n f \ a n0 2 The pressure gradient p is the mean pressure gradient at the fae and is given by p \ 2 a n 1 p 0 p 1 2 (7.84) (7.85) The quantity d pl nf f is the fae value of the pressure gradient. In writing Equation 7.83 we are removing the mean normal pressure gradient, and adding in a fae 162

163 m m m pressure gradient term written. We intend to write this fae pressure gradient in terms of the adjaent pressure values p 0 and p 1, just like we did for regular meshes. We realize however, that the normal gradient of pressure annot be written purely in terms of p 0 and p 1 for general non-orthogonal meshes; other neighboring values would be involved. Only the gradient pl ξ may be written in terms of p 0 and p 1 alone. Thus, we deompose the normal gradient into the diretions ξ and η to obtain, as in previous hapters: m p n n \ f n t n n t e ξ p ξ n f m n t n e n t e ξ ξ t e η p η n f We now write the gradient d pl ηf f in terms of the mean pressure gradient: Using p n n \ f n t n p 1 b p 0 n t e ξ ξ and ombining Equations 7.83 and 7.87, we get V f \ V f (7.86) n t n n t e ξ e ξ t e η p t e η (7.87) p t e η \ p t n b p t e ξ (7.88) v f a n f n t n n t e ξ p t e ξ b p 1 b p 0 ξ n (7.89) Thus, our manipulation results in adding a dissipation assoiated with the gradient pl ξ rather than pl n, sine this the only gradient that an be diretly assoiated with the adjaent pressure differene p 1 b p 0. Rearranging terms, we may write where V f \ ˆV f ˆV f \ V f v f d f \ ξ a n f d f p p 0 b p 1q (7.90) d f p t e ξ ξ n t n n t e ξ (7.91) 7.10 The SIMPLE Algorithm for Non-Orthogonal and Unstrutured Meshes The proedure for deriving the pressure orretion losely parallels that for regular meshes. The fae flow rate is defined as F f \ ρ f V f t A f \ ρ f V f A f (7.92) and represents the outflow from ell C0. As before, let u Œ and vœ be the solutions to the ell momentum equations using a guessed or prevailing pressure field p Œ. As 163

164 before, the disrete ontinuity equation for the ell C0 is not satisfied by u Œ and vœ. We postulate fae flow rate orretions F suh that FŒ f f F f \ 0 (7.93) where F Œ are the fae mass flow rates omputed from the momentum-satisfying veloities uœ and vœ. As before, we postulate fae normal veloity orretions V f \ d f p p 0 b p 1q (7.94) Here the orretion to ˆV f has been dropped in keeping with the SIMPLE algorithm. The orresponding fae flow rate orretions are We also postulate a ell pressure orretion F f \ ρ f d f A f p p 0 b p 1q (7.95) p 0 \ pœ0 p 0 (7.96) As with regular meshes, we define ell veloity orretions with fae pressure orretions u 0 \ v 0 \ p f \ v 0 a u 0 v 0 a v 0 p 0 b p f A x f b p f A y (7.97) f (7.98) 2 Substituting Equations 7.94 and 7.96 into the disrete ontinuity equation (Equation 7.93) yields a pressure orretion equation for the ell enter pressure. We may write this in the form b where p 1 a P p P \ p nb nb Disussion a nb \ ρ f d f A f \ \ b a P a nb nb b f FŒf (7.100) The broad struture of the pressure orretion equation is the same as for regular meshes. The overall SIMPLE algorithm takes the same form, and is not repeated here. However a few important points must be made. 164

165 In writing our added dissipation term, we have hosen to add a dissipation involving the term pl ξ, and to write this gradient expliitly in terms of d p 0 b p 1f. The total gradient driving the fae normal veloity, however, also ontains a pressure gradient tangential to the fae. But beause it is not easy to write this expliitly, we have hosen to leave it embedded in the ˆV f term in Equation The auray of this omission is not a onern sine the added dissipation sheme is Od ξ 3 f aurate. However, we should note that this hoie does have onsequenes for onvergene. The primary onsequene of this hoie is that the pressure orretion equation ignores pressure orretions due to pl η. The pl η term is proportional to the non-orthogonality of the mesh. For orthogonal meshes (e η t e ξ \ 0), the term drops out altogether. But when the mesh is not orthogonal, the pressure orretion equation attributes to pl ξ the orretions that should have been attributed to pl η. The final answer is the same whether we inlude the orretions due to pl η or not; only the rate of onvergene hanges. Our experiene shows that this approximation in the pressure orretion equation is tolerable for most reasonable meshes. Sine we are dropping the orretions to ˆV f in keeping with the SIMPLE algorithm anyway, we may think of this as an additional approximation to the oeffiients of pressure orretion equation. In the interest of larity, one important aspet has been pushed to the bakground: the linear interpolation of fae pressure. For many flows, the pressure field is smooth and a linear interpolation is adequate. In other ases, the presene of strong body fore terms, suh as in swirling or buoyant flows, means that the ell pressure gradient is steeper than that implied by linear interpolation. Sine a linear interpolation underpredits the ell pressure gradient, the flow field must distort itself to provide the extra momentum soures required to balane the body fore. This an lead to distortions in the ell-entered veloities. Improvement of o-loated shemes for large-body fore problems ontinues to be an ative area of researh Closure In this hapter, we have developed a o-loated formulation for strutured and unstrutured meshes. We have seen that the primary diffiulty has to do with the omputation of the fae normal veloity, whih is used to write the disrete ontinuity equation. To irumvent hekerboarding resulting from linear interpolation of the fae normal veloity, we developed a momentum interpolation or added dissipation sheme. We saw that the idea is easily extended to unstrutured meshes and that a SIMPLE algorithm may be developed using it. At this point, we have a omplete proedure apable of omputing the onvetion and diffusion of salars, as well the underlying flow field. The development has been done for general orthogonal and non-orthogonal meshes, both strutured and unstrutured. The sheme preserves the basi onservation priniple regardless of ell shape. Indeed we have made no assumptions about ell shape save that the ell be an arbitrary onvex polyhedron. We turn now to the problem of solving general unstrutured sets of algebrai equations whih result from the unstrutured mesh disretizations we have seen in this and preeding hapters. 165

166 166

167 _] `_ Chapter 8 Linear Solvers As we have seen in the earlier hapters, impliit shemes result in a system of linear equations of the form Ax \ b (8.1) Here A is a N k N matrix and x is a vetor of the unknowns. The effiient solution of suh systems is an important omponent of any CFD analysis. Linear systems also arise in numerous other engineering and sientifi appliations and a large number of tehniques have been developed for their solution. However, the systems of equations that we deal with in CFD have ertain distinguishing harateristis that we need to bear in mind while seleting the appropriate algorithms. One important harateristi of our linear systems is that they are very sparse, i.e., there are a large number of zeroes in the matrix A. Reall that the disrete equation at a ell has non-zero oeffiients for only the neighboring ells. Thus for a two dimensional strutured quadrilateral grid, for example, out of the N 2 entries in the matrix, only about 5Ÿ N of them are non-zero. It would seem to be a good idea to seek solution methods that take advantage of the sparse nature of our matrix. Depending on the struture of the grid, the matrix might also have speifi fill pattern, i.e the pattern of loation of the non-zero entries. The system of equations resulting from a one-dimensional grid, for example, has non-zero entries only on the diagonal and two adjaent lines on either side. For a mesh of 5 ells, the matrix has the form Z A \ x x x x x x x x x x x x x (8.2) Here x denote the non-zero entries. As we shall see shortly, linear systems involving suh matries, known as tri-diagonal matries, an be solved easily and form the basis of some solution methods for more general matries as well. We also note that two and three-dimensional strutured grids similarly result in banded matries, although the exat struture of these bands depends on how the ells are numbered. One again, 167

168 it would seem advantageous to exploit the band struture of our matrix, both for storage and solution tehniques. Another important harateristi of our linear systems is that in many instanes they are approximate. By this we mean that the oeffiients of the matrix and/or the soure vetor b are themselves subjet to hange after we have solved the equation. This maybe beause of oupling between different equations (e.g., the mass flux appearing in onvetive oeffiients of the energy equation), variable properties (temperature dependent thermal ondutivity, for example) or other non-linearities in the governing equations. Whatever the underlying reason, the impliation for the linear solver is that it may not be really worthwhile to solve the system to mahine auray. Sine we are going to reompute the oeffiient matrix and solve the linear problem one again, it is usually suffiient if we obtain only an approximate solution to any given linear system. Also, as we are iterating, we usually have a good initial guess for the unknown and linear solvers that an take advantage of this are obviously desirable. 8.1 Diret vs Iterative Methods Linear solution methods an broadly be lassified into two ategories, diret or iterative. Diret methods, suh as Gauss elimination, LU deomposition et., typially do not take advanatage of matrix sparsity and involve a fixed number of operations to obtain the final solution whih is determined to mahine auray. They also do not take advantage of any initial guess of the solution. Given the harateristis of the linear systems outlined above, it is easy to see why they are rarely used in CFD appliations. Iterative methods on the other hand, an easily be formulated to take advantage of the matrix sparsity. Sine these methods suessively improve the solution by the appliation of a fixed number of operations, we an stop the proess when the solution at any given outer iteration 1 has been obtained to a suffiient level of auray and not have to inur the expense of obtaining the mahine-aurate solution. As the outer iterations progress and we have better initial guesses for the iterations of the linear solver, the effort required during the linear solution also dereases. Iterative methods are therefore preferred and we shall devote the bulk of this hapter to suh methods. 8.2 Storage Strategies As we have already noted, a large number of the entries of our oeffiient matrix are zero. Consequently, it is very ineffiient to use a two dimensional array struture to store our matrix. In this setion we onsider some smarter ways of storing only the non-zero entries that will still allow us to perform any of the matrix operations that the solution algorithm might require. The exat way of doing this will depend on the nature of the grid. 1 To distinguish the iterations being performed beause of equation non-linearity and/or inter equation oupling from the iterations being performed to obtain the solution for a given linear system, we use the term outer iteration for the former and inner iteration or simply iteration for the latter. 168

169 2 CINDEX NBINDEX Figure 8.1: Storage Sheme for Unstrutured Mesh Coeffiient Matrix For a one-dimensional grid of N ells, for example, we ould store the diagonal and the two lines parallel to it using three one-dimensional arrays of length N. Following the notation we have used in the previous hapters, we label these arrays AP, AE and AW, respetively. The non-zero entries of the matrix A an then be obtained as Ad iw if \ AP(i) (8.3) Ad iw i b 1f \ b AW(i) (8.4) Ad iw i 1f \ b AE(i) (8.5) For a two dimensional strutured grid of NI k NJ ells, it is usually onvenient to refer to the ells using a double index notation and therefore we ould use 5 two dimensional arrays of dimension d NI w NJf to store the AP, AE, AW, AN and AS oeffiients. Alternatively, one might prefer to number the ells using a single index notation and store oeffiients using 5 one-dimensional arrays of size NI Ÿ NJ instead. In either ase, beause of the grid struture we impliitly know the indies of the neighboring ells and thus the position of these oeffiients in the matrix A. It is therefore easy to interpret any matrix operation involving the oeffiient matrix A in terms of these oeffiient arrays. For unstrutured grids however, the onnetivity of the matrix must be stored expliitly. Another diffiulty is aused by the fat that the number of neighbors is not fixed. Therefore we annot use the approah mentioned above of storing oeffiients as a P, a E, a W et. arrays. We will look at one strategy that is often used in these ases. Consider a mesh of N ells and let n i represent the number of neighbors of ell i. The total number of neighbor oeffiients that we need to store is then given by B \ N i 1 n i (8.6) We alloate two arrays of length B, one of integers (labelled NBINDEX) and one of floating point numbers (labelled COEFF). We also alloate one other integer array of length N 1, labelled CINDEX whih is defined as CINDEX(1) \ 1 (8.7) CINDEX(i) \ CINDEX(i-1) n i 1 (8.8) 169

170 y y y TDMA(AP,AE,AW,B,X) x forx i = 2 to N r = AW(i)/AP(i-1); AP(i) = AP(i) - r*ae(i-1); B(i) = B(i) - r*b(i-1); X(N) = B(N)/AP(N); for i = N-1 down to 1 x X(i) = (B(i) - AW(i)*X(i+1))/AP(i); Figure 8.2: Tri-Diagonal Matrix Algorithm The idea is that the indies of the neighbours of ell i will be stored in the array NBINDEX at loations loations j that are given by CINDEX(i) ~ \ j ~ CINDEX(i+1). The orresponding oeffiients for these neighbors are stored in the orresponding loations in the COEFF array. Finally the enter oeffiient is stored in a separate array AP of length N. This is illustrated in Fig. 8.1 whih shows the ontents of the CINDEX and NBINDEX for a two dimensional unstrutured grid. 8.3 Tri-Diagonal Matrix Algorithm Although the bulk of this hapter is onerned with iterative solution tehniques, for the tridiagonal linear system arising out of a one-dimensional problem there is a partiularly simple diret solution method that we onsider first. The idea is essentially the same as Gaussian elimination; however the sparse, tri-diagonal pattern of the matrix allows us to obtain the solution in Od N f operations. This is aomplished in two steps. First, the matrix is upper-triangularized, i.e., the entries below the diagonal are suessively eliminated starting with the seond row. The last equation thus has ony one unknown and an be solved. The solution for the other equations an then be obtained by working our way bak from the last to the first unknown, in a proess known as bak-substitution. Using the storage strategy desribed by Eq. 8.3, the algorithm an be written in the form shown in Fig

171 j NJ NJ-1 J 1 i 1 2 I NI-1 NI Figure 8.3: Strutured Grid for Line by Line TDMA 8.4 Line by line TDMA Linear systems arising from two or three dimensional strutured grids also have a regular fill pattern. Unfortunately, there are no simple methods analogous to the TDMA that we saw in the previous setion for the diret solution of suh systems. However, using the TDMA we an devise iterative methods. Consider, for example, the two dimensional strutured grid shown in Fig We will assume that the oeffiient matrix is stored using the strategy disussed in Se. 8.2, i.e, in 5 two dimensional arrays AP, AE, AW, AN and AS. The equation at point d Iw Jf is then given by AP(I,J) X(I,J) AE(I,J) X(I+1,J) AW(I,I) X(I-1,J) AN(I,J) X(I,J+1) AS(I,J) X(I,J-1) \ B(I,J) (8.9) We also assume that we have a guess for the solution everywhere. We rewrite this equation as AP(I,J) X(I,J) AE(I,J) X(I+1,J) AW(I,I) X(I-1,J) \ \ B(I,J) b AN(I,J) XŒ (I,J+1) b AS(I,J) XŒ (I,J-1) (8.10) where the supersript denotes guessed values. The right hand side of Eq is thus onsidered to be known and only X(I,J), X(I+1,J) and X(I-1,J) are onsidered to be unknowns. Writing similar equations for all the ells d iw Jf w i \ 1w NI (shown by the dotted oval in Fig. 8.3 we obtain a system whih has the same form as the tridiagonal system whih we an then solve using TDMA. This gives us values for X(i) for all ells i along j \ J line. However, unlike the one-dimensional problem, this is not the exat solution but only an approximate one sine we had to guess for values of X(i,J+1) and X(i,J-1) in building up the tri-diagonal system. We an now 171

172 y y y forx j = 1 to NJ forx i = 1 to NI AP1D(i) = AP(i,j); AE1D(i) = AE(i,j); AW1D(i) = AW(i,j); B1D(i) = B(i,j); if (j > 1) B1D(i) = B1D(i) - AS(i,j)*X(i,j-1); if (j < NJ) B1D(i) = B1D(i) - AN(i,j)*X(i,j+1); TDMA(AP1D,AE1D,AW1D,B1D,X1D); for i = 1 to NI x X(i,j) = X1D(i); Figure 8.4: Line By Line TDMA Algorithm along j lines apply the same proess along the next line, j \ J 1. In doing so we will use the reently omputed values whenever X(i,J) s are required. The overall proedure an be desribed with the pseudoode shown in Fig. 8.4 One we have applied the proess for all the j lines, we will have updated the value of eah X d iw jf. As noted above these are only approximate values but hopefully they are better approximations than our initial guess. As in all iterative methods, we will try to improve the solution by repeating the proess. To this end, we ould apply the algorithm in Fig. 8.4 again. However, we notie that visiting j lines in sequene from 1 to NJ means that all ells have seen the influene of the boundary at y \ 0 but only the ells at j \ NJ have seen influene of y \ 1 boundary. If we repeat the proess in Fig. 8.4 again, this time the ells at j \ NJ b 1 will see this influene (sine they will use the values obtained at j \ NJ during the present update) but it will takes several repetitions before ells near J \ 1 see any influene of the boundary at y \ 1. One easy way of removing this bias is to visit the j lines in the reverse order during the seond update. With this symmetri visiting sequene we ensure that all ells in the domain see the influene of both boundaries as soon as possible. The sequene of operations whereby all the values of X d iw jf are updated one is referred to as a sweep. An iteration is the sequene that is repeated multiple number of times. Thus for the line by line TDMA, an iteration may onsist of two sweeps, first visiting all j lines in inreasing order of their index and then in dereasing order as desribed above. Of ourse, it is not mandatory to apply the TDMA for a onstant j line. We ould apply the same proess along a onstant i, onsidering only the j 172

173 diretion neighbours impliitly. Depending on the oordinate diretion along whih information transfer is most ritial, sweeping by visiting i or j lines might be the most optimal. In general ases, however, it is useful to ombine both. Thus one iteration of the line by line TDMA would onsist of visiting, say eah of the i lines first in inreasing order and then in dereasing order followed by similar symmetri sweeps along j lines (and k lines in three dimensional problems). 8.5 Jaobi and Gauss Seidel Methods For matries resulting from unstrutured grids, like the one shown in Fig. 8.1, of ourse, no line-by-line proedure is possible. Instead, we must use more general update methods. The simplest of these are the Jaobi and Gauss-Seidel methods. In both ases, the ells are visited in sequene and at eah ell i the value of x i is updated by writing its equation as A i i x i \ b b A i nb x nb (8.11) where the summation is over all the neighbors of ell i. The two methods differ in the values of the neighboring x i that are employed. In ase of the Jaobi method, the old values of x i are used for all the neighbors whereas in the Gauss-Seidel method, the latest values of x i are used at all the neighbours that have already been updated during the urrent sweep and old values are used for the neighbours that are yet to be visited. As in the ase of the line by line TDMA, the order of visiting the ell is reversed for the next sweep so as to avoid diretional bias. In general the Gauss-Seidel method has better onvergene harateristis than the Jaobi method and is therefore most widely used although the latter is sometimes used on vetor and parallel hardware. Using the storage sheme outlined in Se. 8.2, one iteration of the Gauss-Seidel method an be expressed in the pseudo-ode shown in Fig General Iterative Methods The general priniple in all iterative methods is that given an approximate solution x k, we seek to obtain a better approximation x k 1 and then repeat the whole proess. We define the error at any given iteration as e k \ x b x k (8.12) where x is the exat solution. Of ourse, sine we don t know the exat solution, we also don t know the error at any iteration. However, it is possible to hek how well any given solution satisfies the equation by examining the residual r, defined as r k \ b b Ax k (8.13) As the residual approahes zero, the solution approahes the exat solution. We an determine the relation between them using Eqs and 8.13 as Ae k \ r k (8.14) 173

174 y y y y Gauss x Seidel(AP,COEFF,CINDEX,NBINDEX,B,X) forx sweep = 1 to 2 if (sweep = 1) IBEG = 1, IEND = N, ISTEP = 1; else IBEG = N, IEND = 1, ISTEP = -1; for i = IBEG to IEND stepping by ISTEP x r = B(i); for n = CINDEX(i) to CINDEX(i+1)-1 x j = NBINDEX(n); r = r - COEFF(n)*X(j); X(i) = r/ap(i); Figure 8.5: Symmetri Gauss-Seidel Sweep 174

175 _] _ `_ _] _ `_ \ _] `_ Thus the error satisfies the same set of equations as the solution, with the residual r replaing the soure vetor b. This is an important property that we will make use of in devising multigrid shemes. Using Eq and the definition of the error we obtain x b x k \ A 1 r k (8.15) Most iterative methods are based on approximating this expression as x k 1 \ x k Br k (8.16) where B is some approximation of the inverse of A that an be omputed inexpensively. For example, it an be shown that the Jaobi method is obtained when B \ D 1, where D is the diagonal part of the matrix A. Another way of expressing any iterative sheme that we will find useful in later analysis is x k 1 \ Px k g k (8.17) where P is known as the iteration matrix. For the Jaobi method the iteration matrix 1 U. is given by P \ D 1 d L Uf while for the Gauss-Seidel method it is P \ d D b Lf Here D, L and U are the diagonal, stritly lower and upper triangular parts of A obtained by splitting it as A \ D L U (8.18) 8.7 Convergene of Jaobi and Gauss Seidel Methods Although the Jaobi and Gauss-Seidel methods are very easy to implement and are appliable for matries with arbitrary fill patterns their usefulness is limited by their slow onvergene harateristis. The usual observation is that residuals drop quikly during the first few iterations but afterwards the iterations stall. This is speially pronouned for large matries. To demonstrate this behavior, let us onsider the following 1D Poisson equation over a domain of length L. 2 φ x 2 \ s d xf (8.19) and speified Dirihlet boundary onditions φ d 0f \ φ 0 and φ d Lf \ φ L. Reall that this equation results from our 1d salar transport equation in the pure diffusion limit if we hoose a diffusion oeffiient of unity. If we disretize this equation on a grid of N equispaed ontrol volumes using the method outlined in Chapter 3 we will obtain a linear system of the form 1 h 3 b 1 0 t+t0t b 1 2 b 1 t+t0t t+t0t b 1 2 b t+t0t 0 b φ 1 φ 2. φ N 1 φ N hs 1 hs 2 2φ 0 h. hs N 1 hs N 2φ L h (8.20)

176 m 1.0 k = 2 k = k = 1 φ x/l Figure 8.6: Fourier Modes on N \ 64 grid where h \ L N and hs i represents the soure term integrated over the ell. Another simplifiation we make is to hoose φ 0 \ φ L \ 0 as well as sd xf \ 0. Thus the exat solution to this problem is simply φ d xf \ 0. We an now study the behavior of iterative shemes by starting with arbitrary initial guesses; the error at any iteration is then simply the urrent value of the variable φ. In order to distinguish the onvergene harateristis for different error profiles we will solve the problem with initial guesses given by φ i \ sin kπx i L n (8.21) Equation 8.21 represents Fourier modes and k is known as the wavenumber. Figure 8.6 shows these modes over the domain for a few values of k. Note that for low values of k we get smooth profiles while for higher wavenumbers the profiles are very osillatory. Starting with these Fourier modes, we apply the Gauss Seidel method for 50 iterations on a grid with N \ 64. To judge how the solution is onverging we plot the maximum φ i (whih is also the maximum error). The results are shown in Fig. 8.7(a). We see that when we start with an initial guess orresponding to k \ 1, the maximum error has redued by less than 20% but with a guess of k \ 16 Fourier mode, the error redues by over 99% even after 10 iterations. In general ases, our initial guess will of ourse ontain more than one Fourier mode. To see what the sheme does in suh ases we start with an initial guess onsist- 176

177 m m m k = Max. Error k = 8 k = 2 Max. Error k = k = Iteration Iteration Figure 8.7: Convergene of Gauss-Seidel method on N \ 64 grid for (a) initial guesses onsisting of single wavenumbers (b) initial guess onsisting of multiple modes ing of k \ 2w 8 and 16 modes i.e. φ i \ 1 sin 3 ˆ 2πx i L n sin 8πx i L n sin 16πx i L n Š (8.22) In this ase we see from Fig. 8.7(b) that the error drops rapidly at first but then stalls. Another way of looking at the effet of the iterative sheme is to plot the solution after 10 iterations as shown in Fig We see that the amplitude is not signifiantly redued when the initial guess is of low wave number modes but it is greatly redued for the high wave number modes. Interesting results are obtained for the mixed mode initial guess given by Eq We see that the osillatory omponent has vanished leaving a smooth mode error profile. These numerial experiments begin to tell us the reasons behind the typial behavior of the Gauss-Seidel sheme. It is very effetive at reduing high wavenumber errors. This aounts for the rapid drop in residuals at the beginning when one starts with an arbitrary initial guess. One these osillatory omponents have been removed we are left with smooth error profiles on whih the sheme is not very effetive and thus onvergene stalls. Using our sample problem we an also verify another ommonly observed shortoming of the Gauss-Seidel iterative sheme viz. that the onvergene deteriorates as the grid is refined. Retaining the same form of initial guess and using k \ 2, we solve the problem on a grid that is twie as fine, ie., N \ 128. The resulting onvergene plot shown in Fig. 8.9 indiate that the onvergene beomes even worse. On the finer grid we an resolve more modes and again the higher ones among those onverge quikly but the lower modes appear more smooth on the finer grid and hene onverge slower. We also note from Fig. 8.9 that the onverse is also true, ie., on a oarse grid with N \ 32, the onvergene is quiker for the same mode. It appears that the same error profile behaves as a less smooth profile when solved on a oarser grid. 177

178 Initial Final Initial Final φ 0.0 φ 0.0 φ x/l x/l x/l Figure 8.8: Initial and final solutin after 10 Gauss-Seidel iterations on N 64 grid for (a) initial guesses onsisting of k 2 (b) initial guesses onsisting of k 8 () initial guess onsisting of multiple modes Some of the methods for aelerating onvergene of iterative solvers are based upon this property. 8.8 Analysis Of Iterative Methods For simple linear systems like the one we used in the examples above and for simple iterative shemes like Jaobi, it is possible to understand the reasons for the onvergene behaviour analyially. We will not go into details here but briefly desribe some of the important results. Using the iterative sheme expressed in the form Eq. 8.16, we an show that the error at any iteration n is related to the initial error by the following expression e n P n e 0 (8.23) In order for the error to redue with iterations, the spetral radius of the iteration matrix (whih is the largest absolute eigenvalue of the matrix) must be less than one and the rate of onvergene depends on how small this spetral radius is. The eigen values of the Jaobi iteration matrix are losely related to the eigen values of matrix A and the two matries have the same eigen vetors. Now, if we hoose the matrix linear system to be 2 1 h 2 ª 1 0 t0t+t ª 1 2 ª 1 t0t+t t0t+t ª 1 2 ª t0t+t 0 ª 1 2 «Z φ 1 φ 2. φ N 1 φ N «Z hs 1 hs 2 φ 0 h. hs N 1 hs N φ L h «(8.24) 2 This is the system one obtains using a finite differene disretization of Eq with an equispaed mesh onsisting of N interior nodes and is only slightly different from the system we used in the previous setion. Both the systems have similar onvergene harateristis; the reason for hoosing this form instead of Eq is that it is muh easier to study analytially. 178

179 N = 128 Max. Error N = Iteration N = 32 Figure 8.9: Convergene of Gauss-Seidel method on different sized grids for initial guess orresponding to k 2 mode we an find analytial expression for the eigenvalues of the orresponding Jaobi iteration matrix. They are given by λ k 1 ª sin 2 kπ 2N ± k 1² 2²0³1³,³ N (8.25) The eigenvetors of the Jaobi iteration matrix, w k turn out to be the same as the Fourier modes we used in the previous setion as starting guesses. The j th omponent of the eigen vetor orresponding to the eigenvalue λ k is given by w k j sin jkπ N ± j 1² 2²+³,³1³ N (8.26) Now, if our initial error is deomposed into Fourier modes, we an write it in terms of these eigenvetors as e 0 α k w k (8.27) Substituing this expression in Eq and using the definition of eigenvalue, we obtain e n α k λ n k w k (8.28) We see from this expression that the k th mode of the initial error is redued by a fator λk n. From Eq we note that the largest eigenvalue ours for k 1 and therefore it is easy to see why the lower modes are the slowest to onverge. Also note that the magnitude of the largest eigenvalue inreases as N inreases; this indiates the reason 179

180 behind our other observation that onvergene on oarser grids is better than that on finer grids for the same mode. Although we have analyzed the onvergene behaviour of a very simple sheme on a simple matrix, these onlusions hold true in general. The eigenvalues of the matrix A as well as that of the iteration matrix play an important role in determining the onvergene harateristis. Our insistene on maintaining diagonal dominane and positive oeffiients is motivated by the requirement of keeping the spetral radius below unity. Praties suh as linearizing soure terms and underrelaxation that we need in order to handle non-linearities also help in reduing the spetral radius. However in many ases, e.g., the pressure orretion equation, we must handle stiff linear systems, i.e., those with spetral radius lose to 1. Many iterative shemes have been devised to handle stiff systems. They usually involve some form of preonditioning to improve the eigenvalues of the iteration matrix. In general, these methods are a lot more ompliated to implement ompared to the simple Jaobi and Gauss-Seidel methods we have studied so far. We will not disuss any of them here but rather look at another strategy, whih is based on the improved onvergene harateristis of the simple iterative shemes on oarser meshes. 8.9 Multigrid Methods We saw in the previous setion that the reason for slow onvergene of Gauss-Seidel method is that it is only effetive at removing high frequeny errors. We also observed that low frequeny modes appear more osillatory on oarser grids and then the Gauss-Seidel iterations are more effetive. These observations suggest that we ould aelerate the onvergene of these iterative linear solvers if we ould somehow involve oarser grids. The two main questions we need to answer are (1) what problem should be solved on the oarse grid and (2) how should we make use of the oarse grid information in the fine grid solution. Certain onstraints an be easily identified. We know that in general the auray of the solution depends on the disretization; therefore we would require that our final solution be determined only by the finest grid that we are employing. This means that the oarse grids an only provide us with orretions or guesses to the fine grid solution and as the fine grid residuals approah zero (i.e., the fine grid solution approahes the exat answer) the influene of any oarse levels should also approah zero. One onsequene of this requirement is that it is enough to solve only an approximate problem at the oarse levels sine its solution will never govern the final auray we ahieve. One strategy for involving oarse levels might be to solve the original differential equation on a oarse grid. One we have a onverged solution on this oarse grid, we ould interpolate it to a finer grid. Of ourse, the interpolated solution will not in general satisfy the disrete equations at the fine level but it would probably be a better approximation than an arbitrary initial guess. We an repeat the proess reursively on even finer grids till we reah the desired grid. The disadvantage with this strategy, known as nested iteration is that it solves the problem fully on all oarse grids even though we are only interested in the finest grid 180

181 solution. It also does not make use of any guess we might have for the finest level grid from previous outer iterations. More importantly however, the physial problem may not be well resolved on the oarse grid and thus the solution on oarse grid may not always be a good guess for the fine grid solution. Smooth error modes may arise only on the finer grids and then the onvergene will still be limited by them Coarse Grid Corretion A more useful strategy, known as oarse grid orretion is based on the error equation (Eq. 8.14). Reall that the error e satisfies the same set of of equations as our solution if we replae the soure vetor by the residual: Ae r (8.29) Note also that solving Eq. 8.1 with an initial guess x 0 is idential to solving Eq with the residual r 0 b ª Ax 0 and an initial guess of zero error. Now suppose that after some iterations on the finest grid we have a solution x. Although we don t know the error we do know that the error at this stage is likely to be smooth and that further iterations will not redue it quikly. Instead we ould try to estimate it by solving Eq on a oarser grid. We expet that on the oarser grid the smooth error will be more osillatory and therefore onvergene will be better. When we have obtained a satisfatory solution for e we an use it to orret our fine grid solution. Of ourse, even on the oarse level the error (whih of ourse now is the error in Eq. 8.29, i.e., the error in the estimation of the fine grid error) will have smooth omponents. We an now view Eq as a linear problem in its own right. We an thus apply the same strategy for its solution that we used for the finest grid, i.e., solve for its error on an even oarser mesh. This an be ontinued reursively on suessively oarser meshes till we reah one with a few number (2-4) of ells. At this stage we an simply solve the linear analytially, although using Gauss-Seidel iteration usually suffies as well. We still have to speify exatly what we mean by solving Eq on a oarse grid and how exatly we intend to use the errors estimated from the oarse levels but we an already see that the strategy outlined above has the desired properties. First of all, note that if the fine grid solution is exat, the residual will be zero and thus the solution of the oarse level equation will also be zero. Thus we are guaranteed that the final solution is only determined by the finest level disretization. In addition, sine we start with a zero initial guess for the oarse level error, we will ahieve onvergene right away and not waste any time on further oarse level iterations. Another useful harateristi of this approah is that we use oarse level to only estimate fine level errors. Thus any approximations we make in the oarse level problem only effet the onvergene rate and not the final finest grid solution Geometri Multigrid Having developed a general idea of how oarse grids might be used to aelerate onvergene, let us now look at some details. To distinguish between the matries and 181

182 i (a) Fine Level (l=0) I (b) Coarse Level (l=1) Figure 8.10: Coarsening for 1D grid vetors at different grid levels, we shall employ a parenthiated supersript, starting with (0) for the finest grid and inreasing it as the grid is oarsened ; a seond supersript, if present, will denote the iteration number. Thus the problem to be solved at the level µ l is given by A l x l b l (8.30) and the residual at level l after k iterations is r l ¹ k b l ª A l x l ¹ k (8.31) We have already seen how to disretize and iterate on the finest level (l 0) grid of N ells and ompute the residual r 0. We also know that for oarse levels (l º 0), the unknown x l represents the estimate of the error at the µ l ª 1 level and that the soure vetor b l is somehow to be based on the residual r l 1. After doing some iterations on the oarse grid (and perhaps reursively repeating the proess at further oarse levels) we would like to make use of the errors alulated at level l to orret the urrent guess for solution at the finer level. The next step is to define the exat means of doing these oarse grid operations and the intergrid transfers. The simplest way of obtaining the oarse grid for our sample 1D problem is to merge ells in pairs to obtain a grid of N» 2 ells, as shown in Fig The resulting grid is similar to the original grid, with a ell width of 2h. We an now apply our usual disretization proedure on the differential equation (remembering that the unknown is a orretion to the fine level unknown) and obtain the linear system of the same form 182

183 as The oarse level matrix is given by A 1 1 2h 3 ª 1 0 ¼+¼+¼ ª 1 2 ª 1 ¼+¼+¼ ¼+¼+¼$ª 1 2 ª ¼+¼+¼ 0 ª 1 3 «(8.32) We also note from Fig that the ell entroid of a oarse level ell lies midway between the entroids of its parent fine level ells. The soure term for the oarse level ell an thus be obtained by averaging the residuals at the parent ells: b l½ 1 i 1 2 ¾ r l 2i 1 r l 2i (8.33) This operation of transfering the residual from a fine level to the oarse level is known defined as as restrition and is denoted by the operator I l½ 1 l b l½ 1 I l½ 1 l r l (8.34) For our equispaed grid we used averaging as the restrition operator; in the general ase we will need to use some form of interpolation operator. We already know that the starting guess for the oarse level unknowns x l½ 1 ¹ 0 is zero. Thus we now have all the information to iterate the oarse level system and obtain an esitmate for the error. The proess of transfering this orretion bak to the finer. The orretion of level is known as prolongation and is denoted by the operator I l½ l 1 the solution at the fine level using the oarse level solution is written as x l x l Il½ l x l½ 1 1 (8.35) The simplest prolongation operator that we an use on our 1D grid (Fig. 8.10) is to apply the orretion from a oarse level ell to both the parent fine level ells, i.e. use a zeroth order interpolation. A more sophistiated approah is to use linear interpolation; for example, for ell 2 at the fine level we use x 0 2 x x x ± (8.36) The strategy outlined in this setion is known as geometri multigrid beause we made use of the grid geometry and the differential equation at the oarse levels in order to arrive at the linear system to be solved. In the one dimensional ase, of ourse, the oarse level ells had the same type of geometry as those at the fine level and this made the disretization proess straightforward. For multidimensional ases, however, the ell shapes obtained by agglomerating fine level ells an be very different. As shown in Fig the oarse level ells may not even be onvex. With suh nested grid hierarhies it may not be feasible to disretize the original differential equation on the oarse level ells. 183

184 (a) l=0 (b) l=1 () l=2 Figure 8.11: Nested Coarsening For 2D grid (a) l=0 (b) l=1 () l=2 Figure 8.12: Independent Coarsening For 2D grid 184

185 One approah to get around this problem is to use a sequene of non-nested, independent grids, as shown in Fig In this ase there are no ommon faes between any two grids. The main problem with this approah is that the prolongation and restrition operators beome very ompliated sine they involve multidimensional interpolation. Also, in some instanes, for example, the pressure orretion equation that we derived algebraially, we may not have a formal differential equation that an be disretized to obtain the oarse level system. For these reasons, it is useful to devise methods of obtaining oarse grid linear systems that do not depend on the geometry or the differential equation. We will look at suh algebrai multigrid methods in the next setion Algebrai Multigrid The general priniples behind algebrai multigrid methods are the same as those for the geometri multigrid method we saw in the last setion. The main differene is that the oarse level system is derived purely from the fine level system without referene to the underlying grid geometry or physial priniple that led to the fine level system. Instead of thinking in terms of agglomerating two or more fine level ells to obtain the geometry of a oarse level ell, we speak of agglomerating the equations at those ells to diretly obtain the linear equation orresponding to that oarse ell. We will see shortly how to selet the equations to be agglomerated in the general ase. For the moment let us just onsider the 1D grid and the oarse grid levels, shown in Fig. 8.10, that we used in the geometri multigrid setion above. Let i and i 1 be the indies of the fine level equations that we will agglomerate to produe the oarse level equation with index I. For instane, ells 1 and 2 at level 0 are ombined to obtain the equation for ell 1 at level 1. Writing out the error equation (Eq. 8.14) for indies i and i 1 we have A 0 i i e 0 1 i 1 A 0 i e 0 i i A 0 i i½ e 0 1 i½ r 0 (8.37) 1 i A 0 i½ 1 e 0 i i A 0 i½ 1 i½ e 0 1 i½ 1 A 0 i½ 1 i½ e 0 2 i½ r 0 2 i½ (8.38) 1 Now, the multigrid priniple is that the errors at level l are to be estimated from the unknowns at level l 1. We assume that the error for both the parent ells i and i 1 is the same and is obtained from x 1. Likewise, e 0 I i x 1 1 I 1 and e 0 i½ x 1 2 I½ 1. Substituting these relations and adding Eqs and 8.38 gives us the required oarse level equation for index I: A 0 i i x 1 1 I 1 µ A 0 i i A 0 i i½ 1 A 0 i½ 1 i A 0 i½ 1 i½ x 1 1 I A 0 i½ 1 i½ x 1 2 I½ r 0 1 i r 0 i½ 1 (8.39) Thus we see that the oeffiients for the oarse level matrix have been obtained by summing up oeffiients of the fine level matrix and without any use of the geometry or differential equation. The soure term for the oarse level ells turn out be the sum of the residuals at the onstituent fine levels ells. This is equivalent to the use of addition as the restrition operator. Our derivation above implies zeroth order interpolation as the prolongation operator. 185

186 8.9.4 Agglomeration Strategies In the 1D ase that we have seen so far, agglomeration was a simple matter of ombining equations at ells 2i and 2i 1 to obtain the oarse level system of equations. For linear systems resulting from two or three dimensional strutured grids, the same idea an be applied in one or more diretions simultaneously. Besides simplifying the book-keeping this pratie has the additional advantage of maintaining the penta- or equations at a time to obtain septa-diagonal form of the linear system. This permits the use of relaxation methods suh as line-by-line TDMA on the oarse level systems as well as the fine level systems. For unstrutured grids, however, we need to devise more general agglomeration riteria. One useful pratie is to try to ombine ells that have the largest mutual oeffiients. This reates oarse level grids 3 that allow the optimal transfer of boundary information to interior regions and thus aelerates onvergene. To implement suh a oarsening proedure, we assoiate a oarse index with eah fine level ell and initialize it to zero. We also initialize a oarse level ell ounter C 1 We then visit the ells (or equations) in sequene, and if has not been grouped (i.e., its oarse index is 0), group it and n of its neighbours for whih the oeffiient A i j is the largest (i.e, assign them the oarse level index C) and inrement C by 1. We have already seen that the oeffiients of the oarse level matrix are obtained by summing up appropriate oeffiients of the fine level matrix. Proeeding in the same manner that we used to derive Eq we an show that A l½ 1 I J A l i j (8.40) ià G I jà G J where G I denotes the set of fine level ells that belong to the oarse level ell I. Also, as we have seen before, the soure vetor for the oarse level equation is obtained by summing up the residuals of the onstituent fine level ells b l½ 1 I r l i ià G I (8.41) The oarse level matries an be stored using the same storage strategies outlined in Se. 8.2 for the finest level. Best multigrid performane is usually observed for n 2, i.e., a oarse level grid that onsists of roughly half the number of ells as the finest level. If suh a division is ontinued till we have just 2 or 3 ells at the oarsest level, the total memory required for storing all the oarse levels is roughly equal to that required for the finest level. The linear systems enountered in CFD appliations are frequently stiff. This stiffness is a result of a number of fators: large aspet-ratio geometries, disparate grid sizes typial of unstrutured meshes, large ondutivity ratios in onjugate heat transfer problems, and others. The agglomeration strategy outlined above is very effetive in aelerating the onvergene rate of the linear solver. 3 Even though we are not onerned with the atual geometry of the oarse level grids in algebrai multigrid, it is nevertheless quite useful to visualize the effetive grids resulting from the oarsening in order to understand the behaviour of the method. 186

187 Level 0 Level 1 Level 2 Level 4 Level 6 Level 8 Figure 8.13: Condution in omposite domain: multigrid oarsening Consider the situation depited in Fig A omposite domain onsists of a low-ondutivity outer region surrounding a highly onduting inner square domain. The ratio of ondutivities is 1000; a ratio of this order would our for a opper blok in air. The temperature is speified on the four external walls of the domain. Convergene of typial linear solvers is inhibited by the large anisotropy of oeffiients for ells bordering the interfae of the two regions. Coeffiients resulting from the diffusion term sale as ka» x, where A is a typial fae area and x is a typial ell length sale. For interfae ells in the highly onduting region, oeffiients to interior ells are approximately three orders of magnitude bigger than oeffiients to ells in the low-onduting region. However, Dirihlet boundary onditions, whih set the level of the temperature field, are only available at the outer boundaries of the domain, adjaent to the low-onduting region. Information transfer from the outer boundary to the interior region is inhibited beause the large-oeffiient terms overwhelm the boundary information transferred through the small-oeffiient terms. An agglomeration strategy whih lusters ell neighbors with the largest oeffiients results in the oarse levels shown in Fig At the oarsest level, the domain onsists of a single ell in the high-onduting region, and another in the low-onduting region. The assoiated oeffiient matrix has oeffiients of the same order. The temperature level of the inner region is set primarily by the multigrid orretions at this level, and results in very fast onvergene. 187

188 Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Figure 8.14: Orthotropi ondution: multigrid oarsening Another example is shown in Fig The problem involves orthotropi ondution in a triangular domain with temperature distributions given on all boundaries [17]. The material has a ondutivity k ηη º 0 in the η diretion, aligned at π» 3 radians from the horizontal; the ondutivity k ξ ξ in the diretion perpendiular to η is zero. Mesh agglomeration based on oeffiient size results in oarse-level meshes aligned with η as shown. Sine all faes with normals in the ξ diretion have zero oeffiients, the primary diretion of information transfer is in the η diretion. Thus, the oarse level mesh orretly aptures the diretion of information transfer. We should note here that the oeffiient based oarsening strategy are dersirable even on strutured grids. Athough oarse levels reated by agglomerating omplete grid lines in eah grid diretion have the advantage of preserving the grid struture and permitting the use of the same line-by-line relaxation shemes as used on the finest level, they do not always result in optimal multigrid aeleration in general situations sine oeffiient anisotropies are not always aligned along lines. Algebrai multigrid methods used with sequential solution proedures have the advantage that the agglomeration strategy an be equation-speifi; the disrete oeffiients for the speifi governing equation an be used to reate oarse mesh levels. Sine the oarsening is based on the oeffiients of the linearized equations it also hanges appropriately as the solution evolves. This is speially useful for non-linear and/or transient problems. In some appliations, however, the mutual oupling between the governing equations is the main ause of onvergene degradation. Geometri multigrid methods that solve the oupled problem on a sequene of oarser meshes may offer better performane in suh ases. 188

189 8.9.5 Cyling Strategies and Implementation Issues The attrativeness of multigrid methods lies in the fat that signifiant onvergene aeleration an be ahieved just by using simple relaxation sweeps on a sequene of oarse meshes. Various strategies an be devised for the manner in whih the oarse levels are visited. These yling strategies an be expressed rather ompatly using reursion and this makes it very easy to implement them, speially using a omputer language suh as C that allows reursion (i.e., a funtion is allowed all itself). Mutigrid yles an broadly be lassified into two ategories (1) fixed yles that repeat a set pattern of oarse grid visits and (2) flexible yles that involve oarse grid relaxations as and when they are needed. We will look at both of these ideas next. The general priniples of these yling strategies are appliable for both geometri and algebrai multigrid methods but we shall onentrate on the latter. Fixed Cyles We have seen that the oarse level soure vetor is omputed from the residuals at the previous fine level and thus it hanges every time we visit a oarse level. However, the oarse level matrix is only a funtion of oeffiients of the fine level matrix and thus remains onstant. The starting point in all fixed grid methods therefore is to ompute all the oarse level oeffiients. With algebrai multigrid it is usually desirable to keep oarsening the grid till there are only two or three ells left; for geometri multigrid the oarsest possible grid size might be ditated by the minimum number of ells required to reasonably disretize the governing equation. The simplest fixed yle is known as the V yle and onsists of two legs. In the first leg we start with the finest level and perform a fixed number of relaxation sweeps, then transfer the residuals to the next oarse level and relax on that level, ontinuing till we reah the oarsest level. After finishing sweeps on the oarsest level we start the upward leg, using the solution from the urrent level to orret the the solution at the next finer level, then perfoming some relaxation sweeps at that finer level and ontinuing the proess till we reah the finest level. The two parameters defining the V-yle are the number of sweeps performed on the down and up legs, ν 1 and ν 2 respetively. The two need not be equal; in many appliations it is most effiient to have ν 1 0, i.e., to not do any sweeps on the down leg but to simply keep injeting the residuals till the oarsest level. The oarsest level then establishes an average solution over the entire domain whih is then refined by relaxation sweeps on the upward leg. We should note that sine the oarse grids only provide an estimate of the error, it is generally a good idea to always have non-zero ν 2 in order to ensure that the solution satisfies the disrete equation at the urrent level. This yle is graphially illustrated in Fig. 8.15(a) where eah irle represents relaxation sweeps and the up and down arrows represent prolongation and restrition operators, respetively. For very stiff systems, the V-yle may not be suffiient and more oarse level iterations are alled for. This an be ahieved by using a µ yle. It is best understood through a reursive definition. One an think of the V-yle as a fixed grid yle where the yle is reursively applied at eah oarse grid if we haven t reah the oarsest grid. The µ-yle an then be thought of as a yle whih is reursively applied µ 189

190 l = 0 l = 1 l = 2 l = 3 l = 0 l = 1 l = 2 l = 3 (a) V-yle (b) W-yle l = 0 l = 1 l = 2 l = 3 () F-yle Figure 8.15: Relaxation and Grid Transfer Sequenes for Some Fixed Cyles times at eah suessive level. The ommonly used version is the one orresponding to µ 2, whih is also known as the W-yle. It is illustrated in Fig. 8.15(b). Beause of the reursiveness, a W-yle involves a lot of oarse level relaxation sweeps, speially when the number of levels is large. A slight variant of the W-yle, known as the F- yle, involves somewhat less oarse level sweeps but still more than the V-yle. It an be thought of as a fixed yle where one reursively applies one fixed yle followed by a V-yle at eah suessive level. It is illustrated in Fig. 8.15(). All the fixed grid yles we have seen so far an be expressed very ompatly in the reursive pseudoode shown in Fig The entire linear solver an then be expressed using the ode shown in Fig Here α is the termination riterion whih determines how aurately the system is to be solved and nmax is the maximum number of fixed multigrid yles allowed. Á1Á xá,á represents some suitable norm of the vetor x. Usually the L-2 norm (i.e., the RMS value) or the L- norm (i.e., the largest value) is employed. Flexible Cyles For linear systems that are not very stiff, it is not always eonomial to use all multigrid levels all the time in a regular pattern. For suh ases the use of flexible yles is preferred. Here, we monitor the residuals after every sweep on a given grid level and if the ratio is above a speified rate β, we transfer the problem to the next oarse level and ontinue sweeps at that level. If the ratio is below β we ontinue sweeps at the urrent level till the termination riterion is met. When we meet the termination riterion at 190

191 Ä Â Ä Ä Ä Fixed  Cyle(l, yle type) Perform ν 1 relaxation sweeps on A l x l b l ; if (l à lmax) r l b l ª A l x l ; b l½ 1 I l½ l 1 r l ; x l½ 1 0; Fixed Cyle(l+1, yle type); if (yle type = µ CYCLE) Fixed Cyle(l+1, W CYCLE) µ µ ª 1 times; else if (yle type = F CYCLE) Fixed Cyle(l+1, V CYCLE); x l x l Il½ l x l½ 1 1 ; Perform ν 2 relaxation sweeps on A l x l b l ; Figure 8.16: Fixed Cyle Algorithm Solve(A 0, x 0, x 0, α, yle type)  Compute r 0?Á,Á b 0 ª A 0 x 0 Á,Á ; Compute all oarse level matries; for n = 1 to nmax  Fixed Cyle(0,yle type); Compute r n Á1Á b 0 ª A 0 x 0 Á1Á ; if µ r n» r 0 Å α return; Figure 8.17: Driver Algorithm for Fixed Cyle 191

192 Ä Ä Â Ä Ä Flexible  Cyle(l) Compute r 0?Á,Á b l ª A l x l Á1Á ; Set r old r 0 ; if total number of sweeps on level l not exhausted  Perform ν 1 relaxation sweeps on A l x l b l ; Compute r Á1Á b l ª A l x l Á1Á ; if µ r» r 0 Å α return; else if µ0µ r» r old rº β and (l à else  lmax) Compute A l½ 1 if first visit to level l+1; r l b l ª A l x l ; b l½ 1 I l½ l 1 r l ; x l½ 1 0; Flexible Cyle(l+1); x l x l Il½ l x l½ 1 1 ; r old r; Figure 8.18: Flexible Cyle Algorithm any level, and we are not already at the finest level, the solution at that level is used to orret the solution at the next finer level and the proess ontinues. In pratial implementation, a limit is imposed on the number of relaxation sweeps allowed at any level. The flexible yle an also be desribed ompatly in a reursive form, as shown in Fig Closure In this hapter, we examined different approahes to solving the linear equation sets that result from disretization. We saw that the only viable approahes for most fluid flow problems were iterative methods. The line-by-line TDMA algorithm may be used for strutured meshes, but is not suitable for unstrutured meshes. However, methods 192

193 like Gauss-Seidel or Jaobi iteration do not have adequate rates of onvergene. We saw that these shemes are good at reduing high frequeny errors, but annot redue low-frequeny errors. By the same token, they are also inadequate on fine meshes. To aelerate these shemes, we examined geometri and algebrai multigrid shemes, whih use oarse mesh solutions for the error to orret the fine mesh solution. These shemes have been shown in the literature to substantially aelerate linear solver onvergene, and are very effiient way to solve unstrutured linear systems. 193

194 194

195 Bibliography [1] R. Courant, K.O. Friedrihs, and H. Lewy. Uber die partiellen differenzgleihungen der mathematishen physik. Mathematishe Annalen, 100:32 74, [2] R. Courant, K.O. Friedrihs, and H. Lewy. On the partial differene equations of mathematial physis. IBM J. Res. Dev., 11: , [3] B.P. Leonard. A stable and aurate onvetive modelling proedure based on quadrati upstream interpolation. Computer Methods in Applied Mehanis and Engineering, 19:59 98, [4] T. J. Barth and D. C. Jespersen. The design and appliation of upwind shemes on unstrutured meshes. AIAA , [5] D.A. Anderson, J.C. Tannehill, and R. H. Plether. Computational Fluid Mehanis and Heat Transfer. Hemisphere Publishing Corporation, [6] A.J. Chorin. A numerial method for solving inompressible visous flow problems. Journal of Computational Physis, 2(1):12 26, [7] K.C. Karki and S.V. Patankar. Pressure based alulation proedure for visous flows at all speeds in arbitrary onfigurations. AIAA Journal, 27(9): , [8] S.P. Vanka. Blok-impliit multigrid solution of Navier-Stokes equations in primitive variables. Journal of Computational Physis, 65: , [9] S.V. Patankar and D.B. Spalding. A alulation proedure for heat, mass and momentum transfer in three-dimensional paraboli flows. International Journal of Heat and Mass Transfer, 15: , [10] S. V. Patankar. Numerial Heat Transfer and Fluid Flow. MGraw-Hill New York, [11] J.P. Van Doormal and G.D. Raithby. Enhanements of the SIMPLE method for prediting inompressible fluid flows. Numerial Heat Transfer, 7: ,

196 [12] B. R. Baliga and S. V. Patankar. A ontrol-volume finite element method for twodimensional fluid flow and heat transfer. Numerial Heat Transfer, 6: , [13] C. Hsu. A Curvilinear-Coordinate Method for Momentum, Heat and Mass Transfer in Domains of Irregular Geometry. PhD thesis, University of Minnesota, [14] C.M. Rhie and W.L. Chow. A numerial study of the turbulent flow past an isolated airfoil with trailing edge separation. AIAA Journal, 21: , [15] M. Peri. A Finite Volume Method for the Predition of Three Dimensional Fluid Flow in Complex Duts. PhD thesis, University of London, August [16] S. Majumdar. Role of underrelaxation in momentum interpolation for alulation of flow with nonstaggered grids. Numerial Heat Transfer, 13: , [17] J.Y. Murthy and S.R. Mathur. Computation of anisotropi ondution using unstrutured meshes. Journal of Heat Transfer, 120: , August

HEAT CONDUCTION. q A q T

HEAT CONDUCTION. q A q T HEAT CONDUCTION When a temperature gradient eist in a material, heat flows from the high temperature region to the low temperature region. The heat transfer mehanism is referred to as ondution and the

More information

) ( )( ) ( ) ( )( ) ( ) ( ) (1)

) ( )( ) ( ) ( )( ) ( ) ( ) (1) OPEN CHANNEL FLOW Open hannel flow is haraterized by a surfae in ontat with a gas phase, allowing the fluid to take on shapes and undergo behavior that is impossible in a pipe or other filled onduit. Examples

More information

Chapter 5 Single Phase Systems

Chapter 5 Single Phase Systems Chapter 5 Single Phase Systems Chemial engineering alulations rely heavily on the availability of physial properties of materials. There are three ommon methods used to find these properties. These inlude

More information

Chapter 1 Microeconomics of Consumer Theory

Chapter 1 Microeconomics of Consumer Theory Chapter 1 Miroeonomis of Consumer Theory The two broad ategories of deision-makers in an eonomy are onsumers and firms. Eah individual in eah of these groups makes its deisions in order to ahieve some

More information

Sebastián Bravo López

Sebastián Bravo López Transfinite Turing mahines Sebastián Bravo López 1 Introdution With the rise of omputers with high omputational power the idea of developing more powerful models of omputation has appeared. Suppose that

More information

In order to be able to design beams, we need both moments and shears. 1. Moment a) From direct design method or equivalent frame method

In order to be able to design beams, we need both moments and shears. 1. Moment a) From direct design method or equivalent frame method BEAM DESIGN In order to be able to design beams, we need both moments and shears. 1. Moment a) From diret design method or equivalent frame method b) From loads applied diretly to beams inluding beam weight

More information

10.1 The Lorentz force law

10.1 The Lorentz force law Sott Hughes 10 Marh 2005 Massahusetts Institute of Tehnology Department of Physis 8.022 Spring 2004 Leture 10: Magneti fore; Magneti fields; Ampere s law 10.1 The Lorentz fore law Until now, we have been

More information

A Three-Hybrid Treatment Method of the Compressor's Characteristic Line in Performance Prediction of Power Systems

A Three-Hybrid Treatment Method of the Compressor's Characteristic Line in Performance Prediction of Power Systems A Three-Hybrid Treatment Method of the Compressor's Charateristi Line in Performane Predition of Power Systems A Three-Hybrid Treatment Method of the Compressor's Charateristi Line in Performane Predition

More information

1.3 Complex Numbers; Quadratic Equations in the Complex Number System*

1.3 Complex Numbers; Quadratic Equations in the Complex Number System* 04 CHAPTER Equations and Inequalities Explaining Conepts: Disussion and Writing 7. Whih of the following pairs of equations are equivalent? Explain. x 2 9; x 3 (b) x 29; x 3 () x - 2x - 22 x - 2 2 ; x

More information

Channel Assignment Strategies for Cellular Phone Systems

Channel Assignment Strategies for Cellular Phone Systems Channel Assignment Strategies for Cellular Phone Systems Wei Liu Yiping Han Hang Yu Zhejiang University Hangzhou, P. R. China Contat: [email protected] 000 Mathematial Contest in Modeling (MCM) Meritorious

More information

Classical Electromagnetic Doppler Effect Redefined. Copyright 2014 Joseph A. Rybczyk

Classical Electromagnetic Doppler Effect Redefined. Copyright 2014 Joseph A. Rybczyk Classial Eletromagneti Doppler Effet Redefined Copyright 04 Joseph A. Rybzyk Abstrat The lassial Doppler Effet formula for eletromagneti waves is redefined to agree with the fundamental sientifi priniples

More information

DSP-I DSP-I DSP-I DSP-I

DSP-I DSP-I DSP-I DSP-I DSP-I DSP-I DSP-I DSP-I Digital Signal Proessing I (8-79) Fall Semester, 005 IIR FILER DESIG EXAMPLE hese notes summarize the design proedure for IIR filters as disussed in lass on ovember. Introdution:

More information

How To Fator

How To Fator CHAPTER hapter 4 > Make the Connetion 4 INTRODUCTION Developing seret odes is big business beause of the widespread use of omputers and the Internet. Corporations all over the world sell enryption systems

More information

THE PERFORMANCE OF TRANSIT TIME FLOWMETERS IN HEATED GAS MIXTURES

THE PERFORMANCE OF TRANSIT TIME FLOWMETERS IN HEATED GAS MIXTURES Proeedings of FEDSM 98 998 ASME Fluids Engineering Division Summer Meeting June 2-25, 998 Washington DC FEDSM98-529 THE PERFORMANCE OF TRANSIT TIME FLOWMETERS IN HEATED GAS MIXTURES John D. Wright Proess

More information

Computer Networks Framing

Computer Networks Framing Computer Networks Framing Saad Mneimneh Computer Siene Hunter College of CUNY New York Introdution Who framed Roger rabbit? A detetive, a woman, and a rabbit in a network of trouble We will skip the physial

More information

Supply chain coordination; A Game Theory approach

Supply chain coordination; A Game Theory approach aepted for publiation in the journal "Engineering Appliations of Artifiial Intelligene" 2008 upply hain oordination; A Game Theory approah Jean-Claude Hennet x and Yasemin Arda xx x LI CNR-UMR 668 Université

More information

Intelligent Measurement Processes in 3D Optical Metrology: Producing More Accurate Point Clouds

Intelligent Measurement Processes in 3D Optical Metrology: Producing More Accurate Point Clouds Intelligent Measurement Proesses in 3D Optial Metrology: Produing More Aurate Point Clouds Charles Mony, Ph.D. 1 President Creaform in. [email protected] Daniel Brown, Eng. 1 Produt Manager Creaform in.

More information

Electrician'sMathand BasicElectricalFormulas

Electrician'sMathand BasicElectricalFormulas Eletriian'sMathand BasiEletrialFormulas MikeHoltEnterprises,In. 1.888.NEC.CODE www.mikeholt.om Introdution Introdution This PDF is a free resoure from Mike Holt Enterprises, In. It s Unit 1 from the Eletrial

More information

User s Guide VISFIT: a computer tool for the measurement of intrinsic viscosities

User s Guide VISFIT: a computer tool for the measurement of intrinsic viscosities File:UserVisfit_2.do User s Guide VISFIT: a omputer tool for the measurement of intrinsi visosities Version 2.a, September 2003 From: Multiple Linear Least-Squares Fits with a Common Interept: Determination

More information

Improved SOM-Based High-Dimensional Data Visualization Algorithm

Improved SOM-Based High-Dimensional Data Visualization Algorithm Computer and Information Siene; Vol. 5, No. 4; 2012 ISSN 1913-8989 E-ISSN 1913-8997 Published by Canadian Center of Siene and Eduation Improved SOM-Based High-Dimensional Data Visualization Algorithm Wang

More information

Measurement of Powder Flow Properties that relate to Gravity Flow Behaviour through Industrial Processing Lines

Measurement of Powder Flow Properties that relate to Gravity Flow Behaviour through Industrial Processing Lines Measurement of Powder Flow Properties that relate to Gravity Flow ehaviour through Industrial Proessing Lines A typial industrial powder proessing line will inlude several storage vessels (e.g. bins, bunkers,

More information

RISK-BASED IN SITU BIOREMEDIATION DESIGN JENNINGS BRYAN SMALLEY. A.B., Washington University, 1992 THESIS. Urbana, Illinois

RISK-BASED IN SITU BIOREMEDIATION DESIGN JENNINGS BRYAN SMALLEY. A.B., Washington University, 1992 THESIS. Urbana, Illinois RISK-BASED IN SITU BIOREMEDIATION DESIGN BY JENNINGS BRYAN SMALLEY A.B., Washington University, 1992 THESIS Submitted in partial fulfillment of the requirements for the degree of Master of Siene in Environmental

More information

Programming Basics - FORTRAN 77 http://www.physics.nau.edu/~bowman/phy520/f77tutor/tutorial_77.html

Programming Basics - FORTRAN 77 http://www.physics.nau.edu/~bowman/phy520/f77tutor/tutorial_77.html CWCS Workshop May 2005 Programming Basis - FORTRAN 77 http://www.physis.nau.edu/~bowman/phy520/f77tutor/tutorial_77.html Program Organization A FORTRAN program is just a sequene of lines of plain text.

More information

CIS570 Lecture 4 Introduction to Data-flow Analysis 3

CIS570 Lecture 4 Introduction to Data-flow Analysis 3 Introdution to Data-flow Analysis Last Time Control flow analysis BT disussion Today Introdue iterative data-flow analysis Liveness analysis Introdue other useful onepts CIS570 Leture 4 Introdution to

More information

Effects of Inter-Coaching Spacing on Aerodynamic Noise Generation Inside High-speed Trains

Effects of Inter-Coaching Spacing on Aerodynamic Noise Generation Inside High-speed Trains Effets of Inter-Coahing Spaing on Aerodynami Noise Generation Inside High-speed Trains 1 J. Ryu, 1 J. Park*, 2 C. Choi, 1 S. Song Hanyang University, Seoul, South Korea 1 ; Korea Railroad Researh Institute,

More information

5.2 The Master Theorem

5.2 The Master Theorem 170 CHAPTER 5. RECURSION AND RECURRENCES 5.2 The Master Theorem Master Theorem In the last setion, we saw three different kinds of behavior for reurrenes of the form at (n/2) + n These behaviors depended

More information

A novel active mass damper for vibration control of bridges

A novel active mass damper for vibration control of bridges IABMAS 08, International Conferene on Bridge Maintenane, Safety and Management, 3-7 July 008, Seoul, Korea A novel ative mass damper for vibration ontrol of bridges U. Starossek & J. Sheller Strutural

More information

REDUCTION FACTOR OF FEEDING LINES THAT HAVE A CABLE AND AN OVERHEAD SECTION

REDUCTION FACTOR OF FEEDING LINES THAT HAVE A CABLE AND AN OVERHEAD SECTION C I E 17 th International Conferene on Eletriity istriution Barelona, 1-15 May 003 EUCTION FACTO OF FEEING LINES THAT HAVE A CABLE AN AN OVEHEA SECTION Ljuivoje opovi J.. Elektrodistriuija - Belgrade -

More information

Static Fairness Criteria in Telecommunications

Static Fairness Criteria in Telecommunications Teknillinen Korkeakoulu ERIKOISTYÖ Teknillisen fysiikan koulutusohjelma 92002 Mat-208 Sovelletun matematiikan erikoistyöt Stati Fairness Criteria in Teleommuniations Vesa Timonen, e-mail: vesatimonen@hutfi

More information

Relativity in the Global Positioning System

Relativity in the Global Positioning System Relativity in the Global Positioning System Neil Ashby Department of Physis,UCB 390 University of Colorado, Boulder, CO 80309-00390 NIST Affiliate Email: [email protected] July 0, 006 AAPT workshop

More information

protection p1ann1ng report

protection p1ann1ng report f1re~~ protetion p1ann1ng report BUILDING CONSTRUCTION INFORMATION FROM THE CONCRETE AND MASONRY INDUSTRIES Signifiane of Fire Ratings for Building Constrution NO. 3 OF A SERIES The use of fire-resistive

More information

Capacity at Unsignalized Two-Stage Priority Intersections

Capacity at Unsignalized Two-Stage Priority Intersections Capaity at Unsignalized Two-Stage Priority Intersetions by Werner Brilon and Ning Wu Abstrat The subjet of this paper is the apaity of minor-street traffi movements aross major divided four-lane roadways

More information

A Holistic Method for Selecting Web Services in Design of Composite Applications

A Holistic Method for Selecting Web Services in Design of Composite Applications A Holisti Method for Seleting Web Servies in Design of Composite Appliations Mārtiņš Bonders, Jānis Grabis Institute of Information Tehnology, Riga Tehnial University, 1 Kalu Street, Riga, LV 1658, Latvia,

More information

Introduction to CFD Analysis

Introduction to CFD Analysis Introduction to CFD Analysis 2-1 What is CFD? Computational Fluid Dynamics (CFD) is the science of predicting fluid flow, heat and mass transfer, chemical reactions, and related phenomena by solving numerically

More information

Lemon Signaling in Cross-Listings Michal Barzuza*

Lemon Signaling in Cross-Listings Michal Barzuza* Lemon Signaling in Cross-Listings Mihal Barzuza* This paper analyzes the deision to ross-list by managers and ontrolling shareholders assuming that they have private information with respet to the amount

More information

Conversion of short optical pulses to terahertz radiation in a nonlinear medium: Experiment and theory

Conversion of short optical pulses to terahertz radiation in a nonlinear medium: Experiment and theory PHYSICAL REVIEW B 76, 35114 007 Conversion of short optial pulses to terahertz radiation in a nonlinear medium: Experiment and theory N. N. Zinov ev* Department of Physis, University of Durham, Durham

More information

Fixed-income Securities Lecture 2: Basic Terminology and Concepts. Present value (fixed interest rate) Present value (fixed interest rate): the arb

Fixed-income Securities Lecture 2: Basic Terminology and Concepts. Present value (fixed interest rate) Present value (fixed interest rate): the arb Fixed-inome Seurities Leture 2: Basi Terminology and Conepts Philip H. Dybvig Washington University in Saint Louis Various interest rates Present value (PV) and arbitrage Forward and spot interest rates

More information

Weighting Methods in Survey Sampling

Weighting Methods in Survey Sampling Setion on Survey Researh Methods JSM 01 Weighting Methods in Survey Sampling Chiao-hih Chang Ferry Butar Butar Abstrat It is said that a well-designed survey an best prevent nonresponse. However, no matter

More information

SHAFTS: TORSION LOADING AND DEFORMATION

SHAFTS: TORSION LOADING AND DEFORMATION ECURE hird Edition SHAFS: ORSION OADING AND DEFORMAION A. J. Clark Shool of Engineering Department of Civil and Environmental Engineering 6 Chapter 3.1-3.5 by Dr. Ibrahim A. Assakkaf SPRING 2003 ENES 220

More information

Introduction to CFD Analysis

Introduction to CFD Analysis Introduction to CFD Analysis Introductory FLUENT Training 2006 ANSYS, Inc. All rights reserved. 2006 ANSYS, Inc. All rights reserved. 2-2 What is CFD? Computational fluid dynamics (CFD) is the science

More information

ME6130 An introduction to CFD 1-1

ME6130 An introduction to CFD 1-1 ME6130 An introduction to CFD 1-1 What is CFD? Computational fluid dynamics (CFD) is the science of predicting fluid flow, heat and mass transfer, chemical reactions, and related phenomena by solving numerically

More information

HEAT EXCHANGERS-2. Associate Professor. IIT Delhi E-mail: [email protected]. P.Talukdar/ Mech-IITD

HEAT EXCHANGERS-2. Associate Professor. IIT Delhi E-mail: prabal@mech.iitd.ac.in. P.Talukdar/ Mech-IITD HEA EXHANGERS-2 Prabal alukdar Assoiate Professor Department of Mehanial Engineering II Delhi E-mail: [email protected] Multipass and rossflow he subsripts 1 and 2 represent the inlet and outlet, respetively..

More information

THE EFFECT OF WATER VAPOR ON COUNTERFLOW DIFFUSION FLAMES

THE EFFECT OF WATER VAPOR ON COUNTERFLOW DIFFUSION FLAMES THE EFFECT OF WATER VAPOR ON COUNTERFLOW DIFFUSION FLAMES by Jaeil Suh and Arvind Atreya Combustion and Heat Tkansfer Laboratory Department of Mehanial Engineering and Applied Mehanis The University of

More information

10 UNSTEADY FLOW IN OPEN CHANNELS

10 UNSTEADY FLOW IN OPEN CHANNELS 0 UNTEY FLOW IN OEN CHNNEL 0. Introdution Unsteady flow in open hannels differs from that in losed onduits in that the eistene of a free surfae allows the flow ross-setion to freely hange, a fator whih

More information

Asymmetric Error Correction and Flash-Memory Rewriting using Polar Codes

Asymmetric Error Correction and Flash-Memory Rewriting using Polar Codes 1 Asymmetri Error Corretion and Flash-Memory Rewriting using Polar Codes Eyal En Gad, Yue Li, Joerg Kliewer, Mihael Langberg, Anxiao (Andrew) Jiang and Jehoshua Bruk Abstrat We propose effiient oding shemes

More information

Customer Training Material. Lecture 2. Introduction to. Methodology ANSYS FLUENT. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved.

Customer Training Material. Lecture 2. Introduction to. Methodology ANSYS FLUENT. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved. Lecture 2 Introduction to CFD Methodology Introduction to ANSYS FLUENT L2-1 What is CFD? Computational Fluid Dynamics (CFD) is the science of predicting fluid flow, heat and mass transfer, chemical reactions,

More information

Chapter 1: Introduction

Chapter 1: Introduction Chapter 1: Introdution 1.1 Pratial olumn base details in steel strutures 1.1.1 Pratial olumn base details Every struture must transfer vertial and lateral loads to the supports. In some ases, beams or

More information

Heat Generation and Removal in Solid State Lasers

Heat Generation and Removal in Solid State Lasers Chapter 1 Heat Generation and Removal in Solid State Lasers V. Ashoori, M. Shayganmanesh and S. Radmard Additional information is available at the end of the hapter http://dx.doi.org/10.577/63 1. Introdution

More information

Relativistic Kinematics -a project in Analytical mechanics Karlstad University

Relativistic Kinematics -a project in Analytical mechanics Karlstad University Relativisti Kinematis -a projet in Analytial mehanis Karlstad University Carl Stigner 1th January 6 Abstrat The following text is a desription of some of the ontent in hapter 7 in the textbook Classial

More information

UNIVERSITY AND WORK-STUDY EMPLOYERS WEB SITE USER S GUIDE

UNIVERSITY AND WORK-STUDY EMPLOYERS WEB SITE USER S GUIDE UNIVERSITY AND WORK-STUDY EMPLOYERS WEB SITE USER S GUIDE September 8, 2009 Table of Contents 1 Home 2 University 3 Your 4 Add 5 Managing 6 How 7 Viewing 8 Closing 9 Reposting Page 1 and Work-Study Employers

More information

Nodal domains on graphs - How to count them and why?

Nodal domains on graphs - How to count them and why? Proeedings of Symposia in Pure Mathematis Nodal domains on graphs - How to ount them and why? Ram Band, Idan Oren and Uzy Smilansky, Abstrat. The purpose of the present manusript is to ollet known results

More information

Intuitive Guide to Principles of Communications By Charan Langton www.complextoreal.com

Intuitive Guide to Principles of Communications By Charan Langton www.complextoreal.com Intuitive Guide to Priniples of Communiations By Charan Langton www.omplextoreal.om Understanding Frequeny Modulation (FM), Frequeny Shift Keying (FSK), Sunde s FSK and MSK and some more The proess of

More information

Trade Information, Not Spectrum: A Novel TV White Space Information Market Model

Trade Information, Not Spectrum: A Novel TV White Space Information Market Model Trade Information, Not Spetrum: A Novel TV White Spae Information Market Model Yuan Luo, Lin Gao, and Jianwei Huang 1 Abstrat In this paper, we propose a novel information market for TV white spae networks,

More information

THERMAL TO MECHANICAL ENERGY CONVERSION: ENGINES AND REQUIREMENTS Vol. I - Thermodynamic Cycles of Reciprocating and Rotary Engines - R.S.

THERMAL TO MECHANICAL ENERGY CONVERSION: ENGINES AND REQUIREMENTS Vol. I - Thermodynamic Cycles of Reciprocating and Rotary Engines - R.S. THERMAL TO MECHANICAL ENERGY CONVERSION: ENGINES AND REQUIREMENTS Vol. I - Thermodynami Cyles of Reiproating and Rotary Engines - R.S.Kavtaradze THERMODYNAMIC CYCLES OF RECIPROCATING AND ROTARY ENGINES

More information

WATER CLOSET SUPPORTS TECHNICAL DATA

WATER CLOSET SUPPORTS TECHNICAL DATA WATER CLOSET SUPPORTS TECHNICAL DATA Smith engineers have developed an unusually omplete line of fixture supports for mounting all types of "off the floor" fixtures. Supports have been designed for water

More information

3 Game Theory: Basic Concepts

3 Game Theory: Basic Concepts 3 Game Theory: Basi Conepts Eah disipline of the soial sienes rules omfortably ithin its on hosen domain: : : so long as it stays largely oblivious of the others. Edard O. Wilson (1998):191 3.1 and and

More information

Computational Analysis of Two Arrangements of a Central Ground-Source Heat Pump System for Residential Buildings

Computational Analysis of Two Arrangements of a Central Ground-Source Heat Pump System for Residential Buildings Computational Analysis of Two Arrangements of a Central Ground-Soure Heat Pump System for Residential Buildings Abstrat Ehab Foda, Ala Hasan, Kai Sirén Helsinki University of Tehnology, HVAC Tehnology,

More information

Hierarchical Clustering and Sampling Techniques for Network Monitoring

Hierarchical Clustering and Sampling Techniques for Network Monitoring S. Sindhuja Hierarhial Clustering and Sampling Tehniques for etwork Monitoring S. Sindhuja ME ABSTRACT: etwork monitoring appliations are used to monitor network traffi flows. Clustering tehniques are

More information

WORKFLOW CONTROL-FLOW PATTERNS A Revised View

WORKFLOW CONTROL-FLOW PATTERNS A Revised View WORKFLOW CONTROL-FLOW PATTERNS A Revised View Nik Russell 1, Arthur H.M. ter Hofstede 1, 1 BPM Group, Queensland University of Tehnology GPO Box 2434, Brisbane QLD 4001, Australia {n.russell,a.terhofstede}@qut.edu.au

More information

Another Look at Gaussian CGS Units

Another Look at Gaussian CGS Units Another Look at Gaussian CGS Units or, Why CGS Units Make You Cool Prashanth S. Venkataram February 24, 202 Abstrat In this paper, I ompare the merits of Gaussian CGS and SI units in a variety of different

More information

FOOD FOR THOUGHT Topical Insights from our Subject Matter Experts

FOOD FOR THOUGHT Topical Insights from our Subject Matter Experts FOOD FOR THOUGHT Topial Insights from our Sujet Matter Experts DEGREE OF DIFFERENCE TESTING: AN ALTERNATIVE TO TRADITIONAL APPROACHES The NFL White Paper Series Volume 14, June 2014 Overview Differene

More information

4.15 USING METEOSAT SECOND GENERATION HIGH RESOLUTION VISIBLE DATA FOR THE IMPOVEMENT OF THE RAPID DEVELOPPING THUNDERSTORM PRODUCT

4.15 USING METEOSAT SECOND GENERATION HIGH RESOLUTION VISIBLE DATA FOR THE IMPOVEMENT OF THE RAPID DEVELOPPING THUNDERSTORM PRODUCT 4.15 USNG METEOSAT SECOND GENEATON HGH ESOLUTON VSBLE DATA FO THE MPOVEMENT OF THE APD DEVELOPPNG THUNDESTOM PODUCT Oleksiy Kryvobok * Ukrainian HydroMeteorologial nstitute Kyiv, Ukraine Stephane Senesi

More information

VOLUME 13, ARTICLE 5, PAGES 117-142 PUBLISHED 05 OCTOBER 2005 DOI: 10.4054/DemRes.2005.13.

VOLUME 13, ARTICLE 5, PAGES 117-142 PUBLISHED 05 OCTOBER 2005  DOI: 10.4054/DemRes.2005.13. Demographi Researh a free, expedited, online journal of peer-reviewed researh and ommentary in the population sienes published by the Max Plank Institute for Demographi Researh Konrad-Zuse Str. 1, D-157

More information

Recovering Articulated Motion with a Hierarchical Factorization Method

Recovering Articulated Motion with a Hierarchical Factorization Method Reovering Artiulated Motion with a Hierarhial Fatorization Method Hanning Zhou and Thomas S Huang University of Illinois at Urbana-Champaign, 405 North Mathews Avenue, Urbana, IL 680, USA {hzhou, huang}@ifpuiuedu

More information

Open and Extensible Business Process Simulator

Open and Extensible Business Process Simulator UNIVERSITY OF TARTU FACULTY OF MATHEMATICS AND COMPUTER SCIENCE Institute of Computer Siene Karl Blum Open and Extensible Business Proess Simulator Master Thesis (30 EAP) Supervisors: Luiano Garía-Bañuelos,

More information

Waveguides. 8.14 Problems. 8.14. Problems 361

Waveguides. 8.14 Problems. 8.14. Problems 361 8.4. Problems 36 improving liquid rystal displays, and other produts, suh as various optoeletroni omponents, osmetis, and hot and old mirrors for arhitetural and automotive windows. 8.4 Problems 9 Waveguides

More information

Big Data Analysis and Reporting with Decision Tree Induction

Big Data Analysis and Reporting with Decision Tree Induction Big Data Analysis and Reporting with Deision Tree Indution PETRA PERNER Institute of Computer Vision and Applied Computer Sienes, IBaI Postbox 30 11 14, 04251 Leipzig GERMANY [email protected],

More information

Performance Analysis of IEEE 802.11 in Multi-hop Wireless Networks

Performance Analysis of IEEE 802.11 in Multi-hop Wireless Networks Performane Analysis of IEEE 80.11 in Multi-hop Wireless Networks Lan Tien Nguyen 1, Razvan Beuran,1, Yoihi Shinoda 1, 1 Japan Advaned Institute of Siene and Tehnology, 1-1 Asahidai, Nomi, Ishikawa, 93-19

More information

Deadline-based Escalation in Process-Aware Information Systems

Deadline-based Escalation in Process-Aware Information Systems Deadline-based Esalation in Proess-Aware Information Systems Wil M.P. van der Aalst 1,2, Mihael Rosemann 2, Marlon Dumas 2 1 Department of Tehnology Management Eindhoven University of Tehnology, The Netherlands

More information

Previously Published Works UC Berkeley

Previously Published Works UC Berkeley Previously Published Works UC Berkeley A University of California author or department has made this artile openly available. Thanks to the Aademi Senate s Open Aess Poliy, a great many UC-authored sholarly

More information

Context-Sensitive Adjustments of Cognitive Control: Conflict-Adaptation Effects Are Modulated by Processing Demands of the Ongoing Task

Context-Sensitive Adjustments of Cognitive Control: Conflict-Adaptation Effects Are Modulated by Processing Demands of the Ongoing Task Journal of Experimental Psyhology: Learning, Memory, and Cognition 2008, Vol. 34, No. 3, 712 718 Copyright 2008 by the Amerian Psyhologial Assoiation 0278-7393/08/$12.00 DOI: 10.1037/0278-7393.34.3.712

More information

On Some Mathematics for Visualizing High Dimensional Data

On Some Mathematics for Visualizing High Dimensional Data On Some Mathematis for Visualizing High Dimensional Data Edward J. Wegman Jeffrey L. Solka Center for Computational Statistis George Mason University Fairfax, VA 22030 This paper is dediated to Professor

More information

Impedance Method for Leak Detection in Zigzag Pipelines

Impedance Method for Leak Detection in Zigzag Pipelines 10.478/v10048-010-0036-0 MEASUREMENT SCIENCE REVIEW, Volume 10, No. 6, 010 Impedane Method for Leak Detetion in igzag Pipelines A. Lay-Ekuakille 1, P. Vergallo 1, A. Trotta 1 Dipartimento d Ingegneria

More information

A Survey of Usability Evaluation in Virtual Environments: Classi cation and Comparison of Methods

A Survey of Usability Evaluation in Virtual Environments: Classi cation and Comparison of Methods Doug A. Bowman [email protected] Department of Computer Siene Virginia Teh Joseph L. Gabbard Deborah Hix [ jgabbard, hix]@vt.edu Systems Researh Center Virginia Teh A Survey of Usability Evaluation in Virtual

More information

MATE: MPLS Adaptive Traffic Engineering

MATE: MPLS Adaptive Traffic Engineering MATE: MPLS Adaptive Traffi Engineering Anwar Elwalid Cheng Jin Steven Low Indra Widjaja Bell Labs EECS Dept EE Dept Fujitsu Network Communiations Luent Tehnologies Univ. of Mihigan Calteh Pearl River,

More information

Finite Element Modelling of Vibro-Acoustic Systems for Active Noise Reduction

Finite Element Modelling of Vibro-Acoustic Systems for Active Noise Reduction ECHNISCHE MECHANIK, Band 25, Heft 3-4, (25), 24-247 Manuskripteingang:. Dezember 25 Finite Element Modelling of Vibro-Aousti Systems for Ative Noise Redution J. Lefèvre, U. Gabbert Over the past years

More information

An Enhanced Critical Path Method for Multiple Resource Constraints

An Enhanced Critical Path Method for Multiple Resource Constraints An Enhaned Critial Path Method for Multiple Resoure Constraints Chang-Pin Lin, Hung-Lin Tai, and Shih-Yan Hu Abstrat Traditional Critial Path Method onsiders only logial dependenies between related ativities

More information

Customer Efficiency, Channel Usage and Firm Performance in Retail Banking

Customer Efficiency, Channel Usage and Firm Performance in Retail Banking Customer Effiieny, Channel Usage and Firm Performane in Retail Banking Mei Xue Operations and Strategi Management Department The Wallae E. Carroll Shool of Management Boston College 350 Fulton Hall, 140

More information

Neural network-based Load Balancing and Reactive Power Control by Static VAR Compensator

Neural network-based Load Balancing and Reactive Power Control by Static VAR Compensator nternational Journal of Computer and Eletrial Engineering, Vol. 1, No. 1, April 2009 Neural network-based Load Balaning and Reative Power Control by Stati VAR Compensator smail K. Said and Marouf Pirouti

More information

Recent Progress in Brillouin Scattering Based Fiber Sensors

Recent Progress in Brillouin Scattering Based Fiber Sensors Sensors 011, 11, 415-4187; doi:10.3390/s11040415 OPEN ACCESS sensors ISSN 144-80 www.mdpi.om/journal/sensors Review Reent Progress in rillouin Sattering ased Fiber Sensors Xiaoyi ao * and Liang Chen Physis

More information

Granular Problem Solving and Software Engineering

Granular Problem Solving and Software Engineering Granular Problem Solving and Software Engineering Haibin Zhu, Senior Member, IEEE Department of Computer Siene and Mathematis, Nipissing University, 100 College Drive, North Bay, Ontario, P1B 8L7, Canada

More information

The Reduced van der Waals Equation of State

The Reduced van der Waals Equation of State The Redued van der Waals Equation of State The van der Waals equation of state is na + ( V nb) n (1) V where n is the mole number, a and b are onstants harateristi of a artiular gas, and R the gas onstant

More information

RATING SCALES FOR NEUROLOGISTS

RATING SCALES FOR NEUROLOGISTS RATING SCALES FOR NEUROLOGISTS J Hobart iv22 WHY Correspondene to: Dr Jeremy Hobart, Department of Clinial Neurosienes, Peninsula Medial Shool, Derriford Hospital, Plymouth PL6 8DH, UK; Jeremy.Hobart@

More information

Findings and Recommendations

Findings and Recommendations Contrating Methods and Administration Findings and Reommendations Finding 9-1 ESD did not utilize a formal written pre-qualifiations proess for seleting experiened design onsultants. ESD hose onsultants

More information

Chapter 6 A N ovel Solution Of Linear Congruenes Proeedings NCUR IX. (1995), Vol. II, pp. 708{712 Jerey F. Gold Department of Mathematis, Department of Physis University of Utah Salt Lake City, Utah 84112

More information

A Context-Aware Preference Database System

A Context-Aware Preference Database System J. PERVASIVE COMPUT. & COMM. (), MARCH 005. TROUBADOR PUBLISHING LTD) A Context-Aware Preferene Database System Kostas Stefanidis Department of Computer Siene, University of Ioannina,, [email protected] Evaggelia

More information

arxiv:astro-ph/0304006v2 10 Jun 2003 Theory Group, MS 50A-5101 Lawrence Berkeley National Laboratory One Cyclotron Road Berkeley, CA 94720 USA

arxiv:astro-ph/0304006v2 10 Jun 2003 Theory Group, MS 50A-5101 Lawrence Berkeley National Laboratory One Cyclotron Road Berkeley, CA 94720 USA LBNL-52402 Marh 2003 On the Speed of Gravity and the v/ Corretions to the Shapiro Time Delay Stuart Samuel 1 arxiv:astro-ph/0304006v2 10 Jun 2003 Theory Group, MS 50A-5101 Lawrene Berkeley National Laboratory

More information

Express Introductory Training in ANSYS Fluent Lecture 1 Introduction to the CFD Methodology

Express Introductory Training in ANSYS Fluent Lecture 1 Introduction to the CFD Methodology Express Introductory Training in ANSYS Fluent Lecture 1 Introduction to the CFD Methodology Dimitrios Sofialidis Technical Manager, SimTec Ltd. Mechanical Engineer, PhD PRACE Autumn School 2013 - Industry

More information

A Comparison of Default and Reduced Bandwidth MR Imaging of the Spine at 1.5 T

A Comparison of Default and Reduced Bandwidth MR Imaging of the Spine at 1.5 T 9 A Comparison of efault and Redued Bandwidth MR Imaging of the Spine at 1.5 T L. Ketonen 1 S. Totterman 1 J. H. Simon 1 T. H. Foster 2. K. Kido 1 J. Szumowski 1 S. E. Joy1 The value of a redued bandwidth

More information

Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows

Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows Lecture 3 Fluid Dynamics and Balance Equa6ons for Reac6ng Flows 3.- 1 Basics: equations of continuum mechanics - balance equations for mass and momentum - balance equations for the energy and the chemical

More information

HOW TO CALCULATE PRESSURE ANYWHERE IN A PUMP SYSTEM? Jacques Chaurette p. eng. www.lightmypump.com April 2003

HOW TO CALCULATE PRESSURE ANYWHERE IN A PUMP SYSTEM? Jacques Chaurette p. eng. www.lightmypump.com April 2003 HOW TO CALCULATE PRESSURE ANYWHERE IN A PUMP SYSTEM? Jaques Chaurette p. en. www.lihtmypump.om April 003 Synopsis Calulatin the total head of the pump is not the only task of the pump system desiner. Often

More information

Lecture 24: Spinodal Decomposition: Part 3: kinetics of the

Lecture 24: Spinodal Decomposition: Part 3: kinetics of the Leture 4: Spinodal Deoposition: Part 3: kinetis of the oposition flutuation Today s topis Diffusion kinetis of spinodal deoposition in ters of the onentration (oposition) flutuation as a funtion of tie:

More information

IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING, VOL. 9, NO. 3, MAY/JUNE 2012 401

IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING, VOL. 9, NO. 3, MAY/JUNE 2012 401 IEEE TRASACTIOS O DEPEDABLE AD SECURE COMPUTIG, VOL. 9, O. 3, MAY/JUE 2012 401 Mitigating Distributed Denial of Servie Attaks in Multiparty Appliations in the Presene of Clok Drifts Zhang Fu, Marina Papatriantafilou,

More information