32
HAL Id: inria-00271986 https://hal.inria.fr/inria-00271986v2 Submitted on 14 Apr 2008 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. Deterministic Sensitivity Analysis for a Model for Flow in Porous Media Estelle Marchand, François Clément, Jean E. Roberts, Guillaume Pépin To cite this version: Estelle Marchand, François Clément, Jean E. Roberts, Guillaume Pépin. Deterministic Sensitivity Analysis for a Model for Flow in Porous Media. [Research Report] RR-6502, INRIA. 2008. inria- 00271986v2

Deterministic Sensitivity Analysis for a Model for Flow in

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Deterministic Sensitivity Analysis for a Model for Flow in

HAL Id: inria-00271986https://hal.inria.fr/inria-00271986v2

Submitted on 14 Apr 2008

HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, estdestinée au dépôt et à la diffusion de documentsscientifiques de niveau recherche, publiés ou non,émanant des établissements d’enseignement et derecherche français ou étrangers, des laboratoirespublics ou privés.

Deterministic Sensitivity Analysis for a Model for Flowin Porous Media

Estelle Marchand, François Clément, Jean E. Roberts, Guillaume Pépin

To cite this version:Estelle Marchand, François Clément, Jean E. Roberts, Guillaume Pépin. Deterministic SensitivityAnalysis for a Model for Flow in Porous Media. [Research Report] RR-6502, INRIA. 2008. inria-00271986v2

Page 2: Deterministic Sensitivity Analysis for a Model for Flow in

appor t de r ech er ch e

ISS

N02

49-6

399

ISR

NIN

RIA

/RR

--65

02--

FR

+E

NG

Thème NUM

INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE

Deterministic Sensitivity Analysis for a Model forFlow in Porous Media

Estelle Marchand — François Clément — Jean E. Roberts — Guillaume Pépin

N° 6502

April 2008

Page 3: Deterministic Sensitivity Analysis for a Model for Flow in
Page 4: Deterministic Sensitivity Analysis for a Model for Flow in

Centre de recherche INRIA Paris – RocquencourtDomaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay Cedex

Téléphone : +33 1 39 63 55 11 — Télécopie : +33 1 39 63 53 30

Deterministic Sensitivity Analysis for a Model for Flow in

Porous Media

Estelle Marchand ∗ † , Francois Clement ∗ , Jean E. Roberts ∗ , Guillaume Pepin †

Theme NUM — Systemes numeriquesEquipes-Projets Estime

Rapport de recherche n

6502 — April 2008 — 28 pages

Abstract: A deterministic method for sensitivity analysis is developed and applied to a math-ematical model for the simulation of flow in porous media. The method is based on the singularvalue decomposition (SVD) of the Jacobian matrix of the model. It is a local approach to sensi-tivity analysis providing a hierarchical classification of the directions in both the input space andof those in the output space reflecting the degree of sensitiveness of the latter to the former. Itslow computational cost, in comparison with that of statistical approaches, allows the study of thevariability of the results of the sensitivity analysis due to the variations of the input parametersof the model, and thus it can provide a quality criterion for the validity of more classical prob-abilistic global approaches. For the example treated here, however, this variability is weak, anddeterministic and statistical methods yield similar sensitivity results.

Key-words: Deterministic Sensitivity Analysis, Singular Value Decomposition, Darcy Flow,Mixed Hybrid Finite Elements, Automatic Differentiation, Nuclear Waste Storage

∗ Projet Estime.† ANDRA, DSCS, 92298 Chatenay-Malabry cedex, France.

Page 5: Deterministic Sensitivity Analysis for a Model for Flow in

Analyse de sensibilite deterministe pour un modele

d’ecoulement en milieux poreux

Resume : Une methode deterministe pour l’analyse de sensibilite est developpee et appliquee a unmodele mathematique pour la simulation d’ecoulements en milieux poreux. La methode est baseesur la decomposition en valeurs singulieres (SVD) de la matrice Jacobienne du modele. C’est uneapproche locale d’analyse de sensibilite qui fournit une classification hierarchique des directionsdans les espaces d’entree et de celles dans l’espace de sortie traduisant le degre de sensibilitede ces dernieres sur ces premieres. Son coup de calcul faible par rapport a celui des approchesstatistiques rend possible une etude de la variabilite des resultats en fonction des parametresd’entree du modele, et permet ainsi de fournir un critere de qualite sur la validite des approchesprobabilistes, plus classiques. Cependant, pour l’exemple considere ici, cette variabilite est faibleet les methodes deterministe et statistique fournissent des resultats similaires.

Mots-cles : Analyse de sensibilite deterministe, Decomposition en valeurs singulieres, EcoulementDarceen, Elements finis mixtes hybrides, Differentiation automatique, Stockage de dechets nucleaires

Page 6: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 3

1 Introduction

The questions of safety and uncertainty are central to feasibility studies for the undergroundstorage of nuclear waste. One of the important points to be considered is the problem of theevaluation of uncertainties concerning safety indicators (the “output parameters”) due to uncer-tainties concerning properties of the subsoil around a proposed storage site, properties such ashydraulic conductivity, or properties of the contaminants (the “input parameters”). Uncertain-ties concerning the input parameters are due to the imprecision of measurement techniques or tospatial variability. The measure of the water flow through specified outlet channels is a naturalsafety indicator since contaminants are mainly transported by water.

Two different domains are concerned with the quantification of the influence of the inputparameters on the safety indicators. One is uncertainty analysis which is concerned with thequantification, in terms of say distributions or quantiles, of the uncertainty concerning the safetyindicators. The other is sensitivity analysis which determines weights indicating the degree ofinfluence of particular input parameters on particular safety indicators.

Both uncertainty analysis and sensitivity analysis can be addressed using probabilistic ap-proaches such as Monte-Carlo methods. These methods give good results and are relatively easyto implement, thus their popularity, but they are expensive to use because they require a largenumber of simulations (see for example [5]). Probabilistic approaches are global in the sense thatthey take into account all the variations of the input parameters in a given range, but they becomeless reliable for highly nonlinear problems.

The deterministic method investigated here is much less demanding in terms of computing time,but it gives only local information in the sense that for nonlinear problems the results obtainedare relevant only for small variations of the input parameters around some chosen set of inputparameters, the size of the permissible variation depending on the degree of the nonlinearity. Withthis method “first order” uncertainties are computed using the derivatives of the function F thatassociates the output parameters to the input parameters. The hierarchization of the inputs ofthe function F according to their influence on the outputs of F is provided by the Singular ValueDecomposition (SVD) of the Jacobian matrix F ′(x) [21, 6, 7, 1]; see also [35] for the history ofthe SVD and [16] for a detailed description. It is interesting to note that the SVD, the main toolfor the deterministic approach described here, is also commonly used in statistical data analysis,see [8, 9, 25, 36].

The probabilistic and deterministic approaches to sensitivity analysis might rightly be seenas complementary, and it is worthwhile to develop both. To our knowledge, the deterministicapproach has not yet been used for flow problems in porous media. The main objective hereis to present the deterministic method for sensitivity analysis and to show its feasibility for thestudy of 3D Darcy flow in a realistic test case, and then to compare the results obtained using thedeterministic method with those obtained using a Monte Carlo method for the same problem.

When dealing with first order approximations, differentiation is a key issue and different meth-ods can be used for computing F ′(x): divided differences, automatic differentiation, analyticdifferentiation for possibly implicit problems. An explanation of automatic differentiation can befound in [11], an example using automatic differentiation for a huge Fortran code is given in [3]and an example for a C++ code is given in [2]. The theory concerning analytic differentiation isdeveloped in [20] and an example may be found in [29]. For each method of differentiation, directmode or reverse mode can be used. (Reverse mode differentiation is equivalent to the differentia-tion using the adjoint state method.) These derivatives can be used in combination with intervalarithmetic to evaluate uncertainties in the form of intervals containing the image under F of inputintervals [32].

In the second section of this paper, we describe probabilistic methods and deterministic meth-ods for sensitivity analysis. In the third section, we give some details about the computation ofthe derivatives used for the deterministic analysis. In the fourth section, we present a numericalmodel for flow in porous media. In the fifth section, we compare numerical results obtained usinga probabilistic analysis with those obtained using a deterministic analysis for a realistic examplerepresenting water flow around a potential nuclear waste storage site.

RR n

6502

Page 7: Deterministic Sensitivity Analysis for a Model for Flow in

4 Marchand, Clement, Roberts & Pepin

2 Sensitivity analysis

We consider a general model F : x ∈ Rnip 7→ y ∈ R

nop with nip, nop ∈ N?.

2.1 Probabilistic analysis

In this work, the global probabilistic analysis is carried out using a Monte-Carlo method. Thismethod consists in examining the influence of the uncertainty about input data on the uncertaintyabout the output, where the uncertainties have been quantified say in terms of variance. This studycovers the global variation of the values through sampling.

