ACTEA 2009

July 15-17, 2009 Zouk Mosbeh, Lebanon

Comparison of pressure-velocity coupling schemes for 2D flow problems
Edouard Audi, Imperial College London, IEEE
Abstract— Predicting accurately the behaviour of fluids, whether it is water, air, petrol or blood, is of crucial importance in numerous fields such as engineering and medicine. The most widely used way to solve fluid flow problems is to use pressure-correction methods based on algorithms such as SIMPLE (Semi Implicit Method for Pressure Linked Equations), SIMPLER (Revised), SIMPLEC (Consistent) or PISO (Pressure Implicit with Splitting of Operators). FLUENT and STAR CD are the main software capable of calculating and plotting fluid flows for specified problems, using pressure-correction methods. Nevertheless these programs, intended for commercial use, are not ‘user friendly’ and are therefore very difficult to use efficiently; furthermore once the program finds the answer it is not easy to understand how it got to it. The aim of this research is to implement the algorithms SIMPLE, SIMPLER, SIMPLEC and PISO into Matlab in order to create a ‘user-friendly’ program that a novice user can use straightforwardly and efficiently, whilst at the same time understanding what calculations the computer performs between the specification of the problem and the answers. Using this code we will then solve 2D flow problems with the different algorithms and compare their different performances (computer time, convergence and accuracy). This research should result in a program which is user-friendly and which uses a new improved algorithm (combination of the above or new altogether) that performs better than the existing ones, thereafter reducing computational times and improving accuracy.

∂ρu ∂ρu 2 ∂ρuv ∂p ∂ ∂u ∂ ∂u + + = − + (μ ) + (μ ) + Su ∂t ∂x ∂y ∂x ∂x ∂x ∂y ∂y ∂ρv ∂ρuv ∂ρv 2 ∂p ∂ ∂v ∂ ∂v + + = − + (μ ) + (μ ) + Sv ∂t ∂x ∂y ∂y ∂x ∂x ∂y ∂y ∂ρ ∂ρu ∂ρv + + =0 ∂x ∂y ∂t
where u and v are the horizontal and vertical components of the velocity respectively, p is the pressure, ρ is the density of the fluid, μ is its dynamic viscosity and S are the source terms. These equations are generally unsolvable by hand due to non-linearity and pressure-velocity coupling issues [10]. Pressure-velocity coupling algorithms such as SIMPLE, SIMPLER, SIMPLEC or PISO are the most widely used methods to bypass these difficulties. Nevertheless the computational time and the accuracy of the solution is very dependant on the algorithm chosen and on the problem to solve. The aim of this research is to create an algorithm in Matlab, organized in specific organized blocks, in order to compare the cited algorithm for several 2D flow problems in details. II. THE ALGORITHMS A. PRELIMINARY Pressure-correction methods are preferred to other methods as they provide an efficient mean to deal with the role of the pressure in the Navier-Stokes and continuity equations. These equations are closely linked as each component of the velocity appears in every equation but there is no equation for the pressure [10]. All of the algorithms used start by guessing the pressure field and then gradually correct it until convergence is obtained, which deals efficiently with the problem. The finite volume method is used to discretise the equations. This method has several advantages over other discetisation schemes, the most important of which being that it satisfies any conservation properties of the partial differential equations that are being approximated, regardless of the mesh spacing or the truncation error, since the flux going into a control volume must equal the flux going out of it [10]. A staggered grid is used in order to prevent uncoupling of the pressure and the velocity or “checker boarding” [8]. Instead of storing all the variable at a single node, the components of the velocity are stored midway between the

I.

INTRODUCTION

The computation of fluid flows is very important in diverse fields ranging from medicine and the blood flow to engineering and the flow past a sports car or through a pipeline. All of these problems lead to solving the NavierStokes and continuity equations, which are presented here in their 2D unsteady form:

978-1-4244-3834-1/09/$25.00 © 2009 IEEE

245

