Efficient Solvers for the Navier Stokes Equations in Rotation Form Computer Research Institute Seminar Purdue University March 4, 2005 Michele Benzi Emory University Atlanta, GA Thanks to: NSF (MPS/Computational Math) J. Liu (Emory) G. Golub (Stanford), V. Simoncini (Bologna), M. Gander (McGill)
Outline The classical problem Rotation form of the Navier-Stokes equations Preconditioned Krylov methods Block preconditioners HSS preconditioner Some numerical results Conclusions Papers and preprints available at http://www.mathcs.emory.edu/ benzi
The Classical Problem The primitive variables formulation of the Navier Stokes equations for a viscous, incompressible Newtonian fluid in a bounded domain Ω with boundary Γ reads: u t ν u + (u ) u + p = f in Ω t 0, T u = 0 in Ω t 0, T Bu = g on Γ t 0, T, u(x, t 0 ) = u 0 in Ω where u = (u, v, w) is the velocity field, p the pressure f is a known forcing term (e.g., gravity) ν > 0 is the kinematic viscosity coefficient, ν = O(Re 1 ) is the Laplace operator is the gradient, the divergence B is some type of boundary operator
The Classical Problem The pressure field, p, is determined up to an additive constant. To uniquely determine p we may impose some additional condition, such as Ω p d x = 0. Thes equations were first derived by Claude-Louis Navier and independently by George Gabriel Stokes. C.-L. Navier, Mémoire su le lois du mouvement des fluides, Mémoires de l Académie Royale des Sciences, VI (1823), pp. 389 416. G. G. Stokes, On the theories of the internal friction of fluids in motion, and of the equilibrium and motion of elastic solids, Transactions of the Cambridge Philosophical Society, VIII (1846), pp. 287 305.
The Stokes Equations The Navier Stokes equations are nonlinear. When ν is sufficiently large (highly viscous fluid) they can be approximated by the following linear equations: u t ν u + p = f u = 0 with appropriate initial and boundary conditions. The Stokes problem also arises when solving the Navier Stokes equations by operator splitting methods. The steady-case corresponds to u t = 0.
The Stokes Equations The steady-state Stokes equations can also be interpreted as the Euler Lagrange PDEs for the constrained variational problem 1 2 Minimize Ω u 2 dx subject to u = 0. Ω f u dx Note that the pressure p plays the role of the Lagrange multiplier.
Discretization of the Stokes Equations Consider for simplicity the case of zero Dirichlet boundary conditions, Bu = 0, and assume f (L 2 (Ω)) d, d = 2 or d = 3. Letting V = (H 1 0 (Ω))d and Q = { q L 2 (Ω) Ω p dx = 0} the weak formulation of the steady Stokes problem is:
Discretization of the Stokes Equations Consider for simplicity the case of zero Dirichlet boundary conditions, Bu = 0, and assume f (L 2 (Ω)) d, d = 2 or d = 3. Letting V = (H 1 0 (Ω))d and Q = { q L 2 (Ω) Ω p dx = 0} the weak formulation of the steady Stokes problem is: Find u = (u 1,..., u d ) T V and p Q such that d i=1 Ω u i v i dx Ω Ω p div v dx = Ω q div u dx = 0 q Q. f v dx v V,
Discretization of the Stokes Equations Consider for simplicity the case of zero Dirichlet boundary conditions, Bu = 0, and assume f (L 2 (Ω)) d, d = 2 or d = 3. Letting V = (H 1 0 (Ω))d and Q = { q L 2 (Ω) Ω p dx = 0} the weak formulation of the steady Stokes problem is: Find u = (u 1,..., u d ) T V and p Q such that d i=1 Ω u i v i dx Ω Ω p div v dx = Ω q div u dx = 0 q Q. f v dx v V, Discretization using mixed finite elements leads to large, sparse linear algebraic systems.
Discretization of the Stokes Equations The discrete equations have the following block form: A B T B O u p = f 0 where (2D case) L O A = O L and B = B 1 B 2. Here L B 1 x, B 2 y A is symmetric positive definite, n n B is m n, m < n In the unsteady case: L + α, α = O(δt 1 ) saddle point problem
Steady Navier Stokes Equations Consider now the steady-state Navier Stokes equations ν u + (u grad) u + p = f in Ω div u = 0 in Ω u = 0 on Γ To solve these equations we use a linearization process, in which the nonlinear system is replaced by a sequence of linear problems. Under certain assumptions, the solutions of the linear problems converge to the solution of the nonlinear problem.
Steady Navier Stokes Equations Consider now the steady-state Navier Stokes equations ν u + (u grad) u + p = f in Ω div u = 0 in Ω u = 0 on Γ To solve these equations we use a linearization process, in which the nonlinear system is replaced by a sequence of linear problems. Under certain assumptions, the solutions of the linear problems converge to the solution of the nonlinear problem. Two main options: Picard or Newton iteration.
Steady Navier Stokes Equations Picard linearization Oseen problem: ν u k+1 + (u k ) u k+1 + p k+1 = f k, div u k+1 = 0 where div u k = 0 (k = 0, 1,...). Often u 0 = 0. Under some restrictions involving ν and f 1, the iterates (u k, p k ) converge to the unique solution (u, p ) of the Navier-Stokes equations (Karakashian, SINUM 82; Girault & Raviart, 1986).
Steady Navier Stokes Equations Picard linearization Oseen problem: ν u k+1 + (u k ) u k+1 + p k+1 = f k, div u k+1 = 0 where div u k = 0 (k = 0, 1,...). Often u 0 = 0. Under some restrictions involving ν and f 1, the iterates (u k, p k ) converge to the unique solution (u, p ) of the Navier-Stokes equations (Karakashian, SINUM 82; Girault & Raviart, 1986). Letting u := u k+1, f k+1 := f and v := u k, the Oseen problem becomes ν u + (v ) u + p = f, div u = 0 where v is known (and divergence-free). For v = 0 we have a Stokes problem.
Rotation Form of the Navier-Stokes Equations Alternative: rotation form of the linearized N-S system u t ν u + w u + P = f, div u = 0 where (2D case): (w ) = ( 0 w w 0 ) w = v = v 1 x 2 + v 2 x 1 P = p + 1 2 v 2 (Bernoulli pressure). Based on the identity (u )u = 1 2 ( u 2 2 ) u ( u)
Rotation Form of the Navier-Stokes Equations In the 3D case: (w ) = 0 w 3 w 2 w 3 0 w 1 w 2 w 1 0 (w 1, w 2, w 3 ) = w = v See for example: Landau & Lifschitz, Fluid Mechanics, Addison Wesley, 1959. Chorin & Marsden, A Mathematical Introduction to Fluid Mechanics, Springer, 1990. Various papers by M. Olshanskii (e.g. NLAA 1999, SISC 2002).
Discretized Navier-Stokes Equations Weak formulation + Discretization nonsymmetric saddle point system: A B T B O u p = f 0 where now A A T but A is positive real: H = 1 2 (A + AT ) is positive definite
Discretized Navier-Stokes Equations Weak formulation + Discretization nonsymmetric saddle point system: A B T B O u p = f 0 where now A A T but A is positive real: H = 1 2 (A + AT ) is positive definite Stabilization a slightly more general problem: A B T u f = B C p 0 where C is symmetric positive semidefinite.
Discretized Navier Stokes Equations For the standard (convection) form of Navier Stokes we have, in 2D: L O A = O L and B = B 1 B 2. where L + (v ) B 1 x, B 2 y A = H + K, H symmetric positive definite, K = K T B is m n, m < n Unsteady case: L + (v ) + α, α = O(δt 1 )
Discretized Navier Stokes Equations For the rotation form of Navier Stokes we have, in 2D: L D A = D L and B = B 1 B 2. where L D is diagonal or a mass matrix B 1 x, B 2 y A = H + K, H symmetric positive definite, K = K T B is m n, m < n Unsteady case: L + α, α = O(δt 1 )
Sparsity Pattern: 2D Navier Stokes, convection form 0 100 200 300 400 500 600 700 800 0 100 200 300 400 500 600 700 800 nz = 7426 Without stabilization (C = O)
Sparsity Pattern: 2D Navier Stokes, convection form 0 100 200 300 400 500 600 700 800 0 100 200 300 400 500 600 700 800 nz = 8194 With stabilization (C O)
Sparsity Pattern: 2D Navier Stokes, rotation form 0 100 200 300 400 500 600 700 800 0 100 200 300 400 500 600 700 800 nz = 8004 Without stabilization (C = O)
Solvability conditions (general case) Theorem Assume H = 1 2 (A + AT ) is positive semidefinite B has full rank: rank (B) = m C is symmetric positive semidefinite (possibly C = O) Consider the coefficient matrix A B T A = B C. Then (i) ker (H) ker (B) = {0} A invertible. (ii) A invertible ker (A) ker (B) = {0}.
Solvability conditions (general case) Theorem Assume H = 1 2 (A + AT ) is positive semidefinite B has full rank: rank (B) = m C is symmetric positive semidefinite (possibly C = O) Consider the coefficient matrix A B T A = B C. Then (i) ker (H) ker (B) = {0} A invertible. (ii) A invertible ker (A) ker (B) = {0}. Note that A is indefinite: it has eigenvalues on either side of the imaginary axis.
Positive Definite Formulation Changing the sign to the last m equations we obtain the equivalent system A B T B O u p = f 0 where the coefficient matrix is now positive definite, with eigenvalues lying in the right half-plane (positive real part). If stabilization is used, the system becomes: A B T u f = B C p 0 where C is symmetric positive semidefinite.
Eigenvalues for the Oseen problem 0.2 0.15 0.1 0.05 0 0.05 0.1 0.15 0.2 0.2 0 0.2 0.4 0.6 0.8 1 Indefinite form of A
Eigenvalues for the Oseen problem 0.3 0.2 0.1 0 0.1 0.2 0.3 0 0.2 0.4 0.6 0.8 1 Positive definite form of A
Coupled Solvers: direct vs. iterative 1. Direct methods: based on factorization of A High-quality software exists (Duff and coworkers) Stability issues (indefiniteness) Large amounts of fill-in Fairly competitive for 2D problems Too expensive for 3D problems
Coupled Solvers: direct vs. iterative 1. Direct methods: based on factorization of A High-quality software exists (Duff and coworkers) Stability issues (indefiniteness) Large amounts of fill-in Fairly competitive for 2D problems Too expensive for 3D problems 2. Iterative Krylov subspace methods Tend to converge slowly Effective preconditioners a must
Coupled Solvers: direct vs. iterative 1. Direct methods: based on factorization of A High-quality software exists (Duff and coworkers) Stability issues (indefiniteness) Large amounts of fill-in Fairly competitive for 2D problems Too expensive for 3D problems 2. Iterative Krylov subspace methods Tend to converge slowly Effective preconditioners a must Current research focus is on preconditioners A comprehensive survey is now available: M. Benzi, G. Golub and J. Liesen, Numerical solution of saddle point problems, Acta Numerica 2005, 1 137.
Preconditioned Krylov methods Preconditioning: Find an invertible matrix P such that Krylov methods applied to the preconditioned system will converge rapidly. P 1 A x = P 1 b
Preconditioned Krylov methods Preconditioning: Find an invertible matrix P such that Krylov methods applied to the preconditioned system will converge rapidly. P 1 A x = P 1 b Rapid convergence is often associated with a clustered spectrum of P 1 A. However, characterizing the rate of convergence in general is not an easy matter.
Preconditioned Krylov methods Preconditioning: Find an invertible matrix P such that Krylov methods applied to the preconditioned system will converge rapidly. P 1 A x = P 1 b Rapid convergence is often associated with a clustered spectrum of P 1 A. However, characterizing the rate of convergence in general is not an easy matter. To be effective, a preconditioner must significantly reduce the total amount of work: P must be easy to compute Evaluating z = P 1 r must be cheap
Preconditioned Krylov methods Available options: 1. Symmetric A: MINRES (Paige & Saunders, SINUM 76) SQMR (Freund & Nachtigal, APNUM 95) Preconditioner must be SPD for MINRES Preconditioner can be symm. indefinite for SQMR
Preconditioned Krylov methods Available options: 1. Symmetric A: MINRES (Paige & Saunders, SINUM 76) SQMR (Freund & Nachtigal, APNUM 95) Preconditioner must be SPD for MINRES Preconditioner can be symm. indefinite for SQMR 2. Nonsymmetric A: GMRES (Saad & Schultz, SISSC 86) Bi-CGSTAB (van der Vorst, SSISC 91) Preconditioner can be anything
Preconditioned Krylov methods Available options: 1. Symmetric A: MINRES (Paige & Saunders, SINUM 76) SQMR (Freund & Nachtigal, APNUM 95) Preconditioner must be SPD for MINRES Preconditioner can be symm. indefinite for SQMR 2. Nonsymmetric A: GMRES (Saad & Schultz, SISSC 86) Bi-CGSTAB (van der Vorst, SSISC 91) Preconditioner can be anything Recent trend: Use GMRES or Bi-CGSTAB with a nonsymmetric preconditioner, even when A is symmetric (Stokes).
Preconditioners for saddle point systems Options include: 1. Multigrid methods
Preconditioners for saddle point systems Options include: 1. Multigrid methods 2. Schur complement-based methods Block diagonal preconditioning Block triangular preconditioning Uzawa preconditioning
Preconditioners for saddle point systems Options include: 1. Multigrid methods 2. Schur complement-based methods Block diagonal preconditioning Block triangular preconditioning Uzawa preconditioning 3. Constraint preconditioning
Preconditioners for saddle point systems Options include: 1. Multigrid methods 2. Schur complement-based methods Block diagonal preconditioning Block triangular preconditioning Uzawa preconditioning 3. Constraint preconditioning 4. Hermitian/Skew-Hermitian splitting (HSS)
Preconditioners for saddle point systems Options include: 1. Multigrid methods 2. Schur complement-based methods Block diagonal preconditioning Block triangular preconditioning Uzawa preconditioning 3. Constraint preconditioning 4. Hermitian/Skew-Hermitian splitting (HSS) The choice of an appropriate preconditioner is highly problem-dependent.
Block Preconditioners If A is invertible, A has the block LU factorization A = A B T B O = I BA 1 O I A B T O S.
Block Preconditioners If A is invertible, A has the block LU factorization A = A B T B O = I BA 1 O I A B T O S. Letting A O A B T P D = O S, P T = O S
Block Preconditioners If A is invertible, A has the block LU factorization A = A B T B O = I BA 1 O I A B T O S. Letting A O A B T P D = O S, P T = O S one can readily show that The spectrum of P 1 D A is σ(p 1 D A) = {1, 1± 5 2 } The spectrum of P 1 T A is σ(p 1A) = {1} T
Block Preconditioners In practice, A and S are replaced by approximations: Â O Â B T P D = O Ŝ, P T = O Ŝ
Block Preconditioners In practice, A and S are replaced by approximations: Â O Â B T P D = O Ŝ, P T = O Ŝ Â should be spectrally equivalent to A Often, a multigrid V-cycle will do (e.g., for Stokes)
Block Preconditioners In practice, A and S are replaced by approximations: Â O Â B T P D = O Ŝ, P T = O Ŝ Â should be spectrally equivalent to A Often, a multigrid V-cycle will do (e.g., for Stokes) Approximating S is a tricky business, except for Stokes: S ( ) 1 S is spectrally equivalent to the identity!
Block Preconditioners Other methods include: Uzawa and its variants (similar to block triangular) SIMPLE (Patankar & Spalding, IJHMT 72): Â O I D 1 B T P = B BD 1 B T O I, where D = diag (A) SIMPLE often used as a smoother for MG Stokes as a preconditioner for Oseen (Golub & Wathen, SISC 98; Baggag & Sameh, CMAME 04) More recent methods for Oseen (Elman, Kay, Loghin, Silvester, Wathen,...) Needed: good approximations to S = BA 1 B T
Example: 2D Stokes 2D Steady problem, unit square Dirichlet BCs Uniform grid MAC discretization (stable C = O) GMRES, stopping criterion b A x k < 10 6 b BD = Block Diagonal Preconditioner BT = Block Triangular Preconditioner  = A, Ŝ = I (Ŝ = pressure mass matrix in FEM) Grid BD BT Uzawa SIMPLE 8 8 15 10 12 18 16 16 17 11 13 28 32 32 17 12 14 45 64 64 19 13 15 71 128 128 21 13 15 109
Example: 2D Oseen (convection form) 2D Oseen problems, constant wind, variable ν 1. Uzawa: Grid ν = 0.1 ν = 0.01 ν = 0.001 8 8 35 64 64 16 16 40 236 246 32 32 44 > 300 > 300 64 64 47 > 300 > 300 128 128 48 > 300 > 300 2. SIMPLE: Grid ν = 0.1 ν = 0.01 ν = 0.001 8 8 22 59 63 16 16 31 78 120 32 32 48 54 208 64 64 75 66 172 128 128 116 107 130
Example: 2D Oseen (convection form) 3. Stokes as a preconditioner: P = H B T B O, H = 1 2 (A+AT ) Grid ν = 0.1 ν = 0.01 ν = 0.001 8 8 17 57 54 16 16 19 123 241 32 32 20 126 > 300 64 64 20 104 > 300 128 128 20 106 > 300 Optimal preconditioners exist for Stokes Oseen with small ν is a much tougher problem Poor approximations to S = BA 1 B T poor performance
Better preconditioners for Oseen  B T P = O Ŝ where Ŝ 1 = (BB T ) 1 BAB T (BB T ) 1. Based on S 1 = (BA 1 B T ) 1 (B T ) AB, where B = B T (BB T ) 1 (pseudoinverse). Proposed by Elman (SISC 99). Main cost: two Poisson solves, plus 2 or 3 convectiondiffusion solves per step. It still suffers from some degradation as h, ν 0 Can we do better?
HSS Preconditioner We now use the alternative form the saddle point system: A B T B C u p = f 0.
HSS Preconditioner We now use the alternative form the saddle point system: A B T B C u p = f 0. Recall that the eigenvalues of the matrix A B T A = B C satisfy R(λ) > 0.
HSS Preconditioner We now use the alternative form the saddle point system: A B T B C u p = f 0. Recall that the eigenvalues of the matrix A B T A = B C satisfy R(λ) > 0. Consider the splitting A = H + K, H = 1 2 (A + AT ), K = 1 2 (A AT ).
HSS Preconditioner Therefore A B T H O K B T A = B C = O C + B O = H + K.
HSS Preconditioner Therefore A B T H O K B T A = B C = O C + B O = H + K. The HSS preconditioner is defined as P r = 1 2r (H + ri)(k + ri) where r > 0. Note that A = A T K = O (Stokes case).
HSS Preconditioner Therefore A B T H O K B T A = B C = O C + B O = H + K. The HSS preconditioner is defined as P r = 1 2r (H + ri)(k + ri) where r > 0. Note that A = A T K = O (Stokes case). First studied in Bai, Golub & Ng (SIMAX 03); B. & Golub (SIMAX 04) Spectral analysis: B., Gander & Golub, BIT 03; Simoncini & B. (SIMAX 04)
HSS Preconditioner Preconditioner action: requires solving (H + ri)(k + ri) z = r at each Krylov subspace iteration, or (H + ri) v = r followed by (K + ri) z = v.
HSS Preconditioner Preconditioner action: requires solving (H + ri)(k + ri) z = r at each Krylov subspace iteration, or (H + ri) v = r followed by (K + ri) z = v. Similar in spirit to ADI method The first system can be efficiently solved with MG The second one is a shifted skew-symmetric system: can be efficiently solved if rotation form is used In practice, exact solves may be replaced by inexact ones
HSS Preconditioner Note that (K + ri) z = v can be explicitly written as K + ri B T z1 v1 B ri z 2 = v 2 where K = O D D O, D = diag(w 1, w 2,..., w n ). This is relatively easy to solve since the Schur complement ri + B(K + αi) 1 B T is sparse (since (K + ri) 1 is sparse).
Example: Stokes, Oseen problem Stokes (ν = ), Oseen problems on unit square Constant wind, Dirichlet BCs Uniform grids MAC discretization (stable C = O) Full GMRES, stopping criterion 10 6 Exact solves Grid ν = ν = 0.1 ν = 0.01 ν = 0.001 8 8 22 19 15 14 16 16 29 25 19 14 32 32 38 34 25 17 64 64 51 51 36 23 128 128 76 72 57 32
Oseen Problem: Spectra of Preconditioned Matrices 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0.2 0.2 0.4 0.4 0.6 0.6 0.8 0.8 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 (a) Spectrum for ν = 0.01 (b) Spectrum for ν = 0.001
Example: 2D Oseen problem A (steady) recirculating flow problem Rotation form of the equations used HSS preconditioning (r = r best 0.1): Grid ν = 0.1 ν = 0.01 ν = 0.001 8 8 15 13 14 16 16 20 17 14 32 32 26 25 20 64 64 32 37 30 Block triangular preconditioning (Elman): Grid ν = 0.1 ν = 0.01 ν = 0.001 8 8 31 42 155 16 16 43 62 113 32 32 61 83 99 64 64 87 111 158
Example: 3D unsteady problem Unsteady, linearized, 3D problem, rotation form, ν = 0.1. HSS preconditioning: Grid t = 1 t = 1/10 t = 1/20 t = 1/50 t = 1/100 8 8 15 11 10 13 16 16 16 20 16 14 14 15 32 32 29 24 20 17 18 Block triangular preconditioning (Elman): Grid t = 1 t = 1/10 t = 1/20 t = 1/50 t = 1/100 8 8 33 25 22 19 17 16 16 52 39 33 27 24 32 32 93 61 52 43 37
Example: 3D unsteady problem Unsteady, linearized, 3D problem, rotation form, ν = 0.01. HSS preconditioning: Grid t = 1 t = 1/10 t = 1/20 t = 1/50 t = 1/100 8 8 12 10 11 13 16 16 16 18 11 11 13 16 32 32 28 14 13 13 15 Block triangular preconditioning (Elman): Grid t = 1 t = 1/10 t = 1/20 t = 1/50 t = 1/100 8 8 28 16 14 14 13 16 16 45 21 18 15 14 32 32 67 31 27 21 19
Example: 3D unsteady problem Unsteady, linearized, 3D problem, rotation form, ν = 0.001. HSS preconditioning: Grid t = 1 t = 1/10 t = 1/20 t = 1/50 t = 1/100 8 8 11 10 11 13 16 16 16 13 10 10 13 16 32 32 19 11 10 13 16 Block triangular preconditioning (Elman): Grid t = 1 t = 1/10 t = 1/20 t = 1/50 t = 1/100 8 8 25 15 14 14 14 16 16 44 13 12 12 12 32 32 49 16 14 12 12
Conclusions Iterative solvers for incompressible flow remain an active research area Considerable progress made in the last few years A new approach: HSS preconditioning The rotation form of the equations is advantageous! (h, ν)-independent behavior observed for unsteady problems with δt sufficiently small. Steady case: HSS as a smoother for MG?