institut de genie nucl´ eaire´ ecole polytechnique de ... · the sobolev space 1 the sobolev...

21
The Lagrangian finite-element method Alain H ´ ebert [email protected] Institut de g ´ enie nucl ´ eaire ´ Ecole Polytechnique de Montr ´ eal ENE6103: Week 7 The Lagrangian finite-element method – 1/21

Upload: others

Post on 30-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

The Lagrangian finite-element methodAlain Hebert

[email protected]

Institut de genie nucleaire

Ecole Polytechnique de Montreal

ENE6103: Week 7 The Lagrangian finite-element method – 1/21

Page 2: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Content (week 7) 1

The variational formulationThe Sobolev spaceA primal formulation

The Lagrangian finite-element methodLinear Lagrange polynomialsParabolic Lagrange polynomialsCubic Lagrange polynomialsAssembly of matrix systemUnit matrices

ENE6103: Week 7 The Lagrangian finite-element method – 2/21

Page 3: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

A primal variational formulation 1It is possible to rewrite the diffusion equation

− ∇ · D(r)∇φ(r) + Σr(r)φ(r) = Q⋄(r)(1)

together with its continuity and boundary conditions, into a variational formulation that ismathematically equivalent.

This approach is also known as the Rayleigh-Ritz method and provides a means toobtain approximate solutions to a differential equation by finding a stationary point of arelated functional.

Many variational formulations exist, but we will restrict ourself to the one-speed primalformulation based on the one-speed primal functional.

This formulation enables us to obtain a solution for Eq. (1) inside a space of basisfunctions. The Sobolev space is the most general space that can be used.

We have suppressed the group index g in order to simplify the notation.

ENE6103: Week 7 The Lagrangian finite-element method – 3/21

Page 4: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

The Sobolev space 1The Sobolev space is a vector space of functions f(r) defined over domain V and boundedin the Sobolev sense. Elements of the Sobolev space W1(V ) are L2–integrable over thedomain V and possess first derivatives that are also L2–integrable over the domain V .Functions that are element of W1(V ) are therefore continuous over V . We write

W1(V ) =n

f(r) ; f(r) ∈ L2(V ) and ∇f(r) ∈ˆ

L2(V )˜3

o

(2)

where L2(V ) is the set of functions defined over domain V , whose quadratic norm isbounded, so that

L2(V ) =

(

f(r) ;

s

Z

Vd3r [f(r)]2 < ∞

)

.(3)

The elements of W1(V ) are functions with less restrictive continuity requirements thanthose imposed on the solution of Eq. (1).

For example, it is possible to choose basis functions that do not satisfy the neutroncurrent continuity relation. In this sense, a variational formulation is a weak formulation.

ENE6103: Week 7 The Lagrangian finite-element method – 4/21

Page 5: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

A primal formulation 1It is also possible to chose basis functions within a subset of W1(V ).

For example, a primal formulation restrict the choice to the set D(V ) of functions thatvanish over ∂V0, the domain boundary where a zero-flux condition is imposed.

It is also possible to restrict ourself to piecewise polynomial functions, leading to theLagrangian finite-element method.

A variational formulation makes it possible to solve Eq. (1) by seeking a stationary point of acorresponding functional. The one-speed primal functional is written

F {φ(r)} =1

2

Z

Vd3r

D(r)∇φ(r) · ∇φ(r) + Σr(r) [φ(r)]2

− 2φ(r) Q⋄(r)

ff

+1

2

Z

∂Vβ

d2r1

2

1 − β(r)

1 + β(r)[φ(r)]2(4)

where φ(r) ∈ W1(V ) ∩ D(V ), β(r) is the albedo and ∂Vβ is the fraction of ∂V where thealbedo boundary condition is applied, so that ∂V = ∂V0 ∪ ∂Vβ .

ENE6103: Week 7 The Lagrangian finite-element method – 5/21

Page 6: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

A primal formulation 2

A stationary point of functional (4) is defined by the relation

δδφF {φ(r)} = limǫ→0

d