j).J 2Δt (1) −Δy(pI .J − pI −1. the resulting pressure field corresponds to the correct velocity fields. Matlab output of the staggered grid arrangement: stars represent the scalar nodes. A staggered grid arrangement is presented below: fields. This is the main approximation of the SIMPLE algorithm. SIMPLE [8] The core of all the mentioned algorithms is SIMPLE. Δt is the time step and the superscript 0 denotes values corresponding to the previous time step. The velocity fields are corrected in the same way.J u 'i.J = a nb u nb + ΔxΔy 0 0 (ρ I . Therefore SIMPLER is more effective than SIMPLE at calculating the pressure field correctly. For the 2D unsteady form of the Navier-Stokes equations this yields: a i. Nevertheless this doesn’t compromise the solution as. the velocity fields are then updated and if these satisfy the continuity equation the algorithm has converged otherwise the new velocities become the new guessed velocities and the algorithm is looped until convergence is obtained. the temperature. If the pressure and velocity component corrections (with superscript ‘) are then defined as being the difference between the correct field (without superscripts) and the guessed field (with the superscript *): p = p' + p* u = u' + u* v=v +v .J )u i.J ΔxΔy. B. In order to enhance this feature of SIMPLE a revised algorithm SIMPLER has been developed. These expressions also hold for the guessed velocity 246 . First the variables are guessed over the whole computational domain. etc…) in the horizontal and vertical direction respectively. Nevertheless it is Fig.J ) + (Su ) i.J u i. 1. The same procedure is applied to the v equation. Δx and Δy are the mesh spacing in the horizontal and vertical directions respectively (the distance between two consecutive scalar nodes). where the a coefficients are known as they are composed of known values from the previous iteration step (or the initiation step). SIMPLER In SIMPLER [7] the discretised continuity equation is used to obtain a discretised equation for the pressure. A similar expression is then obtained for the v-velocity field.J ). SIMPLEC The SIMPLEC algorithm [9] has the same sequence of operations as the SIMPLE algorithm. when convergence is attained the corrected fields should all equal zero (or be very close to zero). J). These expressions are then substituted into the discretised continuity equation to yield a pressure correction equation.scalar nodes (which contains all the scalar variables such as the pressure. Once the pressure is corrected. J) and v-velocity components at locations (I.J − p'I −1. which consists of a “guess and correct” process until convergence of the solution. D. In SIMPLER the application of the correct velocity field results in the correct pressure field. right-pointing arrows the u-velocity components and uppointing arrows the v-velocity components. instead of the pressure correction equation as in SIMPLE. The term a nb u 'nb is then ignored in (3) and an expression for the velocity correction (and hence the correct velocity) is obtained only as a function of the pressure correction p' . u-velocity components at locations (i.J + ρ I0−1. C. The SIMPLE algorithm is relatively straightforward and is good at correcting the velocity fields but is not as good at correcting the pressure. ' * (2) Subtracting the discretised momentum equations for the correct velocity fields to the ones for the guessed fields and using (2) yields expressions for the velocity field corrections: a i.J = a nb u 'nb − Δy(p'I . Since no terms are neglected when deriving the discretised pressure equation. The momentum equations are then discretised over the appropriate control volumes (centered around a u-velocity component for the u-momentum equation and around a v-velocity component for the vmomentum equation). (3) (A similar expression is obtained for v). Scalar quantities are stored at locations with coordinate (I.

PISO The PISO algorithm [2] was originally intended for noniterative computation of unsteady compressible flows. The code is further intended for pedagogic use and is thereafter straightforward to use and understand. SIMPLEC and PISO algorithms for steady flow problems concluded that none of the three methods had a clear advantage over the others but that the performances of each algorithm was closely dependant on the flow conditions. However it converges much faster and was shown to be fast and efficient despite the extra heavy computational effort required [2]. when it comes to correcting the velocity fields. In order to solve the set of algebraic equations the point and line Gauss-Seidel iterative methods are implemented and their relative merits are evaluated. Each algorithm is coded independently and all the features mentioned above are implemented in each of them allowing for a thorough comparison of every aspect of each algorithm and of the influence of each specific block on the overall performances. the degree of coupling between the momentum and scalar equations. the upwind or the hybrid scheme or higher schemes such as the QUICK and TVD schemes. Both have robust convergence characteristics but none can be said to be significantly superior to the other [4]. an analysis on Star-CD shows that PISO takes four times more time than SIMPLE to find the same solution. which allows a thorough analysis of every step of each algorithm. the under-relaxation factor. the 247 . the MAC and the ICE family of algorithms but these. Independent m-files are created for the discretisation of the convection and diffusion terms of the momentum equations. PISO exhibits the most robust convergence and takes less computational time than SIMPLER and SIMPLEC. although they may perform better (SMAC is more efficient. The pressure and velocity fields are twice corrected in the process hence there is a considerable increase in computational effort at each iteration in comparison with SIMPLE. For non-iterative transient calculations PISO has advantages over the other algorithms firstly because it was developed for this particular purpose whereas SIMPLE. A general comparative study of the SIMPLE and SIMPLER algorithms for steady flow problems [1] showed that although SIMPLER requires more computational effort. Enhanced version of the mentioned algorithms or new algorithms altogether have been developed in order to minimize computational time and increase convergence robustness such as SIMPLEX. E. On the other hand for the simple problem of a flow through a heated fin. confirm and push further the previously reported findings a very versatile Matlab code is developed. faster and more accurate than PISO for transient calculations [5]) are not used as widely as the studied algorithms [10] and will therefore not be considered here. In its iterative form PISO has the same sequence of operations as SIMPLE with an additional corrector step. the initial guesses. For example for a benchmark laminar backward-facing step problem it was shown [3] that PISO performed twice faster than SIMPLE for a similar answer. it has significant advantages when solving the momentum equations. PERFORMANCES OF THE ALGORITHMS Each algorithm is different and therefore performs differently. and secondly because the time accuracy of the second corrector step makes it very attractive [10]. the discretisation scheme used and the numerical method adopted to solve the algebraic equations [4]. For problems where the scalar variable is strongly coupled to the momentum equations SIMPLER and SIMPLEC perform better than PISO and PISO only yields correct solutions for small time steps. The code is composed of several specific functional blocks each of which is independent. Euler implicit and the Crank-Nicolsen schemes. Nevertheless it has been adapted to solve iteratively steady state problems. More precisely SIMPLER performs 30% more calculations than SIMPLE but its faster convergence rate implies that it requires 30 to 50% less computer time to solve problems on average [1]. SIMPLER and SIMPLEC are iterative methods originally intended for steady problems [2]. The link between every step of the algorithm is clearly highlighted and the user controls every step of the calculation from the choice of the geometry and the mesh size to the boundary conditions. Moreover the performance of each algorithm is dependant on the problem they are required to solve. Several discretisation schemes may therefore be compared such as the central. IV. the temporal discretsation scheme. For problems in which there is no coupling between the momentum equations and a scalar variable. the spatial discretisation scheme for the convection and diffusion term independently. THE MATLAB CODE In order to verify.more accurate than SIMPLE as it omits less significant terms. the time step. No clear pattern arises when SIMPLER and SIMPLEC are compared one to another. allowing for a comprehensive study of the initial guess and its influence on the rest of the calculations. III. For transient flow problems three temporal approximations are tested: the Euler explicit. Further studies [3]-[6] on the SIMPLER. The initial guess for the variables is part of an independent routine.

66-82. Jetli. 435-454. [2] Issa. Int. [3] Issa. R. Comparison of PressureVelocity Coupling Solution Algorithms. R. Since each m-file corresponds to a particular step of the algorithm it is easy to develop the code further by adding additional feature in the required m-files. A. V. pp.. (1986). (1980). No. Pearson. Vol. Vol. and Spalding. Journal of Computational Physics. Taylor & Francis Group. Numerical Heat Transfer. Hemisphere Publishing Corporation. D. [9] Van Doormal. [8] Patankar S. Comparison of the PISO. D. REFERENCES [1] Anderson. (1986). New York. J. Numerical Heat Transfer. [5] Kim. Taylor & Francis Group. Vol. The Computation of Compressible and Incompressible Recirculating Flows. 8. the under-relaxation factor. B. Enhancements of the SIMPLE Method for Predicting Incompressible Fluid Flows. and Pollard A. An Introduction to Computational Fluid Dynamics: The Finite Volume Method. S. Numerical Heat Transfer and Fluid Flow. C. 209-228. D. [4] Jang. (1992). and Benson. P. [6] Latimer B. Tannehill. Comparison of the SMAC. I. 147-163. 635-652. Hemisphere Publishing Corporation. (1985). and Watkins. 179-266. A Calculation Procedure for Heat. SIMPLER and SIMPLEC Algorithms for the Treatment of the Pressure-Velocity Coupling in Steady Flow Problems. Computational Fluid Mechanics and Heat Transfer. W. A.. PISO and Iterative Time-Advancing Schemes for Unsteady Flows. p. J.iterative solution method for the algebraic equations. Numerical Heat Transfer. and Acharya. pp. pp. 62. H. Vol. and Raithby G. Second Edition. Heat Mass Transfer. 3. (1986). I. J. 15. 19. Journal of Computational Physics. (1984). Vol. Computational Fluids. 1787. Solution of the Implicitly Discretised Fluid Flow Equations by Operator-Splitting. pp. Vol. K. D. (1972). [10] Versteeg H. 248 . pp. and Pletcher. R.. pp. (2007). R. A. P. the convergence factor and the maximum number of iterations. 62. 21. S. V. and Malalasekera W. (1984). R. New York. 40-65. Gosman. [7] Patankar S. Mass and Momentum Transfer in Three-dimensional Parabolic Flows. J. S. T. Vol. 7. pp. D.