Constraint Oriented Spectral Element Method E. Ahusborde, M. Aza¨ıez, and R. Gruber
Abstract An original polynomial approximation to solve partial differential equations is presented. This spectral element version takes into account the underlying nature of the corresponding physical problem. For different types of operators, this approach allows to all terms in a variational form to be represented by the same functional dependence and by the same regularity, thus eliminating regularity constraints imposed by standard numerical methods. This method satisfies automatically different type of constraints, such as occur for the grad(div) and curl(curl) operators, and this for any geometry. It can be applied to a wide range of physical problems [Physical Review E, 75(5), 056704 (2007)], including fluid flows, electromagnetism, material sciences, ideal linear magnetohydrodynamic stability analysis, and Alfv`en wave heating of fusion plasmas [Communications in Computational Physics, 5(2–4), 413–425 (2009)].
1 Introduction A wide range of physical phenomena can be described by mathematical models based on a set of coupled partial differential equations. Some operators pose significant problems, in particular those that are restricted by physical constraints. For example, for an incompressible flow, velocity u must satisfy the incompressibility constraint r � u D 0. For some operators, such as grad(div) and curl(curl) operators, the solution is restricted by constraints that are an integral part of the solution. For example, in the case of the grad(div) operator, there are two classes of eigensolutions. The solenoidal modes are infinitely degenerate with �2 D 0 and r � u D 0. M. Aza¨ıez (B) and E. Ahusborde TREFLE, ENSCPB, 33607 Pessac, France e-mail:
[email protected],
[email protected] R. Gruber EPFL, 1015 Lausanne, Switzerland e-mail: gruber@epfl.ch
J.S. Hesthaven and E.M. Rønquist (eds.), Spectral and High Order Methods for Partial Differential Equations, Lecture Notes in Computational Science and Engineering 76, c Springer-Verlag Berlin Heidelberg 2011 DOI 10.1007/978-3-642-15337-2 6, �
93
94
E. Ahusborde et al.
The second class of irrotational modes are represented by a discrete spectrum with eigenmodes satisfying r � u D 0. If these strong internal conditions cannot be satisfied precisely, so-called spectral pollution [1] appears and the numerical approach does not stably converge to the physical solution. Our goal is to propose an approach taking into account the nature of the physical problem and avoiding the generation of nonphysical solutions.
2 Constraint Oriented Polynomial Approximation Let ˝ be a bounded connected open set in IR2 , with a Lipschitz-continuous boundary @˝. To describe the method, we introduce a partition of ˝ without overlap: 0 0 ˝ D [N ˝ and ˝k \ ˝k D ;; 1 � k < k � N: For simplification, we kD1 k consider only rectilinear elements with edges collinear to the x, y- axis, that is: ˝k D�ck ; ck0 Œ��dk ; dk0 Œ: For each integer p, let IPp .˝k / be the space of restrictions to ˝k of polynomials with two variables and degree less or equal to p with respect to each variable. We recall the standard quadrature formula: let ˙GLL D f.�i ; �i /I 0 � i � pg and ˙GL D f.�i ; !i /I 1 � i � pg respectively denote the sets of Gauss– Lobatto–Legendre and Gauss–Legendre quadrature nodes and weights associated to polynomials of degree p (see [2]). The canonical polynomial interpolation basis hi .x/ 2 IPp . �� 1; C1Œ / built on ˙GLL is given by the relationships: hi .x/ D �
1 1 .1 � x 2 / L0p .x/ ; p.p C 1/ Lp .�i / .x � �i /
�1 � x � C1;
0 � i � p:
(1) Denoting by Fk the mapping which sends the square �� 1; C1Œ2 onto ˝k , we define the discrete product, for any u and v continuous on ˝: .u; v/h D PN j˝k j Pp Pp kD1 4 i D0 j D0 u ı Fk .�i ; �j /v ı Fk .�i ; �j /�i �j . j ˝k j is the measure of ˝k . Finally, we introduce the Lagrange interpolation operator Ih . For any continuous function ' on ˝, Ih 'j˝k belongs to IPp .˝k / and is equal to ' at all nodes Fk .�i ; �j /; 0 � i; j � p. We use the standard notation for the Sobolev spaces H 1 .˝/, provided with the corresponding norms.
2.1 Definition and Properties We consider the set of functions gi .x/ associated to the canonical basis (1) through the relationships: gi .x/ D hi .x/ � ˇi Lp .x/;
0 � i � p;
(2)
Constraint Oriented Spectral Element Method
95
where the constants ˇi are such that all gi .x/ 2 IPp�1 . � � 1; C1Œ /. The functions gi .x/ have the following properties: 1. Their moments up to order .p � 1/ are equal to those of their corresponding element in the GLL canonical basis, i.e.,: For 0 � i � p, C1
Z
.gi .x/ � hi .x// x j dx D 0;
8 j;
0 � j � .p � 1/:
(3)
�1
The difference .gi .x/ � hi .x// being proportional to Lp .x/ is orthogonal to all polynomials of degree less or equal to .p � 1/. 2. Interpolation of their corresponding element in the canonical basis at the GL nodes, i.e.,: For 0 � i � p, gi .�j / D hi .�j /;
8 j;
1 � j � p:
(4)
3. The constants ˇi can be obtained through a series expansion of (1) and one gets: ˇi D
1 ; .p C 1/ Lp .�i /
0 � i � p:
(5)
The set of .p C 1/ functions gi .x/ 2 IPp�1 . � � 1; C1Œ / is linearly dependent. However, the preceding properties ensure that any combination of p elements in the list is linearly independent. We therefore arbitrarily discard one element in the set fgi .x/gpiD0 (for, instance the first one, g0 .x/) and use the remaining elements to span the IPp�1 . � � 1; C1Œ / space. For any continuous function ' on ��1; C1Œ we consider two polynomial approximations. The Lagrange one, based on the hj basis is given by: 'p .x/ D
p X
'.�j /hj .x/;
(6)
j D0
and a second one uses the new basis .gj /, j D 1; � � � p: .0/
'p�1 .x/ D
p X
.0/
'j gj .x/:
(7)
j D1
The coefficients in expansion (7) can be derived from those of (6) thanks to the p relationships: Z
1
�1
�
� .0/ .x/ gi .x/ dx D 0; 'p .x/ � 'p�1
8 i;
1 � i � p:
(8)
96
E. Ahusborde et al.
One can easily verify: Theorem 1. 8 i;
'i.0/ D '.�i / C ˛i '.�0 /;
1 � i � p;
(9)
where the coefficients ˛i are the unique solutions of: 8 i;
1 � i � p;
p X � � gj ; gi ˛j D .g0 ; gi / :
(10)
j D1
.0/
Let’s introduce the projection operator �h defined on ˝ by: for any function f , �h.0/ fj˝k belongs to IPp�1 .˝k / and satisfies: Z
˝k
� � fj˝k � �h.0/ fj˝k gi dx D 0;
8 i;
1 � i � p:
(11)
2.1.1 First Numerical Result The first experiment is made on � � 1; 1Œ divided into N equal elements. Its purpose is to test the efficiency of the new basis to approximate any given� function. For � instance, we consider the function f .x/ D sin .x 2 � 1/ � .x C 3/ . Figure 1 shows the efficiency of �h.0/ f to approximate the function f since the expected algebraic O.N �p / (see [2, 3]) decrease is observed. Ih f is a piecewisepolynomial function of degree p on each ˝k and continuous across element borders. It can be used to be derived. The function �h.0/ f is a piecewise-polynomial function of degree p � 1 less regular than Ih f and discontinuous across element borders when p D 1. It can be used to represent variations in directions without derivatives. By consequent, the key of our approach is the possibility to use both approximations Ih f or �h.0/ f depending if the function is derived or not. 1e+00
1e+00 1e–01 1e–02
p=1
1e – 01
N = 10
1e–04
1e – 02
|| ε ||L2
|| ε ||L2
1e–03
1e – 03
1e–05 1e–06 1e–07 1e–08
1e – 04
1e–09
10
100
1000
10000
N .0/
1
2
3
4
5
p
6
7
8
9
10
Fig. 1 The L2 .˝/–norm jjf � �h f jj error behavior. Left: as a function of N with p D 1 on a logarithmic scale. Right: as a function of p with N D 10 on a semi-logarithmic scale
Constraint Oriented Spectral Element Method
97
2.2 Extension to Multidimensional Case Extension to the multidimensional case is almost straightforward. For a given vector field u D .ux ; uy /, we consider three different possibilities of approximation: u.0/ r .x; y/ D
Ny p p Nx X X X X
uij gi .xef /gj .yef /;
Ny p p Nx X X X X
uij hi .xef /gj .yef /;
Ny p p Nx X X X X
uij gi .xef /hj .yef /:
ref
(12)
ref
(13)
ref
(14)
eD1 f D1 i Dıe1 j Dıf 1
u.1/ r .x; y/ D
eD1 f D1 i Dıe1 j Dıf 1
u.2/ r .x; y/ D
eD1 f D1 i Dıe1 j Dıf 1
Here, ıe1 and ıf 1 are the Kronecker symbols and the index r denotes x or y. Nr is the number of elements on the r-direction. The piecewise-polynomial functions .s/ ur .s D 0; 1; 2/ have different regularity and different local polynomial degree. Remark 1. Following the relation (9), one can verify that if the vector field belongs to .H01 .˝//2 , all the coefficients in the expansions (12)–(14) are the same while the functions are different. The approximation of the vector field u D .ux ; uy / can be achieved using any of the following collocative expressions according to the functional dependence and the regularity required: u.0/ r .x; y/ D
Ny p p Nx X X X X
ef
ef
ur .�i ; �j / gi .xef /gj .yef /;
(15)
ur .�ief ; �jef / hi .xef /gj .yef /;
(16)
eD1 f D1 i Dıe1 j Dıf 1
u.1/ r .x; y/ D
Ny p p Nx X X X X
eD1 f D1 i Dıe1 j Dıf 1
u.2/ r .x; y/ D
Ny p p Nx X X X X
ef
ef
ur .�i ; �j / gi .xef /hj .yef /:
(17)
eD1 f D1 i Dıe1 j Dıf 1
The approximation u.0/ r will be used when ur is not derived whereas the approx.2/ and u will be used respectively when ur is derived in the directions imations u.1/ r r x and y.
98
E. Ahusborde et al.
3 The Constraint Oriented Effect To illustrate the capability of our approach to satisfy different constraints without changing the definition of the spectral element, let’s consider a formal test problem which consists in solving an eigenvalue problem written on the square ˝ WD Œ�1; C1�2 cut into N 2 elements. The variational form of our problem consists in: Finding u 2 .H01 .˝//2 and � such that: Z
r u � r vd x C ˛ ˝
Z
r � u r � v dx C ˇ
˝
Z
r � u � r � vd x D �2 ˝
Z
u � v d x: ˝
When ˇ D 0 and ˛ is large enough, the resulting eigenvalues are those of Stokes and the associated eigenvectors are divergence-free. For ˛ D 0 and ˇ large enough, the eigenvalues remain the same but the associated eigenvectors become curl-free. To provide a stable element we suggest to replace in (18) the two penalty bilinear forms by a stable approximation using the new basis. The discrete version is then: Find uh D .ux ; uy / 2 Xh and � such that: Ah .uh ; vh / C ˛ Bh .uh ; vh / C ˇ Ch .uh ; vh / D �2
Z
uh � vh d x; ˝
8vh 2 Xh ; (18)
where: Ah .uh ; vh / D .r uh ; r vh /h ; Bh .uh ; vh / D Ch .uh ; vh / D
(19) !
.1/ .1/ @u.2/ @v.2/ @ux @vx y y ; C ; C @x @y @x @y h ! @u.1/ @v.1/ @u.2/ @v.2/ x x y y : � ; � @x @y @x @y
(20)
(21)
h
Xh is the space of continuous piecewise-polynomial functions vanishing on @˝. We remark that all terms in the right-hand side of (20) and (21) are piecewisepolynomial functions with a local degree equal to p � 1, a basic requirement to ensure a stable approximation for grad(div) and curl(curl) operators.
3.1 Numerical Results This section discusses some numerical results related to the problem (18) showing its numerical efficiency in comparison with classical approaches. We start with case ˇ D 0 and ˛ D 105 . The eigenvalue problem (18) gives 2.Np �1/2 eigenvalues and associated eigenvectors corresponding to the degrees of freedom in Xh . Among these eigenvalues,
Constraint Oriented Spectral Element Method
99
λ24
λ24
λ23
λ23
2
λ22
2
λ1
λ2
2
λ1 0
1
2
3 p
4
5
6
0
1
2
3
4 N
5
6
7
8
Fig. 2 The dependence of the grad(div) spectrum computed using a standard hp method with p for fixed N D 4 (left), and with N for fixed p D 4 (right)
there are the Stokes eigenvalues and the non-zero eigenvalues of the grad(div) operator multiplied by ˛. We are particularly interested in predicting the number of Stokes eigenvalues NS . This number corresponds to the size of the kernel of the discretized grad(div) operator, ie to the number of zero eigenvalues. It can be prooved that NS D .Np � 2/2 . Consequently, the resolution of the problem (18) must lead to .Np � 2/2 Stokes eigenmodes. The .Np/2 � 2 remaining eigenmodes are those of the grad(div) operator multiplied by ˛. Thus, the main difficulty to solve the problem (18) consists in providing a stable discretization to the grad(div) operator. If a standard approach is chosen, the solution to the problem (18) is searched in Xh D IPp0 .˝/2 . With such a choice the discretization of the grad(div) operator is unstable and so-called spectral pollution appears [1]. Indeed, Fig. 2 represents the spectrum of the grad(div) operator computed using a standard hp method as a function of p (left) and N (right). In both cases, besides the expected eigenvalues �i .1 � i � 4/, the class of divergence-free eigensolutions expands to an unphysical discrete spectrum. Consequently, in the resolution of the problem (18) the number of Stokes eigenvalues is false and besides the non-zero eigenvalues of the grad(div) operator, we can notice the presence of spurious eigenvalues. Our approach offers a stable discretization of grad(div) operator and consequently we obtain .Np � 2/2 Stokes eigenvalues and no spurious modes. Figure 3 illustrates the convergence of the difference � between the four lowest Stokes eigenvalues computed by our method with those produced by Leriche et al. in [4]. The left part of the figure exhibits the error convergence as a function of p for N D 2 on a semi-logarithmic scale. The error is exponentially decreasing. The right part of the figure shows the same error convergence as a function of N for p D 1 on a log-log diagram. Here, we observe an algebraic decrease. The second experiment concerns the case ˛ D 0 and ˇ D 105 . Here the main difficulty consists in providing a stable discretization of the curl(curl) operator. The numerical conclusion is almost the same than for the previous study. We limit ourself to the production of the graphs (Fig. 4).
100
E. Ahusborde et al.
1e+02 1e+01
N=2
p=1
1e+01
1e+00
|ε|
|ε|
1e – 01 1e – 02
1e+00
1e – 03 1e – 04 1e – 05
1e – 01
1e – 06 3
4
5
6
7
8
8
p
32
16 N
Fig. 3 Convergence plots obtained using the penalty method for the four lowest divergence-free modes (circle D �1 , square D �2 , diamond D �3 , triangle D �4 ). Left: as a function of p with fixed N D 2. Right: as a function of N with fixed p D 1 1e+02 1e+01
p=1
1e+01
N=2
1e+00
|ε|
|ε|
1e–01 1e–02
1e+00
1e–03 1e–04
1e – 01
1e–05 1e–06
3
4
5
6 p
7
8
8
16 N
32
Fig. 4 Convergence plots obtained using the penalty method for the four lowest curl-free modes (circle D �1 , square D �2 , diamond D �3 , triangle D �4 ). Left: as a function of p with fixed N D 4. Right: as a function of N with fixed p D 1
The similarity between the two results proves the efficiency of our approach to solve two different constraints without a significant modification of the spectral element. The same tools remain valid to ensure the stability and expected convergence.
References 1. Gruber R., Rappaz J.: Finite element methods in linear ideal MHD. Springer Series in Computational Physics. Springer, Berlin (1985) 2. Bernardi C., Maday Y., Rapetti F.: Discr´etisation variationnelles de probl`emes aux limites ellitiques. Springer, Paris (2000) 3. Canuto C., Hussaini M. Y., Quarteroni A., Zang T. A.: Spectral methods. Evolution to complex geometries and applications to fluid dynamics. Scientific Computation. Springer, Berlin (2007) 4. Leriche E., Labrosse G.: Stokes eigenmodes in a square domain and the stream function-velocity correlation. Journal of Computational Physics, 200, 489–511 (2004) 5. Appert K., Azaiez M., Gruber R.: Modes of a plasma-filled waveguide determined by a numerical hp method. Communications in Computational Physics, 5(2–4), 413–425 (2009) 6. Ahusborde E., Gruber R., Azaiez M., Sawley M. L.: Physics-conforming constraints-oriented numerical method. Physical Review E, 75(5), 056704 (2007)