This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Stochastic Galerkin methods for linear stability analysis of systems with parametric uncertaintythanks: This work was supported by the U.  S.  National Science Foundation under grant DMS1913201.

Bedřich Sousedík Department of Mathematics and Statistics, University of Maryland, Baltimore County, 1000 Hilltop Circle, Baltimore, MD 21250 (sousedik@umbc.edu)    Kookjin Lee The School of Computing, Informatics, and Decision Systems Engineering, Arizona State University, Tempe, AZ 85281 (klee263@asu.edu).
Abstract

We present a method for linear stability analysis of systems with parametric uncertainty formulated in the stochastic Galerkin framework. Specifically, we assume that for a model partial differential equation, the parameter is given in the form of generalized polynomial chaos expansion. The stability analysis leads to the solution of a stochastic eigenvalue problem, and we wish to characterize the rightmost eigenvalue. We focus, in particular, on problems with nonsymmetric matrix operators, for which the eigenvalue of interest may be a complex conjugate pair, and we develop methods for their efficient solution. These methods are based on inexact, line-search Newton iteration, which entails use of preconditioned GMRES. The method is applied to linear stability analysis of Navier–Stokes equation with stochastic viscosity, its accuracy is compared to that of Monte Carlo and stochastic collocation, and the efficiency is illustrated by numerical experiments.

keywords:
linear stability, eigenvalue analysis, uncertainty quantification, spectral stochastic finite element method, Navier–Stokes equation, preconditioning, stochastic Galerkin method
AMS:
35R60, 60H15, 65F15, 65L07, 65N22, 65N25

1 Introduction

The identification of instability in large-scale dynamical system is important in a number of applications such as fluid dynamics, epidemic models, pharmacokinetics, analysis of power systems and power grid, or quantum mechanics and plasma physics. A steady solution uu is stable, if when in a transient simulation it is introduced with a small perturbation as initial data and the simulation reverts to uu, and it is unstable otherwise. This is of fundamental importance since unstable solutions may lead to inexplicable dynamic behavior. Linear stability analysis entails computing the rightmost eigenvalue of the Jacobian evaluated at uu, and thus it leads to solution of, in general, large sparse generalized eigenvalues problems see, e.g. [4, 6, 8, 13, 16, 27] and the references therein. Typically, a complex pair of rightmost eigenvalues leads to a Hopf bifurcation, and a real rightmost eigenvalue may lead to a pitchfork bifurcation. The analysis is further complicated if the parameters in the systems are functions of one or more random variables. This is quite common in many real-world applications, since the precise values of model coefficients or boundary conditions are often not known. A popular method for this type of problems is Monte Carlo, which is known for its robustness but also slow convergence. In this study, we use spectral stochastic finite element methods [12, 17, 33, 34] with the main focus on the so-called stochastic Galerkin method, for the linear stability analysis of Navier–Stokes equation with stochastic viscosity. Specifically, we consider the parameterized viscosity given in the form of generalized polynomial chaos (gPC) expansion. In the first step, we apply the algorithms developed in [18, 30], see also [24], to find a gPC expansion of the solution of the Navier–Stokes equation. In the second step, we use the expansions of the solution and viscosity to set up a generalized eigenvalue problem with a nonsymmetric matrix operator, and in the assessment of linear stability of this problem we identify the gPC expansions of the rightmost eigenvalue. The main contribution in this study is development of stochastic Galerkin method for nonsymmetric eigenvalue problems. Our approach is based on inexact Newton iteration: the linear systems with Jacobian matrices are solved using GMRES, for which we also develop several preconditioners. The preconditioners are motivated by our prior work on (truncated) hierarchical preconditioning [32, 19], see also [2]. For an overview of literature on solving eigenvalue problems in the context of spectral stochastic finite element methods we refer to [1, 19, 29] and the references therein. Recently, Hakula and Laaksonen [15] studied crossing of eigenmodes in the stochastic parameter space, and Elman and Su [9] developed a low-rank inverse subspace iteration. However, to the best of our knowledge, there are only a few references addressing nonsymmetric stochastic eigenvalue problems: by Sarrouy et al. [25, 26], but there is no discussion of efficient solution strategies, and also by Sonday et al. [28], who studied distribution of eigenvalues for the Jacobian in the context of stochastic Galerkin method. Most recently, the authors with collaborators also compared surrogate learning strategies based on a sampling method, Gaussian process regression and a neural network in [31].

A study of linear stability of Navier–Stokes equation under uncertainty was conducted by Elman and Silvester [5]. The study was based on a judiciously chosen perturbation of the state variable and a stochastic collocation method was used to characterize the rightmost eigenvalue. Our approach here is different. We consider parametric uncertainty (of the viscosity), and the solution strategy is based on the stochastic Galerkin method. In fact, also the variant of the collocation method used here is based on the stochastic Galerkin projection (sometimes called a nonintrusive stochastic Galerkin method in the literature, see [33, Chapter 7] for a discussion). From this perspective, our study can be viewed as an extension of the setup from [6] to problems with viscosity given in the form of stochastic expansion and their efficient solution using stochastic Galerkin method. However, more importantly, we illustrate that the inexact methods for stochastic eigenvalue problems proposed recently by Lee and Sousedík [19] can be also applied to problems with nonsymmetric matrix operator111Specifically, the methods based on inexact Newton iteration, since in our experience the stochastic Rayleigh quotient and inverse iteration methods are less effective for nonsymmetric problems.. This in general allows to perform a linear stability analysis for other types of problems as well. We do not address eigenvalue crossing here, which is a somewhat delicate task for gPC-based techniques. We assume that the eigenvalue of interest is sufficiently separated from the rest of the spectrum and no crossing occurs. This is often the case for outliers and other eigenvalues that may be of interest in applications. A suitability of the algorithm we propose in this study can be assessed, e.g., by running first a low-fidelity (quasi-)Monte Carlo simulation. We also note that from our experience with the problem at hand indicates that the rightmost eigenvalue remains relatively well separated from the rest of the spectrum, and it is less prone to switching unlike the other eigenvalues, even with moderate values of coefficient of variation, which in turn allows its efficient characterization by a gPC expansion.

The rest of the paper is organized as follows. In Section 2 we recall the basic elements of linear stability analysis and link it to an eigenvalue problem for a specific model given by Navier–Stokes equation, in Section 3 we introduce the stochastic eigenvalue problem, in Section 4 we formulate the sampling methods and in Section 5 the stochastic Galerkin method and inexact Newton iteration for its solution, in Section 6 we apply the algorithms to linear stability analysis of Navier–Stokes equation with stochastic viscosity, in Section 7 we report the results of numerical experiments, and finally in Section 8 we summarize and conclude our work.

2 Linear stability and deterministic model problem

Following [6], let us consider the dynamical system

Mut=f(u,ν),Mu_{t}=f(u,\nu), (1)

where f:n×nf:\mathbb{R}^{n}\times\mathbb{R}{\color[rgb]{0,0,0}\rightarrow}\mathbb{R}^{n} is a nonlinear mapping, unu\in\mathbb{R}^{n} is the state variable (velocity, pressure, temperature, deformation, etc.), in the finite element setting Mn×nM\in\mathbb{R}^{n\times n} is the mass matrix, and ν\nu is a parameter. Let uu denote the steady-state solution to (1), i.e., ut=0u_{t}=0. We are interested in the stability ofu~{}u: if a small perturbation δ(0)\delta(0) is introduced to uu at time t=0t=0, does δ(t)\delta(t) grow with time, or does it decay? For a fixed value of ν\nu, linear stability of the steady-state solution is determined by the spectrum of the eigenvalue problem

Jv=λMv,Jv=\lambda Mv, (2)

where J=fu(u(ν),ν)J=\frac{\partial f}{\partial u}(u(\nu),\nu) is the Jacobian matrix of ff evaluated at ν\nu. The eigenvalues have a general form λ=α+iβ\lambda=\alpha+i\beta, where α=Reλ\alpha=\operatorname{Re}\lambda and β=Imλ\beta=\operatorname{Im}\lambda. Then eλt=eαteiβte^{\lambda t}=e^{\alpha t}e^{i\beta t}, and since |eλt|=|eαt|\left|e^{\lambda t}\right|=\left|e^{\alpha t}\right|, there are in general two cases: if α<0\alpha<0 the perturbation decays with time, and if α>0\alpha>0 the perturbation grows. We refer, e.g., to [4, 13] and the references therein for a detailed discussion. That is, if all the eigenvalues have strictly negative real part, then uu is a stable steady solution, and if some eigenvalues have nonnegative real part, thenu~{}u is unstable. Therefore, a change of stability can be detected by monitoring the rightmost eigenvalues of (2). A steady-state solution may lose its stability in one of two ways: either the rightmost eigenvalue of (2) is real and passes through zero from negative to positive as ν\nu varies, or (2) has a complex pair of rightmost eigenvalues and they cross the imaginary axis as ν\nu varies, which leads to a Hopf bifurcation with the consequent birth of periodic solutions of (1).

Consider a special case of (1), the time-dependent Navier–Stokes equations governing viscous incompressible flow,

ut\displaystyle\vec{u}_{t} =ν2u(u)up,\displaystyle=\nu\nabla^{2}\vec{u}-\left(\vec{u}\cdot\nabla\right)\vec{u}-\nabla p, (3)
0\displaystyle 0 =u,\displaystyle=\nabla\cdot\vec{u},

subject to appropriate boundary and initial conditions in a bounded physical domainD~{}D, where ν\nu is the kinematic viscosity, u\vec{u} is the velocity and pp is the pressure. Properties of the flow are usually characterized by the Reynolds number

Re=ULν,Re=\frac{UL}{\nu},

where UU is the characteristic velocity and LL is the characteristic length. For convenience, we will also sometimes refer to the Reynolds number instead of the viscosity. Mixed finite element discretization of (3) gives the following Jacobian and the mass matrix, see [6] and [8, Chapter 88] for more details,

J=[FBTB0]nx×nx,M=[G000]nx×nx,J=\left[\begin{array}[c]{cc}F&B^{T}\\ B&0\end{array}\right]\in\mathbb{R}^{n_{x}\times n_{x}},\qquad M=\left[\begin{array}[c]{cc}-G&0\\ 0&0\end{array}\right]\in\mathbb{R}^{n_{x}\times n_{x}}, (4)

where nx=nu+npn_{x}=n_{u}+n_{p} is the number of velocity and pressure degrees of freedom, respectively, nu>npn_{u}>n_{p}, Fnu×nuF\in\mathbb{R}^{n_{u}\times n_{u}} is nonsymmetric, Bnp×nuB\in\mathbb{R}^{n_{p}\times n_{u}} is the divergence matrix, and the velocity mass matrix Gnu×nuG^{n_{u}\times n_{u}} is symmetric positive definite. The matrices are sparse and nxn_{x} is typically large. We note that the mass matrixM~{}M is singular, and (2) has an infinite eigenvalue. As suggested in [3], we replace the singular mass matrixM~{}M with the nonsingular, shifted mass matrix

Mσ=[GσBTσB0],M_{\sigma}=\left[\begin{array}[c]{cc}-G&\sigma B^{T}\\ \sigma B&0\end{array}\right], (5)

which is symmetric but in general indefinite, and it maps the infinite eigenvalues of (2) to σ1\sigma^{-1} and leaves the finite ones unchanged. Then, the generalized eigenvalue problem (2) can be transformed into an eigenvalue problem

Jv=λMσv.Jv=\lambda M_{\sigma}v. (6)

The flow is considered stable if Reλ<0\operatorname{Re}\lambda<0, and we wish to detect the onset of instability, that is to find when the rightmost eigenvalue crosses the imaginary axis. Efficient methods for finding the rightmost pair of complex eigenvalues of (2) (or (6)) were studied in [6]. Here, our goal is different. We consider parametric uncertainty in the sense that the parameter νν(ξ)\nu\equiv\nu(\xi), where ξ\xi is a set of random variables and which is given by the so-called generalized polynomial chaos expansion. To this end, we first recast the eigenvalue problem (6) in the spectral stochastic finite element framework, then we show how to efficiently solve it, and finally we apply the stability analysis to Navier–Stokes equation with stochastic viscosity.

3 Stochastic eigenvalue problem

Let (Ω,,𝒫)\left(\Omega,\mathcal{F},\mathcal{P}\right) be a complete probability space, that is Ω\Omega is the sample space with σ\sigma-algebra~{}\mathcal{F} and probability measure𝒫~{}\mathcal{P}. We assume that the randomness in the mathematical model is induced by a vector ξ:ΩΓmξ\xi:\Omega\mapsto\Gamma\subset\mathbb{R}^{m_{\xi}} of independent random variables ξ1(ω),,ξmξ(ω)\xi_{1}(\omega),\dots,\xi_{m_{\xi}}(\omega), where ωΩ\omega\in\Omega. Let (Γ)\mathcal{B}(\Gamma) denote the Borel σ\sigma-algebra onΓ~{}\Gamma induced by ξ\xi and μ\mu the induced measure. The expected value of the product of measurable functions onΓ~{}\Gamma determines a Hilbert space TΓL2(Γ,(Γ),μ)T_{\Gamma}\equiv L^{2}\left(\Gamma,\mathcal{B}(\Gamma),\mu\right) with inner product

u,v=𝔼[uv]=Γu(ξ)v(ξ)𝑑μ(ξ),\left\langle u,v\right\rangle=\mathbb{E}\left[uv\right]=\int_{\Gamma}u(\xi)v(\xi)d\mu(\xi), (7)

where the symbol 𝔼\mathbb{E} denotes the mathematical expectation.

In computations we will use a finite-dimensional subspace TpTΓT_{p}\subset T_{\Gamma} spanned by a set of multivariate polynomials {ψ(ξ)}\left\{\psi_{\ell}(\xi)\right\} that are orthonormal with respect to the density function μ\mu, that is 𝔼[ψkψ]=δk\mathbb{E}\left[\psi_{k}\psi_{\ell}\right]=\delta_{k\ell}, and ψ1\psi_{1} is constant. This will be referred to as the gPC basis [34]. The dimension of the spaceTp~{}T_{p}, depends on the polynomial degree. For polynomials of total degreep~{}p, the dimension is nξ=(mξ+pp)n_{\xi}=\binom{m_{\xi}+p}{p}.

Suppose that we are given an affine expansion of a matrix operator, which may correspond to the Jacobian matrix in (2), as

K(ξ)==1nνKψ(ξ),K(\xi)=\sum_{\ell=1}^{n_{\nu}}K_{\ell}\psi_{\ell}(\xi), (8)

where eachKnx×nx~{}K_{\ell}\in\mathbb{R}^{n_{x}\times n_{x}} is a deterministic matrix, and K1K_{1} is the mean-value matrix K1=𝔼[K(ξ)]K_{1}=\mathbb{E}\left[K(\xi)\right]. The representation (8) is obtained from either Karhunen-Loève or, more generally, a stochastic expansion of an underlying random process; a specific example is provided in Section 7.

We are interested in a solution of the following stochastic eigenvalue problem: find a specific eigenvalue λ(ξ)\lambda(\xi) and possibly also the corresponding eigenvectorv(ξ)~{}v(\xi), which satisfy inD~{}D almost surely (a.s.) the equation

K(ξ)v(ξ)=λ(ξ)Mσv(ξ),K(\xi)v(\xi)=\lambda(\xi)M_{\sigma}v(\xi), (9)

where K(ξ)nx×nxK(\xi)\in\mathbb{R}^{n_{x}\times n_{x}} is a nonsymmetric matrix operator, Mσnx×nxM_{\sigma}\color[rgb]{0,0,0}{\in\mathbb{R}^{n_{x}\times n_{x}}} is a deterministic mass matrix, λ(ξ)\lambda(\xi)\in\mathbb{\mathbb{C}} and v(ξ)nxv(\xi)\in\mathbb{\mathbb{C}}^{n_{x}} along with a normalization condition

(v(ξ))v(ξ)=constant,\left(v(\xi)\right)^{\ast}v(\xi)=\text{constant}, (10)

which is further specified in Section 5.

We will search for expansions of the eigenpair (λ(ξ),v(ξ)){(\lambda(\xi),v(\xi))} in the form

λ(ξ)=k=1nξλkψk(ξ),v(ξ)=k=1nξvkψk(ξ),\lambda(\xi)=\sum_{k=1}^{n_{\xi}}\lambda_{k}\psi_{k}(\xi),\quad v(\xi)=\sum_{k=1}^{n_{\xi}}v_{k}\psi_{k}(\xi), (11)

where λk\lambda_{k}\in\mathbb{\mathbb{C}} and vknxv_{k}\in\mathbb{\mathbb{C}}^{n_{x}} are coefficients corresponding to the basis{ψk}~{}\left\{\psi_{k}\right\}. We note that the series for λ(ξ)\lambda(\xi) in (11) converges for nξn_{\xi}\rightarrow\infty in the space TΓT_{\Gamma} under the assumption that the gPC polynomials provide its orthonormal basis and provided that λ(ξ)\lambda(\xi) has finite second moments see, e.g., [10] or [33, Chapter 5]. Convergence analysis of this approximation for self-adjoint problems can be found in [1].

4 Monte Carlo and stochastic collocation

Both Monte Carlo and stochastic collocation are based on sampling. The coefficients are defined by a discrete projection