First, the uncertainty about scalar components of the input data is defined with Probabilis-tic Density Functions (PDF’s), taking into account various kinds of uncertainties such as thoserepresenting natural variability, those coming from up-scaling, or those due to imprecision in themeasurements. The choice of laws for defining the PDF’s is a matter for specialists. These lawsgenerally include correlations and constraints between variables. In other words the components ofthe input data are not necessarily independent. A relation between two parameters may be betterknown than the individual parameters, e.g. for continuous input parameters, the “heterogeneity”of the parameter may be bounded. In this case, PDF’s can be applied to relations between inputparameters. In practice, we will consider a basis of variables, which we assume to be mutuallyindependent and which may or may not correspond to input parameters. A PDF is defined foreach of the basis variables, and each input parameter is explicitly defined in terms of the basisvariables.

Next, various samples of input data are generated. There are several methods available forthis. We used Latin Hypercube Sampling (LHS) (see for example [14]). Let N be the desirednumber of samples. For each of the n′

ip ≤ nip basis variables, the set of possible values is dividedinto N equiprobable intervals and one value is randomly picked from each of these N intervals.The values selected for the n′

ip components are randomly combined, to form N samples of the basisvariables (and then of the input parameters) in such a way that for each of the basis variables, eachselected value appears in precisely one sample. LHS is a compromise between random sampling(N samples are randomly selected, accordantly with the PDF), which may fail to represent theextreme possible values, and stratified sampling, in which the n′

ip−dimensional set of possible inputparameters must be divided into equiprobable subsets (a process which can be difficult) beforerandomly picking one sample from each subset. The nip × N matrix formed from the samples ofinput parameters is denoted by x =

(

x1, ..., xN)

, with, for n = 1, ..., N , xn ∈ Rnip .

Samples of output parameters are computed by applying F to each generated sample. Theyform the nop × N matrix y =

(

y1, ..., yN)

, with, for n = 1, ..., N , yn ∈ Rnop and yn = F (xn). The

result of a sensitivity analysis is a representation of the relations existing between input parametersand output parameters. These relations can be quantified by various statistical indicators. Thesimpler indicators are by construction meaningful only for smooth functions. Some transformationscan be performed to deal with more irregular functions but there is no “universal” indicator(further details about these indicators may be found in [15]):

One can compute correlation coefficients between individual components of input and outputdata (Pearson coefficients)

cor (xi, yj) =

N∑

n=1

(xni − xi)

(

ynj − yj

)

N∑

n=1

(xni − xi)

2

N∑

n=1

(

ynj − yj

)2

, (1)

where xi and yj are the statistical means for i = 1, ..., nip and j = 1, ..., nop. These indicatorsare meaningful when the relations between input data and output data can be approximatedby linear (affine) laws. In this case, Pearson coefficients are proportional to the coefficients

INRIA

Page 8: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 5

of the linear relation between (centered) input and output data. When the relations betweeninput and output parameters are strongly nonlinear, it can be interesting to replace, for eachcomponent of the input or output data, individual values by their ranks in the sampling ofthe considered component, the ranks being defined by

for i = 1, ..., nip, n = 1, ..., N, rnxi

= card m ∈ 1, ..., N, xmi ≥ xn

i ,for j = 1, ..., nop, n = 1, ..., N, rn

yj= card

m ∈ 1, ..., N, ymj ≥ yn

j

.

Correlation coefficients can be computed for these transformed data. The Spearman correla-tion coefficient measures the monotonicity between the uncertainty of the result and the un-certainty of input data. It is the Pearson coefficient computed for the ranks: spear(xi, yj) =cor

(

rxi, ryj

)

for i = 1, ..., nip, j = 1, ..., nop.

These coefficients can be corrected to reduce the effect of other input components whenquantifying the relation between particular input and output components. Linear regressionsmust first be computed following

xi = c0 +

nip∑

k=1,k 6=i

ckxk

yj|i = b0|i +

nip∑

k=1,k 6=i

bk|ixk,

where the coefficients ck, bk|i, k = 1, ..., i − 1, i + 1, ..., nip, dependent on i and j, mini-

mize the quadratic errors over the samples

N∑

n=1

(xni − xn

i )2

and

N∑

n=1

(

ynj − yn

j|i

)2

. The Par-

tial Correlation Coefficient (PCC) is then defined by PCC(xi, yj) = cor(

xi − xi, yj − yj|i

)

.The Partial Rank Correlation Coefficient (PRCC) is the PCC computed for the ranks:PRCC(xi, yj) = PCC(rxi

, ryj).

The Standard Rank Regression Coefficient (SRRC) is related to the effect of modifying aninput component by a fixed fraction of its standard deviation. The following regressionmodel is considered (it is not a partial regression)

yj = b0 +

nip∑

k=1

bkxk ,

where the coefficients bk, k = 1, ..., nip are chosen to minimize the quadratic error over the

samples

N∑

n=1

(

ynj − yn

j

)2. The Standard Regression Coefficient is defined as SRC(xi, yj) =

biσ(xi)

σ(yj), where σ is the estimator for standard deviation defined as σ(xk) =

1√N − 1

N∑

n=1

(xnk − xk)2.

The SRRC is the SRC for the ranks: SRRC(xi, yj) = SRC(rxi, ryj

).

We note that these indicators take values in the interval [−1, 1]. The nearer the absolute valueof an indicator is to 1, the stronger is the dependence input parameter/output parameter. Thesign of the coefficient depends on the monotonicity of the relation and is positive if the consideredinput and output components increase together. Small values (e.g. those smaller than 0.2) indicatea very weak dependence. These coefficients make it possible to rank input parameters accordingto their degree of influence.

RR n

6502

Page 9: Deterministic Sensitivity Analysis for a Model for Flow in

6 Marchand, Clement, Roberts & Pepin

2.2 Deterministic analysis

Local deterministic uncertainty analysis is based on a first order approximation: we consider alinearized problem

δx ∈ Rnip 7→ δy = F ′ (x) δx ∈ R

nop ,

which associates approximate variations of the output parameters δy to small variations of theinput parameters δx around a given set of input parameters x. For an affine function F , an

upper bound on the uncertainty about yi, for i = 1, ..., nop, would be

nip∑

j=1

|F ′(x)ij | |∆xj |, where the

nonnegative value |∆xj | quantifies the uncertainty about the input parameter xj . Correlationsbetween input parameters are not taken into account in this upper bound.

Deterministic sensitivity analysis is based on the Singular Value Decomposition (SVD) of theJacobian matrix F ′(x) for a given input vector x. The SVD of the rectangular matrix F ′(x) isgiven by

F ′ (x) = USV T ,

where U and V are orthogonal matrices and S is a diagonal matrix of the same size as F ′. Thecolumns of V are called the singular vectors of the input space, and the columns of U are calledthe singular vectors of the output space. The diagonal terms of S are the singular values of F ′,

that is to say the square roots of the eigenvalues of the square symmetric matrix F ′T F ′. They arenonnegative numbers sorted in nonincreasing order.

The SVD performs an orthogonal change of basis in both the input and output spaces. If wedenote by uk (respectively vk) the kth column of U (respectively of V ) and by sk the kth diagonalterm of S, we have

for k ≤ min (nip, nop) , F ′ (x) vk = skuk ;if nop < nip, for nop < k ≤ nip, F ′ (x) vk = 0.

(2)

Then the output variation associated with an input variation δx will be

δy =

min(nip,nop)∑

k=1

sk〈δx, vk〉uk, (3)

where 〈., .〉 denotes the canonical scalar product. This means that for k ≤ min(nip, nop), thevariation of the output parameters in the direction uk depends exclusively on the variation onthe input parameters in the direction vk, and this dependence is quantified by the singular valuesk. If nop < nip, for nop < k ≤ nip, i.e. if vk is in the kernel of F ′, a variation of the inputparameters in the direction vk has no influence on the output: for nop < k ≤ nip and α ∈ R,F ′(x)(δx + αvk) = F ′(x)δx. On the other hand, if nip < nop, for nip < k ≤ nop, then 〈δy, uk〉 = 0and uk is in the orthogonal complement of the image of F ′ (x), i.e. the output does not vary inthe direction of uk.

So the rate of decrease of the singular values provides a hierarchical classification of the influenceof the directions vk in the input space on the directions uk in the output space.

SVD is useful in various contexts. For example it can be used to determine which inputparameters should be more accurately measured in order to obtain greater precision for particularoutput parameters. If say the input parameters are the uncertain values of a piecewise constantfield, a field constant in each of several zones into which the domain has been divided, then theSVD results can indicate in which zones more precise measurements need to be taken , or whichzones should be further divided into more zones in which measurements are taken in order toreduce the spatial variability. In another context, when output parameters can be measured andmust be controlled, the SVD results sometimes make it possible to easily identify which inputparameters must be modified to alter one particular output parameter without changing the otheroutput parameters. Generally, the associated singular vector in the input space is not parallel to

