Stochastic approaches to uncertainty quantification in CFD ... - limsi

43 downloads 0 Views 4MB Size Report
Not only is it important to quantify uncertainty but it is also important to establish a confidence interval for the simulation-based predictions or design (cf. [6]).
STOCHASTIC APPROACHES TO UNCERTAINTY QUANTIFICATION IN CFD SIMULATIONS LIONEL MATHELIN† , M. YOUSUFF HUSSAINI‡ AND THOMAS A. ZANG∗

Abstract. This paper discusses two stochastic approaches to computing the propagation of uncertainty in numerical simulations: Polynomial Chaos and Stochastic Collocation. Chebyshev polynomials are used in both cases for the conventional, deterministic portion of the discretization in physical space. For the stochastic parameters, Polynomial Chaos utilizes a Galerkin approximation based upon expansions in Hermite polynomials, whereas Stochastic Collocation rests upon a novel transformation between the stochastic space and an artificial space. In our present implementation of stochastic collocation, Legendre interpolating polynomials are employed. These methods are discussed in the specific context of a quasi-one-dimensional nozzle flow with uncertainty in inlet conditions and nozzle shape. It is shown that both stochastic approaches efficiently handle uncertainty propagation. Furthermore, these approaches enable computation of statistical moments of arbitrary order in a much more effective way than other usual techniques such as the Monte Carlo simulation or perturbation methods. The numerical results indicate that the Stochastic Collocation method is substantially more efficient than the full Galerkin, Polynomial Chaos method. Moreover, the Stochastic Collocation Method extends readily to highly nonlinear equations. An important application is to the stochastic Riemann problem, which is of particular interest for spectral Discontinuous Galerkin Methods. Key words. uncertainty, stochastic, probabilistic, Polynomial Chaos, nozzle flow. Subject classification. Applied and numerical mathematics. 1. Background. Seemingly from time immemorial, uncertainty in computational fluid dynamics (CFD) has meant primarily discretization error and secondarily turbulence modeling limitations. In reality, though, there are numerous types of uncertainties associated with CFD simulations, and one ought to account for all aspects of uncertainty in assessing the simulations. Some of the early advocates of this broader perspective were Mehta [9], Roache [16], Coleman and Stern [3] and Oberkampf and Blottner [12]. This realization has been gaining momentum in the CFD community in the last few years. Indeed the American Institute for Aeronautics and Astronautics has produced guidelines on the subject ([1]). Several references, many of them broader than just the CFD field, which provide background in the subject of computational uncertainty are now available (e.g. [13, 19, 24, 7, 14]). Not only is it important to quantify uncertainty but it is also important to establish a confidence interval for the simulation-based predictions or design (cf. [6]). Some sources of uncertainty identified in numerical simulations include: • inaccuracy / indeterminacy of initial conditions (experimental data, variability of operating environment), • lack of knowledge of phenomenological models (turbulence model), • approximations in the mathematical model (due to linearization or assumptions that neglect some physical effects such as temperature and/or pressure dependence of relevant physical parameters), † email:

[email protected], Florida State University, Tallahassee, FL 32306-4120. Present address: LadHyX - Ecole Polytechnique, 91128 Palaiseau cedex, FRANCE. ‡ email: [email protected], Florida State University, Tallahassee, FL 32306-4120. ∗ email: [email protected], NASA Langley Research Center, Hampton, VA 23681-2199.

1

• uncertainty in describing the physical reality (errors in geometry, roughness, boundary conditions), • discretization errors (numerical diffusion, round-off, algorithmic errors due to incomplete iteration process, etc.). For a particularly striking example of the effects of some of these uncertainties from several dozen different CFD simulations of the same case, see the results from the 2001 AIAA Drag Prediction Workshop ([5]). However, there are many aspects of computational uncertainty which lie outside the domain of the mathematical model and numerical issues. This point is stressed in many of the references cited above. In this paper we focus on the probabilistic aspects of the simulations due to the stochastic nature of the initial and boundary conditions. One crucial issue is to accurately propagate uncertainty from, say, the boundary conditions to the bulk field and finally to the output of the simulation. Several techniques have been proposed in the past. Among these, the currently most commonly used if the so-called perturbation technique that basically involves expanding the variables of the problem in terms of Taylor series around their mean value (e.g. [18]). Though certainly effective in some circumstances, this technique is limited to Gaussian or weakly non-Gaussian processes due to the difficulty in incorporating terms of order higher than two. Still, this technique allows for a quick estimation of the low order statistics. When one wants to get access to the full statistics, one can make use of the Monte Carlo technique. It is considered as an “exact” method for accounting for uncertainty in the sense that it does not require any approximations or assumptions. The main advantages are that its convergence rate does not depend on the number of independent random variables and that its application is straightforward. However, it becomes intractable for large problems as it requires to carry thousands of simulations which results in prohibitive 2 2 CPU time. Indeed, the resulting approximation variance of a σ 2 -variance random process is σM C = σ /n where n is the number of independent samples. Despite some techniques which improve the convergence rate (Latin Hypercube, importance sampling, etc.), this last point prevents its use for most of the practical problems currently studied by CFD. Another possible approach consists in deriving the inverse of the stochastic operator (that represents the governing equations) by expanding it in a Neumann series. Meanwhile, the derivation of the Neumann series may however becomes difficult, if not impossible, for complex problems. An alternative, and more effective, approach is the Polynomial Chaos. Originating from the work of Wiener (1938) and mainly applied to date in the field of structural mechanics, this technique is now making its way in the fluid mechanics community ([22, 23, 19, 21]). The basic idea is to project the variables of the problem onto a stochastic space spanned by a set of complete orthogonal polynomials Ψ function of a random variable ξ(θ) where θ is a random event. The terms of the polynomial are function of ξ(θ) and are thus functional. Many random variables can be used: for example, ξ(θ) can be a Gaussian variable associated with Hermite polynomials. This is the original form of the Wiener work and is called homogeneous chaos. Other expansions are possible: Laguerre polynomials with a Gamma distributed variable, Jacobi polynomials with Beta distribution, etc. Obviously, the convergence rate, and thus the number of terms required for a given accuracy, depends both on the random process to be approximated and on the random variable used. This aspect was illustrated by [22]. Using this approach, each variable of the problem to simulate is expanded as, say for the velocity u u(x, t, θ) =