λk=λ,ψk,vk=v,ψk,k=1,,nξ.\lambda_{k}=\left\langle\lambda,\psi_{k}\right\rangle,\quad v_{k}=\left\langle v,\psi_{k}\right\rangle,\qquad k=1,\dots,n_{\xi}. (12)

The evaluations of coefficients in (12) entail solving a set of independent deterministic eigenvalue problems at a set of sample points{ξ(q)}~{}\left\{\xi^{(q)}\right\}, q=1,,nMCq=1,\dots,n_{MC} or nqn_{q},

K(ξ(q))v(ξ(q))=λ(ξ(q))Mσv(ξ(q)).K(\xi^{(q)})v(\xi^{(q)})=\lambda\left(\xi^{(q)}\right)M_{\sigma}v\left(\xi^{(q)}\right). (13)

In the Monte Carlo method, the sample pointsξ(q)~{}\xi^{(q)}, q=1,,nMC,q=1,\dots,n_{MC}, are generated randomly following the distribution of the random variablesξi~{}\xi_{i}, i=1,,mξi=1,\dots,m_{\xi}, and moments of solution are computed by ensemble averaging. In addition, the coefficients in (11) could be computed using Monte Carlo integration as222In numerical experiments, we avoid this approximation of the gPC coefficients and directly work with the sampled quantities.

λk=1nMCq=1nMCλ(ξ(q))ψk(ξ(q)),vmk=1nMCq=1nMCv(xm,ξ(q))ψk(ξ(q)).\lambda_{k}=\frac{1}{n_{MC}}\sum_{q=1}^{n_{MC}}\lambda(\xi^{(q)})\psi_{k}\left(\xi^{(q)}\right),\qquad v_{mk}=\frac{1}{n_{MC}}\sum_{q=1}^{n_{MC}}v(x_{m},\mathbb{\xi}^{(q)})\psi_{k}(\mathbb{\xi}^{(q)}).

For stochastic collocation, which is used here as the so-called nonintrusive stochastic Galerkin method, the sample pointsξ(q)~{}\xi^{(q)}, q=1,,nq,q=1,\dots,n_{q}, consist of a predetermined set of collocation points, and the coefficients λk\lambda_{k} and vkv_{k} in the expansions (11) are determined by evaluating (12) in the sense of (7) using numerical quadrature as

λk=q=1nqλ(ξ(q))ψk(ξ(q))w(q),vmk=q=1nqv(xm,ξ(q))ψk(ξ(q))w(q),\lambda_{k}=\sum_{q=1}^{n_{q}}\lambda(\mathbb{\xi}^{(q)})\psi_{k}(\mathbb{\xi}^{(q)})w^{(q)},\qquad v_{mk}=\sum_{q=1}^{n_{q}}v(x_{m},\mathbb{\xi}^{(q)})\psi_{k}(\mathbb{\xi}^{(q)})w^{(q)},

where ξ(q)\mathbb{\xi}^{(q)} are the quadrature (collocation) points and w(q)w^{(q)} are quadrature weights. Details of the rule we use in our numerical experiments are discussed in Section 7, and we refer to monograph [17] for a detailed discussion of quadrature rules.

5 Stochastic Galerkin method and Newton iteration

The stochastic Galerkin method is based on the projection

Kv,ψk\displaystyle\left\langle Kv,\psi_{k}\right\rangle =λMσv,ψk,\displaystyle=\left\langle\lambda M_{\sigma}v,\psi_{k}\right\rangle, k\displaystyle k =1,,nξ,\displaystyle=1,\dots,n_{\xi}, (14)
vv,ψk\displaystyle\left\langle v^{{\color[rgb]{0,0,0}\ast}}v,\psi_{k}\right\rangle =constδk1,\displaystyle={\color[rgb]{0,0,0}\text{const}\cdot}\delta_{k1}, k\displaystyle k =1,,nξ,const.\displaystyle=1,\dots,n_{\xi},\,\,\,{\color[rgb]{0,0,0}\text{const}\in\mathbb{R}}. (15)

Let us introduce the notation

[H]jk=h,jk,h,jk𝔼[ψψjψk],=1,,nν,j,k=1,,nξ.\left[H_{\ell}\right]_{jk}=h_{\ell,jk},\quad h_{\ell,jk}\equiv\mathbb{E}\left[\psi_{\ell}\psi_{j}\psi_{k}\right],\qquad\ell=1,\dots,n_{\nu},\quad j,k=1,\dots,n_{\xi}. (16)

In order to formulate an efficient algorithm for eigenvalue problem (9) with nonsymmetric matrix operator using the stochastic Galerkin formulation, we introduce a separated representation of the eigenpair using real and imaginary parts,

v(ξ)=vRe(ξ)+ivIm(ξ),λ(ξ)=λRe(ξ)+iλIm(ξ),v(\xi)=v_{\operatorname{Re}}(\xi)+{\mathrm{i}\mkern 1.0mu}v_{\operatorname{Im}}(\xi),\quad\lambda(\xi)=\lambda_{\operatorname{Re}}(\xi)+{\mathrm{i}\mkern 1.0mu}\lambda_{\operatorname{Im}}(\xi),

where vRe(ξ),vIm(ξ)nxv_{\operatorname{Re}}(\xi),v_{\operatorname{Im}}(\xi)\in\mathbb{R}^{n_{x}} and λRe(ξ),λIm(ξ)\lambda_{\operatorname{Re}}(\xi),\lambda_{\operatorname{Im}}(\xi)\in\mathbb{R}. Then, replacing v(ξ)v(\xi) and λ(ξ)\lambda(\xi) in eigenvalue problem (9) results in

K(ξ)(vRe(ξ)+ivIm(ξ))=(λRe(ξ)+iλIm(ξ))Mσ(vRe(ξ)+ivIm(ξ)).K(\xi)(v_{\operatorname{Re}}(\xi)+{\mathrm{i}\mkern 1.0mu}v_{\operatorname{Im}}(\xi))=\left(\lambda_{\operatorname{Re}}(\xi)+{\mathrm{i}\mkern 1.0mu}\lambda_{\operatorname{Im}}(\xi)\right)M_{\sigma}(v_{\operatorname{Re}}(\xi)+{\mathrm{i}\mkern 1.0mu}v_{\operatorname{Im}}(\xi)). (17)

Expanding the terms in (17) and collecting the real and imaginary parts yields a system of equations that can be written in a separated representation as

[K(ξ)vRe(ξ)K(ξ)vIm(ξ)]=[λRe(ξ)MσλIm(ξ)MσλIm(ξ)MσλRe(ξ)Mσ][vRe(ξ)vIm(ξ)],\left[\begin{array}[c]{c}K(\xi)v_{\operatorname{Re}}(\xi)\\ K(\xi)v_{\operatorname{Im}}(\xi)\end{array}\right]=\begin{bmatrix}\lambda_{\operatorname{Re}}(\xi)M_{\sigma}&-\lambda_{\operatorname{Im}}(\xi)M_{\sigma}\\ \lambda_{\operatorname{Im}}(\xi)M_{\sigma}&\lambda_{\operatorname{Re}}(\xi)M_{\sigma}\end{bmatrix}\left[\begin{array}[c]{c}v_{\operatorname{Re}}(\xi)\\ v_{\operatorname{Im}}(\xi)\end{array}\right], (18)

and the normalization condition corresponding to the separated representation in (18) is taken as

vRe(ξ)TvRe(ξ)=1,vIm(ξ)TvIm(ξ)=1.v_{\operatorname{Re}}(\xi)^{T}v_{\operatorname{Re}}(\xi)=1,\quad v_{\operatorname{Im}}(\xi)^{T}v_{\operatorname{Im}}(\xi)=1. (19)

Now, we seek expansions of type (11) for vRe(ξ)v_{\operatorname{Re}}(\xi), vIm(ξ)v_{\operatorname{Im}}(\xi), λRe(ξ)\lambda_{\operatorname{Re}}(\xi), and λIm(ξ)\lambda_{\operatorname{Im}}(\xi), that is

vs(ξ)=(Ψ(ξ)TInx)v¯s,λs(ξ)=Ψ(ξ)Tλ¯s,s=Re,Im,v_{s}(\xi)=(\Psi(\xi)^{T}\otimes I_{n_{x}})\bar{v}_{s},\quad\lambda_{s}(\xi)=\Psi(\xi)^{T}\bar{\lambda}_{s},\quad s=\operatorname{Re},\operatorname{Im}, (20)

where the symbol \otimes denotes the Kronecker product, Ψ(ξ)=[ψ1(ξ),,ψnξ(ξ)]T\Psi(\xi)=[\psi_{1}(\xi),\ldots,\psi_{n_{\xi}}(\xi)]^{T}, λ¯s=[λs,1,,λs,nξ]Tnξ\bar{\lambda}_{s}=[\lambda_{s,1},\ldots,\lambda_{s,n_{\xi}}]^{T}\in\mathbb{R}^{n_{\xi}}, and v¯s=[vs,1T,,vs,nξT]Tnxnξ\bar{v}_{s}=[v_{s,1}^{T},\ldots,v_{s,n_{\xi}}^{T}]^{T}\in\mathbb{R}^{n_{x}n_{\xi}} for s=Re,Ims=\operatorname{Re},\operatorname{Im}.

Let us consider expansions (20) as approximations to the solution of (18)–(19). Then, we can write the residual of (18) as

F~(v¯Re,v¯Im,λ¯Re,λ¯Im)=[(Ψ(ξ)TK(ξ))v¯Re(λ¯ReTΨ(ξ)Ψ(ξ)TMσ)v¯Re+(λ¯ImTΨ(ξ)Ψ(ξ)TMσ)v¯Im(Ψ(ξ)TK(ξ))v¯Im(λ¯ImTΨ(ξ)Ψ(ξ)TMσ)v¯Re(λ¯ReTΨ(ξ)Ψ(ξ)TMσ)v¯Im],\widetilde{F}(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}},\bar{\lambda}_{\operatorname{Re}},\bar{\lambda}_{\operatorname{Im}})=\begin{bmatrix}\left(\Psi(\xi)^{T}\!\otimes\!K(\xi)\right)\bar{v}_{\operatorname{Re}}-\!\left(\bar{\lambda}_{\operatorname{Re}}^{T}\Psi(\xi)\Psi(\xi)^{T}\!\otimes\!M_{\sigma}\right)\bar{v}_{\operatorname{Re}}\!+\!\left(\bar{\lambda}_{\operatorname{Im}}^{T}\Psi(\xi)\Psi(\xi)^{T}\!\otimes\!M_{\sigma}\right)\bar{v}_{\operatorname{Im}}\\ \vspace{-2.5mm}\\ \left(\Psi(\xi)^{T}\!\otimes\!K(\xi)\right)\bar{v}_{\operatorname{Im}}\!-\!\left(\bar{\lambda}_{\operatorname{Im}}^{T}\Psi(\xi)\Psi(\xi)^{T}\!\otimes\!M_{\sigma}\right)\bar{v}_{\operatorname{Re}}\!-\!\left(\bar{\lambda}_{\operatorname{Re}}^{T}\Psi(\xi)\Psi(\xi)^{T}\!\otimes\!M_{\sigma}\right)\bar{v}_{\operatorname{Im}}\end{bmatrix},

and the residual of (19) as

G~(v¯Re,v¯Im)=[v¯ReT(Ψ(ξ)Ψ(ξ)TInx)v¯Re1v¯ImT(Ψ(ξ)Ψ(ξ)TInx)v¯Im1].\widetilde{G}(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}})=\begin{bmatrix}\bar{v}_{\operatorname{Re}}^{T}\left(\Psi(\xi)\Psi(\xi)^{T}\otimes I_{n_{x}}\right)\bar{v}_{\operatorname{Re}}-1\\ \vspace{-2.5mm}\\ \bar{v}_{\operatorname{Im}}^{T}\left(\Psi(\xi)\Psi(\xi)^{T}\otimes I_{n_{x}}\right)\bar{v}_{\operatorname{Im}}-1\end{bmatrix}.

Imposing the stochastic Galerkin orthogonality conditions (14) and (15) toF~~{}\widetilde{F} andG~~{}\widetilde{G}, respectively, we get a system of nonlinear equations

r(v¯Re,v¯Im,λ¯Re,λ¯Im)=[F(v¯Re,v¯Im,λ¯Re,λ¯Im)G(v¯Re,v¯Im)]=02(nx+1)nξ,r(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}},\bar{\lambda}_{\operatorname{Re}},\bar{\lambda}_{\operatorname{Im}})=\begin{bmatrix}F(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}},\bar{\lambda}_{\operatorname{Re}},\bar{\lambda}_{\operatorname{Im}})\\ G(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}})\end{bmatrix}={0}\in\mathbb{R}^{2(n_{x}+1)n_{\xi}}, (21)

where

F(v¯Re,v¯Im,λ¯Re,λ¯Im)=[𝔼[ΨΨTK]v¯Re𝔼[(λ¯ReΨT)ΨΨTMσ]v¯Re+𝔼[(λ¯ImΨT)ΨΨTMσ]v¯Im𝔼[ΨΨTK]v¯Im𝔼[(λ¯ImΨT)ΨΨTMσ]v¯Re𝔼[(λ¯ReΨT)ΨΨTMσ]v¯Im],F(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}},\bar{\lambda}_{\operatorname{Re}},\bar{\lambda}_{\operatorname{Im}})=\begin{bmatrix}\mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\bar{v}_{\operatorname{Re}}\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Re}}\!+\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Im}}\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\bar{v}_{\operatorname{Im}}\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Re}}\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Im}}\end{bmatrix},

and

G(v¯Re,v¯Im)=[𝔼[Ψ((v¯Re(ΨΨTInx)Tv¯Re)1)]𝔼[Ψ((v¯Im(ΨΨTInx)Tv¯Im)1)]].G(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}})=\begin{bmatrix}\mathbb{E}[\Psi\otimes((\bar{v}_{\operatorname{Re}}{}^{T}(\Psi\Psi^{T}\otimes I_{n_{x}})\bar{v}_{\operatorname{Re}})-1)]\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\otimes((\bar{v}_{\operatorname{Im}}{}^{T}(\Psi\Psi^{T}\otimes I_{n_{x}})\bar{v}_{\operatorname{Im}})-1)]\end{bmatrix}.

We will use Newton iteration to solve system of nonlinear equations (21). The Jacobian matrixDJ(v¯Re,v¯Im,λ¯Re,λ¯Im)~{}DJ(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}},\bar{\lambda}_{\operatorname{Re}},\bar{\lambda}_{\operatorname{Im}}) of (21) can be written as

DJ(v¯Re,v¯Im,λ¯Re,λ¯Im)=[Fv¯ReFv¯ImFλ¯ReFλ¯ImGv¯ReGv¯ImGλ¯ReGλ¯Im](2(nx+1)nξ)×(2(nx+1)nξ),DJ(\bar{v}_{\operatorname{Re}},\bar{v}_{\operatorname{Im}},\bar{\lambda}_{\operatorname{Re}},\bar{\lambda}_{\operatorname{Im}})=\begin{bmatrix}\frac{\partial F}{\partial\bar{v}_{\operatorname{Re}}}&\frac{\partial F}{\partial\bar{v}_{\operatorname{Im}}}&\frac{\partial F}{\partial\bar{\lambda}_{\operatorname{Re}}}&\frac{\partial F}{\partial\bar{\lambda}_{\operatorname{Im}}}\\ \vspace{-2.5mm}&&&\\ \frac{\partial G}{\partial\bar{v}_{\operatorname{Re}}}&\frac{\partial G}{\partial\bar{v}_{\operatorname{Im}}}&\frac{\partial G}{\partial\bar{\lambda}_{\operatorname{Re}}}&\frac{\partial G}{\partial\bar{\lambda}_{\operatorname{Im}}}\end{bmatrix}\in\mathbb{R}^{(2(n_{x}+1)n_{\xi})\times(2(n_{x}+1)n_{\xi})},

where

Fv¯Re\displaystyle\frac{\partial F}{\partial\bar{v}_{\operatorname{Re}}} =[𝔼[ΨΨTK]𝔼[(λ¯ReΨT)ΨΨTMσ]𝔼[(λ¯ImΨT)ΨΨTMσ]],Fλ¯Re=[𝔼[ΨT(ΨΨTMσ)]v¯Re𝔼[ΨT(ΨΨTMσ)]v¯Im],\displaystyle=\begin{bmatrix}\mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\\ \vspace{-2.5mm}\\ -\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\end{bmatrix},\quad\frac{\partial F}{\partial\bar{\lambda}_{\operatorname{Re}}}=\begin{bmatrix}-\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Re}}\\ \vspace{-2.5mm}\\ -\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Im}}\end{bmatrix}, (22)
Fv¯Im\displaystyle\frac{\partial F}{\partial\bar{v}_{\operatorname{Im}}} =[𝔼[(λ¯ImΨT)ΨΨTMσ]𝔼[ΨΨTK]𝔼[(λ¯ReΨT)ΨΨTMσ]],Fλ¯Im=[𝔼[ΨT(ΨΨTMσ)]v¯Im𝔼[ΨT(ΨΨTMσ)]v¯Re],\displaystyle=\begin{bmatrix}\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}{}^{T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\end{bmatrix},\quad\frac{\partial F}{\partial\bar{\lambda}_{\operatorname{Im}}}=\begin{bmatrix}\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Im}}\\ \vspace{-2.5mm}\\ -\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Re}}\end{bmatrix}, (23)

