Technical report, IDE1224, May 2012
Adaptive finite element methods for the Laplace-Beltrami problem
Master’s Thesis in Computational Science and Engineering David Samvin
School of Information Science, Computer and Electrical Engineering Halmstad University
Adaptive finite element methods for the Laplace-Beltrami problem
Master’s Thesis in Computational Science and Engineering
School of Information Science, Computer and Electrical Engineering Halmstad University
Box 823, S-301 18 Halmstad, Sweden
May 2012
Acknowledgements
I would like to express my gratitude to my tutor Prof. Bertil Nilsson and Prof.
Peter Hansbo for all the help and support.
Abstract
This thesis concerns the Laplace-Beltrami problem with FEM on two types of surfaces.
The first part of the thesis is dedicated to explain the background and the general theory. In the second part I will show how to implement the theory with Matlab, and in the third part we consider a closed surface with no boundary conditions and a continuous surface with boundary conditions. The closed surface will be approximated with triangle elements and the continuous surface with quadratic elements.
Table of contents
1. Background 1
1.1. Finite Element Method 1
1.2. Laplace-Beltrami operator 2
1.3. Bezier surface 2
2. Introduction 4
3. Finite element approximation 5
3.1. Finite element formulation 5
3.2. Parameterization 6
4. Adaptivity 9
5. Implementation 10
5.1. Surface 10
5.2. Parametric domain 11
5.3. Surface projecting 12
6. Convergence in a smooth case 13
6.1. Model 1 13
6.2. Model 2 13
6.3. Model 3 14
6.4. Model 4 14
7. Solution 15
7.1. Model 1 15
7.2. Model 2 23
7.3. Model 3 31
7.4. Model 4 32
8. Conclusion 33
9. References 34
10. Attachment 1 35
11. Attachment 2 – Main 36
12. Attachment 3 – Assemble 39
1
1. Background
1.1
Finite Element Method, FEM
The Finite Element Method, FEM, also known as Finite Element Analysis, FEA, is a numerical method for finding approximate solutions of partial differential equations by dividing the domain into finite elements and computes each element locally then combines the entire system to find a solution. The method was developed initially, and prospered, as a computer-based simulation method for the analysis of aerospace structures, but found its way into both design and analysis of complex structural systems.
There are a lot of different types of elements when using FEM, in both 2D and 3D problems. This thesis concerns a 2D problem embedded in ℝ3and therefore we will be using triangular and quadrilateral elements shown in Fig.1.
Fig.1 - Triangular and Quadrilateral elements
2
1.2
Laplace-Beltrami operator
Laplace–Beltrami operator is a linear operator and is defined as the divergence of the gradient. The operator can be extended to operate on tensors as the divergence of a derivative along tangent vectors of a manifold.
Divergence measures the magnitude of a vector field’s source or sink at a given point.
div 𝑓 = ∇ ∙ 𝑓 =
𝜕𝑈𝜕𝑥+
𝜕𝑉𝜕𝑦+
𝜕𝑊𝜕𝑧.
(1.1)Gradient of a scalar field is a vector field that points in the direction of the greatest rate of increase of the scalar field.
grad 𝑓 = ∇𝑓 =
𝜕𝑓𝜕𝑥𝐢 +
𝜕𝑓𝜕𝑦𝐣 +
𝜕𝑓𝜕𝑧𝐤 .
(1.2) where i, j and k stands for the unit vector.(1.1) and (1.2) put together gives the Laplace –Beltrami operator,
∆𝑓 = div grad 𝑓 .
(1.3)1.3
Bezier surface
Bezier surface are mathematical splines used in finite element modeling and computer aided design. The surface is defined by a set of control points. In general, the surface passes through the first and last control
3
point but not through the center control points, rather, it is “stretched”
towards them.
A two-dimensional Bezier surface can be defined as a parametric surface where the position of a point 𝕡 as a function of the parametric coordinates u, v is given by
𝕡(𝑢, 𝑣) = � � 𝐵
𝑖𝑛𝑚
𝑗=0 𝑛
𝑖=0
(𝑢) 𝐵
𝑗𝑚(𝑣) 𝕜
𝑖,𝑗A given surface of order (𝑛, 𝑚) is defined by a set of (𝑛 + 1)(𝑚 + 1) control points 𝕜𝑖,𝑗, where
𝐵
𝑖𝑛(𝑢) = �𝑛𝑖� 𝑢
𝑖(1 − 𝑢)
𝑛−𝑖 is a Bernstein polynomial, and�𝑛𝑖� = 𝑛!
𝑖! (𝑛 − 𝑖)!
is the binomial coefficient.
4
2. Introduction
In this paper we consider the problem
∆
Γ𝑢 = 𝑓 𝑜𝑛 Γ
(2.1)𝑢 = 0 𝑜𝑛 𝜕Γ
Where Γ a two-dimensional projected surface is embedded in ℝ3 and
∆
Γis the Laplace-Beltrami operator on Γ.
For now we consider the case of a closed surface in which case
𝜕Γ = 0
and there are no boundary conditions, but at the end we will also consider a case of an open surface in which case
𝜕Γ ≠ 0
and boundary conditions are present.The problem can be written on weak form as seeking 𝑢 ∈ 𝐻01 ( Γ ) such that
(∇
Γ𝑢, ∇
Γ𝑣) = (𝑓, 𝑣)
Γ, ∀ 𝑣 ∈ 𝐻
01Γ
(2.2) where∇
Γ denotes the surface gradient and (. , . )Γ the 𝐿2 scalar product over Γ.5
3. Finite element approximation
3.1
Finite element formulation
We introduce a triangulation 𝒯ℎ = { 𝑇 } of Γ into a geometrically conforming, quasiuniform, finite element mesh of Γ, resulting in a discrete approximation Γℎ of Γ. Denote by ℎ𝑇 the diameter of element 𝑇 and by ℎ = max𝑇 ∈ 𝒯ℎℎ𝑇 the global mesh size parameter. We shall use continuous, piecewise polynomial, approximations of 𝑢
𝑉
ℎ= {𝑣 ∈ 𝐻
1( Γ
ℎ) ∶ 𝑣 |
𝑇∈ 𝑃
𝑘( 𝑇 ) for all 𝑇 ∈ 𝒯
ℎ}
or𝑉
0ℎ= {𝑣 ∈ 𝐻
1( Γ
ℎ) ∶ 𝑣 |
𝑇∈ 𝑃
𝑘( 𝑇 ) for all 𝑇 ∈ 𝒯
ℎ, 𝑣 = 0 on 𝜕Γ
ℎ}
and seek 𝑢ℎ ∈ 𝑉ℎ such that
(∇
Γℎ𝑢
ℎ, ∇
Γℎ𝑣)
Γℎ= (𝑓, 𝑣)
Γℎ, ∀ 𝑣 ∈ 𝑉
ℎ (3.1)In the following, we shall use finite element technology to compute the approximation
Γℎof
Γ. We then first assume that
𝑢ℎcan be written as
𝑢
ℎ= � 𝑢
𝑖ℎ𝑖
𝜑
𝑖(𝜉, 𝜂),
6
where
(𝜉, 𝜂)
are the coordinates of a reference element,𝜑
𝑖(𝜉, 𝜂)
are the reference shape functions, and𝑢
𝑖ℎ are the nodal values of 𝑢ℎ . We shall next use this parameterization also to approximate Γ.3.2
Parameterization
Unlike Dziuk [3] and Demlow [1] we consider an isoperimetric parameterization of the surface (the same idea can be used for arbitrary parameterizations). We first assume that we can write, on each 𝑇, 𝑥 = 𝑥(
𝜉, 𝜂
) where(𝜉, 𝜂)
denotes the coordinates used to define the reference element and 𝑥 = (𝑥, 𝑦, 𝑧) are the physical coordinates.For any given parameterization, we can extend it outside the surface by defining
𝑥
surf(𝜉, 𝜂) = 𝑥(𝜉, 𝜂),
𝑥
out(𝜉, 𝜂) = 𝑥(𝜉, 𝜂) + 𝑡 𝑛(𝜉, 𝜂)
where 𝑛 is the normal and 𝑡 is a fixed parameter. In some models, where the surface is an idealized thin structure, it is natural to think of 𝑡 as a thickness.
For the purpose of the current extension, we may simply set 𝑡 = 1. Next, we think of the extention as a function of
(𝜉, 𝜂, 𝜁)
so that𝑥
out(𝜉, 𝜂, 𝜁) = 𝑥
surf(𝜉, 𝜂) + 𝜁 𝑛(𝜉, 𝜂), 0 ≤ 𝜁 ≤ 1.
7
Using 𝑛 = 𝑥out − 𝑥surf the extension of the coordinates can alternatively be written
𝑥(𝜉, 𝜂, 𝜁) = (1 − 𝜁)𝑥
surf(𝜉, 𝜂) + 𝜁 𝑥
out(𝜉, 𝜂),
which represents an affine map given 𝑥out. We now specialize to parameterizations of the isoperimetric finite element kind, i.e., approximations of the type
𝑥(𝜉, 𝜂) ≈ 𝑥
ℎ(𝜉, 𝜂) = � 𝑥
𝑖𝑖
𝜑
𝑖(𝜉, 𝜂) ∈ [𝑉
ℎ]
3,
𝑥
out(𝜉, 𝜂) ≈ 𝑥
outℎ(𝜉, 𝜂) = � 𝑥
𝑖out𝑖
𝜑
𝑖(𝜉, 𝜂) ∈ [𝑉
ℎ]
3,
where 𝑥𝑖 are the physical location of the nodes on the surface. 𝑥outℎ will never be used but is needed in the following for the construction of the jacobian of the map. We have
𝑥(𝜉, 𝜂, 𝜁) ≈ �(𝑥
𝑖𝑖
𝜑
𝑖(𝜉, 𝜂)(1 − 𝜁) + 𝑥
𝑖out𝜑
𝑖(𝜉, 𝜂) 𝜁)
At 𝜁 = 0 we find, in the usual way, that the physical derivatives of the shape functions on the surface are approximated, at (𝜉, 𝜂) by
⎣⎢
⎢⎢
⎢⎢
⎡𝜕
𝜑
𝑖𝜕𝜕𝑥
𝜑
𝑖𝜕𝜕𝑦
𝜑
𝑖𝜕𝑧 ⎦⎥⎥⎥⎥⎥⎤
= 𝕁−𝟏(
𝜉, 𝜂, 0
)⎣⎢
⎢⎢
⎢⎡ 𝜕
𝜑
𝑖𝜕
𝜉
𝜕
𝜑
𝑖𝜕
𝜂
𝑛𝑧ℎ𝜑
𝑖⎦⎥⎥⎥
⎥⎤
8
Where the Jacobian
𝕁(𝜉, 𝜂, 0) ∶=
⎣ ⎢
⎢ ⎢
⎢ ⎢
⎡
𝜕𝑥
𝜕
𝜉
𝜕
𝑦
𝜕
𝜉
𝜕
𝑧
𝜕
𝜉
𝜕
𝑥
𝜕
𝜂
𝜕
𝑦
𝜕
𝜂
𝜕
𝑧
𝜕
𝜂
𝜕
𝑥
𝜕
𝜁
𝜕
𝑦
𝜕
𝜁
𝜕
𝑧
𝜕
𝜁⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎤ ,
Finally, the three components of the surface gradient are approximated, elementwise, by
∇
Γℎ𝜑
𝑖= ( 𝕀 − 𝑛
ℎ⨂ 𝑛
ℎ) ∇𝜑
𝑖We also apply the usual FE approximation over the elements for the normals at nodes, 𝕟ℎ = ∑𝑖
𝜑
𝑖 𝕟𝑖 followed by normalization. Then𝕁(𝜉, 𝜂, 0) ∶=
⎣ ⎢
⎢ ⎢
⎢ ⎡
𝜕𝑥
ℎ𝜕
𝜉
𝜕
𝑦
ℎ𝜕
𝜉
𝜕
𝑧
ℎ𝜕
𝜉
𝜕
𝑥
ℎ𝜕
𝜂
𝜕
𝑦
ℎ𝜕
𝜂
𝜕
𝑧
ℎ𝜕
𝜂 𝑛
𝑥ℎ𝑛
𝑦ℎ𝑛
𝑧ℎ⎦ ⎥ ⎥ ⎥ ⎥ ⎤
.
9
4. Adaptivity
As adaptivity criteria we introduce the following error estimation,
‖𝑢 − 𝑈 ‖
𝐿2≤ 𝑐
1ℎ ‖𝑓‖
𝐿2‖𝑓‖
𝐿2= �� 𝑓
2𝑑Ω
Ω
�
1/2
= �� � 𝑓
2𝑑Ω
𝑒Ω𝑒
�
1/2
We only consider according to the error, the highest 30 % of the elements in each adaptivity step.
Element refinement is done by adding a new node between the two existing ones for the elements with highest error as shown in Fig.2.
Fig.2
10
5. Implementation
5.1
Surface
The surface can be generated by using commercial software like Comsol or Solidworks. From the software we can extract the node coordinates, element topology and the normals at nodes.
In our case we will generate the surface using Bezier surface in Matlab and Mathematica and extract the information needed for the nodes, elements and normals.
From the surface we receive the surface coordinates (𝑥, 𝑦, 𝑧) at each node in
𝑛𝑜𝑑𝑒𝑠 = � 𝑥
1. ..
𝑥
𝑛𝑦
1. ..
𝑦
𝑛𝑧
1. ..
𝑧
𝑛�
and the element topology in
𝑒𝑙𝑚𝑛𝑡𝑠 =
⎣ ⎢
⎢ ⎡ 𝑖
1. ..
𝑖
𝑛𝑗
1. ..
𝑗
𝑛𝑘
1. ..
𝑘
𝑛⎦ ⎥ ⎥ ⎤
where each row is an element, and the normals
𝑛𝑜𝑚𝑎𝑙𝑠 = � 𝑛𝑥
1. ..
𝑛𝑥
𝑛𝑛𝑦
1. ..
𝑛𝑦
𝑛𝑛𝑧
1. ..
𝑛𝑧
𝑛�.
11
5.2
Parametric domain
The elements used in the parametric domain are in two dimensions and of rectangular or triangular shape as shown in Fig.3.
The linear basis functions 𝜑𝑖(
𝜉, 𝜂
) in the parametric domain is obtained by𝜑
1= 1 − 𝜉 − 𝜂, 𝜑
2= 𝜉, 𝜑
3= 𝜂
with derivatives
𝜕𝜑
𝑖𝜕𝜉 = � 𝜕𝜑
1𝜕𝜉
𝜕𝜑
2𝜕𝜉
𝜕𝜑
3𝜕𝜉 � = [−1 0 1]
𝜕𝜑
𝑖𝜕𝜂 = � 𝜕𝜑
1𝜕𝜂
𝜕𝜑
2𝜕𝜂
𝜕𝜑
3𝜕𝜂 � = [−1 1 0]
Due to linearity of the problem a one point Gauss quadrature is enough, thus points and weights
𝑔𝑝 = [
13,
13], 𝑔𝑤 = [
12]
Fig.3
12
Numerical integration is applied using the area measure
𝑑Ω
𝑒= � 𝜕𝕩
𝜕𝜉 × 𝜕𝕩
𝜕𝜂 �
5.3 Surface projectingMoving the normals from the nodes to the Gauss points can be done by inserting the Gauss points as 𝜉 and 𝜂 then using the standard FE map
𝑛𝐺 = ∑ 𝜑
𝑖 𝑖(𝜉, 𝜂)𝑛
𝑖= [𝜑
1𝜑
2𝜑
3] �
𝑛
𝑥𝑖𝑛
𝑦𝑖𝑛
𝑧𝑖𝑛
𝑥𝑗𝑛
𝑦𝑗𝑛
𝑧𝑗𝑛
𝑥𝑘𝑛
𝑦𝑘𝑛
𝑧𝑘� (5.1)
and the projection matrixℙ = 𝑛𝐺
T𝑛𝐺
(5.2)and the gradient in three dimensions we obtain
ℂ =
⎣ ⎢
⎢ ⎢
⎡
𝜕𝜑𝜕𝑥𝑖𝜕𝜑𝑖
𝜕𝑦
𝜕𝜑𝑖
𝜕𝑧
⎦ ⎥ ⎥ ⎥ ⎤
(5.3)
Projecting the gradient down on the surface using (5.1), (5.2) and (5.3)
𝔹 = (𝕀 − ℙ) ℂ
where 𝕀 is a 3 by 3 identity matrix.
13
6. Convergence in a smooth case
6.1
Model 1
We consider a sphere with unit diameter and origin at (1/2, 1/2, 1/2). The exact solution
𝑢 = (𝑥 − 1/2)(𝑦 − 1/2)(𝑧 − 1/2)
inserted into (2.1) then corresponds to the right-hand side
𝑓 = (6 (2 𝑥 − 1) (2 𝑦 − 1) (2 𝑧 − 1))
(3 + 4 (𝑥 − 1) 𝑥 + 4 (𝑦 − 1) 𝑦 + 4 (𝑧 − 1) 𝑧)
Using 𝑓 in the FE assembly we should obtain an approximate solution 𝑈 close to the exact solution 𝑢.
6.2
Model 2
We consider an implicitly defined bubble F(𝑥, 𝑦, 𝑧) ≔ (𝑥 − 𝑧2)2+ 𝑦2+ 𝑧2− 1 = 0 with normal 𝕟 = |∇F|∇F. The exact solution
𝑢 = 𝑥 𝑦 ( 𝑧 + 1)
2inserted into (2.1) using Mathematica then corresponds to the right-hand side
𝑓 = 𝑠𝑒𝑒 𝑎𝑡𝑡𝑎𝑐ℎ𝑚𝑒𝑛𝑡. 1
Using 𝑓 in the FE assembly we should obtain an approximate solution 𝑈 close to the exact solution 𝑢.
14
6.3
Model 3
A smooth open Bezier surface with the same source term as model 2 and boundary conditions 𝑢 = 0.
6.4
Model 4
A smooth open Bezier surface with the same source term as model 1 and boundary conditions 𝑢 = 0.
15
7. Solution
7.1
Model 1
A sphere with origin at (1/2, 1/2, 1/2) and no boundary conditions, triangular mesh.
16
17
By refining the elements and computing 𝑢, we obtain the exact solution as shown below.
18
19
The approximate FE solution U
20
21
The difference between the exact solution and the approximated solution i
s
𝑒𝑟𝑟𝑜𝑟 = 𝑢 − 𝑈
22
23
7.2
Model 2
A bubble with origin at (0, 0, 0) and no boundary conditions, triangular mesh.
24
25
By refining the elements and computing 𝑢, we obtain the exact solution as shown below.
26
27
The approximate FE solution U
28
29
The difference between the exact solution and the approximated solution i
s
𝑒𝑟𝑟𝑜𝑟 = 𝑢 − 𝑈
30
31
7.3
Model 3
Open surface with boundary conditions 𝑢 = 0, triangular mesh.
32
7.4
Model 4
Open surface with boundary conditions 𝑢 = 0, quadratic mesh.
33
8. Conclusion
A general adaptive finite element method for the Laplace-Beltrami problem has been developed. The method has been implemented to take care of smooth open and closed surfaces. Comparison with analytical results manifests the method in both cases.
34
9. References
[1] A. Demlow, Higher order finite element methods and pointwise error estimates for elliptic problems on surfaces, SIAM J. Numer.
Anal. 47 (2009) 805-827.
[2] A. Demlow, G. Dziuk, An adaptive finite element method for the Laplace-Beltrami operator on implicitly defined surfaces, SIAM J. Numer. Anal. 45 (2007) 421-442.
[3] G. Dziuk, Finite elements for the Beltrami operator on arbitrary surfaces, in: Partial Differential Equations and Calculus of Variations (Lecture Notes in Mathematics, Vol. 1357),
Hildebrand S, Leis R (eds). Springer: Berlin, 1988, pp. 142-155.
[4] J. Foley, A. van Dam, S. Feiner, J. Hughes, Computer graphics principles and practice (second edition).
35
10. Attachment 1
Source term for the bubble, model 2.
𝑓 =
36
11. Attachment 2 - Main
The code is implemented in Matlab 7.1 R2010a.
37
38
39