INRIA

Page 10: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 7

one of the main axes, and several input parameters may need to be modified together with thecorresponding weights. These possibilities will be illustrated in section 5.3.4.

The SVD algorithm is widely used and several implementations are available. Here the routinedgesvd provided in the linear algebra library LAPACK is used; see [19].

2.3 A 1D example

We consider a flow in a one-dimensional porous medium Ω = [0, L] of permeability K with nosource term

∂Φ

∂ξ= 0, Φ = −K∂p

∂ξ,

and with Dirichlet boundary conditions p = p0 at ξ = 0, p = pL at ξ = L. The velocity field Φ isconstant,

Φ =p0 − pL

∫ L

ξ=0

1

K(ξ)

.

If the hydraulic conductivity is assumed to be piecewise constant with nz zones of length Li,i = 1, ..., nz, we consider F (x) = F (K1, · · · , Knz

) = Φ and the sensitivities are

∂Φ

∂Ki

=Φ2

p0 − pL

Li

K2i

.

With a logarithmic parametrization, i.e. considering F (x) = F (log K1, ..., log Knz) = F (K1, ..., Knz

),

the matrix to be decomposed into singular values is F ′(x) =Φ2

p0 − pL

(

L1

K1, . . . ,

Lnz

Knz

)

. The only

singular value is s1 =∥

∥F ′(x)∥

∥ and the first singular vector in the input space, that is the unit

vector orthogonal of the kernel of F ′(x), is proportional to F ′(x), and its larger components cor-respond to the zones of lower permeability. The importance of Ki increases also with the lengthof the zone Li. Without logarithmic parametrization, the hierarchy can be reordered except whenL1 = ... = Lnz

. In this case only the rate of decrease is accelerated.We give an approximation of the theoretic Pearson coefficient for the case in which there are

only two zones with K1

L1 K2

L2. We denote u1 = K1

L1and u2 = K2

L2. In this case, the equation (1)

can be approximated by

cor(K1, Φ) = cor

(

u1,u1u2

u1 + u2

)

≈ cor(u1, u2) = cor(K1, K2)

and

cor(K2, Φ) = cor

(

u2,u1u2

u1 + u2

)

≈ 1

and we conclude again that the lower permeability has the greater impact.Note that one needs stronger hypotheses to obtain general results with the statistical approach.

RR n

6502

Page 11: Deterministic Sensitivity Analysis for a Model for Flow in

8 Marchand, Clement, Roberts & Pepin

3 Differentiation

The first step in deterministic sensitivity analysis is the computation of the Jacobian matrix ofthe function F .

3.1 Notation

We suppose that the model F is not a closed-form formula.Let P be an open subset of a normed vector space, ndof a large integer and let

F : x ∈ P 7→ y ∈ Rndof

be an implicit function defined by

y = F (x) ⇔ E(x, y) = 0.

The equation E(x, y) = 0, the state equation, is say a discretization of a partial derivative equation,with x a discretization of a field for a physical parameter and y the vector of degrees of freedom.

Let nip and nop be integers, at least one of which is small relative to ndof and let

P : x ∈ Rnip 7→ x ∈ P

O : y ∈ Rndof 7→ y ∈ R

nop

be closed-form formulas. The parametrization operator P serves to reduce the dimension of theinput space in order to avoid over-parametrization problems while the observation, or measure,operator O serves to reduce the dimension of the output space in order to sum up the outputinto indicators or to model experimental measures performed in the real fields. A modular im-plementation of these operators makes it possible to change them easily for different numericalexperiments.

The model to be differentiated is then

F = O F P.

3.2 Differentiation techniques

For the problem treated in this article, we investigated several different techniques of differentiation[23, 11, 26]. Approximate differentiation through divided differences is an obvious possibilitybut this technique is either insufficiently accurate or too expensive in computation time sinceit is difficult to choose the optimal differentiation step. Hence it is best reserved for validationpurposes. Possible exact methods are automatic differentiation and manual differentiation, i.e.differentiation based on analytical formulas.

It is important to be able to differentiate the model either in direct mode (i.e. computation ofthe Jacobian matrix by columns, which is advantageous when nip ≤ nop) or in reverse mode (i.e.computation of the Jacobian matrix by rows, which is advantageous when nip ≥ nop).

We have to differentiate a function computed using a C++ code both in direct mode andin reverse mode. For this reason we have investigated the tool of automatic differentiation byoperator overloading ADOL-C [12]. By now, according to [17], other alternatives are available asFADBAD/TADIFF, OpenAD, and YAO.

We compared the performances of ADOL-C with those of manual differentiation. ADOL-C wasvery competitive with respect to development time, and execution times were comparable to thoseobtained with manually differentiated codes, but memory management was difficult in reversemode with ADOL-C for realistic computations. For this reason we used a manually differentiatedcode and ADOL-C was used for validation (ADOL-C was also competitive with divided differencesconcerning development times). However solutions to the problems of memory management areproposed in [13]; the algorithm described in [10] is available at [18].

INRIA

Page 12: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 9

3.3 Verification of derivative computations

The most error prone step of the deterministic method for sensitivity analysis is the computationof the Jacobian matrix of F . We give in this section some elements concerning the verification ofthe code computing the derivatives, assuming that the code for the function F itself has alreadybeen validated. Details for the example presented in this paper are given in [26].

First of all, at least two different methods must be implemented (among automatic differenti-ation, manual differentiation, finite differences, each method can be implemented in reverse modeand/or in direct mode).

In order to locate the errors, it is important to be able to verify subfunctions one by one.The code to be verified computes the derivative of a solver for a partial derivative equation.

The input of the solver is the vector of the coefficients of a parameter field occurring in the equationon some discrete basis, and the output is for example a subset of the degrees of freedom of thesolver. The operators O and P should be implemented independently of the rest of the code. Ingeneral these operators are linear so that the validation of their derivatives is easy. The same codecan be used for many test cases, for example using different computation domains and meshes,and the critical point is to affirm that it will be reliable for all the possible test cases (and for allvalues of the input vector).

The first step is to verify all the chosen methods for different test cases for which we know ananalytic solution. This step is necessary but not at all sufficient: for example, for the Darcy equa-tion we know analytic solutions for derivatives for all one-dimensional and pseudo one-dimensionaltest cases. We do not have simple and general analytical solutions for the other test cases. One-dimensional tests make not possible to verify that we correctly deal with the coupling between thedifferent entries of the hydraulic conductivity tensors.

For test cases without analytic solutions but with a reasonable number of degrees of freedom,we apply also all the implemented differentiation methods. The set of test cases should be repre-sentative of all the possible problems, concerning heterogeneity, anisotropy, boundary conditions,but, in order to be exhaustive, for computation time reasons, we use meshes just big enough tomake this generality possible. We consider that if all the implemented methods provide the sameresults for all the test cases it is a very good sign. No small differences can be accepted. Com-parison with results of divided differences is not so simple: we must compute divided differencesfor different differentiation steps, and select the results with “best” differentiation step. This beststep is not known before performing a comparison.

For the realistic test case, it can happen that only one method is applicable, regarding memorymanagement and computation time. That is why the previous verification is very important.

We have used divided differences and automatic differentiation with ADOL-C to verify ourmanual derivated code. The tool ADOL-C seems to be a very safe mean for verification. The toolactually computes both the function and its derivatives. We observed that the only difficulty isto compute the right function. This is verified by comparison of the results provided by ADOL-C

and by an original non differentiated code, supposed to be reliable, over a representative set oftest cases. Once the right function is computed, the computation of derivatives is always right.

3.4 Differentiation in direct mode

In direct mode, the Jacobian matrices are computed column by column by setting elementaryvariations of the operator E equal to zero. We denote, for j, j ′ ∈ 1, ..., nip, (δxj)j′

= δj,j′ (i.e. 1

when j = j′ and 0 otherwise). The jth column of F ′ is

O′(y)δyj

where δyj is defined by∂E

∂x

∂x

∂xδxj +

∂E

∂yδyj = 0. (4)

RR n

6502

Page 13: Deterministic Sensitivity Analysis for a Model for Flow in

10 Marchand, Clement, Roberts & Pepin

Thus, independently of the number of output parameters nop, there are nip linear systems tosolve in order to compute the complete Jacobian matrix of F . The size of the linear systems isindependent of the number of input or output parameters (for a given state equation E).

3.5 Differentiation in reverse mode

In reverse mode, the Jacobian matrices are computed row by row. Here, we use the adjoint statemethod which is well suited for the differentiation of implicitly defined functions with a smallnumber of outputs [23].

3.5.1 The adjoint state method

The object here is to calculate the ith row of the Jacobian matrix F ′(x) =(

O F P)′

(x). The