and

Gv¯Re\displaystyle\frac{\partial G}{\partial\bar{v}_{\operatorname{Re}}} =[2𝔼[Ψ(v¯ReTΨΨTInx)]0],Gλ¯Re=0,\displaystyle=\begin{bmatrix}2\mathbb{E}[\Psi\otimes(\bar{v}_{\operatorname{Re}}^{T}\Psi\Psi^{T}\!\otimes\!I_{n_{x}})]\\ \vspace{-2.5mm}\\ 0\end{bmatrix},\quad\quad\frac{\partial G}{\partial\bar{\lambda}_{\operatorname{Re}}}=0, (24)
Gv¯Im\displaystyle\frac{\partial G}{\partial\bar{v}_{\operatorname{Im}}} =[02𝔼[Ψ(v¯ImTΨΨTInx)]],Gλ¯Im=0.\displaystyle=\begin{bmatrix}0\\ \vspace{-2.5mm}\\ 2\mathbb{E}[\Psi\otimes(\bar{v}_{\operatorname{Im}}^{T}\Psi\Psi^{T}\!\otimes\!I_{n_{x}})]\end{bmatrix},\quad\quad\frac{\partial G}{\partial\bar{\lambda}_{\operatorname{Im}}}=0. (25)

However, for convenience in the formulation of the preconditioners presented later, we formulate Newton iteration with rescaled Jacobian matrixDJ^(v¯Re(n),v¯Im(n),λ¯Re(n),λ¯Im(n))~{}\widehat{DJ}(\bar{v}_{\operatorname{Re}}^{(n)},\bar{v}_{\operatorname{Im}}^{(n)},\bar{\lambda}_{\operatorname{Re}}^{(n)},\bar{\lambda}_{\operatorname{Im}}^{(n)}), which at stepn~{}n entails solving a linear system

[F(n)v¯ReF(n)v¯ImF(n)λ¯ReF(n)λ¯Im12G(n)v¯Re12G(n)v¯Im00][δv¯Reδv¯Imδλ¯Reδλ¯Im]=[F(n)12G(n)],\begin{bmatrix}\frac{\partial F^{(n)}}{\partial\bar{v}_{\operatorname{Re}}}&\frac{\partial F^{(n)}}{\partial\bar{v}_{\operatorname{Im}}}&\frac{\partial F^{(n)}}{\partial\bar{\lambda}_{\operatorname{Re}}}&\frac{\partial F^{(n)}}{\partial\bar{\lambda}_{\operatorname{Im}}}\\ \vspace{-2.5mm}&&&\\ -\frac{1}{2}\frac{\partial G^{(n)}}{\partial\bar{v}_{\operatorname{Re}}}&-\frac{1}{2}\frac{\partial G^{(n)}}{\partial\bar{v}_{\operatorname{Im}}}&0&0\end{bmatrix}\begin{bmatrix}\delta\bar{v}_{\operatorname{Re}}\\ \delta\bar{v}_{\operatorname{Im}}\\ \delta\bar{\lambda}_{\operatorname{Re}}\\ \delta\bar{\lambda}_{\operatorname{Im}}\end{bmatrix}=-\begin{bmatrix}F^{(n)}\\ -\frac{1}{2}G^{(n)}\end{bmatrix}, (26)

followed by an update

[v¯Re(n+1)v¯Im(n+1)λ¯Re(n+1)λ¯Im(n+1)]=[v¯Re(n)v¯Im(n)λ¯Re(n)λ¯Im(n)]+[δv¯Reδv¯Imδλ¯Reδλ¯Im].\begin{bmatrix}\bar{v}_{\operatorname{Re}}^{(n+1)}\\ \bar{v}_{\operatorname{Im}}^{(n+1)}\\ \bar{\lambda}_{\operatorname{Re}}^{(n+1)}\\ \bar{\lambda}_{\operatorname{Im}}^{(n+1)}\end{bmatrix}=\begin{bmatrix}\bar{v}_{\operatorname{Re}}^{(n)}\\ \bar{v}_{\operatorname{Im}}^{(n)}\\ \bar{\lambda}_{\operatorname{Re}}^{(n)}\\ \bar{\lambda}_{\operatorname{Im}}^{(n)}\end{bmatrix}+\begin{bmatrix}\delta\bar{v}_{\operatorname{Re}}\\ \delta\bar{v}_{\operatorname{Im}}\\ \delta\bar{\lambda}_{\operatorname{Re}}\\ \delta\bar{\lambda}_{\operatorname{Im}}\end{bmatrix}. (27)
Remark 1.

We used the rescaling of the Jacobian in [19] in order to symmetrize the matrix in (26), however we note that here it is still in general nonsymmetric.

Linear systems (26) are solved inexactly using a preconditioned GMRES method. We refer to Appendix A for the details of evaluation of the right-hand side and of the matrix-vector product, and to [18] for a discussion of GMRES in a related context.

5.1 Inexact Newton iteration

As in [19], we consider a line-search modification of this method following [23, Algorithm 11.4] in order to improve global convergence behavior of Newton iteration. Denoting

v¯(n)=[(v¯Re(n))T,(v¯Im(n))T]Tandλ¯(n)=[(λ¯Re(n))T,(λ¯Im(n))T]T,\bar{v}^{(n)}=[(\bar{v}_{\operatorname{Re}}^{(n)})^{T},(\bar{v}_{\operatorname{Im}}^{(n)})^{T}]^{T}\quad\text{and}\quad\bar{\lambda}^{(n)}=[(\bar{\lambda}_{\operatorname{Re}}^{(n)})^{T},(\bar{\lambda}_{\operatorname{Im}}^{(n)})^{T}]^{T},

we define the merit function as the sum of squares,

f(v¯(n),λ¯(n))=12r^(v¯(n),λ¯(n))22,where r^(v¯(n),λ¯(n))=[F(n)12G(n)],f(\bar{v}^{(n)},\bar{\lambda}^{(n)})=\frac{1}{2}\|{\widehat{r}}(\bar{v}^{(n)},\bar{\lambda}^{(n)})\|_{2}^{2},\quad\text{where }\widehat{r}(\bar{v}^{(n)},\bar{\lambda}^{(n)})=\begin{bmatrix}F^{(n)}\\ -\frac{1}{2}G^{(n)}\end{bmatrix},

that is r^(v¯(n),λ¯(n))\widehat{r}(\bar{v}^{(n)},\bar{\lambda}^{(n)}) is the negative right-hand side of (26), i.e., it is a rescaled residual of (21), and we also denote

fn=f(v¯(n),λ¯(n)),r^=nr^(v¯(n),λ¯(n)),DJ^n=DJ^(v¯(n),λ¯(n)).f_{n}=f(\bar{v}^{(n)},\bar{\lambda}^{(n)}),\qquad\widehat{{r}}{{}_{n}=\widehat{r}(\bar{v}^{(n)},\bar{\lambda}^{(n)}),}\qquad\widehat{DJ}_{n}=\widehat{DJ}(\bar{v}^{(n)},\bar{\lambda}^{(n)}).

As the initial approximation of the solution, we use the eigenvectors and eigenvalues of the associated mean problem

K1([vRe(0)]1+i[vIm(0)]1)=([λRe(0)]1+i[λIm(0)]1)Mσ([vRe(0)]1+i[vIm(0)]1),K_{1}\left([v_{\operatorname{Re}}^{(0)}]_{1}+i[v_{\operatorname{Im}}^{(0)}]_{1}\right)=\left([\lambda_{\operatorname{Re}}^{(0)}]_{1}+i[\lambda_{\operatorname{Im}}^{(0)}]_{1}\right)M_{\sigma}\left([v_{\operatorname{Re}}^{(0)}]_{1}+i[v_{\operatorname{Im}}^{(0)}]_{1}\right), (28)

concatenated by zeros, that is

v¯(0)\displaystyle\bar{v}^{(0)} =[([vRe(0)]1)T,0,,([vIm(0)]1)T,0,]T,\displaystyle=\left[([v_{\operatorname{Re}}^{(0)}]_{1})^{T},0,\ldots,([v_{\operatorname{Im}}^{(0)}]_{1})^{T},0,\ldots\right]^{T},
λ¯(0)\displaystyle\bar{\lambda}^{(0)} =[[λRe(0)]1,0,,[λIm(0)]1,0,]T,\displaystyle=\left[[\lambda_{\operatorname{Re}}^{(0)}]_{1},0,\ldots,[\lambda_{\operatorname{Im}}^{(0)}]_{1},0,\ldots\right]^{T},

and the initial residual is

r^0=[F(v¯(0),λ¯(0))12G(v¯(0))].\widehat{r}_{0}=\begin{bmatrix}F(\bar{v}^{(0)},\bar{\lambda}^{(0)})\\ -\frac{1}{2}G(\bar{v}^{(0)})\end{bmatrix}.

The line-search Newton method is summarized in our setting as Algorithm 1, and the choice of parametersρ~{}\rho andc~{}c in the numerical experiments is discussed in Section 7.

Algorithm 1 [23, Algorithm 11.4] Line-search Newton iteration
1:Given ρ,c(0,1)\rho,c\in(0,1), set α=1\alpha^{\ast}=1.
2:Set v¯(0)\bar{v}^{(0)} and λ¯(0)\bar{\lambda}^{(0)}.
3:for n=0,1,2,n=0,1,2,\ldots do
4:     DJ^npn=r^n\widehat{DJ}_{n}p_{n}=-\widehat{r}_{n} (Solve inexactly to find the Newton update pnp_{n}.)
5:     [δv¯(n)δλ¯(n)]=pn\begin{bmatrix}\delta\bar{v}^{(n)}\\ \delta\bar{\lambda}^{(n)}\end{bmatrix}=p_{n}
6:     αn=α\alpha_{n}=\alpha^{\ast}
7:     while  f(v¯(n)+αnδv¯(n),λ¯(n)+αnδλ¯(n))>fn+cαnfnTpnf(\bar{v}^{(n)}+\alpha_{n}\delta\bar{v}^{(n)},\bar{\lambda}^{(n)}+\alpha_{n}\delta\bar{\lambda}^{(n)})>f_{n}+c\,\alpha_{n}\nabla f_{n}^{T}p_{n} do
8:         αnραn\alpha_{n}\leftarrow\rho\,\alpha_{n}
9:     end while
10:     v¯(n+1)v¯(n)+αnδv¯(n)\bar{v}^{(n+1)}\leftarrow\bar{v}^{(n)}+\alpha_{n}\delta\bar{v}^{(n)}
11:     λ¯(n+1)λ¯(n)+αnδλ¯(n)\bar{\lambda}^{(n+1)}\leftarrow\bar{\lambda}^{(n)}+\alpha_{n}\delta\bar{\lambda}^{(n)}
12:     Check for convergence.
13:end for

The inexact iteration entails in each step a solution of the stochastic Galerkin linear system in Line 4 of Algorithm 1 given by (26) using a Krylov subspace method. We use preconditioned GMRES with the adaptive stopping criteria,

r^n+DJ^npn2r^n2<τr^2n1,\frac{\|\widehat{r}_{n}+\widehat{DJ}_{n}p_{n}\|_{2}}{\|\widehat{r}_{n}\|_{2}}<\tau\left\|\widehat{r}{{}_{n-1}}\right\|_{2}, (29)

where τ=101\tau=10^{-1}. The for-loop is terminated when the convergence check in Line 12 is satisfied; in our numerical experiments we check if r^n2<1010\left\|\widehat{r}_{n}\right\|_{2}<10^{-10}.

Our implementation of the solvers is based on the so-called matricized formulation, in which we make use of isomorphism between nxnξ\mathbb{R}^{n_{x}n_{\xi}} and nx×nξ\mathbb{R}^{n_{x}\times n_{\xi}} determined by the operators vec\operatorname{vec} and mat\operatorname{mat}: v¯=vec(V¯)\bar{v}=\operatorname{vec}(\bar{V}), V¯=mat\bar{V}=\operatorname{mat}(v¯)\bar{v}), where v¯nxnξ\bar{v}\in\mathbb{R}^{n_{x}n_{\xi}}, V¯nx×nξ\bar{V}\in\mathbb{R}^{n_{x}\times n_{\xi}}. The upper/lower case notation is assumed throughout the paper, so R¯=mat\bar{R}=\operatorname{mat}(r¯)\bar{r}), etc. Specifically, we define the matricized coefficients of the eigenvector expansion

V¯=mat(v¯)=[v1,v2,,vnξ]nx×nξ,\bar{V}=\operatorname{mat}(\bar{v})=\left[v_{1},v_{2},\ldots,v_{n_{\xi}}\right]\in\mathbb{R}^{n_{x}\times n_{\xi}}, (30)

where the column kk contains the coefficients associated with the basis functionψk~{}\psi_{k}. A detailed formulation of the GMRES in the matricized format can be found, e.g., in [18]. We only describe computation of the matrix-vector product (Appendix A), and in the next section we formulate several preconditioners.

5.2 Preconditioners for the Newton iteration

In order to allow for an efficient iterative solution of linear systems in Line 4 of Algorithm 1 given by (26) using a Krylov subspace method, it is necessary to provide a preconditioner. In this section, we adapt the mean-based preconditioner and two of the constraint preconditioners from [19] to the formulation with separated real and complex parts, and we write them in the matricized format. The idea can be motivated as follows. The preconditioners are based on approximations of the blocks in (45). The mean-based preconditioner is inspired by the approximation

[A¯00S¯],\left[\begin{array}[c]{cc}\overline{A}&0\\ 0&\overline{S}\end{array}\right],

where A¯[AReAIm]\overline{A}\approx\left[A_{\operatorname{Re}}\;A_{\operatorname{Im}}\right] and the Schur complement S¯12[CReCIm][AReAIm]1[BReBIm]\overline{S}\approx-\frac{1}{2}\left[C_{\operatorname{Re}}\;C_{\operatorname{Im}}\right]\left[A_{\operatorname{Re}}\;A_{\operatorname{Im}}\right]^{-1}\left[B_{\operatorname{Re}}\;B_{\operatorname{Im}}\right]. The constraint preconditioners are based on the approximation

[A¯B¯C¯0],\left[\begin{array}[c]{cc}\overline{A}&\overline{B}\\ \overline{C}&0\end{array}\right],

where B¯[BReBIm]\overline{B}\approx\left[B_{\operatorname{Re}}\;B_{\operatorname{Im}}\right] and C¯12[CReCIm]\overline{C}\approx-\frac{1}{2}\left[C_{\operatorname{Re}}\;C_{\operatorname{Im}}\right]. Next, considering the truncation of the series in (46)–(51) to the very first term, we get

A¯\displaystyle\overline{A} Inξ[K1λRe,1MσλIm,1MσλIm,1MσK1λRe,1Mσ] see left columns in (22)–(23) and (46)–(47),\displaystyle\approx I_{n_{\xi}}\otimes\left[\begin{array}[c]{cc}K_{1}-\lambda_{\operatorname{Re},1}M_{\sigma}&\lambda_{\operatorname{Im},1}M_{\sigma}\\ -\lambda_{\operatorname{Im},1}M_{\sigma}&K_{1}-\lambda_{\operatorname{Re},1}M_{\sigma}\end{array}\right]\text{ see left columns in (\ref{eq:jac_Fu_1})--(\ref{eq:jac_Fu_2}) and (\ref{eq:jac_A_Re})--(\ref{eq:jac_A_Im})},
B¯\displaystyle\overline{B} Inξ[MσvRe,1MσvIm,1MσvIm,1MσvRe,1] see right columns in (22)–(23) and (48)–(49),\displaystyle\approx I_{n_{\xi}}\otimes\left[\begin{array}[c]{cc}-M_{\sigma}v_{\operatorname{Re},1}&M_{\sigma}v_{\operatorname{Im},1}\\ -M_{\sigma}v_{\operatorname{Im},1}&-M_{\sigma}v_{\operatorname{Re},1}\end{array}\right]\text{ see right columns in~{}(\ref{eq:jac_Fu_1})--(\ref{eq:jac_Fu_2}) and (\ref{eq:jac_B_Re})--(\ref{eq:jac_B_Im}),}
C¯\displaystyle\overline{C} Inξ[vRe,1T0nx×10nx×1vIm,1T] see (24)–(25) and (50)–(51).\displaystyle\approx I_{n_{\xi}}\otimes\left[\begin{array}[c]{cc}-v_{\operatorname{Re},1}^{T}&0_{n_{x}\times 1}\\ 0_{n_{x}\times 1}&-v_{\operatorname{Im},1}^{T}\end{array}\right]\text{ see (\ref{eq:jac_Gl_1})--(\ref{eq:jac_Gl_2}) and (\ref{eq:jac_C_Re})--(\ref{eq:jac_C_Im}).}

