A Matrix-free Implicit Solution Algorithm for

0 downloads 0 Views 264KB Size Report
application to the solution of incompressible flow on a hybrid unstructured mesh. ... Early matrix free temporal discretization methods used in conjunction with ... lems has however been that their performance deteriorates significantly, ...
A Matrix-free Implicit Solution Algorithm for Incompressible Flows on Hybrid Unstructured Grids A. G. Malan? 1 , J. P. Meyer? and R. W. Lewis† Deptartment of Mechanical & Aeronautical Engineering, University of Pretoria, Pretoria 0002, Rep. of South Africa, Web page: {http://www.up.ac.za/academic/mae/}

?



Department of Mechanical Engineering, University of Wales Swansea, Singleton Park, Swansea, SA2 8PP, United Kingdom, Web page: {http://www.engineering.swan.ac.uk/mech eng.htm}

Abstract The complex flow regimes resulting from the intricate geometries prevalent in industrial incompressible flow processes necessitate the use of a numerical simulation tool which is applicable to hybrid unstructured type meshes while offering a high degree of computational efficiency. This paper assesses the convergence characteristics of an implicit matrix-free Generalized Minimal Residual (GMRES) method which is applied to a hybrid unstructured preconditioned artificial compressibility algorithm recently developed by the authors. The system of discrete equations is Newton linearized where analytical expressions for the Jacobian terms are employed. The convergence characteristics of the solver is compared to that of two other matrix free algorithms viz. explicit with local time-stepping and lower-upper symmetric Gauss-Seidel) (LU-SGS) by application to the solution of incompressible flow on a hybrid unstructured mesh.

1

Introduction

Numerical simulation of incompressible fluid flow is of great practical importance due to its many industrial applications. These range from hydrodynamics and low speed aerodynamics to the natural and forced convection systems found in heat exchangers and electronic cooling devices. The involved spectrum of flow regimes and wide range of length scales has resulted in the need for an efficient numerical tool which may be readily applied to simulate the extensive range of flow conditions without prior ad hoc modifications. The use of unstructured meshes for fluid dynamics problems has become widespread due to their inherent suitability for the spatial decomposition of complex geometries often present in industrial applications. Unfortunately, a numerical solution on such grids is computationally not competitive with the structured counterparts in terms of storage and the number of operations required (Sbarbella and Imregyn [1] and Sørensen [2]). Another advantage of structured decomposition is the improved accuracy resulting from the ability to align edges in a preferential manner in the case of a field which contains large gradients in a particular direction (Sbarbella and Imregyn [1] and Khawaja and Kallinderis [3]). The favorable characteristics of both decomposition systems may, however, be exploited by meshing different regions of a particular spatial domain with the most suitable type i.e. structured or unstructured. The result is a hybrid unstructured mesh. Early matrix free temporal discretization methods used in conjunction with unstructured spatial discretization algorithms focussed on purely explicit type schemes. Many researchers employed 1

Corresponding author.

a multistage Runge-Kutta explicit method to drive the solution to steady state. Typical acceleration techniques used were local time-stepping (in the interest of convergence) and implicit residual smoothing. The drawback of such accelerations methods when applied to large problems has however been that their performance deteriorates significantly, particularly where the Navier-Stokes equations are to be solved [4]. A more sophisticated acceleration method is required to enhance convergence characteristics. Two examples of such methods are multigrid and implicit temporal discretization methods. Generally, implicit methods involve the linearization of a fully implicit scheme at each time step, and the subsequent solution of the linear system. In the context of unstructured meshes, the most widely used are approximate factorization methods and iterative solution schemes. An example of an extremely memory efficient approximate factorization method is a relatively recently developed lower-upper symmetric Gauss-Seidel (LU-SGS) method, first applied by Jameson and Yoon [5] to structured meshes, and later extended to unstructured methods [6]. Another promising matrix free solution algorithm is the generalized minimal residuals (GMRES) method (Saad and Schultz [7]). This requires slightly more memory that the LU-SGS algorithm as a number of Kryloc-space vectors have to be stored. In this work a GMRES solver is developed for application to a recently developed preconditioned artificial compressibility method (Malan and Lewis [8]). The system of discrete equations are Newton linearized and the resulting Jacobian terms evaluated analytically. This is more computationally efficient than the finite difference counterpart proposed by Grotowsky and Ballmann [9] while eliminating the need to employ a numerical differentiation perturbation parameter which may have a significant effect on convergence performance. The potential of the developed GMRES solver as an efficient matrix free solution algorithm is evaluated by comparison of the convergence characteristics to that of the matrix-free explicit method with local time-stepping as well as the LU-SGS algorithm. The latter was specifically implemented for the purpose of evaluating the GMRES method. The evaluation is done through the solution of an incompressible flow problem on a hybrid unstructured grid.

2

Governing Equations

The Navier-Stokes equation which describes the laminar flow of a fluid consists of equations enforcing the principles of mass and momentum conservation. Assuming a Newtonian fluid, the system of preconditioned equations describing the flow of an incompressible fluid may be written in the following form (Malan and Lewis [8]): ∂Gj ∂W ∂Q ∂Fj − =0 + ∂Q ∂t ∂xj ∂xj where,

(1)

1/c2τ



∂W τ ∂Q LGP

0 0 0 0

  2(1 − Ap )u1 /c2τ   2 =  2(1 − Ap )u2 /cτ   2(1 − Ap )u3 /c2 τ  aT T /c2τ



 ρ 0 0 0    0 ρ 0 0    0 0 ρ 0   0 0 0 ρ

(2)

and 

p





ρuj

     u1   j  ρu1 uj  Q=  F =  ρu2 uj  u2     u3 ρu3 uj





0

    σ1j    Gj =    σ2j   σ3j

      

(3)

Here cτ denotes the pseudo-acoustic velocity and A p the preconditioning parameter [10]. Further, ρ is the density; uj the velocity component in direction x j and p the pressure. The stress term σij is defined as σij = µ



∂ui ∂uj 2 ∂uk + − δij ∂xj ∂xi 3 ∂xk



− pδij

(4)

where µ is the fluid viscosity and δij is the Kronecker delta and is equal to unity when i = j and equal to zero when i 6= j.

3 3.1

Solution Procedure Spatial Discretization

A vertex-centered edge-based finite volume algorithm [10] is employed for spatial discretization purposes as it is naturally applicable to any part of the hybrid mesh, while exhibiting a number of computational advantages as compared to other methods. An edge-based data structure is computationally more efficient than element based approaches (Luo et al. [11]) while the vertexcentered variant of the finite volume scheme is superior to cell-centered counterparts in terms of memory usage as pointed out by Zhao and Zang [12]. The governing equation (Eq. (1)) discretized, may be written in the following semi-discrete form for a node m: ∂Qm Ωm = R m ∂t

(5)

where Ωm denotes the finite-volume attached to node m and R m represents all discretized spatial terms. The latter equals zero when steady state is reached. Dividing by the finite-volume it follows that

∂Qm = Resm ∂t

(6)

Here Res is the residual vector. 3.2

Implicit Time Integration

The semi-discrete equation may be discretized implicitly in time and Newton linearized as follows: ∆Qn ∂Resn = Resn + ∆Qn ∆t ∂Q

(7)

where n denotes the time level and ∆Qn = Qn+1 − Qn . The equation may be rearranged as follows: 

∂Resn 1 − ∆t ∂Q



∆Qn = An ∆Qn = Resn

(8)

The Jacobian terms are evaluated by developing analytical expressions for the discrete equations resulting from the employed discretization algorithm. 3.3

Matrix Free Solution Procedures

A matrix free algebraic variant of the GMRES solution algorithm is employed and the change in Q calculated from ∆Q = vl ak , l = 1...L. Here L denotes the number of Krylov-space vectors v l and ak is to calculated such that it minimizes the residual RES for a given set of Krylov-space vectors. These are calculated iteratively by invoking the following GMRES procedure until ∆Q converges: 1. Starting Krylov-space vector: v1 =

Resn |Resn |

(9)

2. For l = 1, 2, ....., L − 1 compute: wl+1 = An vl −

l X

hkl vk ,

hkl = vk Avl

(10)

k=1

vl+1 =

wl+1 |wl+1 |

(11)

3. As noted above the change in Q is now calculated from ∆Q = vl ak where al is calculated from

(12)



A n vk



   An vl al = An vk · Resn

(13)

In this work the convergence characteristics of the GMRES method is compared to that of two other matrix-free methods viz. a purely explicit technique with local time-stepping as well as the LU-SGS implicit method. In the latter case, ∆Q in Equation (8) is evaluated by performing two sweeps over edges viz. lower sweep: (D + L) ∆Q∗ = Res and an upper sweep: (D + U ) ∆Q = DQ∗ . Here D, L and U denote the diagonal, lower and upper matrices respectively. Note that this algorithm may be implemented in a completely matrix free form. u1 = 1, u2 = 0

u1 = 0, u2 = 0

PSfrag replacements

u1 = 0, u2 = 0

x2 1.0

u1 = 0, u2 = 0

PSfrag replacements p=0 u1 = 0, u2 = 0

1.0 x1

Figure 1: Lid driven cavity. Boundary conditions (left) and (right) hybrid unstructured mesh containing 4736 points.

4

Numerical Results

The test case employed to evaluate the convergence performance of the implemented GMRES algorithm involves the isothermal recirculation flow in a square cavity generated by the uniform translation of the upper surface (lid) of a cavity. As shown in Figure 1 the lid is driven at a uniform velocity and no fluid is allowed to escape between the lid and the cavity wall. No-slip boundary conditions are applied to all cavity walls and the pressure is prescribed at a point close to the mid-section of the bottom side. The Reynolds number of this problem is 400. Calculated velocities are depicted in Figure 2 and are in good agreement with the benchmark solution by Ghia et al. [13]. Further, the convergence behavior of the various solution techniques are shown. The LU-SGS implicit method offers a significant improvement in the number of required iterations as compared to the explicit method. GMRES is however the clear superior matrix free technique and converges 5 orders of magnitude in 120 iterations, which is a factor 73 fewer than required by the explicit technique and 10 times fewer iterations as compared to LUSGS. The proposed GMRES solution algorithm is therefore deemed to have significant potential for use as an efficient matrix-free solver for application to the simulation of incompressible flow on hybrid unstructured meshes.

x1 coordinate 0

0.2

0.4

0.6

0.8

1

1

0.4

u1 u2

Explicit LU-SGS: CFL= 50 GMRES: CFL= 50

0.3

0.8

0.2

0.01

0.6 0 -0.1 0.4

semi-implicit CBS [?] -0.2 Benchmark solution [?]

L2 (Res)

PSfrag replacements 0.1 u2

x2 coordinate

0.1

0.001

PSfrag replacements 0.0001

-0.3

0.2

-0.4 1e-05 0 -0.4

-0.5 -0.2

0

0.2

0.4

u1

0.6

0.8

1

0

200

400

600

800

1000

1200

Iteration

Figure 2: Lid driven cavity: Left - Velocities at x 1 = 0.5 (u1 ) and x2 = 0.5 (u2 ). Symbols indicate the benchmark solution [13]. Right - convergence history for the different solvers: explicit (with local-time-stepping), LU-SGS and GMRES.

5

Conclusion

This work deals with the matrix-free implicit solution of the incompressible variant of the NavierStokes equations, which has been discretized via a recently developed hybrid unstructured preconditioned artificial compressibility algorithm. An implicit matrix-free GMRES solver is developed for this purpose. The discrete system of equations are Newton linearized and analytical expressions for the Jacobian terms employed. The convergence characteristics of the method is compared to that of two other matrix free methods viz. explicit and LU-SGS. The employed GMRES algorithm is found to exhibit far superior convergence characteristics, and deemed to have significant potential for use as an efficient implicit matrix-free solver for application to the modeling of incompressible flow on hybrid unstructured meshes.

References [1] L. Sbarbella and M. Imregun. An efficient discretization of viscous fluxes on unstructured mixed-element grids. Communications in Numerical Methods in Engineering, 16:839–849, 2000. [2] K. A. Sørensen. A Multigrid Acceleration Procedure for the Solution of Compressible Fluid Flows on Unstructured Hybrid Meshes. Doctor of Philosophy Thesis submitted to the University of Wales Swansea, Swansea, 2002. [3] A. Khawaja and Y. Kallinderis. Hybrid grid generation for turbomachinery and aerospace applications. International Journal for Numerical Methods in Engineering, 49(1-2):145–166, 2000. [4] H. Luo, J. D. Baum, and R. L¨ohner. A fast, matrix-free implicit method for compressible flows on unstructured grids. Journal of Computational Physics, (146):664–690, 1998.

[5] A. Jameson and S. Yoon. Lower-upper implicit schemes with multiple grids for the euler equations. AIAA Journal, 25(7), 1987. [6] M. Soetrisno, S. T. Imlay, and D. W. Roberts. A zonal implicit procedure for hybrid structured-unstructured grids. In AIAA Paper, volume 94-0617, 1994. [7] Y. Saad and M. H. Schultz. GMRES: A generalized mimimal residual algorithm for solving nonsymmetric linear systems. Siam J. Sci. Stat. Comp., 7(3):856–869, 1986. [8] A. G. Malan and R. W. Lewis. Modeling incompressible flows on unstructured and hybrid meshes using a Locally Generalized Preconditioned artificial compressibility scheme. In J. P. Meyer, editor, In proceedings: 2nd International Conference On Heat Transfer, Fluid Mechanics and Thermodynamics, Victoria Falls, Zambia, 2003. [9] I. M. G. Grotowsky and J. Ballmann. Efficient time integration of Navier-Stokes equations. Computers & Fluids, 28:243–263, 1999. [10] A. G. Malan, R. W. Lewis, and P. Nithiarasu. An improved unsteady, unstructured, artificial compressibility, finite volume scheme for viscous incompressible flows: Part I. Theory and implementation. International Journal for Numerical Methods in Engineering, 54(5):695– 714, 2002. [11] H. Luo, J. D. Baum, and R. L¨ohner. Edge-based finite-element scheme for the Euler equations. AIAA, 32(6):1183–1190, 1994. [12] Y. Zhao and B. Zhang. A high-order characteristics upwind FV method for incompressible flow and heat transfer simulation on unstructured grids. International Journal of Numerical Methods in Engineering, 37:3323–3341, 1994. [13] U. Ghia, K. N. Ghia, and C. T. Shin. High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. Journal of Computational Physics, 48:387–411, 1982.

Suggest Documents