dǫF {φ(r) + ǫ δφ(r)}

ff

= 0(5)

where δφ(r) is an arbitrary element of vector space W1(V ) ∩ D(V ). We thus obtain

Z

Vd3r

D(r) ∇δφ(r) · ∇φ(r) + Σr(r) δφ(r) φ(r)

− δφ(r) Q⋄(r)

ff

+

Z

∂Vβ

d2r1

2

1 − β(r)

1 + β(r)δφ(r) φ(r) = 0(6)

∀δφ(r) ∈ W1(V ) ∩ D(V ).

ENE6103: Week 7 The Lagrangian finite-element method – 6/21

Page 7: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

A primal formulation 3We divide the total reactor volume V into aset of subvolumes {Vi ; i = 1, N} overwhich constant diffusion coefficient{Di ; i = 1, N} and constant removal crosssections {Σr,i ; i = 1, N} are defined.Moreover, ∇φ(r) and ∇δφ(r) are assumedcontinuous inside each subvolume Vi. Wealso define {∂Vi ; i = 1, N} as surfacessurrounding each subvolume and Ni(r) asthe normal unit vector pointing out of ∂Vi atr. We note that Ni(r) = −Nj(r).

Ni(r)

VjVi

r

−+

∂Vi

Let us now apply the Gauss divergence theorem over subvolume Vi, so that

Z

Vi

d3r D(r)∇δφ(r) · ∇φ(r)

= −Z

Vi

d3r δφ(r)∇ · D(r)∇φ(r) +

Z

∂Vi

d2r δφ(r) D(r−) ∇φ(r−) · Ni(r)(7)

where i = 1, N .

ENE6103: Week 7 The Lagrangian finite-element method – 7/21

Page 8: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

A primal formulation 4

We separate each surface ∂Vi into three parts, as

∂Vi = ∂Wi + ∂Vβ,i + ∂V0,i(8)

where ∂Wi is the part of ∂Vi internal to domain V . Surfaces ∂Vβ,i and ∂V0,i are the part of∂Vi belonging to ∂Vβ an ∂V0, respectively.

Substituting Eq. (7) into Eq. (6), we obtain

NX

i=1

Z

Vi

d3r δφ(r)

»

−∇ · D(r)∇φ(r) + Σr(r) φ(r) − Q⋄(r)

+

Z

∂Wi

d2r δφ(r) D(r−) ∇φ(r−) · Ni(r)

+

Z

∂Vβ,i

d2r δφ(r)

»

D(r) ∇φ(r) · Ni(r) +1

2

1 − β(r)

1 + β(r)φ(r)

= 0(9)

∀δφ(r) ∈ W1(V ) ∩ D(V ).

ENE6103: Week 7 The Lagrangian finite-element method – 8/21

Page 9: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

A primal formulation 5Hence φ(r) is a stationnary point of functional (4) for all arbitrary variationsδφ(r) ∈ W1(V ) ∩ D(V ) if, and only if its Euler equations are satisfied:

−∇ · D(r)∇φ(r) + Σr(r) φ(r) = Q⋄(r) ; r ∈ V ,(10)

NX

i=1

δi(r) Di ∇φ(r−) · Ni(r) = 0 with δi(r) =

1 if r ∈ δWi

0 otherwise(11)

and

D(r) ∇φ(r) · N(r) +1

2

1 − β(r)

1 + β(r)φ(r) = 0 ; r ∈ ∂Vβ .(12)

In conclusion, a function φ(r) corresponding to a stationnary point of functional (4) willrespect current continuity and albedo boundary conditions in addition to satisfying thediffusion equation.

Conditions satisfied as a stationnary point of a fiunctional are said to be naturalconditions.

Conditions imposed to the trial functions, such as flux continuity or zero-flux boundaryconditions, are said to be essential conditions.

ENE6103: Week 7 The Lagrangian finite-element method – 9/21

Page 10: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