The precise formulations are listed for the mean-based preconditioner as Algorithm 2 and for the constraint mean-based preconditioner as Algorithm 3. Finally, the constraint hierarchical Gauss-Seidel preconditioner is listed as Algorithm 4. It can be viewed as an extension of Algorithm 3, because the solves with stochastic Galerkin matrices (35) are used also in this preconditioner, but in addition the right-hand sides are updated using an idea inspired by Gauss-Seidel method in a for-loop over the degree of the gPC basis. Moreover, as proposed in [32], the matrix-vector multiplications, used in the setup of the right-hand sides can be truncated in the sense that in the summations, t=1,,nξt=1,\dots,n_{\xi} is replaced by ttt\in\mathcal{I}_{t}, where t={1,,nt}\mathcal{I}_{t}=\left\{1,\dots,n_{t}\right\} with nt=(mξ+ptpt)n_{t}=\binom{m_{\xi}+p_{t}}{p_{t}} for some ptpp_{t}\leq p, and in particular with pt=0p_{t}=0 the chGS preconditioner (Algorithm 4) reduces to the cMB preconditioner (Algorithm 3). We also note that, since the initial guess is zero in Algorithm 4, the multiplications by1~{}\mathcal{F}_{1} and d+1\mathcal{F}_{d+1} vanish from (36)–(37).

Algorithm 2 Mean-based preconditioner (MB)

The preconditioner MB:(R¯vRe,R¯vIm,R¯λRe,R¯λIm)(V¯vRe,V¯vIm,V¯λRe,V¯λIm)\mathcal{M}_{\text{MB}}:\left(\bar{R}^{v_{\operatorname{Re}}},\bar{R}^{v_{\operatorname{Im}}},\bar{R}^{\lambda_{\operatorname{Re}}},\bar{R}^{\lambda_{\operatorname{Im}}}\right)\longmapsto\left(\bar{V}^{v_{\operatorname{Re}}},\bar{V}^{v_{\operatorname{Im}}},\bar{V}^{\lambda_{\operatorname{Re}}},\bar{V}^{\lambda_{\operatorname{Im}}}\right) is defined as

MB[V¯vReV¯vImV¯λReV¯λIm]=[R¯vReR¯vImR¯λReR¯λIm].\mathcal{M}_{\text{MB}}\left[\begin{array}[c]{c}\bar{V}^{v_{\operatorname{Re}}}\\ \bar{V}^{v_{\operatorname{Im}}}\\ \bar{V}^{\lambda_{\operatorname{Re}}}\\ \bar{V}^{\lambda_{\operatorname{Im}}}\end{array}\right]=\left[\begin{array}[c]{c}\bar{R}^{v_{\operatorname{Re}}}\\ \bar{R}^{v_{\operatorname{Im}}}\\ \bar{R}^{\lambda_{\operatorname{Re}}}\\ \bar{R}^{\lambda_{\operatorname{Im}}}\end{array}\right]. (31)

Above

MB=[A~02nx×202×2nx[wRe(0)T0nx×10nx×1wIm(0)T]A~1[MσwRe(0)MσwIm(0)MσwIm(0)MσwRe(0)]],\mathcal{M}_{\text{MB}}=\left[\begin{array}[c]{cc}\widetilde{A}&0_{2n_{x}\times 2}\\ 0_{2\times 2n_{x}}&\left[\begin{array}[c]{cc}-w_{\operatorname{Re}}^{(0)T}&0_{n_{x}\times 1}\\ 0_{n_{x}\times 1}&-w_{\operatorname{Im}}^{(0)T}\end{array}\right]\widetilde{A}^{-1}\left[\begin{array}[c]{cc}-M_{\sigma}w_{\operatorname{Re}}^{(0)}&M_{\sigma}w_{\operatorname{Im}}^{(0)}\\ -M_{\sigma}w_{\operatorname{Im}}^{(0)}&-M_{\sigma}w_{\operatorname{Re}}^{(0)}\end{array}\right]\end{array}\right], (32)

where wRe(0)w_{\operatorname{Re}}^{(0)} and wIm(0)w_{\operatorname{Im}}^{(0)} are the real and imaginary components of eigenvector ww of the stencil (K1,Mσ)(K_{1},M_{\sigma}) with corresponding eigenvalue μ=μRe\mu=\mu_{\operatorname{Re}}+iμIm\mu_{\operatorname{Im}}, cf. (28), and

A~=[K1ϵReμReMσϵImμImMσϵImμImMσK1ϵReμReMσ],\widetilde{A}=\left[\begin{array}[c]{cc}K_{1}-\epsilon_{\operatorname{Re}}\mu_{\operatorname{Re}}M_{\sigma}&\epsilon_{\operatorname{Im}}\mu_{\operatorname{Im}}M_{\sigma}\\ -\epsilon_{\operatorname{Im}}\mu_{\operatorname{Im}}M_{\sigma}&K_{1}-\epsilon_{\operatorname{Re}}\mu_{\operatorname{Re}}M_{\sigma}\end{array}\right], (33)

with constants ϵRe\epsilon_{\operatorname{Re}}, ϵIm\epsilon_{\operatorname{Im}} further specified in the numerical experiments section.

Algorithm 3 Constraint mean-based preconditioner (cMB)

The preconditioner cMB:(R¯vRe,R¯vIm,R¯λRe,R¯λIm)(V¯vRe,V¯vIm,V¯λRe,V¯λIm)\mathcal{M}_{\text{cMB}}:\left(\bar{R}^{v_{\operatorname{Re}}},\bar{R}^{v_{\operatorname{Im}}},\bar{R}^{\lambda_{\operatorname{Re}}},\bar{R}^{\lambda_{\operatorname{Im}}}\right)\longmapsto\left(\bar{V}^{v_{\operatorname{Re}}},\bar{V}^{v_{\operatorname{Im}}},\bar{V}^{\lambda_{\operatorname{Re}}},\bar{V}^{\lambda_{\operatorname{Im}}}\right) is defined as

cMB[V¯vReV¯vImV¯λReV¯λIm]=[R¯vReR¯vImR¯λReR¯λIm].\mathcal{M}_{\text{cMB}}\left[\begin{array}[c]{c}\bar{V}^{v_{\operatorname{Re}}}\\ \bar{V}^{v_{\operatorname{Im}}}\\ \bar{V}^{\lambda_{\operatorname{Re}}}\\ \bar{V}^{\lambda_{\operatorname{Im}}}\end{array}\right]=\left[\begin{array}[c]{c}\bar{R}^{v_{\operatorname{Re}}}\\ \bar{R}^{v_{\operatorname{Im}}}\\ \bar{R}^{\lambda_{\operatorname{Re}}}\\ \bar{R}^{\lambda_{\operatorname{Im}}}\end{array}\right]. (34)

Above

cMB=[A~MσwRe(0)MσwIm(0)MσwIm(0)MσwRe(0)wRe(0)T0nx×10nx×1wIm(0)T02×2],\mathcal{M}_{\text{cMB}}=\left[\begin{array}[c]{cc}\widetilde{A}&\begin{array}[c]{cc}-M_{\sigma}w_{\operatorname{Re}}^{(0)}&M_{\sigma}w_{\operatorname{Im}}^{(0)}\\ -M_{\sigma}w_{\operatorname{Im}}^{(0)}&-M_{\sigma}w_{\operatorname{Re}}^{(0)}\end{array}\\ \begin{array}[c]{cc}-w_{\operatorname{Re}}^{(0)T}&0_{n_{x}\times 1}\\ 0_{n_{x}\times 1}&-w_{\operatorname{Im}}^{(0)T}\end{array}&0_{2\times 2}\end{array}\right], (35)

with wRe(0)w_{\operatorname{Re}}^{(0)}, wIm(0)w_{\operatorname{Im}}^{(0)} and A~\widetilde{A} set as in Algorithm 2.

Algorithm 4 Constraint hierarchical Gauss-Seidel preconditioner (chGS)

The preconditioner MchGS:(R¯vRe,R¯vIm,R¯λRe,R¯λIm)(V¯vRe,V¯vIm,V¯λRe,V¯λIm)M_{\text{chGS}}:\left(\bar{R}^{v_{\operatorname{Re}}},\bar{R}^{v_{\operatorname{Im}}},\bar{R}^{\lambda_{\operatorname{Re}}},\bar{R}^{\lambda_{\operatorname{Im}}}\right)\longmapsto\left(\bar{V}^{v_{\operatorname{Re}}},\bar{V}^{v_{\operatorname{Im}}},\bar{V}^{\lambda_{\operatorname{Re}}},\bar{V}^{\lambda_{\operatorname{Im}}}\right) is defined as follows.

1:Set the initial solution (V¯vRe,V¯vIm,V¯λRe,V¯λIm)\left(\bar{V}^{v_{\text{Re}}},\bar{V}^{v_{\text{Im}}},\bar{V}^{\lambda_{\text{Re}}},\bar{V}^{\lambda_{\text{Im}}}\right) to zero and update as:
2:Solve
cMB(V1vReV1vImV1λReV1λIm)=[R1vReR1vImR1λReR1λIm]1(V(2:nξ)vReV(2:nξ)vImV(2:nξ)λReV(2:nξ)λIm),\mathcal{M}_{\text{cMB}}\left(\begin{array}[]{c}V_{1}^{v_{\text{Re}}}\\ V_{1}^{v_{\text{Im}}}\\ V_{1}^{\lambda_{\text{Re}}}\\ V_{1}^{\lambda_{\text{Im}}}\end{array}\right)=\left[\begin{array}[]{c}R_{1}^{v_{\text{Re}}}\\ R_{1}^{v_{\text{Im}}}\\ R_{1}^{\lambda_{\text{Re}}}\\ R_{1}^{\lambda_{\text{Im}}}\end{array}\right]-\mathcal{F}_{1}\left(\begin{array}[]{c}V_{\left(2:n_{\xi}\right)}^{v_{\text{Re}}}\\ V_{\left(2:n_{\xi}\right)}^{v_{\text{Im}}}\\ V_{\left(2:n_{\xi}\right)}^{\lambda_{\text{Re}}}\\ V_{\left(2:n_{\xi}\right)}^{\lambda_{\text{Im}}}\end{array}\right), (36)
where cMB\mathcal{M}_{\text{cMB}} is set as in Algorithm 3, and
1(V1vReV1vImV1λReV1λIm)=tt[1A[ht,(2:nξ)(1)]1B[ht,(2:nξ)(1)](vRe,t(n))TV(2:nξ)vRe[ht,(2:nξ)(1)](vIm,t(n))TV(2:nξ)vIm[ht,(2:nξ)(1)]],\mathcal{F}_{1}\left(\begin{array}[c]{c}V_{1}^{v_{\text{Re}}}\\ \vspace{-3mm}\hfil\\ V_{1}^{v_{\text{Im}}}\\ \vspace{-3mm}\hfil\\ V_{1}^{\lambda_{\text{Re}}}\\ \vspace{-3mm}\hfil\\ V_{1}^{\lambda_{\text{Im}}}\end{array}\right)=\!\sum_{t\in\mathcal{I}_{t}}\!\left[\!\!\begin{array}[c]{c}\mathcal{F}_{1}^{A}\left[h_{t,\left(2:n_{\xi}\right)\left(1\right)}\right]\\ \vspace{-3mm}\hfil\\ \mathcal{F}_{1}^{B}\left[h_{t,\left(2:n_{\xi}\right)\left(1\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Re},t}^{(n)})^{T}V_{\left(2:n_{\xi}\right)}^{v_{\text{Re}}}\left[h_{t,\left(2:n_{\xi}\right)\left(1\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Im},t}^{(n)})^{T}V_{\left(2:n_{\xi}\right)}^{v_{\text{Im}}}\left[h_{t,\left(2:n_{\xi}\right)\left(1\right)}\right]\end{array}\!\!\right],
1A\displaystyle\mathcal{F}_{1}^{A} =((KtλRe,t(n)Mσ)V(2:nξ)vRe+λIm,t(n)MσV(2:nξ)vImvRe,t(n)MσV(2:nξ)λRe+vIm,t(n)MσV(2:nξ)λIm),\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(2:n_{\xi}\right)}^{v_{\text{Re}}}\!+\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(2:n_{\xi}\right)}^{v_{\text{Im}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(2:n_{\xi}\right)}^{\lambda_{\text{Re}}}\!+\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(2:n_{\xi}\right)}^{\lambda_{\text{Im}}}\!\right),
1B\displaystyle\mathcal{F}_{1}^{B} =((KtλRe,t(n)Mσ)V(2:nξ)vImλIm,t(n)MσV(2:nξ)vRevRe,t(n)MσV(2:nξ)λImvIm,t(n)MσV(2:nξ)λRe),\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(2:n_{\xi}\right)}^{v_{\text{Im}}}\!-\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(2:n_{\xi}\right)}^{v_{\text{Re}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(2:n_{\xi}\right)}^{\lambda_{\text{Im}}}\!-\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(2:n_{\xi}\right)}^{\lambda_{\text{Re}}}\!\right),
and vRe,t(n)v_{\text{Re},t}^{(n)}, vIm,t(n)v_{\text{Im},t}^{(n)} the ttth gPC coefficients of eigenvector v(n)v^{(n)} at step nn of Algorithm 1.
3:for d=1,,p1d=1,\ldots,p-1 do
4:     Set =(n+1:nu), where n=(nξ+d1d1) and nu=(nξ+dd)\ell=\left(n_{\ell}+1:n_{u}\right),\text{ where }n_{\ell}=\binom{n_{\xi}+d-1}{d-1}\text{ and }n_{u}=\binom{n_{\xi}+d}{d}.
5:     Solve
cMB(V()vReV()vImV()λReV()λIm)=[R()vReR()vImR()λReR()λIm]d+1(V(1:n)vReV(1:n)vImV(1:n)λReV(1:n)λIm)d+1(V(nu+1:nξ)vReV(nu+1:nξ)vImV(nu+1:nξ)λReV(nu+1:nξ)λIm),\mathcal{M}_{\text{cMB}}\left(\begin{array}[]{c}V_{\left(\ell\right)}^{v_{\text{Re}}}\\ V_{\left(\ell\right)}^{v_{\text{Im}}}\\ V_{\left(\ell\right)}^{\lambda_{\text{Re}}}\\ V_{\left(\ell\right)}^{\lambda_{\text{Im}}}\end{array}\right)=\left[\begin{array}[]{c}R_{\left(\ell\right)}^{v_{\text{Re}}}\\ R_{\left(\ell\right)}^{v_{\text{Im}}}\\ R_{\left(\ell\right)}^{\lambda_{\text{Re}}}\\ R_{\left(\ell\right)}^{\lambda_{\text{Im}}}\end{array}\right]-\mathcal{E}_{d+1}\left(\begin{array}[]{c}V_{(1:n_{\ell})}^{v_{\text{Re}}}\\ V_{(1:n_{\ell})}^{v_{\text{Im}}}\\ V_{(1:n_{\ell})}^{\lambda_{\text{Re}}}\\ V_{(1:n_{\ell})}^{\lambda_{\text{Im}}}\end{array}\right)-\mathcal{F}_{d+1}\left(\begin{array}[]{c}V_{(n_{u}+1:n_{\xi})}^{v_{\text{Re}}}\\ V_{(n_{u}+1:n_{\xi})}^{v_{\text{Im}}}\\ V_{(n_{u}+1:n_{\xi})}^{\lambda_{\text{Re}}}\\ V_{(n_{u}+1:n_{\xi})}^{\lambda_{\text{Im}}}\end{array}\right), (37)
where
d+1(V(1:n)vReV(1:n)vImV(1:n)λReV(1:n)λIm)\displaystyle\mathcal{E}_{d+1}\left(\!\!\!\begin{array}[c]{c}V_{(1:n_{\ell})}^{v_{\text{Re}}}\\ V_{(1:n_{\ell})}^{v_{\text{Im}}}\\ V_{(1:n_{\ell})}^{\lambda_{\text{Re}}}\\ V_{(1:n_{\ell})}^{\lambda_{\text{Im}}}\end{array}\!\!\!\right)\! =tt[d+1A[ht,(1:n)()]d+1B[ht,(1:n)()](vRe,t(n))TV(1:n)vRe[ht,(1:n)()](vIm,t(n))TV(1:n)vIm[ht,(1:n)()]],\displaystyle=\!\sum_{t\in\mathcal{I}_{t}}\!\!\left[\!\!\begin{array}[c]{c}\mathcal{E}_{d+1}^{A}\left[h_{t,\left(1:n_{\ell}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ \mathcal{E}_{d+1}^{B}\left[h_{t,\left(1:n_{\ell}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Re},t}^{(n)})^{T}V_{\left(1:n_{\ell}\right)}^{v_{\text{Re}}}\left[h_{t,\left(1:n_{\ell}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Im},t}^{(n)})^{T}V_{\left(1:n_{\ell}\right)}^{v_{\text{Im}}}\left[h_{t,\left(1:n_{\ell}\right)\left(\ell\right)}\right]\end{array}\!\!\right],
d+1(V(nu+1:nξ)vReV(nu+1:nξ)vImV(nu+1:nξ)λReV(nu+1:nξ)λIm)\displaystyle\mathcal{F}_{d+1}\left(\!\!\!\begin{array}[c]{c}V_{(n_{u}+1:n_{\xi})}^{v_{\text{Re}}}\\ V_{(n_{u}+1:n_{\xi})}^{v_{\text{Im}}}\\ V_{(n_{u}+1:n_{\xi})}^{\lambda_{\text{Re}}}\\ V_{(n_{u}+1:n_{\xi})}^{\lambda_{\text{Im}}}\end{array}\!\!\!\right)\! =tt[d+1A[ht,(nu+1:nξ)()]d+1B[ht,(nu+1:nξ)()](vRe,t(n))TV(nu+1:nξ)vRe[ht,(nu+1:nξ)()](vIm,t(n))TV(nu+1:nξ)vIm[ht,(nu+1:nξ)()]],\displaystyle=\!\sum_{t\in\mathcal{I}_{t}}\!\!\left[\!\begin{array}[c]{c}\mathcal{F}_{d+1}^{A}\left[h_{t,\left(n_{u}+1:n_{\xi}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ \mathcal{F}_{d+1}^{B}\left[h_{t,\left(n_{u}+1:n_{\xi}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Re},t}^{(n)})^{T}V_{\left(n_{u}+1:n_{\xi}\right)}^{v_{\text{Re}}}\left[h_{t,\left(n_{u}+1:n_{\xi}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Im},t}^{(n)})^{T}V_{\left(n_{u}+1:n_{\xi}\right)}^{v_{\text{Im}}}\left[h_{t,\left(n_{u}+1:n_{\xi}\right)\left(\ell\right)}\right]\end{array}\!\!\right],
d+1A\displaystyle\mathcal{E}_{d+1}^{A} =((KtλRe,t(n)Mσ)V(1:n)vRe+λIm,t(n)MσV(1:n)vImvRe,t(n)MσV(1:n)λRe+vIm,t(n)MσV(1:n)λIm),\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(1:n_{\ell}\right)}^{v_{\text{Re}}}\!+\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{\ell}\right)}^{v_{\text{Im}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{\ell}\right)}^{\lambda_{\text{Re}}}\!+\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{\ell}\right)}^{\lambda_{\text{Im}}}\!\right),
d+1B\displaystyle\mathcal{E}_{d+1}^{B} =((KtλRe,t(n)Mσ)V(1:n)vImλIm,t(n)MσV(1:n)vRevRe,t(n)MσV(1:n)λImvIm,t(n)MσV(1:n)λRe),\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(1:n_{\ell}\right)}^{v_{\text{Im}}}\!-\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{\ell}\right)}^{v_{\text{Re}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{\ell}\right)}^{\lambda_{\text{Im}}}\!-\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{\ell}\right)}^{\lambda_{\text{Re}}}\!\right),
d+1A\displaystyle\mathcal{F}_{d+1}^{A} =((KtλRe,t(n)Mσ)V(nu+1:nξ)vRe+λIm,t(n)MσV(nu+1:nξ)vImvRe,t(n)MσV(nu+1:nξ)λRe+vIm,t(n)MσV(nu+1:nξ)λIm),\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(n_{u}+1:n_{\xi}\right)}^{v_{\text{Re}}}\!+\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(n_{u}+1:n_{\xi}\right)}^{v_{\text{Im}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(n_{u}+1:n_{\xi}\right)}^{\lambda_{\text{Re}}}\!+\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(n_{u}+1:n_{\xi}\right)}^{\lambda_{\text{Im}}}\!\right),
d+1B\displaystyle\mathcal{F}_{d+1}^{B} =((KtλRe,t(n)Mσ)V(nu+1:nξ)vImλIm,t(n)MσV(nu+1:nξ)vRevRe,t(n)MσV(nu+1:nξ)λImvIm,t(n)MσV(nu+1:nξ)λRe).\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(n_{u}+1:n_{\xi}\right)}^{v_{\text{Im}}}\!-\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(n_{u}+1:n_{\xi}\right)}^{v_{\text{Re}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(n_{u}+1:n_{\xi}\right)}^{\lambda_{\text{Im}}}\!-\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(n_{u}+1:n_{\xi}\right)}^{\lambda_{\text{Re}}}\!\right).
6:end for
Algorithm 5 Constraint hierarchical Gauss-Seidel preconditioner (chGS), continued
7:Set =(nu+1:nξ)\ell=\left(n_{u}+1:n_{\xi}\right).
8:Solve
cMB(V()vReV()vImV()λReV()λIm)=[R()vReR()vImR()λReR()λIm]p+1(V(1:nu)vReV(1:nu)vImV(1:nu)λReV(1:nu)λIm),\mathcal{M}_{\text{cMB}}\left(\begin{array}[c]{c}V_{(\ell)}^{v_{\text{Re}}}\\ V_{(\ell)}^{v_{\text{Im}}}\\ V_{(\ell)}^{\lambda_{\text{Re}}}\\ V_{(\ell)}^{\lambda_{\text{Im}}}\end{array}\right)=\left[\begin{array}[c]{c}R_{(\ell)}^{v_{\text{Re}}}\\ R_{(\ell)}^{v_{\text{Im}}}\\ R_{(\ell)}^{\lambda_{\text{Re}}}\\ R_{(\ell)}^{\lambda_{\text{Im}}}\end{array}\right]-\mathcal{E}_{p+1}\left(\begin{array}[c]{c}V_{(1:n_{u})}^{v_{\text{Re}}}\\ V_{(1:n_{u})}^{v_{\text{Im}}}\\ V_{(1:n_{u})}^{\lambda_{\text{Re}}}\\ V_{(1:n_{u})}^{\lambda_{\text{Im}}}\end{array}\right),
where
p+1(V(1:nu)vReV(1:nu)vImV(1:nu)λReV(1:nu)λIm)=tt[p+1A[ht,(1:nu)()]p+1B[ht,(1:nu)()](vRe,t(n))TV(1:nu)vRe[ht,(1:nu)()](vIm,t(n))TV(1:nu)vIm[ht,(1:nu)()]],\mathcal{E}_{p+1}\left(\begin{array}[c]{c}V_{(1:n_{u})}^{v_{\text{Re}}}\\ V_{(1:n_{u})}^{v_{\text{Im}}}\\ V_{(1:n_{u})}^{\lambda_{\text{Re}}}\\ V_{(1:n_{u})}^{\lambda_{\text{Im}}}\end{array}\right)=\sum_{t\in\mathcal{I}_{t}}\left[\!\!\begin{array}[c]{c}\mathcal{E}_{p+1}^{A}\left[h_{t,\left(1:n_{u}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ \mathcal{E}_{p+1}^{B}\left[h_{t,\left(1:n_{u}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Re},t}^{(n)})^{T}V_{\left(1:n_{u}\right)}^{v_{\text{Re}}}\left[h_{t,\left(1:n_{u}\right)\left(\ell\right)}\right]\\ \vspace{-3mm}\hfil\\ -(v_{\text{Im},t}^{(n)})^{T}V_{\left(1:n_{u}\right)}^{v_{\text{Im}}}\left[h_{t,\left(1:n_{u}\right)\left(\ell\right)}\right]\end{array}\!\!\right],
p+1A\displaystyle\mathcal{E}_{p+1}^{A} =((KtλRe,t(n)Mσ)V(1:nu)vRe+λIm,t(n)MσV(1:nu)vImvRe,t(n)MσV(1:nu)λRe+vIm,t(n)MσV(1:nu)λIm),\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(1:n_{u}\right)}^{v_{\text{Re}}}\!+\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{u}\right)}^{v_{\text{Im}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{u}\right)}^{\lambda_{\text{Re}}}\!+\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{u}\right)}^{\lambda_{\text{Im}}}\!\right),
p+1B\displaystyle\mathcal{E}_{p+1}^{B} =((KtλRe,t(n)Mσ)V(1:nu)vImλIm,t(n)MσV(1:nu)vRevRe,t(n)MσV(1:nu)λImvIm,t(n)MσV(1:nu)λRe).\displaystyle=\left(\left(\!K_{t}\!-\!\lambda_{\text{Re},t}^{(n)}M_{\sigma}\!\right)\!V_{\left(1:n_{u}\right)}^{v_{\text{Im}}}\!-\!\lambda_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{u}\right)}^{v_{\text{Re}}}\!\!-\!v_{\text{Re},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{u}\right)}^{\lambda_{\text{Im}}}\!-\!v_{\text{Im},t}^{(n)}M_{\sigma}\!V_{\left(1:n_{u}\right)}^{\lambda_{\text{Re}}}\!\right).
9:for d=p1,,1d=p-1,\ldots,1 do
10:     Set =(n+1:nu), where n=(nξ+d1d1) and nu=(nξ+dd)\ell=\left(n_{\ell}+1:n_{u}\right),\text{ where }n_{\ell}=\binom{n_{\xi}+d-1}{d-1}\text{ and }n_{u}=\binom{n_{\xi}+d}{d}.
11:     Solve (37).
12:end for
13:Solve (36).