derivation of P is assumed to be very simple. In order to avoid the manipulation of large matriceswith ndof rows, it is better to differentiate directly the composite O F than to differentiateO and F separately. So, we write the Jacobian matrix of the model under the form F ′(x) =(

O F)′

(x)P ′(x) and we focus on the calculation of the ith row of(

O F)′

(x).

Let G be the projection onto the ith axis in the output space and set Q = G O. Then the ith

row of(

O F)′

(x) is simply the derivative of g = Q F , i.e. the transposed of its gradient ~∇g.

The adjoint state method is popular for minimization problems with equality constraints, andin particular for the computation of the corresponding gradient. Here the gradient ~∇g is associatedwith the function Q = G O and the constraint is the state equation E(x, y) = 0 defining F .Hence, as for minimization problems, we define the following Lagrangian function:

L : P × Rndof × R

ndof → R,

(x; y, λ) 7→ Q (y) + 〈E (x, y) , λ〉 ,

where λ ∈ Rndof is the Lagrange multiplier associated with the constraint (here the size of the state

equation is the size of y, i.e. ndof). Then, for a given parameter x, let yx denote the state variablesolution of the equation E(x, y) = 0, i.e. yx = F (x). The state variable yx is also characterizedby the equation

∀δλ ∈ Rndof ,

∂L∂λ

(x; yx, λ) δλ = 0.

This condition is independent of the variable λ. Similarly, if Q and E are sufficiently regular, theadjoint state variable λx may be defined by the equation

∀δy ∈ Rndof ,

∂L∂y

(x; yx, λx) δy = 0,

and λx is the solution of the linear equation

[

∂E

∂y(x, yx)

]T

λx = − [Q′(yx)]T

. (5)

Moreover we have ∀x ∈ P , g(x) = L(x; yx, λx) because yx satisfies E(x, yx) = 0. Hence, if Eis sufficiently regular,

~∇g, δx⟩

=∂L∂x

(x; yx, λx)δx +∂L∂y

(x; yx, λx)∂yx

∂xδx +

∂L∂λ

(x; yx, λx)∂λx

∂xδx

=∂L∂x

(x; yx, λx)δx.

If F and Q are sufficiently regular then g is differentiable and its gradient is

~∇g =

[

∂E

∂x(x, yx)

]T

λx. (6)

INRIA

Page 14: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 11

3.5.2 Assembling the Jacobian matrix row by row

Equations (5) and (6) are now used to compute the ith row of F ′.Let gy,i denote the ith row of the Jacobian matrix of the measure operator O:

gy,i = G O′(y). (7)

According to equation (5), the corresponding adjoint state λi is determined by solving

[

∂E

∂y(x, yx)

]T

λi = −gTy,i. (8)

Then, according to equation (6), the ith row of the Jacobian matrix of F is

gx,i = λiT

[

∂E

∂x

∂x

∂x

]

. (9)

So there is one linear system to solve for each output parameter in order to compute the completeJacobian matrix of F . The number of linear systems to be solved is independent of the length ofthe vector x. The size of the systems to be solved is the same as for direct mode.

RR n

6502

Page 15: Deterministic Sensitivity Analysis for a Model for Flow in

12 Marchand, Clement, Roberts & Pepin

4 Mathematical and Numerical Models

4.1 The Steady-state Darcy flow problem

Assume that the calculation domain, identified with the porous medium containing the nuclearwaste storage site, is a bounded open subdomain Ω of R

3. Assume that the medium is saturatedwith water, which is supposed to be incompressible. Assume further that the shape of the domainis such that the effects of gravity are negligible. Then flow in Ω is governed by a stationaryconservation law together with Darcy’s law:

div ~u = q in Ω (conservation law)

~u = −K~∇p in Ω (Darcy′s law),

where ~u is the Darcy water flow velocity field, q is a source term, K is the non homogeneoushydraulic conductivity matrix field, which is assumed to be everywhere symmetric and positivedefinite, and p is the pressure field. Assume that the boundary of Ω, is divided into two parts, ΓD

and ΓN , on which are imposed Dirichlet and Neumann boundary conditions respectively:

p = pD on ΓD

~u · ~n = gN on ΓN ,

where ∂Ω = ΓD ∪ ΓN with ΓD ∩ ΓN = ∅.This work is concerned with the effect of uncertainties about the hydraulic conductivity matrix

field K on certain safety indicators. Here the safety indicators are taken to be the fluxes of ~uthrough nop specified surfaces in Ω called outlet channels Si, i = 1, ..., nop. Thus given these nop

outlet channels, oriented by the unitary normal vector fields ~ni, i = 1, ..., nop, the safety indicatorsare the fluxes Φi, i = 1, ..., nop defined by

for i = 1, ..., nop, Φi =

Si

~u · ~ni.

The hydraulic conductivity matrix field is assumed to be piecewise constant so that Ω is the unionof the closures of nz mutually exclusive subdomains Ωα, α = 1, · · · , nz on which K is constant:

K|Ωα≡ Kα, (10)

where for each α, α = 1, · · · , nz,Kα is a symmetric 3× 3 matrix. Thus K is uniquely determinedby 6nz parameters though the number of parameters maybe reduced in the presence of furtherassumptions concerning the form of the matrices Kα or assumptions that in certain zones Kα iswell known.

For the problem treated here, it is supposed that, for each zone α, Kα is either diagonal orscalar, so that the total number nip of independent input parameters is less than or equal to3nz. Let K = (Kj)j=1,...,nip

denote the vector containing these parameters. As usual with elliptic

equations, and since the values of the hydraulic conductivity often vary over several orders ofmagnitude, it is reasonable to use a logarithmic parametrization; i. e. to take as input parametersthe logarithms of the values Kj :

for j = 1, ..., nip, let xj = log Kj ,

and let x = (xj)j=1,...,nip.

The function we are interested in is the function F that associates output parameters Φ =(Φi)i=1,...,nop

to input parameters x = (xj)j=1,...,nip, a function from R

nip to Rnop . But, as we are

dealing with numerical calculations, a discretization F of this function needs to be defined. Thefunction F will associate approximations y = (yi)i=1,...,nop

of the fluxes Φ = (Φi)i=1,...,nopthrough

the outlet channels (Si)i=1,...,nopto the input parameters x = (xj)j=1,...,nip

.

INRIA

Page 16: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 13

4.2 Discretization

To obtain the discretization F of the function F a mixed-hybrid finite element method [31] isused. Assume that Th = (Ti)i∈I is a finite element discretization of the domain Ω, that is a“triangulation” of Ω which may be made up of tetrahedra, or of convex hexahedral elements. Themesh Th is such that the outlet channels Si, i = 1, ..., nop, are unions of faces of the mesh. Theset of faces of the elements of the triangulation Th (including those faces contained in the interiorof Ω and those lying on the boundary of Ω) is denoted Sh = (Ej)j∈J

. Each face Ej is oriented byan arbitrarily chosen unit normal vector ~nj . In the case of tetrahedral or parallelepiped cells, thelowest order Raviart-Thomas-Nedelec elements [30, 28] are used, and in the case of more generalhexahedral cells, the composite elements defined in [33, 34] are used. In each case, the degrees offreedom for such a method are of three types:

The pressure unknowns: for each cell Ti, one value corresponding to an approximation tothe average value of the pressure on the cell.

The trace-of-pressure unknowns: for each face Ej not on the Dirichlet boundary ΓD, onevalue corresponding to an approximation of the average value of the pressure on the face.

The flux unknowns: for each cell Ti and for each face Ej of Ti, one value correspondingto an approximation of the outgoing flux from Ti through Ej . Thus we have one fluxvalue per face of the boundary, and two flux values per interior face. The continuity of theflow through the interior faces is imposed not by the choice of the unknowns but throughsupplementary equations, obtained by using Lagrange multipliers associated with the trace-of-pressure unknowns for the interior faces through the operator C of equation (13) below.Similarly the Neumann boundary conditions are imposed by using Lagrange multipliersassociated with the trace-of-pressure unknowns for the faces on the Neumann boundary ΓN .

The vector of unknowns will be denoted Y :

Y =

UPL

, (11)

where the components of U are approximations to the fluxes of ~u through the faces of the mesh(Ej)j∈J

(one component Uj for each boundary face and two components Uj and Uj′ for each

interior face: Uj ≈∫

Ej

~u · ~nj and Uj′ ≈∫

Ej

~u · (−~nj)), P contains one pressure value per cell and

L contains the pressure traces, one per face not included in ΓD.The discretized variational formulation then yields the following algebraic system

Eh (K, Y ) = 0,

with

Eh (K, Y ) = M (K) Y −

R1

R2

R3

, (12)

where M(K) is a symmetric positive definite matrix of the form

M(K) =

A(

K−1)

tB tCB 0 0

C 0 0

. (13)

The first equation A(

K−1)