∞ X

ui (x, t) Ψi (ξ(θ)) .

(1.1)

i=0

For practical simulations, the series has to be truncated to a finite number of terms, hereafter denoted N P C .

2

This framework remains valid also for partially, or non-, correlated variables. In that case, the variables of the problem are function of several independent random variables and ξ is now a vector. The general expression for the Hermite polynomial H is ξT ξ

1

Hp (ξi1 , . . . , ξin ) = (−1)p e 2

∂ξi1

1 ∂p e− 2 . . . ∂ξin

ξT ξ

.

(1.2)

As discussed in [4], there is a one-to-one correspondence between functions H p (ξi1 , . . . , ξin ) and Ψj (ξ(θ)). The general expression for the Hermite Chaos is finally given by u(x, t, θ) =

N PC X

ui (x, t) Ψi (ξ(θ)) ,

(1.3)

i=0

with the number of terms NP C determined from (npc + ppc )! , npc ! ppc !

NP C + 1 =

(1.4)

where ppc is the order of the expansion and npc the dimensionality. It follows that NP C grows very quickly with the dimension and the order of the decomposition. As an example, for a second order, 2-D Hermite polynomial expansion, we get ¡ ¢ ¡ ¢ u(x, t, θ) = u0 (x, t)+u1 (x, t)ξ1 (θ)+u2 (x, t)ξ2 (θ)+u3 (x, t) ξ12 (θ) − 1 +u4 (x, t)ξ1 (θ)ξ2 (θ)+u5 (x, t) ξ22 (θ) − 1 (1.5) where ξ1 (θ) and ξ2 (θ) are two independent random variables. In the case of the Hermite polynomials, the zeroth order represents the mean value and the first order the Gaussian part while higher orders account for non-Gaussian contributions. The Hermite polynomials span a complete orthogonal set of basis functions in the stochastic space. The inner product is expressed as Z ∞ f1 (ξ) f2 (ξ) w(ξ) dξ , (1.6) hf1 (ξ) f2 (ξ)i = −∞

where the weight function w(ξ) is the npc -D normal distribution

In the L2 norm space, we thus get

w(ξ) = p

1 (2

1

π)npc

e− 2

ξT ξ

.

hΨi Ψj i = hΨ2i i δij ,

(1.7)

(1.8)

where δ is the Kronecker operator. The standard Polynomial Chaos approach uses a Galerkin method (in x and ξ) for deriving the appropriate discrete equations for the expansions coefficients. The contributions of this paper are two-fold: (1) application of Polynomial Chaos to compressible flow in a quasi-one-dimensional (quasi-1D) nozzle; and (2) development and demonstration of an alternative discretization for the stochastic component, which we term the Stochastic Collocation Method (SCM). In the Stochastic Collocation Method for one random variable, the finite expression corresponding to (1.1) is u(x, t, α) =

Nq X i=0

3

ui (x, t) hi (α) ,

(1.9)

where α is an artificial variable introduced to facilitate the collocation process (see §4 for the details), h i is the Lagrange interpolating polynomial corresponding to the collocation points in α-space, and N q denotes the degree of the polynomial. Our development of the SCM is driven by our desire to obtain an accurate but less expensive alternative to Polynomial Chaos for computing uncertainty propagation. In Section 2 we furnish the governing equations and uncertainty description for quasi-1D nozzle. The next section covers the discretization procedures. Section 4 demonstrates the new Stochastic Collocation Method on a Riemann problem. Section 5 presents numerous results for quasi-1D nozzle flow using Polynomial Chaos, and compares its computational cost with that of the Stochastic Collocation Method. 2. Stochastic Quasi-One-Dimensional Nozzle Flow. 2.1. Basic Equations. To illustrate the stochastic approaches and set a physical basis for further tests and development, the Polynomial Chaos technique was applied to a quasi-1D nozzle flow. The physics of the phenomena involved in a nozzle flow are well understood and the configuration is simple enough to allow focusing on stochastic treatment rather than on numerical problems, making this configuration an appropriate choice. The system of compressible Euler equations is written in conservative form: Qt + F x = S

