CAPÍTULO 3. ANÁLISIS, DISEÑO E IMPLEMENTACIÓN DEL SISTEMA
3.9 D IAGRAMA DE COMPONENTES
This subsection focuses on the nonlinear Newton-Krylov algorithm with a new AMG-based preconditioner. Krylov-subspace methods are commonly used with a preconditioner that accel-erates the convergence of the linear iterations; therefore, we consider an implementation of this algorithm to solve the thin film flow model. In this thesis, we develop our algorithm for solving the nonlinear thin film flow system optimally with a new preconditioner. Since Krylov methods converge slowly when employed to this type of a system, we will require a preconditioner in order to reach acceptable convergence rates. As we have mentioned previously the algebraic multigrid AMG iterative methods are the most effective for solving large sparse linear systems that are obtained from the discretisation of single elliptic partial differential equations. Our goal is to incorporate AMG methods as a part of a preconditioner for Krylov subspace methods for our linearised system.
In the Newton-Krylov algorithm, there are two different types of iterations: outer iterations and inner iterations. The outer iterations are the nonlinear Newton’s iterations, which we use to linearise the nonlinear system. The inner iterations are the linear Krylov methods for solving linear systems. We have a nonsymmetric matrix J, therefore, we will use GMRES as a Krylov subspace method in our implementation. It is the combination of the two types of iterations that make the Newton-Krylov method, one of the most powerful methods for solving nonlinear algebraic systems, provided a suitable preconditioner is available, as we will confirm in our numerical experiments. In our case, we will use a new preconditioner that incorporates AMG, for which we apply a software implementation that is available in the Harwell Subroutine Li-brary (HSL) [15,70]. This software involves routines called HSL-MI20 for the AMG scheme and HSL-MI24 for the GMRES scheme. Building on this, we will provide a new optimal (or near optimal) preconditioner for Newton-Krylov iterations as a part of the solution of the discrete nonlinear system of PDEs.
We discussed the discrete nonlinear thin film flow system in section 5.4.1; the linearisation of this system leads to a large sparse linear system which must be solved at each step. Let us rewrite the linear system (5.41) in the following matrix form:
K I
We require a preconditioner, P say, to approximate the action of the full Jacobian. We examine
87 5.5. Steady-State Solvers
the numerical solution of Equation (5.44) with right preconditioning, which requires solution of
J P−1u = b. (5.45)
We do not require the matrix J P−1 to be formed explicitly, however we do require the precon-ditioner equation to be solved whenever required, i.e.
P z = r. (5.46)
Let z = (zh zp)> and r = (rp rh)> be column-vectors so that, for a block upper triangular preconditioner, Equation (5.46) has the following matrix form:
P1z = K I question on how to choose a good preconditioner for solving the linearized thin film flow model at each Newton iteration.
For the first preconditioner P1we use the exact Schur Complement, S1 in the (2, 2) block. The benefit of using the exact Schur Complement is that this preconditioned system needs just two iterations to converge [47, 97, 135]. However, obviously, this is not efficient since we use a lot of memory and great expense to compute S1. Therefore, we will investigate how to improve this preconditioner by replacing the Schur Complement S1by an approximation.
We have made approximations of the preconditioners firstly, via approximate the Schur Com-plement by replacing it with the first term in the Schur ComCom-plement and then we examine this preconditioner via eigenvalues. However, these preconditioners are not practical and efficient.
Therefore, we decided to make a further approximation, which is a more efficient approach by using AMG, which is practical and efficient implementation as we will discuss below.
Our approach will be to develop a sequence of potential preconditioners for the matrix J in Equation (5.44). As also described, the first choice of a preconditioner is P1, the upper triangular block preconditioner written as follows:
The second preconditioner that we consider, P1a, is the upper triangular block preconditioner
Chapter 5. Thin Film Flow System 88
where we have replaced S1with Kαwhich we hope will provide an approximation to the Schur Complement.
A third preconditioner, P1b, uses one AMG iteration with this approximate Schur Complement, AM G(Kα), for the (2, 2) block and, similarly replace the (1, 1) block in P1a with an AMG approximation to K. The advantage of using AMG is in the fact that it is much faster than an exact solve but is spectrally equivalent. Hence,
P1b= AMG(K) I
0 AMG(Kα)
!
, (5.50)
where AMG(X) is one AMG iteration for the matrix X.
As with the preconditioners P1, P1aand P1bwe can also introduce a second sequence of potential preconditioners by using forward elimination instead of using the backward elimination (to create block lower triangular preconditioners). These preconditioners are denoted P2, P2a and P2b. Here P2is the lower block triangular preconditioner written as follows:
P2= S2 0 Bα Kα
!
, (5.51)
where S2is the Schur Complement S2= K− IKα−1Bα.
The preconditioner P2a is given by the lower block triangular matrix as follows:
P2a= K 0 Bα Kα
!
, (5.52)
and the preconditioner P2b is given by the lower block triangular matrix as follows:
P2b= AMG(K) 0
Bα AMG(Kα)
!
. (5.53)
Note that the preconditioners P1a and P2a approximate the Schur Complement but still solve the backward (or forward) elimination exactly (using backslash in MATLAB in our implemen-tations). The preconditioners P1b and P2b approximate the Schur Complement and the other diagonal block by using one AMG V-cycle. In other words, we applied AMG separately for each diagonal block in the P1b and P2b preconditioners in Equations (5.50) and (5.53) respectively.