U +t BP +t CL = R1 corresponds to Darcy’s law where R1 depends onthe Dirichlet boundary conditions. The second equation BU = R2 corresponds to the conservationlaw where R2 contains the source term. The third equation CU = R3 expresses the continuity ofthe velocity flux where R3 contains Neumann boundary conditions.

RR n

6502

Page 17: Deterministic Sensitivity Analysis for a Model for Flow in

14 Marchand, Clement, Roberts & Pepin

The vectors of real numbers Y and Eh(K, Y ) are of size ndof , where ndof is the number ofdegrees of freedom.

Then the function to be analyzed is

F =

F1

...Fnop

with, for i = 1, ..., nop,Fi : R

nip → R,

x 7→ yi =∑

j∈J|Ej⊂Si

~nj · ~niUj

where ~nj · ~ni = ±1 depending on whether ~nj = ~ni or ~nj = −~ni. The function F is decomposedas a composite of a parametrization operator, a fine model operator and an observation operator:F = O F P , see Section 3.1. The parametrization operator P is defined by

P : x ∈ Rnip 7→ K ∈ P

where the space P for fine parameters is the space of hydraulic conductivity fields

P =

K : Ω → M+3×3|K has bounded and measurable coefficients

and is uniformly elliptic

with M+3×3 the set of symmetric positive definite matrices of size 3 × 3. The fine model F is

implicitly defined by the state equation Y = F (K) ⇔ Eh(K, Y ) = 0 where nop is the number ofoutlet channels and the observation or measure operator is

O : Y ∈ Rndof 7→ y ∈ R

nop .

Remark 1 It is important to note that in the method proposed, the matrix M(K) of equations (12)and (13) will never be constructed and a system of size ndof × ndof will never be solved. Instead,an equation in the unknown vector L, obtained by eliminating the variables U and P , is solved. AsA

(

K−1)

, B and C are block matrices, with small blocks, U and P can be eliminated by inverting

only local matrices. (For A(

K−1)

, the blocks are of size 6 × 6 in the case of hexahedral meshesor of size 4 × 4 in the case of tetrahedral meshes, one block corresponding to one element of Th.)Once L has been calculated, P and U can be found by local matrix multiplications. See for example[4].

4.3 Differentiation

4.3.1 Direct mode

This section concerns the construction and resolution of equation (4).The vector δY j is actually the solution of a boundary value problem of the same form as that

for Y (12):dEhK,dK

(

δY j)

= 0,

where

δY j =

δU j

δP j

δLj

;

dEhK,δK

(

δY j)

= M (K) δY j −

A(

K−1 δK K−1)

U0

0

,

INRIA

Page 18: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 15

with δK =∂K∂xj

δxj and with U defined as in equation (11), the function A which takes as input a

field of 3 × 3 symmetric matrices and returns a square matrix of the same size as U is the sameas the one used in equation (13) and M(K) is defined as in equation (13). Remark 1 is pertinenthere.

4.3.2 Reverse mode

The expression of gy,i defined in equation (7) is for our example (y = Y ) very simple: for i =1, ..., nop, gT

Y,i is the vector of the same length as Y whose kth component is equal to ~nk · ~ni if Ek

exists with Ek ⊂ Si and equal to 0 otherwise.It is easy to see what equation (8) is in the present context since the partial function to be

differentiated is linear.The remainder of this section concerns the calculation of the right hand side of equation (9).

For j ∈ I , we denote U j the vector of size nj containing the components of U representing theoutgoing flow from Tj . The contribution of the cell Tj to the global mass matrix A(K−1) isrepresented by the elementary matrix Aj(K−1). It is a square matrix of size nj × nj , with nj thenumber of edges of Tj . For i, j ∈ I , λi,j is the vector containing the components of λi associatedwith faces of Tj .

For k, l = 1, ..., 3, define the field of 3 × 3 matrices H(k,l) by

for p, q = 1, ..., 3, H(k,l)p,q = −

(

K−1)

p,k

(

K−1)

l,q.

Recall that K is supposed to be piecewise constant; see equation (10). For α = 1, ..., nz and fork = 1, ..., 3 we have

∂yi

∂Kαk,k

=∑

j∈I|Tj⊂Ωα

tU jAj

(

H(k,k))

λi,j .

As the matrices Kα for α = 1, ..., nz have been supposed to be symmetric it follows that, forα = 1, ..., nz, k = 1, ..., 3 and l = 1, ..., k−1, the matrix

(

H(k,l) + H(l,k))

is symmetric and we have

∂yi

∂Kαk,l

=∑

j∈I|Tj⊂Ωα

tU jAj

(

H(k,l) + H(l,k))

λi,j .

RR n

6502

Page 19: Deterministic Sensitivity Analysis for a Model for Flow in

16 Marchand, Clement, Roberts & Pepin

5 Numerical results

We have applied the Monte Carlo method and the deterministic approach for sensitivity analysisto a realistic problem of flow in porous media. After a description of the parameters of the testcase we give results and conclusions obtained with both approaches to compare them.

5.1 Test case description

The test case that we consider models water flow around a potential underground nuclear wastestorage site. The data for this test case were provided by ANDRA, see [27].

5.1.1 The computational domain

The model is a simplified 3-dimensional hydraulic model, mostly made up of plane parallel layers.The computational domain is a layered medium Ω, roughly 500 meters deep and of a horizontalextent of about 40 kilometers by 40 kilometers. It is divided into 12 zones (Ωα), α = 1, ..., 12, eachzone being contained in a single layer. A computational mesh of roughly 300,000 cells, each cellbeing contained in one zone, is used. The zones are represented in the two dimensional sectionsshown in Figure 1. The storage site is contained in zone Ω1 and is shown in red in the figure.In all of the figures vertical dimensions have been multiplied by a factor of 30. The hydraulic

(a)Storage zone

S4 S3

6

5

(b)

Figure 1: 2D vertical section (a) and horizontal section (b) of the 3D hydraulic model. S1, ..., S4are the outlet channels. Green numbers are the indices for zones. K1 = K2 = diag(kh, kh, kv),Ki = kiI for i = 3, . . . , 12. kh, kv and ki, i = 3, . . . , 6 are uncertain.

conductivity is constant in each zone and the formalism described in sections 4.1 and 4.2 is used.The hydraulic conductivity matrices in zones Ω1 and Ω2 are the same, K1 = K2. This matrixis diagonal with a vertical component kv and with both horizontal components equal to kh. Inzones Ω3 through Ω12 the hydraulic conductivity is scalar: for α = 3, ..., 12, Kα = kαI, where I

is the 3 × 3 identity matrix. The vector K is of length nip = 12 with K1 = kh, K2 = kv and forα = 3, ..., 12 Kα = kα. In the figures and tables that follow, the first two components are indexedby h and v, instead of by 1 and 2.

There are 4 outlet channels (Si)i=1,...,4, which are also shown in dark blue in Figure 1. Theoutlet channels S1 and S2 are horizontal plane surfaces coinciding with interfaces between zones:S1 = Ω1 ∩ Ω3 and S2 = Ω3 ∩ Ω5. The outlet channel S3 is made up of 3 vertical plane surfaceswith S3 = Ω5 ∩ Ω6. The outlet channel S4 is the lateral face of a cylinder with a vertical axis,with S4 ⊂ Ω6.

Figure 2 shows from two different perspectives the pressure distribution corresponding to themost likely set of hydraulic conductivities (corresponding to maximum of PDF), whose values aregiven in Table 2 and 3. Water globally flows from regions of higher pressure (shown in red) toregions of lower pressure (shown in blue). Figure 3 shows for the same hydraulic conductivities

INRIA

Page 20: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 17

and from the same perspectives a single stream line emanating from the storage site. It goesthrough the outlet channels S1, S2, S3 and along the axis of the cylinder defining S4.

(a) (b)

Figure 2: The pressure field for the most likely set of parameters. (a): front view; (b): top view.

(a) (b)

Figure 3: A water velocity stream line for the most likely set of parameters. (a): front view; (b):top view. The computation domain is transparent and different background colors correspond todifferent zones.

5.1.2 Data for input parameters

It is assumed that the hydraulic conductivities in zones 7 through 12 are precisely known andtheir values, k7, ..., k12, are given in Table 2. The other variables, kh, kv, k3, ..., k6, are defined bythe probability laws given in Table 1, we see that some of them are not independent (e.g. kh

and kv or k3 and k4). The values for these parameters considered as the most likely are given inTable 3. The choice of logarithmic parametrization for the deterministic study is coherent withthe description of probabilistic distributions by log-normal laws.

5.1.3 Expected sensitivity results

The mean flow is largely determined by the values of the hydraulic conductivity in the less per-meable layers, which behave like barriers, and by the boundary conditions, whose influence is notstudied here (see the importance of the boundary conditions in [22]). See also the results forboth approaches applied to the one-dimensional case in section 2.3. The heterogeneities of the

RR n

6502

Page 21: Deterministic Sensitivity Analysis for a Model for Flow in