5.2.1 Updating the constraint preconditioner

It is also possible to update the application of the constraint mean-based preconditioner in order to incorporate the latest approximations of the eigenvector mean coefficients represented by the vectorswRe/Im(n)~{}w_{\operatorname{Re}/\operatorname{Im}}^{(n)} in (35). Suppose the inverse of the matrixcMB~{}\mathcal{M}_{\text{cMB}} from (35) for n=0n=0 is available, e.g., as the LU decomposition. That is, we have the preconditioner for the initial step of the Newton iteration, and let us denote its application by X1X^{-1}. Specifically, X1=U1L1X^{-1}=U^{-1}L^{-1}, where LL and UU are the factors ofcMB~{}\mathcal{M}_{\text{cMB}}. Next, let us consider two matrices YY and ZZ such that

YZT=[02nx×2nxMσΔwRe(n)MσΔwIm(n)MσΔwIm(n)MσΔwRe(n)ΔwRe(n)0nx×10nx×1ΔwIm(n)02×2],YZ^{T}=\left[\begin{array}[c]{cc}0_{2n_{x}\times 2n_{x}}&\begin{array}[c]{cc}-M_{\sigma}\Delta w_{\operatorname{Re}}^{(n)}&M_{\sigma}\Delta w_{\operatorname{Im}}^{(n)}\\ -M_{\sigma}\Delta w_{\operatorname{Im}}^{(n)}&-M_{\sigma}\Delta w_{\operatorname{Re}}^{(n)}\end{array}\\ \begin{array}[c]{cc}-\Delta w_{\operatorname{Re}}^{(n)}&0_{n_{x}\times 1}\\ 0_{n_{x}\times 1}&-\Delta w_{\operatorname{Im}}^{(n)}\end{array}&0_{2\times 2}\end{array}\right], (38)

where

ΔwRe(n)=wRe(n)wRe(0),ΔwIm(n)=wIm(n)wIm(0).\Delta w_{\operatorname{Re}}^{(n)}=w_{\operatorname{Re}}^{(n)}-w_{\operatorname{Re}}^{(0)},\qquad\Delta w_{\operatorname{Im}}^{(n)}=w_{\operatorname{Im}}^{(n)}-w_{\operatorname{Im}}^{(0)}.

Specifically, YZTYZ^{T} is the rank4~{}4 update of the preconditioner at stepn~{}n of Newton iteration, and the matrices YY and ZZ can be computed using a sparse SVD, which is available, e.g., in [20]. In implementation, using Matlab notation with YZT=𝚈𝚉𝚝YZ^{T}=\mathtt{\mathtt{YZt}}, we compute [𝚄,𝚂,𝚅]=𝚜𝚟𝚍𝚜(𝚈𝚉𝚝,𝟺)\mathtt{[U,S,V]=svds(\mathtt{YZt,4})} and set Y=𝚄𝚂Y=\mathtt{U\ast S}, ZT=𝚅Z^{T}=\mathtt{\mathtt{V}}^{\prime}. Finally, a solve cMBv=u\mathcal{M}_{\text{cMB}}v=u at stepn~{}n of Newton iteration may be facilitated using the Sherman-Morrison-Woodbury formula see, e.g. [14], or [22, Section 3.8], as

v=(X+YZT)1u=(X1X1Y(I+ZTX1Y)1ZTX1)u.v=\left(X+YZ^{T}\right)^{-1}u=\left(X^{-1}-X^{-1}Y\left(I+Z^{T}X^{-1}Y\right)^{-1}Z^{T}X^{-1}\right)u.

6 Bifurcation analysis of Navier–Stokes equations with stochastic viscosity

Here, we follow the setup from [30] and assume that the viscosityν~{}\nu is given by a stochastic expansion

ν(x,ξ)==1nνν(x)ψ(ξ),\nu(x,\xi)=\sum_{\ell=1}^{n_{\nu}}\nu_{\ell}(x)\,\psi_{\ell}(\xi), (39)

where {ν(x)}\left\{\nu_{\ell}(x)\right\} is a set of given deterministic spatial functions. We note that there are several possible interpretations of such setup [24, 30]. Assuming fixed geometry, the stochastic viscosity is equivalent to Reynolds number being stochastic and, for example, to a scenario when the volume of fluid moving into a channel is uncertain. Consider the discretization of (3) by a div-stable mixed finite element method, and let the bases for the velocity and pressure spaces be denoted {ϕi}i=1nu\left\{\phi_{i}\right\}_{i=1}^{n_{u}} and {φj}i=1np\left\{\varphi_{j}\right\}_{i=1}^{n_{p}}, respectively. We further assume that we have a discrete approximation of the steady-state solution of the stochastic counterpart of (3), given as333Techniques for computing these approximations were studied in [18, 30].

u(x,ξ)\displaystyle\vec{u}(x,\xi) k=1nξi=1nuuikϕi(x)ψk(ξ)=k=1nξuk(x)ψk(ξ),\displaystyle{\color[rgb]{0,0,0}\approx}\sum_{k=1}^{n_{\xi}}\sum_{i=1}^{n_{u}}u_{ik}\phi_{i}(x)\psi_{k}(\xi)=\sum_{k=1}^{n_{\xi}}\vec{u}_{k}(x)\psi_{k}(\xi),
p(x,ξ)\displaystyle p(x,\xi) k=1nξj=1nppjkφj(x)ψk(ξ)=k=1nξpk(x)ψk(ξ).\displaystyle{\color[rgb]{0,0,0}\approx}\sum_{k=1}^{n_{\xi}}\sum_{j=1}^{n_{p}}p_{jk}\varphi_{j}(x)\psi_{k}(\xi)=\sum_{k=1}^{n_{\xi}}p_{k}(x)\psi_{k}(\xi).

We are interested in a stochastic counterpart of the generalized eigenvalue problem (2), which we write as

𝒥(ξ)v=λMσv,\mathcal{J(\xi)}v=\lambda M_{\sigma}v, (40)

whereMσ~{}M_{\sigma} is the deterministic (shifted) mass matrix from (5), and 𝒥(ξ)\mathcal{J(\xi)} is the stochastic Jacobian matrix operator given by the stochastic expansion

𝒥(ξ)==1n^𝒥ψ(ξ).\mathcal{J(\xi)=}\sum_{\ell=1}^{\widehat{n}}\mathcal{J}_{\ell}\psi_{\ell}(\xi). (41)

The expansion is built from matrices 𝒥nx×nx\mathcal{J}_{\ell}\in\mathbb{R}^{n_{x}\times n_{x}}, =1,,n^\ell=1,\dots,\widehat{n}, such that

𝒥1=[F1BTB0],𝒥=[F000],=2,,n^,\mathcal{J}_{1}=\left[\begin{array}[c]{cc}F_{1}&B^{T}\\ B&0\end{array}\right],\qquad\mathcal{J}_{\ell}=\left[\begin{array}[c]{cc}F_{\ell}&0\\ 0&0\end{array}\right],\qquad\ell=2,\dots,\widehat{n},

where n^=max(nν,nξ)\widehat{n}=\max\left(n_{\nu},n_{\xi}\right), and FF_{\ell} is a sum of the vector-Laplacian matrixA~{}A_{\ell}, the vector-convection matrixN~{}N_{\ell}, and the Newton derivative matrix WW_{\ell},

F=A+N+W,F_{\ell}=A_{\ell}+N_{\ell}+W_{\ell},

where

A\displaystyle A_{\ell} =[a,ab],a,ab=Dν(x)ϕb:ϕa,=1,,nν,\displaystyle=\left[a_{\ell,ab}\right],\qquad a_{\ell,ab}=\int_{D}\nu_{\ell}(x)\,\nabla\phi_{b}:\nabla\phi_{a},\qquad\ell=1,\dots,n_{\nu},
N\displaystyle N_{\ell} =[n,ab],n,ab=D(uϕb)ϕa,=1,,nξ,\displaystyle=\left[n_{\ell,ab}\right],\qquad n_{\ell,ab}=\int_{D}\left(\vec{u}_{\ell}\cdot\nabla\phi_{b}\right)\cdot\phi_{a},\qquad\ell=1,\dots,n_{\xi},
W\displaystyle W_{\ell} =[w,ab],w,ab=D(ϕbu)ϕa,=1,,nξ,\displaystyle=\left[w_{\ell,ab}\right],\qquad w_{\ell,ab}=\int_{D}\left(\phi_{b}\cdot\nabla\vec{u}_{\ell}\right)\cdot\phi_{a},\qquad\ell=1,\dots,n_{\xi},

and if nν>nξn_{\nu}>n_{\xi}, we set N=W=0N_{\ell}=W_{\ell}=0 for =nξ+1,,nν\ell=n_{\xi+1},\dots,n_{\nu}, and if nν<nξn_{\nu}<n_{\xi}, we set A=0A_{\ell}=0 for =nν+1,,nξ\ell=n_{\nu+1},\dots,n_{\xi}. In the numerical experiments, we use the stochastic Galerkin method from [30] to calculate the terms u\vec{u}_{\ell} for the construction of the matrices NN_{\ell}. The divergence matrix BB is defined as