The Lagrangian finite-element method 1The finite element method (FEM) is used for finding approximate solutions of partialdifferential equations. It is based on an expansion of the dependent variable(s), theparticle flux in our case, into a linear combination of polynomial trial functions definedover subvolumes.

The trial functions space must be chosen so as to ensure that improvement in thenumerical approximation occurs with increase in the number I of subvolumes and/orwith the degree K of the polynomial trial functions.

The trial functions are known a priori and the corresponding coefficients can be foundusing a weighted residual approach or a variational formulation

We have chosen to present the variational formulation, as it brings two importantbenefits:

1. the intrinsic symmetry of the one-speed diffusion equation is always preserved bythe discretization process,

2. the boundary conditions are introduced in a consistent way.

ENE6103: Week 7 The Lagrangian finite-element method – 10/21

Page 11: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

The Lagrangian finite-element method 2The polynomial basis {um(r) ; m = 1, M} with um(r) ∈ W1(V ) ∩ D(V ) is used to spanthe neutron flux φ(r) and flux variation δφ(r) over V , according to

φ(r) =M

X

m=1

φm um(r) and δφ(r) =M

X

m=1

δφm um(r)(13)

where the set of variational coefficients {φm ; m = 1, M} represents the unknown vector orthe numerical solution to be obtained by the FEM.

The FEM can be applied to various types and form of subvolumes or elements.Cartesian and hexagonal elements are the most widely used in reactor physics forfull-core calculations.

A Cartesian domain is first partitioned into rectangular parallelepipeds over which thenuclear properties are assumed to be uniform.

A polynomial basis is defined over each element by using full tensorial products of 1Dpolynomials up to a given order.

In the case of a primal variational formulation, Lagrange polynomials are chosen aspolynomial basis in order to satisfy the requirement that um(r) ∈ W1(V ) ∩ D(V ).

ENE6103: Week 7 The Lagrangian finite-element method – 11/21

Page 12: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

The Lagrangian finite-element method 3

i-1 i i+1

xi-3/2 xi-1/2 xi+1/2 xi+3/2

xi-1 xi+1 xi

∆xi-1 ∆xi ∆xi+1

X

region regionregion

We will consider a 1D Cartesian domain with I subvolumes Trial functions in space aretransformed from the global coordinate x defined over element i with xi−1/2 ≤ x ≤ xi+1/2

to local coordinate u defined over the unit domain, with −1/2 ≤ u ≤ 1/2. The followingchange of variable will be used:

u =1

∆xi

»

x − 1

2