on

]xI ; xE [ ,

(2.1)

where 



ρA

  Q= ρuA  , ρEA





ρuA

  F =  ρ u2 A + P A  , ρuEA+P uA



0



  S =  P ∂A/∂x  , 0

(2.2)

with ρ the density, u the velocity, A the cross-section area, P the static pressure and E the total energy. The inlet (or inflow) stations is at xI and the exit (or outflow) station is at xE . The pressure can be removed from the above equations making use of the following equation: E=

1 P + u2 . (γ − 1) ρ 2

(2.3)

The vectors in expression (2.2) thus become 

 ρA   Q= ρuA  , ρEA

 ρuA   2 F =  3−γ , 2 ρ u A + (γ − 1) ρ E A  γ−1 3 γρuEA− 2 ρu A 



0

h  (γ − 1) ρE− S=  0

ρ u2 2

i



 ∂A/∂x   .

(2.4)

The particular problem studied here is that of a supersonic diverging nozzle with inlet Mach number 1.2. This choice was made to avoid the complications of discontinuous solutions in this initial application of stochastic methods to this compressible flow problem. The nozzle contours of the baseline problem as a function of the flow direction x are plotted in Figure 2.1. Uncertainty is considered to arise both from uncertainty in the inlet boundary conditions (pressure, velocity and density) and also from variability (as might be produced by the limitations of manufacturing processes) in the nozzle geometry.

4

Fig. 2.1. Nozzle cross-section mean value along the streamwise distance.

2.2. Karhunen-Loeve expansion. The inlet boundary conditions are given by simple scalar quantities, whereas the nozzle geometry is described by a function of x. While the uncertainty in any one of the inlet boundary conditions can be described by a single random variable, the variability in the nozzle geometry requires a more complex description. We use the well-known Karhunen-Loeve expansion for this. In general, let u(x, t, θ) be a random function of x and t. Then the mean value of u(x, t, θ) is denoted by u(x, t) ,

(2.5)

and the variance by 2

var(u(x, t, θ)) = h(u(x, t) − u(x, t)) i .

(2.6)

Let v(x, t, θ) be a second random function. The covariance function C is given by, say, Cuv (x1 , t1 ; x2 , t2 ) = h(u(x1 , t1 ) − u(x1 , t1 )) (v(x2 , t2 ) − v(x2 , t2 ))i .

(2.7)

In the special case of spatial autocovariance,

Cuu (x1 ; x2 , t2 ) = h(u(x1 ) − u(x1 )) (u(x2 ) − u(x2 ))i .

(2.8)

When the structure of the covariance function C is known, the most effective representation of a random process is through the Karhunen-Loeve decomposition. The spectral representation of the autocovariance function is

C(x1 , t1 ; x2 , t2 ) =

∞ X

λi fi (x1 , t1 ) fi (x2 , t2 )

i=0

where λi and fi (x, t) are the eigenvalues and eigenfunctions of the covariance kernel, respectively. Thus, the random process u(x, t, θ) can be expressed by (see derivation in [4])

5

(2.9)

u(x, t, θ) = u(x, t, θ) +

∞ p X

λi fi (x, t) ϕi (θ) ,

(2.10)

i=1

where the ϕi are random variables to be determined. The rate of decay of the eigenvalues λi , which depends upon the stochastic spectrum of the random process, governs the number of terms that are retained in the Karhunen-Loeve expansion. The number of retained terms determines the number of stochastic dimensions of the problem. As a limiting case, for a perfectly white noise random field, the stochastic spectrum is “full” and an infinite number of terms needs to be considered. 2.3. Nozzle geometry variability description. Due to manufacturing limitations, the shape of the nozzle is subject to some inevitable level of variability. We assume that the variability of the nozzle area A(x) is described by a Gaussian distribution, and that its partial correlations along the x direction follow the covariance CAA (x1 , x2 ) = σ 2 e−

|x1 −x2 | b

,

(2.11)

where b is the correlation length and σ 2 the associated variance. As the covariance structure of the crosssection area A is known, the Karhunen-Loeve decomposition is used to represent the stochastic process. We get

A(x) = A(x) +

∞ p X

λi Φi (x) ϕi (θ) ,

(2.12)

i=1

and Z

CAA (x1 , x2 ) Φi (x2 ) dx2 = λi Φi (x1 )

on

[−a; a] .

(2.13)

The eigenvalue problem has the solution ([23]) λi =

2 b σ2 , 1 + b2 ωi2

(2.14)

where the ωi are the solutions of the transcendental equations 1 − ωi tan(a ωi ) = 0 b

if i is odd ,

(2.15)

1 tan(a ωi ) = 0 b

if i is even .

(2.16)

and

ωi + The eigenfunctions are

Φi (x) = q

cos(ωi x) a+

sin(2 ωi a) 2 ωi

and

6

if i is odd ,

(2.17)

Φi (x) = q

sin(ωi x) a−

sin(2 ωi a) 2 ωi

if i is even .

(2.18)

Here, since A is assumed to be Gaussian, the corresponding random variables ϕ i are also Gaussian and form an orthonormal basis. We thus have ϕi (θ) = ξi (θ) and A can be directly expressed as

A(x) = A(x) +

∞ p X λi Φi (x) ξi (θ) .

(2.19)

i=1

For the examples presented in this paper, we take b = 20 and σ = 0.05. Figure 2.2 shows the first seven eigenvalues. Due to the rapid decay, only the first two terms are retained in the expansion: i = 0 (mean area) and i = 1.

(a) Cartesian scale.

(b) Log scale.

Fig. 2.2. Eigenvalues spectrum.

The resulting “fuzzy” cross-section area is plotted in Figure 2.3. For the Polynomial Chaos simulations reported in this paper the area function is applied in terms of its Polynomial Chaos expansion A(x) =

∞ X

Ai (x) Ψi (ξ(θ)) .

(2.20)

i=0

This is obtained by projecting the Karhunen-Loeve expansion onto the space spanned by the Polynomial Chaos: P∞ p A(x) hΨi i + j=1 λj Φj (x) hΨi ξj i hA(x) Ψi i Ai (x) = = . (2.21) hΨ2i i hΨ2i i The Stochastic Collocation Method simulations use this same projection for the description of the nozzle variability.

7

Z Y X

40000

30000

20000

10000

0

1 2

S tre 2 amw ise 3 dist anc 4 e

1.75

area ion 1.25 -sect ss Cro 1.5

1

5

0.75

Fig. 2.3. Stochastic cross-section area Probability Distribution Function (PDF).

3. Chebyshev/Polynomial Chaos Discretization. In this approach the Euler equations are discretized using a Chebyshev Galerkin spectral element method( [15]) in physical space, a Polynomial Chaos Galerkin spectral method in the stochastic independent variable(s), and a fourth-order Runge–Kutta scheme in time. The CFL number for the time integration was fixed at 0.5. 3.1. Physical space discretization. The physical space is spanned by the Chebyshev polynomials of degree ≤ N . In local coordinates x ∈ [−1; 1] the relevant Gauss-Lobatto points are ³π n´ xn = cos ∀n ∈ [0; N ] ⊂ N . (3.1) N The dependent variables, say u, are expressed as u(x, t) =

N X

un (t) hn (x)

(3.2)

n=0

where

hn (x) =

N 2 X 1 Tm (xn ) Tm (x) , N m=0 cn cm

(3.3)

with Tm the Chebyshev polynomials and ci given by

ci = 2

i ∈ {0; N }

(3.4)

ci = 1

i ∈]0; N [⊂ N .

(3.5)

8

3.2. Polynomial Chaos stochastic space discretization. Similarly, in the stochastic space,

u(θ, x, t) =

N PC X

ui (x, t) Ψi (ξ(θ)) .

(3.6)

i=0

Equation (2.1) is projected onto the spectral and stochastic basis and the Galerkin technique is applied. The terms in the resulting discrete equations are



N PC N PC X X

N X

ρi,n Aj hΨi Ψj Ψl i (hn , hp )    i=0 j=0 n=0  NX N X N PC N PC X X  P C NX ρi,n uj,m Ak hΨi Ψj Ψk Ψl i (hn , hm , hp ) Q=   i=0 j=0 k=0 n=0 m=0  N N N N N X PC X PC X PC X  X  ρi,n Ej,m Ak hΨi Ψj Ψk Ψl i (hn , hm , hp ) i=0



j=0

k=0 n=0 m=0

           

∀ {l ∈ [0; NP C ], p ∈ [0; N ]} ⊂ N ,

(3.7)



0

  N N X N PC N PC N PC X   X X X ∂Ak   (γ − 1) hΨi Ψj Ψk Ψl i (hn , hm , hp ) ρi,n Ej,m   ∂x   i=0 j=0 k=0 n=0 m=0  , S= N N N N N N N   P C P C P C P C γ−1 X X X X X X X ∂Ar    − hΨi Ψj Ψk Ψr Ψl i (hn , hm , ho , hp )  ρi,n uj,m uk,o   2 ∂x i=0 j=0 k=0 r=0 n=0 m=0 o=0   0 (3.8)

9

0

NP C NP C NP C

N N X X X X X

»

∂Ak ρi,n uj,m hΨi Ψj Ψk Ψl i (hn , hm , hp ) + Ak ∂x m=0 j=0 k=0 n=0 ««– „ ∂hm hn , , hp ∂x

„„

« ∂hn , hm , hp + ∂x

B B i=0 B B B B B B B B B B B NP C NP C NP C NP C N N N » B X X X X X X X 3−γ ∂Ak B ρ u u hΨ Ψ Ψ Ψ Ψ i (hn , hm , ho , hp ) + i,n j,m k,o i j r k l B ∂x B i=0 j=0 k=0 r=0 n=0 m=0 o=0 2 « „ « „ ««– „„ B B ∂hm ∂ho ∂hn B + h + h + A , h , h , h n, n , hm , m , ho , hp o , hp p k B ∂x ∂x ∂x B » N N N N N PC X X PC X PC X B X ∂Ak B ρi,n Ej,m hΨi Ψj Ψk Ψl i (hn , hm , hp ) (γ − 1) + B B ∂x m=0 n=0 i=0 j=0 k=0 B „„ « „ ««– ∂F B ∂hn ∂hm =B Ak , h m , h p + hn , , hp B ∂x ∂x ∂x B B B B B B B NP C NP C NP C NP C N N N » B X X X X X X X ∂Ak B γ ρi,n uj,m Ek,o hΨi Ψj Ψk Ψr Ψl i (hn , hm , ho , hp ) + B ∂x B i=0 j=0 k=0 r=0 n=0 m=0 o=0 „„ « „ « „ ««– B B ∂hn ∂hm ∂ho B Ak , h m , h o , h p + hn , , h o , h p + hn , h m , , hp − B ∂x ∂x ∂x B N N N N N N N N N PC PC PC PC PC B γ−1 X X X X X X X X X B ρi,n uj,m uk,o ur,q hΨi Ψj Ψk Ψr Ψs Ψl i B B 2 s=0 r=0 n=0 m=0 o=0 q=0 j=0 i=0 k=0 B « „ « „„ » B ∂hm ∂hn ∂Ak B + Ak , h m , h o , h q , h p + hn , , ho , hq , hp + (hn , hm , ho , hq , hp ) B ∂x ∂x B «∂x „ ««– „ @ ∂hq ∂ho , h q , h p + hn , h m , h o , , hp hn , h m , ∂x ∂x

1

C C C C C C C C C C C C C C C C C C C C C C C C C C C C C , C C C C C C C C C C C C C C C C C C C C C C C C C C A

(3.9)

where γ is the specific heat ratio (γ = 1.4 for diatomic gas). These expressions contain numerous scalar products in both physical space and stochastic space. An example of the former (physical space) is (hn , hm , ho ) = =

Z

1

hn (x) hm (x) ho (x) dx

(3.10)

−1

Z 1 N N N 8 X X X Ta (xn ) Tb (xm ) Tc (xo ) Ta (x) Tb (x) Tc (x) dx , N 3 a=0 ca cb cc cn cm co −1 c=0 b=0

and an example of the latter (stochastic space) is hΨi Ψj Ψk Ψl i = p

1 (2

π)2

Z

∞ −∞

Z

∞ 1

Ψ i Ψ j Ψ k Ψ l e− 2

ξT ξ

dξ .

(3.11)

−∞

In most of the simulations reported here the physical space discretization used 3 points per element and 30 elements. The statistics of a variable u can be determined from its Polynomial Chaos expansion in relatively simple form. The mean value of a variable is given by the zeroth term of the series. The variance reduces to var(u(x, t, θ)) =

N PC X i=1

10

u2i (x, t) hΨ2i i ,

(3.12)

and the spatial autocovariance becomes

Cuu (x1 ; x2 ) =

N PC X

ui (x1 ) ui (x2 ) hΨ2i i .

(3.13)

i=1

4. Stochastic Collocation Method. The Stochastic Collocation Method was developed by Mathelin and Hussaini [8] to enable application of stochastic methods to Spectral Discontinuous Galerkin Methods (cf., [2]) as well as to reduce the cost of Polynomial Chaos methods. The algorithmic challenge for stochastic discretizations of Spectral Discontinuous Galerkin Methods in Computational Fluid Dynamics applications is that a stochastic Riemann problem must be solved. An efficient approach to solving the highly nonlinear Riemann problem using the Polynomial Chaos method is not obvious. In order to overcome this barrier, a new technique is required. Moreover, for more manageable applications such as quasi-1D nozzle flow (which has low-order polynomial nonlinearities) it is desirable to reduce the computational cost of the Polynomial Chaos method. Let a and b be two independent random variables. As already seen in section 1, in the Polynomial Chaos method, the finite series for each variable would be expressed as, say, for a, a=

N PC X

ai Ψi (ξ) ,

(4.1)

i=0

and the product ab would be ab =

N PC N PC X X

ai bj Ψi (ξ)Ψj (ξ) .

(4.2)

i=0 j=0

(Here we drop any dependence upon x and t and concentrate on just the random variable ξ without reference to the random event parameter θ.) The usual Galerkin truncation yields for the expansion coefficients of the product c = ab (ab)k =

N PC N PC X X i=0

ai bj hΨi Ψj Ψk i

∀k ∈ [0; NP C ] ⊂ N .

(4.3)

j=0

Therefore, computing the NP C + 1 coefficients of the product ab takes of order NP3 C operations and the complexity becomes even greater for cubic products. For non-polynomial nonlinearities (e.g. geometrical and hypergeometrical functions such as those that arise in the Riemann problem), the Galerkin truncation is not obvious. For traditional deterministic problems, these difficulties are often treated by resorting to a collocation method instead of the Galerkin method. The usual spatial collocation approach consists of projecting the equations into the physical space (x). But a “physical space” corresponding to the random variable ξ has limited physical meaning, and the spatial scheme cannot be directly transformed. To deal with this problem, we define a new stochastic space whose properties are known. In the stochastic collocation method one lets the Probability Density Function (PDF) of the random variable ξ serve as the basis for the transformation between the physical random variable ξ and its artificial stochastic space. We use α to denote a point in this artificial stochastic space. The range of the corresponding Cumulative Distribution Function (CDF) is [0,1], and provided that the underlying PDF is non-zero in the interior of its domain, the CDF is strictly monotonic and therefore this transformation is bijective. Denote

11

the CDF of ξ by Fξ (ξ). We prefer to map the CDF to the standard domain [-1,1] of orthogonal polynomials, and so we define Fξ (ξ) = 2Fξ (ξ) − 1 .

(4.4)

Finally, denote the inverse of Fξ by Gξ . Let α be a point in the domain [-1,1] of G. This is the new, known stochastic space that is the foundation of the SCM. We have then α = Fξ (ξ) = 2Fξ (ξ) − 1

(4.5)

ξ = Gξ (α) .

(4.6)

and

The SCM utilizes collocation points αi , i = 0, . . . , Nq , in [-1,1] . These have associated quadrature weights wi , chosen to give the best approximation to inner products on [-1,1]. In the present work we make the particular choice of the Gauss-Legendre points and weights. The collocation points in the stochastic space are associated with the points ξi , i = 0, . . . , Nq , in random variable space according to (4.6). Let us return now to the example of evaluating the product of two random variables a and b. First we construct the appropriate mapping functions, Fa and Fb (and also their inverses Ga and Gb ), from the PDFs of a and b. Second, we evaluate a and b at the points αi , obtaining ai = Ga (αi )

i = 0, . . . , Nq

bi = Gb (αi )

i = 0, . . . , Nq .

(4.7)

These functions are then approximated in α-space by their interpolating polynomials, as for example, a

Nq

(α) =

Nq X

aj hj (α) ,

(4.8)

j=0

where the functions hi are the classical Lagrange interpolants based on the Nq + 1 collocation points, i.e., hj is a polynomial of degree Nq and hj (αi ) = δij . The representation of the product c = ab associated with a Galerkin method would be < aNq bNq hk >=

Nq Nq X X

a i bj < h i h j h k > .

(4.9)

i=0 j=0

But in the SCM we resort to the quadrature rule to approximate this as < a N q bN q h k > '

Nq Nq Nq XX X

ai bj hi (αl )hj (αl )hk (αl ) wl

Nq Nq Nq XX X

ai bj δil δjl δkl wl

l=0 i=0 j=0

=

(4.10)

l=0 i=0 j=0

= a k bk w k . So, the representation of the product is just Gc (α) ≡ c

Nq

(α) =

Nq X

k=0

12

(ak bk wk ) hk (α) .

(4.11)

The last step is to map this result back into the random variable space to obtain the approximate CDF of c = ab. Recall that (4.11) gives the representation in α-space of the random variable c. We now need to back out the CDF of c from the transformation rules (4.5) and (4.6). (In these equations we make the appropriate identification ξ = c.) We have, finally, for the CDF, Fc , of c ´ 1³ Fc (c) + 1 2 ´ 1 ³ −1 = Gc (α) + 1 , 2

Fc (c) =

(4.12)

recalling that Fc is the inverse function of Gc . The PDF of c is then readily obtained by differentiation of (4.12). In our present implementation of the SCM we use standard interpolation methods for the mappings (4.5) and (4.12). For the forward mapping we start with a uniform distribution of the ξ i (ai in our example) for representing the PDF of ξ. We base the interpolant for the inverse mapping on the collocation points α i , in which case we have Gc (αi ) = ai bi wi

i = 0, . . . , Nq ,

(4.13)

since hk (αi ) = δik . The complexity of this implementation of the SCM in one dimension is N q , regardless of the form of the nonlinearity. In contrast the Galerkin method already scales as NP3 C for a simple quadratic nonlinearity. The quadrature in the stochastic collocation method does introduce additional errors compared with those of the Galerkin method, but these are reduced as Nq increases. This is usually not a major issue since the collocation scheme allows for dramatic speed-up compared to full Galerkin approach and a relatively high value for Nq is affordable. As an example of this process, consider the cubic equation f (u) = u3 ,

(4.14)

where u is a Gaussian random variable, with mean 1.0 and standard deviation of 0.1. Figure 4.1 shows the PDF of u, the α-representation of u, the α-representation of f (u) = u3 , and the corresponding PDF of f (u).

5. Demonstration of the Stochastic Collocation Method on the Riemann Solver. We first illustrate the versatility of the above method on the stochastic Riemann problem. In the context of fluid dynamics, the Riemann problem is specified by an initial state in which the field variables have a discontinuity at some point in space. The general solution to this contains a shock wave, a rarefaction wave and an expansion fan. See Landau & Lifshitz ([10]) or Liepmann & Roshko ([11]) for a review of the physical phenomena involved. To compute the resulting state for later times, one can make use of the algorithm proposed by Sod ([17]). The equations for this are distinctly non-linear, including rational powers and conditional equations. While the treatment of these equations is straightforward in a deterministic space, it is problematic for a stochastic approach. For example, the particular expressions involved depend on whether the pressure ratio P ∗ /P is greater or lesser than 1 and the alternative expressions are quite different. But when both pressures are non-deterministic, what does P ∗ /P > 1 or P ∗ /P < 1 mean ?

13

(a) PDF of input function u.

(b) Projection of the input function into the α-space.

(c) Output function f (u) in the α-space

(d) PDF of output function f (u).

Fig. 4.1. Illustration of stochastic collocation for f (u) = u 3 .

Using the collocation scheme, however, all the variables have a deterministic expression at every point in the artificial α-space. It is then possible to determine the resulting pressure ratio at each α unambiguously, and thence to compute the corresponding output states at each α. Finally, the transformation back to the stochastic space produces the density functions of each variable. Figures 5.1 through 5.3 illustrate such a solution to a stochastic Riemann problem using Nq = 200 collocation points. For this Riemann problem the values of the initial left state are for ρ, a mean of 1, and a standard deviation of 0.0 (in kg/m 3 ); for u, a mean of 280 and a standard deviation of 1 (in m/s); and for P a mean of 101,325 and a standard deviation of 100 (in Pa). All had zero skewness (kurtosis). The values for the initial right state are for ρ, a mean of 0.7, a standard deviation of 0.15 and a skewness of -0.017 (in kg/m 3 ); for u, a mean of 190, a standard deviation of 30 and a skewness of 1.9 (in m/s); and for P a mean of 40,000, a standard deviation of 8,000 and a skewness of 100 (in Pa). 6. Stochastic Simulations for the Quasi-1D Nozzle Flow. 6.1. Mean flow code. The principal objective of this section is to demonstrate the type of uncertainty information that can be obtained from the stochastic approaches discussed in this paper. Most of the results

14

(a) Left state.

(b) Interface state.

(c) Right state.

Fig. 5.1. Density PDF evolution throughout a discontinuity.

(a) Left state.

(b) Interface state.

(c) Right state.

Fig. 5.2. Velocity PDF evolution throughout a discontinuity.

(a) Left state.

(b) Interface state.

(c) Right state.

Fig. 5.3. Pressure PDF evolution throughout a discontinuity.

are for simulations using the Polynomial Chaos methods, as this was the first method that we implemented. We have recently obtained results from the Stochastic Collocation Method, and we conclude the section with some comparative timings for the two approaches. For all the nozzle simulations reported here the mean flow is supersonic with an inlet Mach number of 1.2, a 1-atmosphere static pressure and unit density, i.e., u = 450 m/s, P = 101,325 Pa, and ρ = 1 kg/m3 . The inlet is located at xI = 0.3 m and the outlet at xE = 5.5 m. The equations were first solved deterministically for verification of the deterministic part of the code. The distributions along the nozzle of the mean values of the dependent variables, normalized with respect to their inlet values, are plotted in Figure 6.1. The flow is from left to right. As the fluid flows along the diverging nozzle, the pressure

15

Fig. 6.1. Normalized flow variables mean value distribution along the nozzle.

and density decrease, while the velocity and the total energy increase. This behavior is consistent with the expected evolution of supersonic diverging flow. 6.2. Verification of Polynomial Chaos code. To verify our implementation of the Polynomial Chaos (PC) approach to quasi-1D nozzle flow, we first compared PC results to conventional Monte Carlo simulations, i.e., Monte Carlo simulations which do not take advantage of any acceleration technique. The Monte Carlo (MC) method is sometimes referred to as an “exact” method in the sense that no approximations are required to handle the stochastic aspect. The mean flow conditions were as above. The velocity had a standard deviation of 10 m/s, but the density and pressure were deterministic, i.e., both a standard deviation of 0. The cross-section area is here taken to be deterministic as well. Hence, there is just a single random variable; it represents the effect upon all the flow variables of the stochastic component of the inlet velocity. There were 61 points in the deterministic coordinate x (30 elements with 3 points per element). The MC simulations used over 9 million independent samples. The PC computations have one stochastic variable, corresponding to the distribution at the inlet of the uncertain velocity, and use a second-order PC expansion. Figure 6.2 shows the comparisons between the PDFs obtained from the MC and the PC techniques for the density, pressure and velocity at the outlet of the nozzle. The density and pressure PDFs remain approximately Gaussian at the nozzle exit, while the velocity PDF becomes skewed due to non-linearity in the Euler equations. It can be seen that an excellent agreement between the two techniques is achieved, in particular for the density and the pressure for which the two curves almost match. For the velocity, the agreement is very good except in the left tail region, indicating the need for higher order in the PC expansion to improve the approximation. Meanwhile, this example clearly demonstrates the ability of the PC technique to accurately propagate uncertainty throughout the flow, even with a very limited number of terms in the expansion (3 terms in this case). Considering the difference in the CPU time required (1.7 × 10 6 s for MC

16

(a) Density.

(b) Velocity.

(c) Pressure.

Fig. 6.2. Outlet probability density function. 1-D 2nd order Polynomial Chaos (solid line) vs MonteCarlo (dots). Arbitrary units.

versus 70 s for PC), the speed-up ratio is approximately 24,000, hence making the PC a much more effective alternative to the MC technique for this case.

6.3. 1-D stochastic simulations. The simplest uncertainty propagation problems are those with noncorrelated 1-D random variables. In our first example only the inlet velocity is considered to be uncertain, while the remaining two inlet conditions are deterministic. The nozzle geometry variability was accounted for here and in the remaining stochastic simulations by means of a 2-term Karhunen-Loeve expansion, as discussed in §2.3 .The evolution of the first three stochastic modes of the density, velocity and pressure distribution along the nozzle is plotted in Figure 6.3. The modes are normalized with their respective maximum values. The zeroth-order mode follows the deterministic behavior; for example, the mean velocity increases with an increase in the cross-section area, as expected for a supersonic flow. The first-order mode, representing the standard deviation, decreases before stabilizing to a limit value in the final portion of the nozzle. This is due to the fact that in the configuration considered here (supersonic flow in a divergent nozzle), we have ∂ uexit /∂ uinlet < 1. The second-order mode, which accounts for the skewness, grows rapidly due to 17

nonlinearities, exhibits a maximum after a steep rise in the first part of the nozzle, and then decreases to a limit value. For the density and pressure boths mode 1 and 2 start from 0 since they are set deterministic at the inlet (zero variance, zero skewness). Due to coupling effects with the velocity, they both develop uncertainty as the flow goes downstream. The autocovariance can also be determined and is plotted in Figure 6.4 for the pressure. Its distribution is fully consistent with the corresponding first mode evolution from Figure 6.3. (The first mode is the variance, which corresponds to the autocovariance along x1 = x2 .) A more explicit representation is the distribution of the PDF of a variable along the nozzle. Figure 6.5 shows the velocity PDF distribution. It is seen that the variance decreases with the streamwise distance, again in agreement with the first mode evolution of Figure 6.3.

(a) Density.

(b) Velocity.

(c) Pressure.

Fig. 6.3. Stochastic normalized modes.

Another point of interest here is to study how uncertainty in the inlet temperature could affect both the thermal and also the dynamical behavior within the nozzle. The density and velocity are thus prescribed to

18

Fig. 6.4. Pressure autocovariance.

Z

Y X

60000

50000

40000

30000

20000

10000

0

S tr ea 2 mw ise

700 600

dis tan 4 ce

500 400

ity V eloc

Fig. 6.5. Velocity PDF distribution throughout the nozzle. Arbitrary PDF units.

be deterministic at the inlet, while the static temperature is set to 353 K with a 4.2 K standard deviation (1.2 %). From Figure 6.6 it is clearly seen that the temperature remains uncertain throughout the nozzle

19

and also that both the velocity and density develop uncertainty as the flow goes downstream. This result exhibits the fact that an uncertainty in the thermal conditions not only affects the thermal field but also the dynamical aspects. For example here, the 4.2 K uncertainty in the inlet static temperature induces a 4.9 K (1.3 %) standard deviation of the outlet static temperature, 2.8 m/s (0.4 %) for the velocity and 135 Pa (0.6 %) for the pressure, drastically influencing the nozzle performance.

(a) Density.

(b) Velocity.

(c) Static temperature.

Fig. 6.6. Stochastic normalized modes. Uncertainty in the inlet static temperature.

6.4. 2-D stochastic simulations. When random variables of the problem considered are decoupled or, at most, only partially correlated, the stochastic process must be described using several independent random variables ξ. To illustrate this more general problem, a 2-D 2nd order PC simulation is reported in this section. The inlet pressure and velocity are both assumed uncertain with no correlation, while the inlet density is considered to be deterministic. The mean conditions are the same as for the 1-D simulations. The standard deviations for the velocity and pressures are 10 m/s and 1000 Pa, respectively. The velocity has zero skewness, whereas the inlet pressure skewness is -50 Pa. Inlet pressure uncertainty is spanned along the stochastic dimension ξ1 while velocity uncertainty is spanned along dimension ξ2 . The nozzle shape, A, is assumed uncertain as well and is expanded in a 2-D Karhunen-Loeve series. All variables are now expanded using 6 terms within the stochastic space (cf. (1.4)). Figure 6.7 shows the first three modes of the variables

20

(a) Density modes.

(b) Velocity modes.

(c) Pressure modes.

Fig. 6.7. Distribution of the first three normalized modes for a 2-D 2nd order PC simulation.

along the nozzle. Mode 0 is the mean value, mode 1 is the standard deviation in stochastic space dimension ξ 1 and mode 2 is the standard deviation in dimension ξ2 . Higher modes account for coupling terms between the two stochastic dimensions and thus bring some skewness to the resulting PDF. They are not plotted for sake of clarity. As the inlet pressure and velocity are independent random variables, evolution of their modes 1 and 2 are little affected by cross coupling. We have observed that mode 2 of the velocity and pressure in this 2-D stochastic case behave very similarly to the respective mode 2 for the 1-D stochastic case shown in Figure 6.3. Similarly to the case studied in §6.3, the velocity mode 1 increases due to a finite pressure variance (mode 1). The density is prescribed to be deterministic at the inlet; therefore, modes 1 and 2 for it start from 0. As pressure and density behave similarly, the downstream evolution of their modes 1 and 2 are the same: mode 1 first decreases while mode 2 first increases. After they peak, they both asymptote to a limiting value as the velocity variance and the uncertainty in the stochastic dimension ξ 2 decrease. In Figure 6.8, the covariance distribution is plotted for u − P , u − ρ and ρ − P . Since all variables are presumed independent at the inlet, all the the covariance are zero at that point for the three figures.

21

(a) Velocity / Pressure.

(b) Velocity / Density.

(c) Density / Pressure.

Fig. 6.8. Distribution of the covariance.

Downstream, coupling effects spread the uncertainty across the different variables, leading the covariance to evolve until tending to a steady state near the outlet of the nozzle. An example of a parameter of engineering interest is the thrust produced by such a nozzle. Due to intrinsic uncertainties associated with different variables (inlet conditions, nozzle shape, etc.), the resulting thrust itself is uncertain. Having the PDF of the thrust along with its mean value would add valuable information to the nozzle process. Assuming the inlet conditions are those of a reservoir, the thrust reduces to the momentum flow rate at the exit: ¡ ¢ thrust = ρ A u2 outlet .

(6.1)

For the present case, the PDF of the resulting nozzle thrust is plotted in 6.9. This is approximately a Gaussian distribution centered around the deterministic value. In this simple example with Gaussian distributions for independent 2-D stochastic input uncertainties (in velocity and pressure) along with the nozzle geometry variability, the resulting thrust is approximately Gaussian as well, with minor skewness.

22

Fig. 6.9. PDF of the thrust of the nozzle. Arbitrary units.

6.5. Relative cost of Stochastic Collocation and Polynomial Chaos. The most complex nonlinearity arises for the third component of the inviscid momentum flux (3.9), which requires a 9-dimensional summation. Five of these sums are due to the Polynomial Chaos expansion, and would remain even for a simple finite-difference spatial discretization. Thus, the cost of the stochastic part of the Polynomial Chaos method for the quasi-1D nozzle problem scales as (NP C +1)5 . In contrast, the cost of the Stochastic Collocation Method scales linearly with Nq . The precise coefficients in front of these scaling terms are very problem dependent. We illustrate the relative cost of the two methods for a computation with a single stochastic variable using either NP C +1 = 4 for third-order Polynomial Chaos (see (1.4)) or Nq = 200 for the Stochastic Collocation. In Table 6.1, we present CPU timings (in seconds on a PC) for the two methods on the quasi-1D nozzle problem with N = 31 points in physical space (15 elements and 3 points per element) and the stochastic discretization parameters given above. Clearly, the SCM provides for a significant reduction in cost. We anticipate that the cost of the SCM computations for two stochastic variables will be a full order of magnitude lower than for Polynomial Chaos. Deterministic

PC1D

SCM1D

PC2D

SCM2D

19

1,760

298

93,600

N/A

Table 6.1 CPU time requirement for different computing methods. Euler model.

7. Conclusions. In this paper, the Polynomial Chaos stochastic spectral approach is applied to quasione-dimensional supersonic flow. The results demonstrate that this approach is much more effective than conventional Monte Carlo simulation for uncertainty quantification with a small number of stochastic variables. Furthermore, it yields complete statistics of arbitrary order. This paper also presented a new Stochastic Collocation Method which promises to extend the class of problems that can be treated with the stochastic approach, especially to problems with complex nonlinearities. Moreover, even for problems with low-order polynomial nonlinearities, the Stochastic Collocation Method offers the prospect of reduced the computational time in some cases. The Stochastic Collocation Method was demonstrated on the stochastic Riemann problem. The success of the SCM on this applica-

23

tion implies that the popular discontinuous Galerkin spectral method (where a Riemann problem has to be solved) can be extended to handle stochastic partial differential equations. Acknowledgement. The work of the first two authors was sponsored by NASA Langley Research Center under Cooperative Agreement NCC-1-02025.

REFERENCES [1] Anon. AIAA guide for the verification and validation of computational fluid dynamics simulations, AIAA G-077-1998, 1998 [2] B. Cockburn, G. E. Karniadakis and C.-W. Shu, eds., Discontinuous Galerkin methods: theory, computation and applications, Lecture Notes in Computational Science and Engineering 11, Springer-Verlag, New York, 2000. [3] H. W. Coleman and F. Stern, Uncertainties and CFD code validation, J. Fluids Eng., 119 (1997), pp. 795–803. [4] R. G. Ghanem and P. D. Spanos, Stochastic finite elements: a spectral approach, Springer-Verlag, New York, 1991. [5] M. J. Hemsch, Statistical analysis of CFD solutions from the drag prediction workshop, AIAA 2002– 0842, 2002. [6] L. Huyse, Free-form airfoil shape optimization under uncertainty using maximum expected value and second-order second-moment strategies, ICASE Report No. 2001–18, 2001. [7] J. M. Luckring, M. J. Hemsch and J. H. Morrison, Uncertainty in computationalaerodynamics, AIAA 2003–0409, 2003. [8] L. Mathelin and M. Y. Hussaini, A stochastic collocation algorithm for uncertainty analysis, NASA/CR–2003–212153, 2003. [9] U. B. Mehta, Some aspects of uncertainty in computational fluid dynamics results, J. Fluids Eng., 113 (1991), pp. 538–543. [10] L. D. Landau and E. M. Lifshitz, Course of theoretical physics. Vol.6. Fluid mechanics, Pergamon Press, Oxford, 1982. [11] H. W. Liepmann and A. Roshko, Elements of gas dynamics, Wiley, New York, 1957. [12] W. L. Oberkampf and F. G. Blottner Issues in computational fluid dynamics code verification and validation, AIAA J., 36 (1998), pp. 687–695. [13] W. L. Oberkampf K. V. Diegert, K. F. Alvin and B. M. Rutherford : Variability, uncertainty, and error in computational simulation, AIAA/ASME Joint Thermophysics and Heat Transfer Conference, ASME–HTD–Vol. 357–2 (1998), pp. 259–272. [14] W. L. Oberkampf and T. G. Trucano Verification and validation in computational fluid dynamics, Progress Aerospace Sci., in press. [15] A. T. Patera, A spectral element method for fluid dynamics: laminar flow in a channel expansion, J. Comput. Phys., 54 (1984), pp. 468–488. [16] P. J. Roache Verification and validation in computational science and engineering, Hermosa Publ. (1998). [17] G. A. Sod, A survey of several finite difference methods for systems of nonlinear hyperbolic conservation laws, J. Comput. Phys., 27 (1978), pp. 1–31.

24

[18] A. C. Taylor, L. L. Green, P. A. Newman and M. M. Putko, Some advanced concepts in discrete aerodynamic sensitivity analysis, AIAA 2001–2529, 2001. [19] R. W. Walters and L. Huyse, Uncertainty analysis for fluid mechanics with applications, ICASE Report No. 2002–1, 2002. [20] N. Wiener, The homogeneous chaos, Amer. J. Math., 60 (1938), pp. 897–936. [21] D. Xiu, D. Lucor, C.-H. Su and G. Em. Karniadakis, Stochastic modeling of flow-structure interactions using generalized polynomial chaos, J. Fluids Eng., 124(1) (2002), pp. 51–59. [22] D. Xiu and G. E. Karniadakis, The Wiener-Askey polynomial chaos for stochastic differential equations, SIAM J. Sci. Comput., 24(2) (2002), pp. 619–644. [23] D. Xiu D. and G. E. Karniadakis, Modeling uncertainty in flow simulations via generalized polynomial chaos, J. Comput. Phys., 187 (2003), pp. 137–167. [24] T. A. Zang, M. J. Hemsch, M. W. Hilburger, S. P. Kenny, J. M. Luckring, P. M. Maghami, S. L. Padula and W. J. Stroud Needs and opportunities for uncertainty-based multidisciplinary design methods for aerospace vehicles, NASA/TM–2002–211462, 2002.

25

Suggest Documents