B=[bcd],bcd=Dφc(ϕd),B=\left[b_{cd}\right],\qquad b_{cd}=-\int_{D}\varphi_{c}\left(\nabla\cdot\phi_{d}\right),

and the velocity mass matrix GG is defined as

G=[gab],gab=Dϕbϕa.G=\left[g_{ab}\right],\qquad g_{ab}=\int_{D}\phi_{b}\,\phi_{a}.

7 Numerical experiments

We implemented the method in Matlab using IFISS 3.5 package [7], and we tested the algorithms using two benchmark problems: flow around an obstacle and an expansion flow around a symmetric step. The stochastic Galerkin methods were used to solve both the Navier–Stokes problem (see [18, 30] for full description) and the eigenvalue problem (9), which was solved using the inexact Newton iteration from Section 5. The sampling methods (Monte Carlo and stochastic collocation) entail generating a set of sample viscosities from (39), and for each sample solving a deterministic steady-state Navier–Stokes equation followed by a solution of a deterministic eigenvalue problem (13) with a matrix operator corresponding to sampled Jacobian matrix operator (41), where the deterministic eigenvalue problems at sample points were solved using function eigs in Matlab. For the solution of the Navier–Stokes equation, in both sampling and stochastic Galerkin methods, we used a hybrid strategy in which an initial approximation was obtained from solution of the stochastic Stokes problem, after which several steps of Picard iteration were used to improve the solution, followed by Newton iteration. A convergent iteration stopped when the Euclidean norm of the algebraic residual was smaller than 10810^{-8}, see [30] for more details. Also, when replacing the mass matrixM~{}M by the shifted mass matrixMσ~{}M_{\sigma}, see (4) and (5), we set σ=102\sigma=-10^{-2} as in [6]. The 300300 eigenvalues with the largest real part of the deterministic eigenvalue problem with mean viscosity ν1\nu_{1} for each of the two examples are displayed in Figure 1.

Refer to caption Refer to caption
Fig. 1: The 300300 eigenvalues with the largest real part of the matrices K1K_{1} for the two examples: flow around an obstacle (left) and expansion flow around a symmetric step (right). The rightmost eigenvalues are indicated by a red cross.

7.1 Flow around an obstacle

For the first example, we considered flow around an obstacle in a similar setup as studied in [30]. The domain of the channel and the discretization are shown in Figure 2. The spatial discretization used a stretched grid with 10081008 Q2{}_{2}-Q1 finite elements. We note that these elements are referred to as Taylor-Hood in the literature. There were 84168416 velocity and 10961096 pressure degrees of freedom. The viscosityν(x,ξ)~{}\nu(x,\xi) was taken to be a truncated lognormal process transformed from the underlying Gaussian process [11]. That is, ψ(ξ)\psi_{\ell}(\xi), =1,,nν\ell=1,\dots,n_{\nu}, is a set of Hermite polynomials and, denoting the coefficients of the Karhunen-Loève expansion of the Gaussian process bygj(x)~{}g_{j}(x) and ηj=ξjgj,\eta_{j}=\xi_{j}-g_{j}, j=1,,mξj=1,\dots,m_{\xi}, the coefficients in expansion (39) were computed as

ν(x)=𝔼[ψ(η)]𝔼[ψ2(η)]exp[g0+12j=1mξ(gj(x))2].\nu_{\ell}(x)=\frac{\mathbb{E}\left[\psi_{\ell}(\eta)\right]}{\mathbb{E}\left[\psi_{\ell}^{2}(\eta)\right]}\exp\left[g_{0}+\frac{1}{2}\sum_{j=1}^{m_{\xi}}\left(g_{j}(x)\right)^{2}\right].

The covariance function of the Gaussian field, for points X1=(x1,y1)X_{1}=(x_{1},y_{1}) and X2=(x2,y2)X_{2}=(x_{2},y_{2}) inD~{}D, was chosen to be

C(X1,X2)=σg2exp(|x2x1|Lx|y2y1|Ly),C\left(X_{1},X_{2}\right)=\sigma_{g}^{2}\exp\left(-\frac{\left|x_{2}-x_{1}\right|}{L_{x}}-\frac{\left|y_{2}-y_{1}\right|}{L_{y}}\right), (42)

whereLx~{}L_{x} and LyL_{y} are the correlation lengths of the random variables ξi\xi_{i}, i=1,,mξi=1,\dots,m_{\xi}, in the xx and yy directions, respectively, and σg\sigma_{g} is the standard deviation of the Gaussian random field. The correlation lengths were set to be equal to 25%25\% of the width and height of the domain. The coefficient of variation CoVCoV of the lognormal field, defined as CoV=σν/ν1CoV=\sigma_{\nu}/\nu_{1}, where σν\sigma_{\nu} is the standard deviation and ν1\nu_{1} is the mean viscosity, was 1%1\% or 10%10\%. The viscosity (39) was parameterized using mξ=2m_{\xi}=2 random variables. According to [21], in order to guarantee a complete representation of the lognormal process by (39), the degree of polynomial expansion of ν(x,ξ)\nu(x,\xi) should be twice the degree of the expansion of the solution. We followed the same strategy here. Therefore, the values of nξn_{\xi} and nνn_{\nu} are, cf., e.g. [12, p. 87] or [33, Section 5.2], nξ=(mξ+p)!mξ!p!n_{\xi}=\frac{\left(m_{\xi}+p\right)!}{m_{\xi}!p!}, nν=(mξ+2p)!mξ!(2p)!n_{\nu}=\frac{\left(m_{\xi}+2p\right)!}{m_{\xi}!\left(2p\right)!}. For the gPC expansion of eigenvalues/eigenvectors (11), the maximal degree of gPC expansion is p=3p=3, so then nξ=10n_{\xi}=10 and nν=28n_{\nu}=28. We used 1×1031\times 10^{3} samples for the Monte Carlo method and Smolyak sparse grid with Gauss-Hermite quadrature points and grid level4~{}4 for collocation see, e.g., [17] for discussion of quadrature rules. With these settings, the size of {H}=1nν\left\{H_{\ell}\right\}_{\ell=1}^{n_{\nu}} in (16) was 10×10×2810\times 10\times 28 with 203203 nonzeros, and there were nq=29n_{q}=29 points in the sparse grid. As a consequence, the size of the stochastic Galerkin matrices is nξ(nu+np)=95120n_{\xi}(n_{u}+n_{p})=95120, the matrix associated with the Jacobian is fully block dense and the mass matrix is block diagonal, but we note that these matrices are never formed in implementation. For the solution of the Navier–Stokes problem we used the hybrid strategy with 66 steps of Picard iteration followed by at most 1515 steps of Newton iteration. We used mean viscosity ν1=5.36193×103\nu_{1}=5.36193\times 10^{-3}, which corresponds to Reynolds number Re=373Re=373, and the rightmost eigenvalue pair is 0.0085±2.2551i0.0085\pm 2.2551i, see the left panel in Figure 1. The Figure 3 displays Monte Carlo realizations of the 2525 eigenvalues with the largest real part for the values CoV=1%CoV=1\% and CoV=10%CoV=10\%. It can be seen that the rightmost eigenvalue is relatively less sensitive to perturbation comparing to the other eigenvalues, and since its real part is well separated from the rest of the spectrum, it can be easily identified in all runs of a sampling method. Figure 4 displays the probability density function (pdf) estimates of the rightmost eigenvalue with the positive imaginary part obtained directly by Monte Carlo, the stochastic collocation and stochastic Galerkin methods, for which the estimates were obtained using Matlab function ksdensity (in 2D) for sampled gPC expansions. Figure 5 shows plots of the estimated pdf of the real part of the rightmost eigenvalue. In both figures we can see a good agreement of the plots in the left column corresponding to CoV=1%CoV=1\% and in the right column corresponding to CoV=10%CoV=10\%. In Table 1 we tabulate the coefficients of the gPC expansion of the rightmost eigenvalue with positive imaginary part computed using the stochastic collocation and Galerkin methods. A good agreement of coefficients can be seen, in particular for coefficients with value much larger than zero, specifically with k=1,2,4,6,7k=1,2,4,6,7 and9~{}9. Finally, in Table 2 we examine the inexact line-search Newton iteration from Algorithm 1. For the line-search method, we set ρ=0.9\rho=0.9 for the backtracking and c=0.25c=0.25. The initial guess is set using the rightmost eigenvalue and corresponding eigenvector of the eigenvalue problem (28) concatenated by zeros. The nonlinear iteration terminates when the norm of the residual r^n2<1010\left\|\widehat{r}_{n}\right\|_{2}<10^{-10}. The linear systems in Line 4 of Algorithm 1 are solved using GMRES with the mean-based preconditioner (Algorithm 2), constraint mean-based preconditioner (Algorithm 3) and its updated variant discussed in Section 5.2.1, and the constraint hierarchical Gauss-Seidel preconditioner (Algorithm 45), which was used without truncation of the matrix-vector multiplications and also with truncation, setting pt=2p_{t}=2, as discussed in Section 5.2. For the mean-based preconditioner we used ϵRe=ϵIm=0.97\epsilon_{\operatorname{Re}}=\epsilon_{\operatorname{Im}}=0.97, which worked best in our experience, and ϵRe=ϵIm=1\epsilon_{\operatorname{Re}}=\epsilon_{\operatorname{Im}}=1 otherwise. For the constraint mean-based preconditioner the matrixcMB~{}\mathcal{M}_{\text{cMB}} from (35) was factored using LU decomposition, and the updated variant from Section 5.2.1 was used also in the constraint hierarchical Gauss-Seidel preconditioner. First, we note that the performance of the algorithm with the mean-based preconditioner was very sensitive to the choice of ϵRe\epsilon_{\operatorname{Re}} and ϵIm\epsilon_{\operatorname{Im}}, and it can be seen that it is quite sensitive also to CoVCoV. On the other hand, the performance of all variants of the constraint preconditioners appear to be far less sensitive, and we see only a mild increase in numbers of both nonlinear and GMRES iterations. Next, we see that updating the constraint mean-based preconditioner reduces the numbers of GMRES iterations in particular in the latter steps of the nonlinear method. Finally, we see that using the constraint hierarchical Gauss-Seidel preconditioner further decreases the number of GMRES iterations, for smaller CoVCoV it may be suitable to truncate the matrix-vector multiplications without any change in iteration counts and even though we see with CoV=10%CoV=10\% an increase in number of nonlinear steps, the overall number of GMRES iterations remains smaller than when the two variants of the constraint mean-based preconditioner were used.

Refer to caption
Fig. 2: Finite element mesh for the flow around an obstacle problem.
Refer to caption Refer to caption
Fig. 3: Monte Carlo samples of 2525 eigenvalues with the largest real part for the flow around an obstacle with CoV=1%CoV=1\% (left) and CoV=10%CoV=10\% (right). The eigenvalues of the mean problem are indicated by circles.
Refer to caption Refer to caption
Refer to caption Refer to caption
Refer to caption Refer to caption
Fig. 4: Plots of the pdf estimate of the rightmost eigenvalue with positive imaginary part obtained using Monte Carlo (top), stochastic collocation (middle) and stochastic Galerkin method (bottom) for the flow around an obstacle with CoV=1%CoV=1\% (left) and CoV=10%CoV=10\% (right).
Refer to caption Refer to caption
Fig. 5: Plots of the pdf estimate of the real part of the rightmost eigenvalue obtained using Monte Carlo (MC), stochastic collocation (SC) and stochastic Galerkin method (SG) for the flow around an obstacle with CoV=1%CoV=1\% (left) and CoV=10%CoV=10\% (right).
Table 1: The 1010 coefficients of the gPC expansion of the rightmost eigenvalue with positive complex part for the flow around an obstacle problem with CoV=1%CoV=1\% and 10%10\% computed using stochastic collocation (SC), and stochastic Galerkin method (SG). Here dd is the polynomial degree and kk is the index of basis function in expansion (11).
dd kk SC SG
CoV=1%CoV=1\%
0 1 8.5726E-03 + 2.2551E+00 i 8.5726E-03 + 2.2551E+00 i
1 2 -6.5686E-03 - 2.2643E-03 i -6.5686E-03 - 2.2643E-03 i
3 1.1181E-16 - 2.0817E-14 i 2.6512E-17 + 8.3094E-17 i
2 4 -1.1802E-06 - 2.4274E-05 i -1.2055e-06 - 2.4200E-05 i
5 3.8351E-15 - 4.4964E-15 i 8.9732E-20 - 2.0565E-19 i
6 -3.3393E-06 + 4.0603E-05 i -3.3527E-06 + 4.0641E-05 i
3 7 -1.0635E-07 + 4.1735E-07 i -8.5671E-08 + 3.5926E-07 i
8 7.8095E-16 + 6.1617E-15 i -4.3191E-22 - 8.3970E-21 i
9 -4.6791E-07 + 5.1602E-08 i -4.4762E-07 - 6.0766E-09 i
10 2.2155E-15 + 4.6907E-15 i 1.2691E-15 + 2.9181E-16 i
CoV=10%CoV=10\%
0 1 1.3420E-02 + 2.2577E+00 i 1.3419E-02 + 2.2576E+00 i
1 2 -6.6200E-02 - 2.2034E-02 i -6.6243E-02 - 2.2018E-02 i
3 1.6011E-15 - 1.0297E-14 i 1.1672E-15 + 8.8396E-16 i
2 4 -2.2415E-04 - 2.5416E-03 i -1.0889E-04 - 2.4178E-03 i
5 8.5869E-17 - 1.0547E-15 i 1.1865E-17 + 6.5559E-17 i
6 -2.7323E-04 + 4.1219E-03 i -2.1977E-04 + 4.1437E-03 i
3 7 -4.8106E-05 + 3.556E-04 i 1.3510E-04 + 9.1486E-05 i
8 2.8365E-15 + 6.1062E-15 i 8.0683E-19 + 5.3753E-18 i
9 -4.5696E-04 + 2.7795E-06 i -4.1149E-04 - 1.8160E-04 i
10 1.7408E-15 + 1.3101E-14 i 1.3975E-15 + 3.5152E-16 i
Table 2: The number of GMRES iterations in each step of inexact line-search Newton method (Algorithm 1) for computing the rightmost eigenvalue and corresponding eigenvectors of the flow around an obstacle problem with CoV=1%CoV=1\% (left) and 10%10\% (right) and with the stopping criteria rn2<1010\|r_{n}\|_{2}<10^{-10} and different choices of preconditioners: mean-based (MB) from Algorithm 2, constraint mean-based (cMB) from Algorithm 3 and its updated variant (cMBu) from Section 5.2.1, and the constraint hierarchical Gauss-Seidel preconditioner (chGS) from Algorithm 45 and also with truncation, setting pt=2p_{t}=2 (chGS2).
CoV=1%CoV=1\% CoV=10%CoV=10\%
step MB cMB cMBu chGS chGS2 MB cMB cMBu chGS chGS2
1 2 1 1 1 1 7 1 1 1 1
2 2 1 1 1 1 6 3 2 3 3
3 6 3 2 1 1 13 4 4 3 4
4 9 6 3 2 2 10 8 7 3 4
5 15 10 6 3 3 15 16 13 4 5
6 14 8 8
7 25
8 32
9 67

7.2 Expansion flow around a symmetric step

For the second example, we considered an expansion flow around a symmetric step. The domain and its discretization are shown in Figure 6. The spatial discretization used a uniform grid with 976976 Q2{}_{2}-P-1 finite elements, which provided a stable discretization for the rectangular grid, see [8, p. 139]. There were 83388338 velocity and 29282928 pressure degrees of freedom. For the viscosity we considered a random field with affine dependence on the random variables ξ\xi given as

ν(x,ξ)=ν1+σν=2nνν(x)ξ1,\nu(x,\xi)=\nu_{1}+\sigma_{\nu}\sum_{\ell=2}^{n_{\nu}}\nu_{\ell}(x)\,\xi_{\ell-1}, (43)

where ν1\nu_{1} is the mean and σν=CoVν1\sigma_{\nu}=CoV\cdot\nu_{1} the standard deviation of the viscosity, nν=mξ+1n_{\nu}=m_{\xi}+1, and ν+1=3λv(x)\nu_{\ell+1}=\sqrt{3\lambda_{\ell}}v_{\ell}(x) with {(λ,v(x))}=1mξ\left\{\left(\lambda_{\ell},v_{\ell}(x)\right)\right\}_{\ell=1}^{m_{\xi}} are the eigenpairs of the eigenvalue problem associated with the covariance kernel of the random field. As in the previous example, we used the values CoV=1%CoV=1\%, and 10%10\%. We considered the same form of the covariance kernel as in (42),

C(X1,X2)=exp(|x2x1|Lx|y2y1|Ly),C\left(X_{1},X_{2}\right)=\exp\left(-\frac{\left|x_{2}-x_{1}\right|}{L_{x}}-\frac{\left|y_{2}-y_{1}\right|}{L_{y}}\right),