18 Marchand, Clement, Roberts & Pepin

Variable Vmin Vref Vmax cm cMkv (m/s) 10−14 10−13 10−12 1 99

kh

kv

100 101 102 5 95

k4

k3101 102 103 0.1 0.99

k5 (m/s) 10−9 10−8 10−7 5 95k6

k5101 102 103 0.1 99.9

(a)

Variable Vmin Vmaxk3

kv

10 1000(b)

Table 1: Basis variables, and parameters for the PDF used to generate the samples of inputparameters. The variables in table (a) follow log-normal laws truncated at the centiles cm andcM, of mean Vref and of standard deviation such that the law loads the interval [Vmin,Vmax];the variable in table (b) follows an uniform law of minimum Vmin and of maximum Vmax.

k7 k8 k9 k10 k11 k12

10−9 2 10−7 10−12 10−11 3 10−4 3 10−5

Table 2: Invariant hydraulic conductivities (m/s).

kh kv k3 k4 k5 k6

10−11 10−13 10−11 10−9 8 10−9 6 10−7

y1 y2 y3 y4

2.48 10−5 2.46 10−5 1.44 10−4 5.51 10−3

Table 3: The values considered as most likely for the variable input parameters (m/s) and corre-sponding water fluxes through the outlet channels (m3/s).

hydraulic conductivity have an influence on the spatial variation of the flow: the water flux isindeed attracted toward the more permeable zones, which behave like sponges.

5.2 Results of the probabilistic study

Monte Carlo method was used. We needed to perform N = 1000 simulations for this probabilisticstudy.

The sensitivity of y2 has not been studied since it was observed that y2 is always very close toy1. The correlation indicator for the results presented is the mean of the coefficients of Spearman,the PRCC and the SRRC. Results are given in Table 4: we see that y1 depends exclusively on kv ,y3 depends largely on k5 and to a lesser extent on k6 and y4 depends exclusively on k6.

These results are not surprising e.g. with respect to section 5.1.3. For example the meanvectical flux is governed by the vertical hydraulic conductivity in the less permeable zone andhorizontal fluxes are governed by upwind permeabilities.

5.3 Deterministic results

The Jacobian matrix of the problem has been computed using the adjoint state method sinceoutputs are less numerous than inputs, and using a manually exactly differentiated code.

INRIA

Page 22: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 19

y1 indicator(kh) 0.10(kv) 1.00

(k3) 0.08(k4) 0.02(k5) 0.12(k6) 0.08

y3 indicator(kh) 0.03(kv) 0.05(k3) 0.00(k4) 0.01(k5) 0.93

(k6) 0.47

y4 indicator(kh) 0.01(kv) 0.01(k3) 0.03(k4) 0.02(k5) 0.14(k6) 1.00

Table 4: Statistical indicator of correlation between the water flows and the input parameters.

5.3.1 Interpretation of the SVD results

Each set of three pictures from Figure 4 to Figure 8 should be read as follows.

The first picture (a) gives the singular values, normalized with respect to the first singularvalue. The coefficients of normalization are given in square brackets. We have noc = 4output parameters (one for each outlet channel) and noc < nip (nip is the number of inputparameters), so we have 4 singular values skk=1,...,4, each represented by one colored bulletin picture (a).

The second picture (b) gives the first 4 singular vectors of the input space represented in thecanonical basis corresponding to the components of K. We have nip = 12 input parametersso 12 input singular vectors vkk=1,...,12. Each of the 4 curves corresponds to one singularvector and each of the 4 curves is associated with the singular value of the same color inthe first picture. For k > noc = 4, the singular vector of the input space vk has no influenceon the outputs and is not represented in the picture. Such a vector is in the kernel of theJacobian matrix.

The third picture (c) gives the singular vectors of the output space represented in the canon-ical basis corresponding to the components of y. We have 4 output parameters so 4 outputsingular vectors ukk=1,...,4. Each curve corresponds to one singular vector and is associatedwith the singular value of the same color in the first picture and with the singular vector ofthe same color in the second picture through equation (2).

We use equation (3) to interpret the results: for example, if the ith components of vk, sk

and the jth component of uj are nonzero then the variation of yj depends in particular on theki. On the other hand, if the ith component of vk is equal to zero, then the variation of thelinear combination of fluxes 〈uk, y〉 is locally independent of the variation of ki. For each singularvalue, one has to consider the correspondingly colored line in the middle figure to check for theinfluencing parameters, and in the right figure to check for the affected fluxes.

5.3.2 A first local study

The results shown in Figure 4 are obtained with the most likely parameters, given in Tables 2 and3.

Around this set of parameters, the main influence is that of the hydraulic conductivity in zonenumber 6 on the flux y4 through the surface S4. This influence is indeed represented by thered bullet on figure 4-(a) and the red curves on figures 4-(b) and 4-(c). The singular vector v1

on figure 4-(b) has exactly 1 nonzero component, its 6th component, corresponding to hydraulicconductivity in zone number 6, and the unique nonzero component of the corresponding singularvector u1 represented on figure 4-(c) is its 4th component.

Next we have the influence of the hydraulic conductivity in zone number 5 on y3. It is rep-resented in dark blue on the figures. The only nonzero component of v2 on figure 4-(b) is its 5th

component and the only nonzero component of u2 on figure 4-(c) is its 3rd component.

RR n

6502

Page 23: Deterministic Sensitivity Analysis for a Model for Flow in

20 Marchand, Clement, Roberts & Pepin

1 2 3 410

−5

10−4

10−3

10−2

10−1

100

singular value index

sing

ular

val

ue

h v 3 4 5 6 7 8 9 10 11 12−1

−0.5

0

0.5

1

input parameter index

1st input sv

2nd input sv

3rd input sv

4th input sv

1 2 3 4−1

−0.5

0

0.5

1

mesure index (velocity flow)

1st output sv

2nd output sv

3rd output sv

4th output sv

(a) [5.53 10−3 m3/s] (b) (c)

Figure 4: Results of SVD for the most likely parameters (see Table 2 and Table 3).

The third and fourth output singular vectors are not orthogonal to main axes:we have represented in green the influence of the vertical hydraulic conductivity in the base

zone upon the mean (or the sum) of y1 and y2. The only nonzero component of v3 is its 2nd

component and u3 has exactly two nonzero, equal components, corresponding to y1 and y2.Finally we have the influence on the hydraulic conductivity in zone number 3 upon the dif-

ference between y1 and y2 It is represented in pale blue on the figures: v4 has exactly 1 nonzerocomponent and u4 has exactly to nonzero, opposite components. Since the last singular value is al-most zero, we can say that y1−y2 is almost invariable for small variations of hydraulic conductivityaround this set of parameters.

The other input parameters have a negligible or null influence on the fluxes considered.Finally we obtain almost the same conclusions as in the probabilistic study, up to the secondary

influence of k6 upon y3. But a single local study is not enough to justify a conclusion, hence wehave performed the same study for other sets of parameters.

5.3.3 Variability of the SVD results due to the variation of the input parameters

The other SVD results correspond to much less likely parameters. We have first computed 12supplementary Jacobian matrices and the corresponding decompositions into singular values, bychoosing the most likely value for each of the basis variables except one for which we choose eitherthe smallest or the largest possible value. Then we have explored the vertices of the set of possiblevalues for the hydraulic conductivities (this set is a polyhedron), that is to say we have chosen foreach variable parameter either the smallest or the largest possible value, satisfying the correlations,given in Table 5. This means there are 26 = 64 Jacobian matrix computations and decompositionsinto singular values.

kv ∈

10−14, 10−12

kh ∈

kv, 102kv

k3 ∈

10−12, 10−10

k4 ∈

10k3, 103k3

k5 ∈

10−9, 10−7

k6 ∈

10k5, 103k5

Table 5: Choice of variable parameters for the deterministic analyses.

Some samples of the results obtained are given in Figures 5 through 8. We sum up here themain tendencies we have observed.

INRIA

Page 24: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 21

1. In most cases the results are similar to those of the first local study, i.e. the hierarchical listof the influences is

(log k6 on y4; log k5 on y3; log kv on y1 + y2; log k3 on y1 − y2).

2. The influence of the horizontal hydraulic conductivity in the base zone Ω1 ∪ Ω2 in thesensitivity results seems to remain almost null for all possible sets of parameters.

3. The hierarchy of the influences is sometimes locally modified.

(a) Wheneverk5

kv

= 103 (this is the minimal possible value), the influence of log kv on

y1 + y2 is larger than the influence of log k5 on y3. See Figures 7 and 8.

(b) Wheneverk6

kv

= 104 (this is the minimal possible value), the influence of log kv on

y1 + y2 is larger than the influence of log k6 on y4. See Figure 8.

4. The composition of the singular vectors in the input space is sometimes modified.

(a) Wheneverk3

kv