`

xi−1/2 + xi+1/2

´

(14)

where

∆xi = xi+1/2 − xi−1/2 .(15)

ENE6103: Week 7 The Lagrangian finite-element method – 12/21

Page 13: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

The Lagrangian finite-element method 4

The polynomial trial functions are written

um(x) =

IX

i=1

KX

k=0

δmi,kLk(u) ; m = 1, M(16)

where I is the total number of elements and δmi,k is the finite element delta function, equal to

1 if the local unknown k in element i correspond to the global unknown m, and 0 otherwise.

Each element i serves as support for a local basis of order–K Lagrange polynomials.

These polynomial are defined so as to preserve the continuity of the global trialfunctions, as required by our primal variational formulation.

ENE6103: Week 7 The Lagrangian finite-element method – 13/21

Page 14: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Linear Lagrange polynomials (K = 1) 1This local basis contains two linear Lagrange polynomials in 1D, defined for local base pointsu0 = −1/2 and u1 = 1/2. They are written

L0(u) =1

2− u and L1(u) =

1

2+ u(17)

so that L0(−1/2) = L1(1/2) = 1 and L0(1/2) = L1(−1/2) = 0.

In this case, the variational coefficients φm are the flux values at abscissas xi−1/2 andxi+1/2. Continuity of the trial functions is preserved if each coefficient φm, corresponding toan internal mesh, is shared by two elements. For example, if a domain has left and rightalbedo boundary conditions, then δm

i,k is defined as

δmi,k =

1 if m = i + k

0 otherwise.(18)

Similarly, if a domain has left and right zero-flux boundary conditions, then δmi,k is defined as

δmi,k =

8

>

>

<

>

>

:

0 if i = 1 and k = 0

0 if i = I and k = 1

1 if m = i + k − 1

0 otherwise.

(19)

ENE6103: Week 7 The Lagrangian finite-element method – 14/21

Page 15: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Parabolic Lagrange polynomials (K = 2) 1

This local basis contains three parabolic Lagrange polynomials in 1D. They are written

L0(u) = −1

8− u +

5u2

2, L1(u) =

5

4− 5u2 and L2(u) = −1

8+ u +

5u2

2.(20)

Again, the continuity of trial functions will be satisfied if some coefficients φm are shared bytwo elements. For example, if a domain has left and right albedo boundary conditions, thenδmi,k is defined as

δmi,k =

1 if m = 2i + k − 1

0 otherwise.(21)

Similarly, if a domain has left and right zero-flux boundary conditions, then δmi,k is defined as

δmi,k =

8

>

>

<

>

>

:

0 if i = 1 and k = 0

0 if i = I and k = 2

1 if m = 2i + k − 2

0 otherwise.

(22)

ENE6103: Week 7 The Lagrangian finite-element method – 15/21

Page 16: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Cubic Lagrange polynomials (K = 3) 1

This local basis contains four parabolic Lagrange polynomials in 1D. They are written

L0(u) = −1

8+

3u

4+

5u2

2− 7u3 , L1(u) =

5

8− 5

√7u

4− 5u2

2+ 5

√7u3 ,

L2(u) =5

8+

5√

7u

4− 5u2

2− 5

√7u3 and L3(u) = −1

8− 3u

4+

5u2

2+ 7u3 .(23)

Again, the continuity of trial functions will be satisfied if some coefficients φm are shared bytwo elements. For example, if a domain has left and right albedo boundary conditions, thenδmi,k is defined as

δmi,k =

1 if m = 3i + k − 2

0 otherwise.(24)

Similarly, if a domain has left and right zero-flux boundary conditions, then δmi,k is defined as

δmi,k =

8

>

>

<

>

>

:

0 if i = 1 and k = 0

0 if i = I and k = 3

1 if m = 3i + k − 3

0 otherwise.

(25)

ENE6103: Week 7 The Lagrangian finite-element method – 16/21

Page 17: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Assembly of matrix system 1

Having defined our space of polynomial trial functions, we need to find the variationalcoefficients corresponding to the solution of the diffusion equation. Using the variationalapproach, we first rewrite Eq. (6) for the particular case of a Cartesian 1D domain. We have

IX

i=1

Z xi+1/2

xi−1/2

dx [Di ∇δφ(x) · ∇φ(x) + Σr,i δφ(x) φ(x) − δφ(x) Q⋄(x)]

+B− δφ(x1/2) φ(x1/2) + B+ δφ(xI+1/2) φ(xI+1/2) = 0(26)

∀δφ(x) ∈ W1(V ) ∩ D(V ). The two boundary terms B− and B+ are defined as

B− =

(

12

1 − β−1 + β−

if the domain has a left albedo condition

0 otherwise(27)

and

B+ =

(

12

1 − β+

1 + β+if the domain has a right albedo condition

0 otherwise.(28)

ENE6103: Week 7 The Lagrangian finite-element method – 17/21

Page 18: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Assembly of matrix system 2We next define a linear product and two different types of bilinear products:

〈Q⋄ um〉 =

IX

i=1

Z xi+1/2

xi−1/2

dx Q⋄(x) um(x)(29)

〈∇um, D∇un〉 =

IX

i=1

Z xi+1/2

xi−1/2

dx Di ∇um(x) · ∇un(x)(30)

and

〈um, Σ un〉 =I

X

i=1

Z xi+1/2

xi−1/2

dx Σi um(x) un(x) .(31)

These bilinear products can be expressed for a Lagrangian FEM as

〈∇um, D∇un〉 =I

X

i=1

Di

∆xi

KX

k=0

KX

ℓ=0

δmi,k δn

i,ℓ Qk,ℓ(32)

and 〈um, Σ un〉 =

IX

i=1

∆xi Σi

KX

k=0

KX

ℓ=0

δmi,k δn

i,ℓ Mk,ℓ .(33)

ENE6103: Week 7 The Lagrangian finite-element method – 18/21

Page 19: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Assembly of matrix system 3

Substitution of Eqs. (29) to (31) into Eq. (26) leads to the discretized linear system,corresponding to the one-speed neutron diffusion equation. We write

(

MX

m=1

φm [〈∇um, D∇un〉 + 〈um, Σr un〉])

+ φ1 B− δn,1 + φM B+ δn,M = 〈Q⋄ un〉

(34)

where n = 1, M .The system (34) is a linear matrix system of the form AΦ = Q where the coefficient matrix A

is symmetric, positive definite and diagonally dominant.

Equations (32) and (33) are written in term of the FEM mass matrix{Mk,ℓ , k = 0, K and ℓ = 0, K} and stiffness matrix {Qk,ℓ , k = 0, K and ℓ = 0, K},defined as

Mk,ℓ =

Z

1/2

−1/2

du Lk(u) Lℓ(u)(35)

and

Qk,ℓ =

Z

1/2

−1/2

dud

duLk(u)

d

duLℓ(u) .(36)

ENE6103: Week 7 The Lagrangian finite-element method – 19/21

Page 20: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Unit matrices 1

These unit matrices can be integrated analytically, leading to

Linear Lagrange polynomials (K = 1):

M1 =

» 1

3

1

61

6

1

3

and Q1 =

»

1 −1

−1 1

(37)

Parabolic Lagrange polynomials (K = 2):

M2 =

2

4

1

80 − 1

24

0 5

60

− 1

240 1

8

3

5 and Q2 =

2

4

37

12− 25

6

13

12

− 25

6

25

3− 25

613

12− 25

6

37

12

3

5(38)

Cubic Lagrange polynomials (K = 3):

M3 =

2

6

6

6

4

1

150 0 1

60

0 5

120 0

0 0 5

120

1

600 0 1

15

3

7

7

7

5

and Q3 =

2

6

6

6

6

4

83

15− 21

√7+25

12

21√

7−25

12− 41

30

− 21√

7+25

12

65

6− 20

3

21√

7−25

12

21√

7−25

12− 20

3

65

6− 21

√7+25

12

− 41

30

21√

7−25

12− 21

√7+25

12

83

15

3

7

7

7

7

5

(39)

ENE6103: Week 7 The Lagrangian finite-element method – 20/21

Page 21: Institut de genie nucl´ eaire´ Ecole Polytechnique de ... · The Sobolev space 1 The Sobolev space is a vector space of functions f(r) defined over domain V and bounded in the

Further remarks 1We have presented the FEM in its simplest implementation.

The Lagrangian formulation can be modified by using numerical integration to obtainthe mass and stiffness matrices of Eqs. (35) and (36).

Using a Gauss-Lobatto quadrature with linear Lagrange polynomials produces anumerical solution that is equivalent to the mesh-corner finite difference method.

Using a Gauss-Legendre quadrature leads to superconvergent approximations.

Discretization of 2D and 3D domains with a Lagrangian FEM produces a matrixsystem that is not compatible with the alternating direction implicit (ADI) method. Thisincompatibility is due to the off-diagonal term present in the mass matrices of Eqs. (37)to (39). This off-diagonal term can be suppressed by using a Gauss-Lobattoquadrature, leading to the primal finite-element approximations of the TRIVAC code.

The Raviart-Thomas finite element method introduces an important class ofapproximations, based on a mixed-dual variational formulation.

A linear Raviart-Thomas finite element method, with Gauss-Lobatto integration ofthe unit matrices, is equivalent to the mesh-centered finite difference method.

All Raviart-Thomas FEMs are producing approximations that are compatible withthe ADI method and with the TRIVAC code.

ENE6103: Week 7 The Lagrangian finite-element method – 21/21