and the correlation lengths were set to 12.5%12.5\% of the width and 25%25\% of the height of the domain. We assume that the random variables {ξ}=1mξ\left\{\xi_{\ell}\right\}_{\ell=1}^{m_{\xi}} follow a uniform distribution over (1,1)(-1,1). We note that (43) can be viewed as a special case of (39), which consists of only linear terms ofξ~{}\xi. For the parametrization of viscosity by (43) we used the same stochastic dimension mξm_{\xi} and degree of polynomial expansionp~{}p as in the previous example: mξ=2m_{\xi}=2 and p=3p=3, so then nξ=10n_{\xi}=10 and nν=mξ+1=3n_{\nu}=m_{\xi}+1=3. We used 1×1031\times 10^{3} samples for the Monte Carlo method and Smolyak sparse grid with Gauss-Legendre quadrature points and grid level4~{}4 for collocation. With these settings, the size of {H}=1nν\left\{H_{\ell}\right\}_{\ell=1}^{n_{\nu}} in (16) was 10×10×310\times 10\times 3 with 3434 nonzeros, and there were nq=29n_{q}=29 points on the sparse grid. As a consequence, the size of the stochastic Galerkin matrices is 112660112660, and the matrix associated with the Jacobian has in this case a block-sparse structure see, e.g., [17, p. 88]. For the solution of the Navier–Stokes problem we used the hybrid strategy with 2020 steps of Picard iteration followed by at most 2020 steps of Newton iteration. We used mean viscosity ν1=4.5455×103\nu_{1}=4.5455\times 10^{-3}, which corresponds to Reynolds number Re=220Re=220, and the rightmost eigenvalue is 5.7963×1045.7963\times 10^{-4} (the second largest eigenvalue is 8.2273×102-8.2273\times 10^{-2}), see the right panel in Figure 1. Figure 7 displays Monte Carlo realizations of the 2525 eigenvalues with the largest real part. As in the previous example, it can be seen that the rightmost eigenvalue is relatively less sensitive to perturbation comparing to the other eigenvalues, and it can be easily identified in all runs of a sampling method. Figure 8 displays the probability density function (pdf) estimates of the rightmost eigenvalue obtained directly by Monte Carlo, the stochastic collocation and stochastic Galerkin methods, for which the estimates were obtained using Matlab function ksdensity for sampled gPC expansions. We can see a good agreement of the plots in the left column corresponding to CoV=1%CoV=1\% and in the right column corresponding to CoV=10%CoV=10\%. In Table 3 we tabulate the coefficients of the gPC expansion of the rightmost eigenvalue computed using the stochastic collocation and stochastic Galerkin methods. A good agreement of coefficients can be seen, in particular for coefficients with larger values. Finally, we examine the inexact line-search Newton iteration from Algorithm 1. For the line-search method, we used the same setup as before with ρ=0.9\rho=0.9 and c=0.25c=0.25. The initial guess is set using the rightmost eigenvalue and corresponding eigenvector of the eigenvalue problem (28), just with no imaginary part, concatenated by zeros. The nonlinear iteration terminates when the norm of the residual r^n2<1010\left\|\widehat{r}_{n}\right\|_{2}<10^{-10}. The linear systems in Line 4 of Algorithm 1 are solved using right-preconditioned GMRES method as in the complex case. However, since the eigenvalue is real, the generalized eigenvalue problem as written in eq. (18) has the (usual) form given by eq. (9) and all algorithms formulated in this paper can be adapted by simply dropping the the components corresponding to the imaginary part of the eigenvalue problem: for example, the constraints mean-based preconditioner (Algorithm 3), and specifically (35) reduces to

cMB=[K1ϵReμReMσMσwRe(0)wRe(0)T0].\mathcal{M}_{\text{cMB}}=\left[\begin{array}[c]{cc}K_{1}-\epsilon_{\operatorname{Re}}\mu_{\operatorname{Re}}M_{\sigma}&-M_{\sigma}w_{\operatorname{Re}}^{(0)}\\ -w_{\operatorname{Re}}^{(0)T}&0\end{array}\right].

and in the mean-based preconditioner (Algorithm 2) we also modified (32) as

cMB=[K1ϵReμReI00wRe(0)T(K1ϵReμReI)1wRe(0)],\mathcal{M}_{\text{cMB}}=\left[\begin{array}[c]{cc}K_{1}-\epsilon_{\operatorname{Re}}\mu_{\operatorname{Re}}I&0\\ 0&w_{\operatorname{Re}}^{(0)T}\left(K_{1}-\epsilon_{\operatorname{Re}}\mu_{\operatorname{Re}}I\right)^{-1}w_{\operatorname{Re}}^{(0)}\end{array}\right],

that is we usedI~{}I instead ofMσ~{}M_{\sigma} in the shift of the matrixK1~{}K_{1}. We also adapted the constraint hierarchical Gauss-Seidel preconditioner (Algorithm 45), which was used as before without truncation of the matrix-vector multiplications and also with truncation, setting pt=2p_{t}=2, as discussed in Section 5.2. For the mean-based preconditioner we used ϵRe=0.97\epsilon_{\operatorname{Re}}=0.97, but the preconditioner appeared to be far less sensitive to a specific value ofϵRe~{}\epsilon_{\operatorname{Re}}, and ϵRe=1\epsilon_{\operatorname{Re}}=1 otherwise. We note that this way the algorithms are still formulated for a generalized nonsymmetric eigenvalue problem unlike in [19], where we studied symmetric problems and in implementation we used a Cholesky factorization of the mass matrix in order to formulate a standard eigenvalue problem. From the results in Table 4 we see that for all preconditioners the overall number of nonlinear steps and GMRES iterations increases for larger CoVCoV, however all variants of the constraint preconditioner outperform the mean-based preconditioner the total number of iterations remains relatively small. Next, the performance with constraint preconditioners seem not improve with the updating discussed in Section 5.2.1, which is likely since the numbers of iterations are already low. Finally, using the constraint hierarchical Gauss-Seidel preconditioner reduces the number of GMRES iterations, which is slightly more significant for larger values of CoVCoV.  The computational cost of preconditioner may be reduced by using the truncation of the matrix-vector multiplications; specifically we see that the overall iteration counts with and without the truncation are the same.

Refer to caption
Fig. 6: Finite element mesh for the expansion flow around a symmetric step.
Refer to caption Refer to caption
Fig. 7: Monte Carlo samples of 2525 eigenvalues with the largest real part for the flow around an obstacle with CoV=1%CoV=1\% (left) and CoV=10%CoV=10\% (right). The eigenvalues of the mean problem are indicated by circles.
Refer to caption Refer to caption
Fig. 8: Plots of the pdf estimate of the real part of the rightmost eigenvalue obtained using Monte Carlo (MC), stochastic collocation (SC) and stochastic Galerkin method (SG) for the expansion flow around a symmetric step with CoV=1%CoV=1\% (left) and CoV=10%CoV=10\% (right).
Table 3: The 1010 coefficients of the gPC expansion of the rightmost eigenvalue for the expansion flow around a symmetric step problem with CoV=1%CoV=1\% and 10%10\% computed using stochastic collocation (SC), and stochastic Galerkin method (SG). Here dd is the polynomial degree and kk is the index of basis function in expansion (11).
dd kk SC SG SC SG
CoV=1%CoV=1\% CoV=10%CoV=10\%
0 1 5.7873E-04 5.7873E-04 4.8948E-04 4.8927E-04
1 2 -1.5948E-04 -1.5948E-04 -1.5890E-03 -1.5877E-03
3 -2.3689E-04 -2.3689E-04 -2.3619E-03 -2.3605E-03
2 4 -2.4179E-07 -2.6041E-07 -2.4472E-05 -2.6501E-05
5 -8.2562E-07 -8.7937E-07 -8.3136E-05 -8.8911E-05
6 -5.6059E-07 -5.9203E-07 -5.6429E-05 -5.9831E-05
3 7 7.7918E-10 8.2134E-10 5.7810E-07 8.5057E-07
8 2.5941E-09 3.9327E-09 2.8439E-06 4.022E-06
9 3.8788E-09 5.5168E-09 4.0315E-06 5.6217E-06
10 1.3002E-09 2.2685E-09 1.6668E-06 2.3171E-06
Table 4: The number of GMRES iterations in each step of inexact line-search Newton method (Algorithm 1) for computing the rightmost eigenvalue and corresponding eigenvectors of the expansion flow around a symmetric step problem with CoV=1%CoV=1\% (left) and 10%10\% (right) and with the stopping criteria rn2<1010\|r_{n}\|_{2}<10^{-10} and different choices of preconditioners: mean-based (MB) from Algorithm 2, constraint mean-based (cMB) from Algorithm 3 and its updated variant (cMBu) from Section 5.2.1, and the constraint hierarchical Gauss-Seidel preconditioner (chGS) from Algorithm 45 and also with truncation, setting pt=2p_{t}=2 (chGS2).
CoV=1%CoV=1\% CoV=10%CoV=10\%
step MB cMB cMBu chGS chGS2 MB cMB cMBu chGS chGS2
1 19 4 4 2 2 23 6 6 3 3
2 17 4 4 3 3 20 6 6 4 4
3 15 3 3 3 3 19 6 6 4 4
4 15 5 5 4 4
5 14 5 5 3 3
6 23 8 8 5 5

8 Conclusion

We studied inexact stochastic Galerkin methods for linear stability analysis of dynamical systems with parametric uncertainty and a specific application: the Navier–Stokes equation with stochastic viscosity. The model leads to a generalized eigenvalue problem with a symmetric mass matrix and nonsymmetric stiffness matrix, which was given by an affine expansion obtained from a stochastic expansion of the viscosity. For the assesment of linear stability we were interested in characterizing the rightmost eigenvalue using the generalized polynomial chaos expansion. Since the eigenvalue of interest may be complex, we considered separated representation of the real and imaginary parts of the associated eigenpair. The algorithms for solving the eigenvalue problem were formulated on the basis of line-search Newton iteration, in which the associated linear systems were solved using right-preconditioned GMRES method. We proposed several preconditioners: the mean-based preconditioner, the constraint mean-based preconditioner, and the constraint hierarchical Gauss-Seidel preconditioner. For the two constraint preconditioners we also proposed an updated version, which adapts the preconditioners to the linear system using Sherman-Morrison-Woodburry formula after each step of Newton iteration. We studied two model problems: one when the rightmost eigenvalue is given by a complex conjugate pair and another when the eigenvalue is real. The overall iteration count of GMRES with the constraint preconditioners was smaller compared to the mean-based preconditioner, and the constraint preconditioners were also less sensitive to the value of CoVCoV. Also we found that updating the constraint preconditioner after each step of Newton iteration and using the off-diagonal blocks in the action of the constraint hierarchical Gauss-Seidel preconditioner may further decrease the overall iteration count, in particular when the rightmost eigenvalue is complex. Finally, for both problems the probability density function estimates of the rightmost eigenvalue closely matched the estimates obtained using the stochastic collocation and also with the direct Monte Carlo simulation.

Acknowledgement

We would like to thank the anonymous reviewers for their insightful suggestions. Bedřich Sousedík would also like to thank Professors Pavel Burda, Howard Elman, Vladimír Janovský and Jaroslav Novotný for many discussions about bifurcation analysis and Navier–Stokes equations that inspired this work.

Appendix A Computations in inexact Newton iteration

The main component of a Krylov subspace method, such as GMRES, is the computation of a matrix-vector product. First, we note that the algorithms make use of the identity

(VW)vec(U)=vec(WUVT).\left(V\otimes W\right)\operatorname{vec}\left(U\right)=\operatorname{vec}\left(WUV^{T}\right). (44)

Let us write a product with Jacobian matrix from (26) as

DJ^(v¯Re(n),v¯Im(n),λ¯Re(n),λ¯Im(n))[δv¯Reδv¯Imδλ¯Reδλ¯Im],\widehat{DJ}(\bar{v}_{\operatorname{Re}}^{(n)},\bar{v}_{\operatorname{Im}}^{(n)},\bar{\lambda}_{\operatorname{Re}}^{(n)},\bar{\lambda}_{\operatorname{Im}}^{(n)})\begin{bmatrix}\delta\bar{v}_{\operatorname{Re}}\\ \delta\bar{v}_{\operatorname{Im}}\\ \delta\bar{\lambda}_{\operatorname{Re}}\\ \delta\bar{\lambda}_{\operatorname{Im}}\end{bmatrix},

where

DJ^(v¯Re(n),v¯Im(n),λ¯Re(n),λ¯Im(n))=[AReAImBReBIm12CRe12CIm00],\widehat{DJ}(\bar{v}_{\operatorname{Re}}^{(n)},\bar{v}_{\operatorname{Im}}^{(n)},\bar{\lambda}_{\operatorname{Re}}^{(n)},\bar{\lambda}_{\operatorname{Im}}^{(n)})=\left[\begin{array}[c]{cccc}A_{\operatorname{Re}}&A_{\operatorname{Im}}&B_{\operatorname{Re}}&B_{\operatorname{Im}}\\ -\frac{1}{2}C_{\operatorname{Re}}&-\frac{1}{2}C_{\operatorname{Im}}&0&0\end{array}\right], (45)

with AReA_{\operatorname{Re}}, AImA_{\operatorname{Im}}, BReB_{\operatorname{Re}}, BImB_{\operatorname{Im}} and CReC_{\operatorname{Re}}, CImC_{\operatorname{Im}} denoting the matrices in (22)–(25). Then, using (30) and (44), the matrix-vector product entails evaluating

AReδv¯Re\displaystyle A_{\operatorname{Re}}\delta\bar{v}_{\operatorname{Re}} =[𝔼[ΨΨTK]𝔼[(λ¯Re(n)TΨ)ΨΨTMσ]𝔼[(λ¯Im(n)TΨ)ΨΨTMσ]]δv¯Re=\displaystyle=\begin{bmatrix}\mathbb{E}\left[\Psi\Psi^{T}\!\otimes\!K\right]\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}^{(n)T}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\\ \vspace{-2.5mm}\\ -\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\end{bmatrix}\delta\bar{v}_{\operatorname{Re}}= (46)
=[vec(=1nνKδV¯ReHT)vec(=1nξλRe,(n)MσδV¯ReHT)vec(=1nξλIm,(n)MσδV¯ReHT)],\displaystyle=\begin{bmatrix}\operatorname{vec}\left(\sum_{\ell=1}^{n_{\nu}}K_{\ell}\delta\bar{V}_{\operatorname{Re}}H_{\ell}^{T}\right)\!-\!\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Re},\ell}^{(n)}M_{\sigma}\delta\bar{V}_{\operatorname{Re}}H_{\ell}^{T}\right)\\ \vspace{-2.5mm}\\ -\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Im},\ell}^{(n)}M_{\sigma}\delta\bar{V}_{\operatorname{Re}}H_{\ell}^{T}\right)\end{bmatrix},
AImδv¯Im\displaystyle A_{\operatorname{Im}}\delta\bar{v}_{\operatorname{Im}} =[𝔼[(λ¯Im(n)TΨ)ΨΨTMσ]𝔼[ΨΨTK]𝔼[(λ¯Re(n)TΨ)ΨΨTMσ]]δv¯Im=\displaystyle=\begin{bmatrix}\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\end{bmatrix}\delta\bar{v}_{\operatorname{Im}}= (47)
=[vec(=1nξλIm,(n)MσδV¯ReHT)vec(=1nνKδV¯ReHT)vec(=1nξλRe,(n)MσδV¯ReHT)],\displaystyle=\begin{bmatrix}\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Im},\ell}^{(n)}M_{\sigma}\delta\bar{V}_{\operatorname{Re}}H_{\ell}^{T}\right)\\ \vspace{-2.5mm}\\ \operatorname{vec}\left(\sum_{\ell=1}^{n_{\nu}}K_{\ell}\delta\bar{V}_{\operatorname{Re}}H_{\ell}^{T}\right)\!-\!\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Re},\ell}^{(n)}M_{\sigma}\delta\bar{V}_{\operatorname{Re}}H_{\ell}^{T}\right)\end{bmatrix},
BReδλ¯Re\displaystyle B_{\operatorname{Re}}\delta\bar{\lambda}_{\operatorname{Re}} =[𝔼[ΨT(ΨΨTMσ)]v¯Re(n)𝔼[ΨT(ΨΨTMσ)]v¯Im(n)]δλ¯Re=[vec(=1nξδλRe,MσV¯Re(n)HT)vec(=1nξδλRe,MσV¯Im(n)HT)],\displaystyle=\begin{bmatrix}-\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Re}}^{(n)}\\ \vspace{-2.5mm}\\ -\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Im}}^{(n)}\end{bmatrix}\delta\bar{\lambda}_{\operatorname{Re}}=\begin{bmatrix}-\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\delta\lambda_{\operatorname{Re},\ell}M_{\sigma}\bar{V}_{\operatorname{Re}}^{(n)}H_{\ell}^{T}\right)\\ \vspace{-2.5mm}\\ -\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\delta\lambda_{\operatorname{Re},\ell}M_{\sigma}\bar{V}_{\operatorname{Im}}^{(n)}H_{\ell}^{T}\right)\end{bmatrix}, (48)
BImλ¯Im\displaystyle B_{\operatorname{Im}}\bar{\lambda}_{\operatorname{Im}} =[𝔼[ΨT(ΨΨTMσ)]v¯Im(n)𝔼[ΨT(ΨΨTMσ)]v¯Re(n)]δλ¯Im=[vec(=1nξδλIm,MσV¯Im(n)HT)vec(=1nξδλIm,MσV¯Re(n)HT)],\displaystyle=\begin{bmatrix}\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Im}}^{(n)}\\ \vspace{-2.5mm}\\ -\mathbb{E}[\Psi^{T}\otimes(\Psi\Psi^{T}\!\otimes\!M_{\sigma})]\bar{v}_{\operatorname{Re}}^{(n)}\end{bmatrix}\delta\bar{\lambda}_{\operatorname{Im}}=\begin{bmatrix}\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\delta\lambda_{\operatorname{Im},\ell}M_{\sigma}\bar{V}_{\operatorname{Im}}^{(n)}H_{\ell}^{T}\right)\\ \vspace{-2.5mm}\\ -\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\delta\lambda_{\operatorname{Im},\ell}M_{\sigma}\bar{V}_{\operatorname{Re}}^{(n)}H_{\ell}^{T}\right)\end{bmatrix}, (49)
12CReδv¯Re\displaystyle-\frac{1}{2}C_{\operatorname{Re}}\delta\bar{v}_{\operatorname{Re}} =[𝔼[Ψ(v¯Re(n)TΨΨTInx)]0]δv¯Re=[[v¯Re(n)T(H1Inx)δv¯Rev¯Re(n)T(HnξInx)δv¯Re]0],\displaystyle=-\begin{bmatrix}\mathbb{E}[\Psi\otimes(\bar{v}_{\operatorname{Re}}^{(n)T}\Psi\Psi^{T}\!\otimes\!I_{n_{x}})]\\ \vspace{-2.5mm}\\ 0\end{bmatrix}\delta\bar{v}_{\operatorname{Re}}=-\begin{bmatrix}\begin{bmatrix}\bar{v}_{\operatorname{Re}}^{(n)T}(H_{1}\otimes I_{n_{x}})\delta\bar{v}_{\operatorname{Re}}\\ \vdots\\ \bar{v}_{\operatorname{Re}}^{(n)T}(H_{n_{\xi}}\otimes I_{n_{x}})\delta\bar{v}_{\operatorname{Re}}\end{bmatrix}\\ \vspace{-2.5mm}\\ 0\end{bmatrix}, (50)
12CImδv¯Im\displaystyle-\frac{1}{2}C_{\operatorname{Im}}\delta\bar{v}_{\operatorname{Im}} =[0𝔼[Ψ(v¯Im(n)TΨΨTInx)]]δv¯Im=[0[v¯Im(n)T(H1Inx)δv¯Imv¯Im(n)T(HnξInx)δv¯Im]],\displaystyle=-\begin{bmatrix}0\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\otimes(\bar{v}_{\operatorname{Im}}^{(n)T}\Psi\Psi^{T}\!\otimes\!I_{n_{x}})]\end{bmatrix}\delta\bar{v}_{\operatorname{Im}}=-\begin{bmatrix}0\\ \vspace{-2.5mm}\\ \begin{bmatrix}\bar{v}_{\operatorname{Im}}^{(n)T}(H_{1}\otimes I_{n_{x}})\delta\bar{v}_{\operatorname{Im}}\\ \vdots\\ \bar{v}_{\operatorname{Im}}^{(n)T}(H_{n_{\xi}}\otimes I_{n_{x}})\delta\bar{v}_{\operatorname{Im}}\end{bmatrix}\end{bmatrix}, (51)