= 1 (this is the minimal possible value), we observe an influence of

log kv + α log k3 on y1 + y2, where α ≈ 0.5, instead of an influence of log kv on y1 + y2.See Figures 6 and 8.

(b) Wheneverk3

kv

= 104 (this is the maximal possible value), we observe an influence of

log kv − α log k3 on y1 + y2, where α ≈ 0.5, instead of an influence of log kv on y1 + y2.See Figure 5.

(c) Whenever k6 = 10−4 (this is the maximal possible value), log k6 and log k8 have bothan influence on y4. See Figures 5 and 6.

(d) The parameter k4 has a (very low) influence whenk4

k3and

k4

kv

are both the smallest

possible. See Figure 8.

zone no 1, 2 3 4 5 6 7 8 9 10 11 12kα or Kα(m/s) kh = 10−14, kv = 10−14 10−10 10−9 10−7 10−4 10−9 2 10−7 10−12 10−11 3 10−4 3 10−5

1 2 3 410

−6

10−5

10−4

10−3

10−2

10−1

100

singular value index

sing

ular

val

ue

h v 3 4 5 6 7 8 9 10 11 12−1

−0.5

0

0.5

1

input parameter index

1st input sv

2nd input sv

3rd input sv

4th input sv

1 2 3 4−1

−0.5

0

0.5

1

mesure index (velocity flow)

1st output sv

2nd output sv

3rd output sv

4th output sv

(a) [3.78 10−1 m3/s] (b) (c)

Figure 5: Example of SVD results, with k6 andk3

kv

set at their maximal possible value.

RR n

6502

Page 25: Deterministic Sensitivity Analysis for a Model for Flow in

22 Marchand, Clement, Roberts & Pepin

zone no 1, 2 3 4 5 6 7 8 9 10 11 12kα or Kα(m/s) kh = 10−10, kv = 10−12 10−12 10−9 10−7 10−4 10−9 2 10−7 10−12 10−11 3 10−4 3 10−5

1 2 3 410

−8

10−6

10−4

10−2

100

singular value index

sing

ular

val

ue

h v 3 4 5 6 7 8 9 10 11 12−1

−0.5

0

0.5

1

input parameter index

1st input sv

2nd input sv

3rd input sv

4th input sv

1 2 3 4−1

−0.5

0

0.5

1

mesure index (velocity flow)

1st output sv2nd output sv3rd output sv4th output sv

(a) [3.78 10−1 m3/s] (b) (c)

Figure 6: Example of SVD results, withk3

kv

set at its minimal possible value and k6 set at its

maximal possible value.

zone no 1, 2 3 4 5 6 7 8 9 10 11 12kα or Kα(m/s) kh = 10−12, kv = 10−12 10−10 10−7 10−9 10−6 10−9 2 10−7 10−12 10−11 3 10−4 3 10−5

1 2 3 410

−4

10−3

10−2

10−1

100

singular value index

sing

ular

val

ue

h v 3 4 5 6 7 8 9 10 11 12−1

−0.5

0

0.5

1

input parameter index

1st input sv

2nd input sv

3rd input sv

4th input sv

1 2 3 4−1

−0.5

0

0.5

1

mesure index (velocity flow)

1st output sv2nd output sv3rd output sv4th output sv

(a) [9.29 10−3 m3/s] (b) (c)

Figure 7: Example of SVD results, withk5

kv

set at its minimal possible value.

5.3.4 Using the SVD results

We consider the linearization of our problem around the most likely parameters. If the fluxesthrough each of the outlet channels are of the same importance, the most important input pa-rameters to investigate well (concerning reduction of variance for example) are log kv , log k5 andlog k6. The output parameter y3 (resp. y4) could be locally controlled, without modifying otheroutput parameters, by modifying only the value of log k5 (resp. log k6). The output parameter y1

could be locally controlled, without modifying other output parameters, by modifying the valuesof log kv and log k3 with the same sign. The ratio between these modifications depends on thesingular values following the equation s3∆(log kv) − s4∆(log k3) = 0 in order to impose ∆y2 = 0.The output parameter y2 could be locally controlled, without modifying other output parameters,by modifying the values of log kv and log k3 with opposite sign. The ratio between these modifica-tions depends on the singular values following the equation s3∆(log kv)+ s4∆(log k3) = 0 in orderto impose ∆y1 = 0. Since s4 is much smaller than s3, it is very difficult to control independentlyy1 and y2.

INRIA

Page 26: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 23

zone no 1, 2 3 4 5 6 7 8 9 10 11 12kα or Kα(m/s) kh = 10−10, kv = 10−12 10−12 10−11 10−9 10−8 10−9 2 10−7 10−12 10−11 3 10−4 3 10−5

1 2 3 410

−4

10−3

10−2

10−1

100

singular value index

sing

ular

val

ue

h v 3 4 5 6 7 8 9 10 11 12−1

−0.5

0

0.5

1

input parameter index

1st input sv

2nd input sv

3rd input sv

4th input sv

1 2 3 4−1

−0.5

0

0.5

1

mesure index (velocity flow)

1st output sv2nd output sv3rd output sv4th output sv

(a) [1.62 10−4 m3/s] (b) (c)

Figure 8: Example of SVD results, withk3

kv

,k5

kv

,k6

kv

,k4

kv

andk4

k3set at their minimal possible

value.

5.4 About computation times

We use the three following points to predict raw comparisons of computation times for statisticaland deterministic sensitivity analyses.

1. The computation cost for one row, or one column, of the Jacobian matrix F ′(x) is approx-imately the same as the cost for applying the function F . Indeed, in both cases, the mostcomputationally demanding task is to solve a linear system with the same matrix. Of course,when using direct linear solvers, it is possible to store the (possibly incomplete) factorizationof the matrix and then subsequent linear system resolutions are much faster.

2. For a local analysis around x using reverse mode, F (x) must first be computed once, thenthe rows of F ′(x) are computed.

3. Deterministic and statistical analyses offer roughly the same parallel possibilities.

Independent computations: of F for statistical approaches, or of row/column of F ′ forthe deterministic approach.

Each computation of F or of row/column of F ′ is heavy and can be itself parallelized,for example by domain decomposition [24].

So we can compare computation times simply by comparing the number of times we have toapply function or compute one row/column of the Jacobian matrix.

For this example, N = 1000 computations of F were needed to perform the statistical analysis.Concerning the deterministic study, each local analysis leads to 1 computation of F and 4 compu-tations of rows and the complete analysis is 77 times more expensive. So the cost of the statisticalanalysis is about 2.5 times the cost of the complete deterministic analysis (and 200 times the costof one single local study).

RR n

6502

Page 27: Deterministic Sensitivity Analysis for a Model for Flow in

24 Marchand, Clement, Roberts & Pepin

6 Conclusion

In this work we have described a deterministic method for sensitivity analysis for a model thatcomputes Darcy velocity fluxes through specified outlet channels from hydraulic conductivityparameters. We see this work as a first step towards sensitivity analysis for a model for thetransport of contaminants in porous media.

The method is based on the singular value decomposition of the Jacobian matrix of the model.It yields a (weighted) hierarchical list of directions both in the space of input parameters and inthe space of fluxes. It makes possible a truncated computation of the uncertainties concerningthe outputs. This information being first order is only local information but it is obtained witha small calculation time. This approach to sensitivity analysis is complementary to probabilisticapproaches, which are global, but more computationally demanding.

This method requires the computation of the Jacobian matrix of the model. For this thederivatives have been calculated manually (i. e. using analytic formulas) and the Jacobian matrixhas been calculated row by row using the adjoint state method. The C++ code, differentiatedmanually, has been validated with the aid of the ADOL-C automatic differentiation library.

Several local deterministic studies have been carried out, around various sets of parameters of awide range of probabilities. For the example studied, only a weak variability of the local influencesis observed for a variation within the spectrum of the possible values of the input parameters. Thisis due to the weak nonlinearity of the model, assured by the choice of a logarithmic parametrizationof the hydraulic conductivities. The results have been compared to those obtained from a globalprobabilistic study of Monte-Carlo type. The results are similar and are coherent with what mightbe expected for such a test case.

INRIA

Page 28: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 25

Acknowledgments

This work was funded by ANDRA, the French agency for nuclear waste management, and wasadditionally supported by the GDR MOMAS.

RR n

6502

Page 29: Deterministic Sensitivity Analysis for a Model for Flow in

26 Marchand, Clement, Roberts & Pepin

References

[1] P. Al Khoury, G. Chavent, F. Clement, and P. Herve. Inversion of spectroscopic data, appli-cation on co2 radiation of flame combustion. Inverse Problems in Science and Engineering,13(3):219–240, June 2005.

[2] P. Aubert, N. Di Cesare, and O. Pironneau. Automatic differentiation in C++ using ex-pression templates and application to a flow control problem. Comput Visual Sci, 3:197–208,2001.