and the right-hand side of (26) is evaluated using

F(n)\displaystyle F^{(n)} =[𝔼[ΨΨTK]v¯Re(n)𝔼[(λ¯Re(n)TΨ)ΨΨTMσ]v¯Re(n)+𝔼[(λ¯Im(n)TΨ)ΨΨTMσ]v¯Im(n)𝔼[ΨΨTK]v¯Im(n)𝔼[(λ¯Im(n)TΨ)ΨΨTMσ]v¯Re(n)𝔼[(λ¯Re(n)TΨ)ΨΨTMσ]v¯Im(n)]=\displaystyle=\begin{bmatrix}\mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\bar{v}_{\operatorname{Re}}^{(n)}\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Re}}^{(n)}\!+\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Im}}^{(n)}\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\Psi^{T}\!\otimes\!K]\bar{v}_{\operatorname{Im}}^{(n)}\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Im}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Re}}^{(n)}\!-\!\mathbb{E}[(\bar{\lambda}_{\operatorname{Re}}^{(n)T}{}\Psi)\Psi\Psi^{T}\!\otimes\!M_{\sigma}]\bar{v}_{\operatorname{Im}}^{(n)}\end{bmatrix}=
=[vec(=1nνKδV¯Re(n)HT)vec(=1nξλRe,(n)MσV¯Re(n)HT)+vec(=1nξλIm,(n)MσV¯Im(n)HT)vec(=1nνKδV¯Im(n)HT)vec(=1nξλIm,(n)MσV¯Re(n)HT)vec(=1nξλRe,(n)MσV¯Im(n)HT)],\displaystyle=\begin{bmatrix}\operatorname{vec}\left(\sum_{\ell=1}^{n_{\nu}}K_{\ell}\delta\bar{V}_{\operatorname{Re}}^{(n)}H_{\ell}^{T}\right)\!-\!\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Re},\ell}^{(n)}M_{\sigma}\bar{V}_{\operatorname{Re}}^{(n)}H_{\ell}^{T}\right)\!+\!\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Im},\ell}^{(n)}M_{\sigma}\bar{V}_{\operatorname{Im}}^{(n)}H_{\ell}^{T}\right)\\ \vspace{-2.5mm}\\ \operatorname{vec}\left(\sum_{\ell=1}^{n_{\nu}}K_{\ell}\delta\bar{V}_{\operatorname{Im}}^{(n)}H_{\ell}^{T}\right)\!-\!\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Im},\ell}^{(n)}M_{\sigma}\bar{V}_{\operatorname{Re}}^{(n)}H_{\ell}^{T}\right)\!-\!\operatorname{vec}\left(\sum_{\ell=1}^{n_{\xi}}\lambda_{\operatorname{Re},\ell}^{(n)}M_{\sigma}\bar{V}_{\operatorname{Im}}^{(n)}H_{\ell}^{T}\right)\end{bmatrix},

and

G(n)=[𝔼[Ψ((v¯Re(n)T(ΨΨTInx)v¯Re(n))1)]𝔼[Ψ((v¯Im(n)T(ΨΨTInx)v¯Im(n))1)]],G^{(n)}=\begin{bmatrix}\mathbb{E}[\Psi\otimes((\bar{v}_{\operatorname{Re}}^{(n)T}(\Psi\Psi^{T}\otimes I_{n_{x}})\bar{v}_{\operatorname{Re}}^{(n)})\!-\!1)]\\ \vspace{-2.5mm}\\ \mathbb{E}[\Psi\otimes((\bar{v}_{\operatorname{Im}}^{(n)T}(\Psi\Psi^{T}\otimes I_{n_{x}})\bar{v}_{\operatorname{Im}}^{(n)})\!-\!1)]\end{bmatrix},

where, using \star for either Re\operatorname{Re} or Im\operatorname{Im}, the iith row ofG(n)~{}G^{(n)} is

[G(n)]i\displaystyle\left[G^{(n)}\right]_{i} =𝔼[ψi(v¯(n)(ΨΨTInx)Tv¯(n))ψi],\displaystyle=\mathbb{E}[\psi_{i}(\bar{v}_{\star}^{(n)}{}^{T}(\Psi\Psi^{T}\otimes I_{n_{x}})\bar{v}_{\star}^{(n)})-\psi_{i}],
=v¯(n)𝔼T[ψiΨΨTInx]v¯(n)δ1i,\displaystyle=\bar{v}_{\star}^{(n)}{}^{T}\mathbb{E}[\psi_{i}\Psi\Psi^{T}\otimes I_{n_{x}}]\bar{v}_{\star}^{(n)}-\delta_{1i},

and the first term above is evaluated as

v¯(n)𝔼T[ψiΨΨTInx]v¯(n)=v¯(n)(HiInx)Tv¯(n),\bar{v}_{\star}^{(n)}{}^{T}\mathbb{E}[\psi_{i}\Psi\Psi^{T}\otimes I_{n_{x}}]\bar{v}_{\star}^{(n)}=\bar{v}_{\star}^{(n)}{}^{T}(H_{i}\otimes I_{n_{x}})\bar{v}_{\star}^{(n)},

or, denoting the trace operator bytr~{}\operatorname{tr}, this term can be also evaluated as

v¯(n)𝔼T[ψiΨΨTInx]v¯(n)=tr(V¯(n)HiV¯(n))T=tr(V¯(n)V¯(n)THi).\bar{v}_{\star}^{(n)}{}^{T}\mathbb{E}[\psi_{i}\Psi\Psi^{T}\otimes I_{n_{x}}]\bar{v}_{\star}^{(n)}=\operatorname{tr}(\bar{V}_{\star}^{(n)}H_{i}\bar{V}_{\star}^{(n)}{}^{T})=\operatorname{tr}(\bar{V}_{\star}^{(n)}{}^{T}\bar{V}_{\star}^{(n)}H_{i}).

Appendix B Parameters used in numerical experiments

In addition to the description in Section 7, we provide in Table 5 an overview of the main parameters used in the numerical experiments. Besides that, we used the following settings in both experiments. The gPC parameters: mξ=2m_{\xi}=2, p=3p=3, nξ=10n_{\xi}=10; for the sampling methods: nMC=1×103n_{MC}=1\times 10^{3}, nq=29n_{q}=29; for the inexact Newton iteration: ρ=0.9\rho=0.9, c=0.25c=0.25, stopping criterion r^n2<1010\left\|\widehat{r}_{n}\right\|_{2}<10^{-10}; for the preconditioners: ϵRe=ϵIm=0.97\epsilon_{\operatorname{Re}}=\epsilon_{\operatorname{Im}}=0.97 (the mean-based preconditioner) and ϵRe=ϵIm=1\epsilon_{\operatorname{Re}}=\epsilon_{\operatorname{Im}}=1 (otherwise).

Table 5: The main parameters used in the numerical experiments.
Section 7.1 Section 7.2
problem Flow around an obstacle Expansion flow around a symmetric step
FEM Q2{}_{2}-Q1 Q2{}_{2}-P-1
nelem/nun_{u}/npn_{p} 1008/8416/1096 976/8338/2928
ReRe 373 220
λ\lambda 0.0085±2.2551i0.0085\pm 2.2551i 5.7963×1045.7963\times 10^{-4}
nνn_{\nu} 28 3
quadrature (in SC) Gauss-Hermite Gauss-Legendre
Solving the Navier–Stokes problem (see [30] for details):
max Picard steps 6 20
max Newton steps 15 20
nltol 10810^{-8} 10810^{-8}

References

  • [1] R. Andreev and C. Schwab. Sparse tensor approximation of parametric eigenvalue problems. In Numerical Analysis of Multiscale Problems, volume 83 of Lecture Notes in Computational Science and Engineering, pages 203–241, Berlin, Heidelberg, 2012. Springer.
  • [2] Alex Bespalov, Daniel Loghin, and Rawin Youngnoi. Truncation preconditioners for stochastic galerkin finite element discretizations. SIAM Journal on Scientific Computing, pages S92–S116, 2021. (to appear).
  • [3] K. A. Cliffe, T. J. Garratt, and A. Spence. Eigenvalues of block matrices arising from problems in fluid mechanics. SIAM Journal on Matrix Analysis and Applications, 15(4):1310–1318, 1994.
  • [4] K. A. Cliffe, A. Spence, and S. J. Taverner. The numerical analysis of bifurcation problems with application to fluid mechanics. Acta Numerica, 9:39–131, 2000.
  • [5] H. Elman and D. Silvester. Collocation methods for exploring perturbations in linear stability analysis. SIAM Journal on Scientific Computing, 40(4):A2667–A2693, 2018.
  • [6] H. C. Elman, K. Meerbergen, A. Spence, and M. Wu. Lyapunov inverse iteration for identifying Hopf bifurcations in models of incompressible flow. SIAM Journal on Scientific Computing, 34(3):A1584–A1606, 2012.
  • [7] H. C. Elman, A. Ramage, and D. J. Silvester. IFISS: A computational laboratory for investigating incompressible flow problems. SIAM Review, 56:261–273, 2014.
  • [8] H. C. Elman, D. J. Silvester, and A. J. Wathen. Finite elements and fast iterative solvers: with applications in incompressible fluid dynamics. Numerical Mathematics and Scientific Computation. Oxford University Press, New York, second edition, 2014.
  • [9] H. C. Elman and T. Su. Low-rank solution methods for stochastic eigenvalue problems. SIAM Journal on Scientific Computing, 41(4):A2657–A2680, 2019.
  • [10] Oliver G. Ernst, Antje Mugler, Hans-Jörg Starkloff, and Elisabeth Ullmann. On the convergence of generalized polynomial chaos expansions. ESAIM: Mathematical Modelling and Numerical Analysis, 46(2):317–339, 2012.
  • [11] R. G. Ghanem. The nonlinear Gaussian spectrum of log-normal stochastic processes and variables. Journal of Applied Mechanics, 66(4):964–973, 1999.
  • [12] R. G. Ghanem and P. D. Spanos. Stochastic Finite Elements: A Spectral Approach. Springer-Verlag New York, Inc., New York, NY, USA, 1991. (Revised edition by Dover Publications, 2003).
  • [13] W. Govaerts. Numerical Methods for Bifurcations of Dynamical Equilibria. SIAM, Philadelphia, 2000.
  • [14] W. Hager. Updating the inverse of a matrix. SIAM Review, 31(2):221–239, 1989.
  • [15] H. Hakula and M. Laaksonen. Multiparametric shell eigenvalue problems. Computer Methods in Applied Mechanics and Engineering, 343:721–745, 2019.
  • [16] W. Kerner. Large-scale complex eigenvalue problems. Journal of Computational Physics, 85(1):1–85, 1989.
  • [17] O. Le Maître and O. M. Knio. Spectral Methods for Uncertainty Quantification: With Applications to Computational Fluid Dynamics. Scientific Computation. Springer, 2010.
  • [18] K. Lee, H. C. Elman, and B. Sousedík. A low-rank solver for the Navier-Stokes equations with uncertain viscosity. SIAM/ASA Journal on Uncertainty Quantification, 7(4):1275–1300, 2019.
  • [19] K. Lee and B. Sousedík. Inexact methods for symmetric stochastic eigenvalue problems. SIAM/ASA Journal on Uncertainty Quantification, 6(4):1744–1776, 2018.
  • [20] The Mathworks, Inc., Natick, Massachusetts. MATLAB version 9.10.0.1684407 (R2021a) Update 3, 2021.
  • [21] H. G. Matthies and A. Keese. Galerkin methods for linear and nonlinear elliptic stochastic partial differential equations. Computer Methods in Applied Mechanics and Engineering, 194(12–16):1295–1331, 2005.
  • [22] C. D. Meyer. Matrix Analysis and Applied Linear Algebra. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2000.
  • [23] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, New York, first edition, 1999.
  • [24] C. E. Powell and D. J. Silvester. Preconditioning steady-state Navier-Stokes equations with random data. SIAM Journal on Scientific Computing, 34(5):A2482–A2506, 2012.
  • [25] E. Sarrouy, O. Dessombz, and J.-J. Sinou. Stochastic analysis of the eigenvalue problem for mechanical systems using polynomial chaos expansion— application to a finite element rotor. Journal of Vibration and Acoustics, 134(5):1–12, 2012.
  • [26] E. Sarrouy, O. Dessombz, and J.-J. Sinou. Piecewise polynomial chaos expansion with an application to brake squeal of a linear brake system. Journal of Sound and Vibration, 332(3):577–594, 2013.
  • [27] P. J. Schmid and D. S. Henningson. Stability and Transition in Shear Flows. Springer, New York, 2001.
  • [28] Benjamin E. Sonday, Robert D. Berry, Habib N. Najm, and Bert J. Debusschere. Eigenvalues of the Jacobian of a Galerkin-projected uncertain ode system. SIAM Journal on Scientific Computing, 33(3):1212–1233, 2011.
  • [29] B. Sousedík and H. C. Elman. Inverse subspace iteration for spectral stochastic finite element methods. SIAM/ASA Journal on Uncertainty Quantification, 4(1):163–189, 2016.
  • [30] B. Sousedík and H. C. Elman. Stochastic Galerkin methods for the steady-state Navier-Stokes equations. Journal of Computational Physics, 316:435–452, 2016.
  • [31] B. Sousedík, H. C. Elman, K. Lee, and R. Price. On surrogate learning for linear stability assessment of Navier-Stokes equations with stochastic viscosity. Applications of Mathematics, 2022. (Accepted.) Preprint available at arXiv:2103.00622.
  • [32] B. Sousedík and R. G. Ghanem. Truncated hierarchical preconditioning for the stochastic Galerkin FEM. International Journal for Uncertainty Quantification, 4(4):333–348, 2014.
  • [33] D. Xiu. Numerical Methods for Stochastic Computations: A Spectral Method Approach. Princeton University Press, 2010.
  • [34] D. Xiu and G. E. Karniadakis. The Wiener-Askey polynomial chaos for stochastic differential equations. SIAM Journal on Scientific Computing, 24(2):619–644, 2002.