[3] C. H. Bischof, H. M. Bucker, and A. Rasch. Sensitivity analysis of turbulence models usingautomatic differentiation. SIAM J. on Scient. Comp., 26:510–522, 2004.

[4] F. Brezzi and M. Fortin. Mixed and Hybrid Finite Element Methods. Springer, 1991.

[5] D. G. Cacuci and M. Ionescu-Bujor. A comparative review of sensitivity and uncertaintyanalysis of large-scale systems—ii: Statistical methods. Nuclear Science and Engineering,147:204–217, 2004.

[6] V. A. Cheverda, F. Clement, V. G. Khaidukov, and V. I. Kostin. Linearized inversion ofmulti-offset data for vertically inhomogeneous background. Journal of Inverse and Ill-PosedProblems, 5:453–484, 1998.

[7] F. Clement, N. Khvoenkova, A. Cartalade, and Ph. Montarnal. Analyse de sensibilite etestimation de parametres de transport pour une equation de diffusion, approche par etatadjoint. Technical Report 5132, INRIA, 2004.

[8] K. V. M. Fernando and H. Nicholson. Karhunen-Loeve expansion with reference to singular-value decomposition and separation of variables. Proc IEE-D, 127:204–206, 1980.

[9] J. J. Gerbrands. On the relationships between SVD, KLT and PCA. Pattern Recognition,14:375–381, 1981.

[10] A. Griewank. Achieving logarithmic growth of temporal and spatial complexity in reverseautomatic differentiation. Optimization Methods and Software, 1:35–54, 1992.

[11] A. Griewank. Evaluating Derevatives: Principles and Techniques of Algorithmic Differentia-tion. Frontiers in Applied Mathematics. SIAM, Philadelphia, 2000.

[12] A. Griewank, A. Kowarz, J. Utke, O. Vogel, and A. Walther. ADOL-C: A package for theautomatic differentiation of algorithms written in C/C++. documentation for ADOL-C,version 1.10.0, http://www.math.tu-dresden.de/˜adol-c/adolc110.ps, July 2005.

[13] A. Griewank and A. Walther. Algorithm 799: ADOL-C: An implementation of checkpointingfor the reverse and adjoint mode of computational differentiation. ACM Transactions onMathematical Software, 26(1):19–45, March 2000.

[14] J. C. Helton and F. J. Davis. Latin hypercube sampling and the propagation of uncertaintyin analyses of complex systems. Technical report, Sandia National Laboratories, November2002.

[15] Jon C. Helton and Freddie J. Davis. Sensitivity Analysis, chapter 6. Wiley series in probabilityand statistics. Wiley, 2000.

[16] R. A. Horn and C. R. Johnson. Topics in matrix analysis. Cambridge University Press, 1991.

[17] http://www.autodiff.org/.

[18] http://www.math.tu dresden.de/wir/project/revolve/.

INRIA

Page 30: Deterministic Sensitivity Analysis for a Model for Flow in

Deterministic Sensitivity Analysis 27

[19] http://www.netlib.org/lapack/.

[20] M. Ionescu-Bujor and D. G. Cacuci. A comparative review of sensitivity and uncertaintyanalysis of large-scale systems—i: Deterministic methods. Nuclear Science and Engineering,147:189–203, 2004.

[21] M. Jannane, W. Beydoun, E. Crase, D. Cao, Z. Koren, E. Landa, M. Mendes, A. Pica,M. Noble, G. Roeth, S. Singh, R. Snieder, A. Tarantola, D. Trezeguet, and M. Xie. Wavelengthof earth structures that can be resolved from seismic reflection data. Geophysics, 54:906–910,1989.

[22] A. Marsh La Venue and J. F. Pickens. Application of a coupled adjoint sensitivity and krigingapproach to calibrate a groundwater flow model. Water Resources Research, 28(1543–1569),June 1992.

[23] E. Laporte and P. Le Tallec. Numerical methods in sensitivity analysis and shape optimization.Birkauser, 2003.

[24] P. Le Tallec. Domain decomposition methods in computational mechanics. ComputationalMechanics Advances, 1(2), February 1994.

[25] Y. C. Liang, H. P. Lee, S. P. Lim, W. Z. Lin, K. H. Lee, and C. G. Wu. Proper orthogonaldecomposition and its applications—Part I: Theory. J. Sound Vibration, 252:527–544, 2002.

[26] E. Marchand. Analyse de sensibilite deterministe pour la simulation numerique du transfertde contaminants. PhD thesis, Universite Paris IX Dauphine, 2007.

[27] V. Martin. Simulation multidomaine d’un ecoulement autour d’un site de stockage de dechets.PhD thesis, Universite Paris IX Dauphine, 2004.

[28] J.-C. Nedelec. Mixed finite elements in R3. Numer. Math., 35:315–341, 1980.

[29] J. D. Paduano and D. R. Downing. Sensitivity analysis of digital flight control systems usingsingular-value concepts. J. Guidance Control Dynam., 12:297–303, 1989.

[30] P.-A. Raviart and J.-M. Thomas. A mixed finite element method for second order ellipticproblems. In I. Galligani and E. Magenes, editors, Mathematical Aspects of Finite ElementMethods, number 606 in Lecture Notes in Mathematics, pages 292–315. Springer, Berlin, 1977.

[31] J. E. Roberts and J.-M. Thomas. Mixed and hybrid methods. In P. G. Ciarlet and J. L.Lions, editors, Handbook of Numerical Analysis, volume II. Elsevier, 1991.

[32] S. M. Rump. Estimation of the sensitivity of linear and nonlinear algebraic problems. Lin.Algebra Appl., 153:1–34, 1991.

[33] A. Sboui. Quelques methodes numeriques robustes pour l’ecoulement et le transport en milieuporeux. PhD thesis, Universite Paris IX Dauphine, 2007.

[34] A. Sboui, J. Jaffre, and J. E. Roberts. A composite mixed finite element for general hexahedralgrids. SISC, 2008.

[35] G. W. Stewart. On the early history of the singular value decomposition. SIAM Review,35:551–566, 1993.

[36] M.H. Tan and J.K. Hammond. A non-parametric approach for linear system identificationusing principal component analysis. Mechanical Systems and Signal Processing, 21:1576–1600,2007.

RR n

6502

Page 31: Deterministic Sensitivity Analysis for a Model for Flow in

28 Marchand, Clement, Roberts & Pepin

Contents

1 Introduction 3

2 Sensitivity analysis 4

2.1 Probabilistic analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Deterministic analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 A 1D example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Differentiation 8

3.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.2 Differentiation techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3 Verification of derivative computations . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 Differentiation in direct mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.5 Differentiation in reverse mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.5.1 The adjoint state method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5.2 Assembling the Jacobian matrix row by row . . . . . . . . . . . . . . . . . . 11

4 Mathematical and Numerical Models 12

4.1 The Steady-state Darcy flow problem . . . . . . . . . . . . . . . . . . . . . . . . . . 124.2 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.3 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.3.1 Direct mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3.2 Reverse mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Numerical results 16

5.1 Test case description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.1.1 The computational domain . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.1.2 Data for input parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.1.3 Expected sensitivity results . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.2 Results of the probabilistic study . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.3 Deterministic results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.3.1 Interpretation of the SVD results . . . . . . . . . . . . . . . . . . . . . . . . 195.3.2 A first local study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.3.3 Variability of the SVD results due to the variation of the input parameters 205.3.4 Using the SVD results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.4 About computation times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

6 Conclusion 24

INRIA

Page 32: Deterministic Sensitivity Analysis for a Model for Flow in

Centre de recherche INRIA Paris – RocquencourtDomaine de Voluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France)

Centre de recherche INRIA Bordeaux – Sud Ouest : Domaine Universitaire - 351, cours de la Libération - 33405 Talence CedexCentre de recherche INRIA Grenoble – Rhône-Alpes : 655, avenue de l’Europe - 38334 Montbonnot Saint-Ismier

Centre de recherche INRIA Lille – Nord Europe : Parc Scientifique de la Haute Borne - 40, avenue Halley - 59650 Villeneuve d’AscqCentre de recherche INRIA Nancy – Grand Est : LORIA, Technopôle de Nancy-Brabois - Campus scientifique

615, rue du Jardin Botanique - BP 101 - 54602 Villers-lès-Nancy CedexCentre de recherche INRIA Rennes – Bretagne Atlantique : IRISA, Campus universitaire de Beaulieu - 35042 Rennes Cedex

Centre de recherche INRIA Saclay – Île-de-France : Parc Orsay Université - ZAC des Vignes : 4, rue Jacques Monod - 91893 Orsay CedexCentre de recherche INRIA Sophia Antipolis – Méditerranée : 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex

ÉditeurINRIA - Domaine de Voluceau - Rocquencourt, BP 105 - 78153 Le Chesnay Cedex (France)

ISSN 0249-6399