Elliptic Problems in Weak Form
Elliptic Problems in Weak Form
39
Elliptic boundary-value problems
General Elliptic Problem
Find u : ⌦ ! R, such that
r · (Aru) + b · ru + cu = f , in ⌦ ⇢ Rd
with A ⌘ A(x) symmetric & positive definite matrix (tensor) a.e. in ⌦, s.t.
u = gD on @⌦D ,
n · Aru = gN on @⌦N ,
The above has unique solution only under certain conditions (regularity, sign)
on the coefficients and on the boundary conditions.
Does not arise “naturally” from a minimisation principle if b 6= 0.
40
Elliptic boundary-value problems
Take solution space V := H 1 (⌦), and test space
1
HD (⌦) := {v 2 H 1 (⌦) : v |@⌦D = 0}
1
Starting from the PDE, multiply by v 2 HD (⌦) and integrate
Z Z Z Z
r · (Aru)v dx + b · ruv dx + cuv dx = fv dx.
⌦ ⌦ ⌦ ⌦
Integrate by parts
Z Z Z Z Z
Aru · rv dx + b · ruv dx + cuv dx n · Aruv dS = fv dx.
⌦ ⌦ ⌦ @⌦ ⌦
1
for every v 2 HD (⌦).
42
Starting simple: 1D problem
1D boundary value problem
Find u : [a, b] ! R, such that
Pretend we don’t know how to solve this. The above in weak form:
BIG IDEA:
dim(V) = 1. Solve the problem in a finite-dimensional subspace of V?
43
να είναι πόχωρος πεπερα μένης διά α ης ο V.
Μια ιδέα να κα α κε ά ο με ένα βολικό Vh είναι ν’ αναζη ή ο με ην προ έγγι η ε ένα πλήθος πεπερα-
A “nice”
μένων finite[a, dimensional
ημείων ο χωρίο b]. Για ε κολία, ορίζο subspace
με μια ομοιόμορ η διαμέρι η ο [a, b] βήμα ος h > 0
μέ ω ων ημείων x0 < x1 < · · · < xN +1 , έ οια ώ ε
Consider (uniform) grid/mesh of I¯ = [a, b]:
a = x0 , x1 = x0 + h, x2 = x1 + h, . . . , xN = xN 1 + h, xN +1 = b, (8.3)
a = x0 , x1 = x0 + h, x2 = x1 + h, . . . , xN = xN 1 + h, xN+1 = b,
και, νεπώς, h = (b a)/(N + 1). Τα ημεία {xi }N +1
i=0 θα ανα έρον αι ως πλέγμα.
Σ ηwithνέχεια,
h :=ορίζο
(b μεa)/(N
ως Vh + ο 1),
ύνολο
andωνconsider ναρ ή the
εων family
vh 2 Vhofοι continuous,
οποίες είναι νεχείς και γραμμικές
piecewise
ε κάθε ποδιά ημαfunctions
linear/affine για i = 1, . . .to, Nthe
[xi 1 , xi ],subordinate 1, καθώς επί ης να ικανοποιούν και ις νοριακές
+ mesh:
νθήκες vh (x0 ) = 0 = vh (xN +1 ); βλ., Σχήμα 8.1 για μια χημα ική αναπαρά α η. Παρα ηρούμε ό ι οι
νεχείς και μημα V ικά := {v 2 V :ναρ
h γραμμικές v |(xήj εις affine function, j = 1, . . . , N + 1}
1 ,xj ] ο (a, b) έχο ν καλά ορι μένη α θενή παράγωγο και, επι-
πλέον, ι χύει ό ι Vh ⇢ H01 ((a, b)). Σ ναρ ή εις vh 2 Vh α ής ης μορ ής ανα έρον αι και ως γραμμικές
splines η βιβλιογρα ία.
...
h ...
a = x0 x1 xN xN +1 = b
Σχήμα 8.1: Συνεχείς και τμηματικά γραμμικές συναρτήσεις (γραμμικές splines).
I.e., the space of linear splines with zero endpoints, subordinate the the mesh.
Παρα ηρούμε ό ι για να ορί ο με πλήρως μια νάρ η η vh 2 Vh , αρκεί να καθορί ο με ις ιμές
44
ης
A finite element method
We can only use this family due to the use of weak derivatives!
45
νεπάγε αι ό ι ο Vh είναι ομοιομορ ικός με ον RN . Σ νεπώς, είναι δ να ό να θεωρή ο με μια (γραμμική)
βά η για ον Vh πο ν’ αν ι οιχεί ην ορθοκανονική βά η ο RN , {ei }N i=1 , όπο (ei )j = ij , δηλ.,
On V ...
μονάδα h ην i-ο ή ν ε αγμένη και οι πόλοιπες ί ες με ο μηδέν. Ορίζον ας, λοιπόν, για κάθε i =
1, . . . , N , ις συναρτήσεις-«σκηνή» (“hat/tent” functions): i : [a, b] ! R με
Observe that dim Vh = N. This 8 is because
> x xi 1
>
< , αν xi 1 x xi ;
h >
vh 2 Vh i (x) = ! i+1x x vh (x1 ), . . . , vh (xN ) 2 RN (8.4)
> , αν xi x xi+1 ;
>
: h
0, δια ορε ικά,
So there exists a basis { i }N
i=1 spanning Vh .
παρα ηρούμε ό ι η i 2 Vh είναι ί η με 1 ον κόμβο xi και ί η με μηδέν ο ς πόλοιπο ς κόμβο ς· βλ.,
Σχήμα 8.2 για ένα καρί ημα. Θα ανα ερόμα ε ις ναρ ή εις i α ές ως συναρτήσεις βάσης (basis
functions) ο Vh .
Lagrange basis: i 2 Vh ! N
ei 2 R
h
a = x0 x1 xi xN xN +1 = b
8 x xi 1
Σχήμα 8.2: Συνάρτηση-«σκηνή»
i .
<
h , if xi 1 x xi ;
xi+1 x
Μια έ οια“hat”
βά η ποfunctions: i (x)
αν ι οιχεί α διανύ α ei ονομάζε
μα = h αι ,και βάση x (Lagrange
if xiLagrange xi+1 ; basis), με
:
ην ορολογία ης Θεωρίας Προ έγγι ης. 0, otherwise,
Άρα αν ί ο (8.2), αναζη ούμε η λύ η ο προ εγγι ικού προβλήμα ος: βρες uh 2 Vh , έ οια ώ ε
Z b Z b 46
On Vh ...
i 1 i
xi 1 xi
Σχήμα 8.3: Πεπερασμένο στοιχείο:
1D linear finite χωρίο και συναρτήσεις βάσης.
element
47
A finite element method
Z Z
Find uh 2 Vh , such that uh0 vh0 dx = fvh dx 8vh 2 Vh .
I I
3rd j = i 1. Then Z b Z xi
0 0 1 1 1
ai(i 1) = i 1 (x) i (x) dx = dx = .
a xi 1
h h h
50
Dealing with the Fi
Typically one uses quadrature rules of correct order, e.g., midpoint rule:
Z b Z xi Z xi+1
f (x) i (x) dx = f (x) i (x) dx + f (x) i (x) dx
a xi 1 xi
✓ ⇣ x + x ⌘◆
h ⇣ xi 1 + xi ⌘ i i+1
⇡ f +f ,
2 2 2
xi±1 +xi
since i 2 = 12 .
Remark
Rb
Since the load f only appears in a
f (x) i (x) dx, “rough” f are admissible.
General observation
FEM provides approximation over the whole computational domain!
51
Comparing with finite di↵erences
a = x0 , x1 = x0 + h, x2 = x1 + h, . . . , xN = xN 1 + h, xN+1 = b,
52
Comparing with finite di↵erences
The above motivates the finite di↵erence method: find uj 2 R, j = 1, . . . , N, s. t.
or
0 10 u 1 0
f (x1 )
1
2 1 0 0 ... 0 1
B 1 2 1 0 ... 0 CB u2 C B f (x2 ) C
B CB C B C
B 0 1 2 1 ... 0 CB
B
.. C
C
B
B
.. C
C
B CB . C = h2 B . C
B .. .. .. .. .. CB . C B .. C
B . . . . . ... CB . C B C
B CB . C B . C
@ 0 ... 0 1 2 1 A@ A @ A
uN 1 f (xN 1 )
0 ... 0 0 1 2 uN f (xn )
Remarks:
FE and FD provide the same discretisation of the derivate on uniform grids
right-hand “load” vectors typically di↵er!
53
Error analysis
We want to estimate u uh . A reasonable norm to do so is the “natural” norm
for this problem:
ku uh kV := |u uh |H 1 (I ) := k(u uh )0 kL2 (I )
Problem
Z Z
Find u 2 V, such that u 0 v 0 dx = fv dx 8v 2 V.
I I
Method
Z Z
Find uh 2 Vh , such that uh0 vh0 dx = fvh dx 8vh 2 Vh .
I I
54
Error analysis
Galerkin orthogonality
Z
(u uh )0 vh0 dx = 0 for all vh 2 Vh .
I
ku uh kV = min ku vh kV .
vh 2Vh
55
Proof
We have, respectively
Z
ku uh k2V = (u uh )0 (u 0 uh0 ) dx
ZI Z
= (u 0 uh0 )u 0 dx (u uh )0 uh0 dx
I
|I {z }
=0 Galerkin orthogonality
Z Z
= (u 0 uh0 )u 0 dx (u 0 uh0 )vh0 dx .
I
|I {z }
=0 Galerkin orthogonality
for all vh 2 Vh , or
ku uh kV inf ku vh kV .
vh 2Vh
Definition
Let v 2 C ([a, b]) and Vh as above. Define the interpolant vI 2 Vh of v by
N
X
vI := v (xi ) i .
i=1
Theorem
Let v 2 H 2 (I ). Then, we have the estimates
h 00
k(v vI )0 kL2 (I ) kv kL2 (I )
⇡
and
h2 00
kv vI kL2 (I ) 2 kv kL2 (I ) .
⇡
57
Proof
For the proof we use Friedrichs’ inequality in 1D:
d c
for every w 2 H01 ((c, d)), we have kw kL2 ((c,d)) kw 0 kL2 ((c,d))
⇡
For the first estimate, we have, respectively,
Z xi+1
|v vI |2H 1 ((xi ,xi+1 )) = (v vI )0 (v vI )0 dx
xi
Z xi+1
= (v vI )(v vI )00 dx
x
Z ixi+1
= (v vI )v 00 dx
xi
kv vI kL2 ((xi ,xi+1 )) kv 00 kL2 ((xi ,xi+1 )) .
Noting that (v vI )(xi ) = 0 = (v vI )(xi+1 ), Friedrichs’ inequality implies
xi+1 xi
kv vI kL2 ((xi ,xi+1 )) |v vI |H 1 ((xi ,xi+1 )) .
⇡
58
Proof
Combining the above, we have
h 00
|v vI |H 1 ((xi ,xi+1 )) kv kL2 ((xi ,xi+1 )) ,
⇡
or, by squaring and summing up for i = 0, . . . , N and taking square root
h 00
|v vI |H 1 (I ) kv kL2 ((xi ,xi+1 )) .
⇡
For the second estimate, we work as follows: consider the problem
z 00 (x) = (v vI )(x) for x 2 (a, b) and z(a) = 0 = z(b).
We have, respectively,
Z b Z b
kv vI k2L2 (I ) = (v vI )z 00 dx = (v vI )0 z 0 dx
a a
N Z
X xi+1 N Z
X xi+1
0 0
= (v vI ) z dx = (v vI )0 (z 0 i ) dx
i=0 xi i=0 xi
R xi+1
for any i 2 R, since xi
(v vI )0 dx = (v vI )(xi+1 ) (v vI )(xi ) = 0.
59
Proof
Let now
i := zI0 (xi ,xi+1 )
with zI the respective linear interpolant of z. (Well defined: zI0 |(xi ,xi+1 ) const.)
Then,
kv vI k2L2 (I ) |v vI |H 1 (I ) |z zI |H 1 (I ) .
Using the previously proven estimate in the H 1 seminorm, we get
h2 00
kv vI k2L2 (I ) 2 kv kL2 (I ) kz 00 kL2 (I ) .
⇡
Finally, since z 00 = v vI , we deduce
h2 00
kv vI k2L2 (I ) 2 kv kL2 (I ) kv vI kL2 (I ) .
⇡
[You may want to check if it is possible to make the 2nd estimate proof easier by using Friedrichs’ inequality.]
60
Error analysis
Theorem
Let u 2 H 2 (I ) exact solution to 1D boundary value problem and uh 2 Vh its
approximation by the FEM. Then, we have
h 00
ku uh kV ku kL2 (I ) .
⇡
In fact, we can do better: modifying the above proofs it is not hard to show
✓X
N ◆ 12
hi2 00 2
ku uh kV ku kL2 ((xi ,xi+1 ))
⇡2
i=0
61
FEM for a general 2nd order boundary-value problem
for ✏, , ub , ⌫ 2 R, with ✏ > 0, and 2 L1 ((a, b)), with (x) 0, in (a, b).
62
FEM for a general 2nd order boundary-value problem
Consider approximation/FE space Vh ⇢ H01 (I ) with basis { i }N
i=1 , as above.
Consider extra element-wise linear basis function N+1 s.t. N+1 (xi ) = i(N+1)
N +1
h
a = x0 x1 xi xN xN +1 = b
N +1
Then, the approximate solution will be of the form
Παρατήρηση 8.3. Εκ πρώ ης όψεως, πιθανώς X δεN δια αίνε αι να πάρχει ιδιαί ερη δια ορά ης παραπάνω
μεθόδο με η αν ί οιχη ο προβλήμα uοςh Dirichlet
= U(8.5).
j j +Παρα
ub N+1
ηρών ας προ εκ ικά όμως ις δ ο μεθό-
δο ς, η δια ορά ο ς έγκει αι ο ς δια ορε ικούς
j=1 χώρο ς Vh και Ṽh .
Α ού κάθεUvjh22R
with Vhto beεcomputed.
γρά αι ως γραμμικός νδ α μός ναρ ή εων βά ης i, i = 1, . . . , N, N + 1,
η ΜΠΣ γρά ε αι ι οδύναμα ως: βρες uh 2 Ṽh , έ οια ώ ε 63
FEM for a general 2nd order boundary-value problem
Finite Element Method
Find uh as above, such that
Z Z Z
a(uh , vh ) = ✏uh0 vh0 + uh vh ) dx + uh0 vh dx = fvh dx = `(vh ) 8vh 2 Vh
I I I
PN
As before, the latter is equivalent to: find uh = j=1 Uj j + ub N+1 , such that
Z Z Z
✏uh0 0i + uh i ) dx + uh0 i dx = f i dx, i = 1, . . . , N
I I I
or
N
X ✓Z Z ◆
0 0 0
Uj ✏ j i + j i ) dx + j i dx
j=1 I I
Z ✓Z Z ◆
0 0 0
= f i dx ub ✏ N+1 i + N+1 i ) dx + N+1 i dx , i = 1, . . . , N
I I I
Since supp( N+1 ) = [xN , b], the 2nd term on RHS vanishes for i = 1, . . . , N 1.
64
FEM for a general 2nd order boundary-value problem
That is, an N ⇥ N-linear system (✏A + B + C )U = F, whereby
Z b
0 0
A = [aij ]N
i,j=1 , for aij = j (x) i (x) dx
a
Z b
0
B = [bij ]N
i,j=1 , for bij = j (x) i (x) dx
a
Z b
C = [cij ]N
i,j=1 , for cij = (x) j (x) i (x) dx
a
and
Z b ✓Z Z ◆
0 0 0
Fi = f (x) i (x) dx, ub ✏ N+1 i + N+1 i ) dx + N+1 i dx , i = N
a I I
65
Assembly
A as above.
For B, we consider four cases:
1st j = i. Then,
Z b Z xi Z xi+1
0 x xi 1 x xi+1
bii = i (x) i (x) dx = dx + dx = 0.
a xi 1
h2 xi h 2
2nd j = i + 1. Then
Z b Z xi+1
0 xi+1 x 1
bi(i+1) = i+1 (x) i (x) dx = 2
dx = .
a xi h 2
3rd j = i 1. Then
Z b Z xi
0 xi 1 x 1
bi(i 1) = i 1 (x) i (x) dx = dx = .
a xi 1
h2 2
66
Assembly
that is, 0 1
1
0 2 0 0 ... 0
B 1 0 1
0 ... 0 C
B 2 2 C
B 0 1
0 1
... 0 C
B 2 2 C
B=B . .. .. .. .. C
B .. . . . . ... C
B C
@ 0 ... 0 1
0 1 A
2 2
1
0 ... 0 0 2 0
67
Assembly
For C with general coefficient , we require to employ quadrature.
2nd j = i + 1. Then
Z b Z xi+1
(x xi )(xi+1 x) h
ci(i+1) = i+1 (x) i (x) dx = dx = .
a xi h2 6
3rd j = i 1. Then
Z b Z xi
(xi x)(x xi 1) h
ci(i 1) = i 1 (x) i (x) dx = dx = .
a xi 1
h2 6
68
Assembly
that is, 0 1
2h h
3 6 0 0 ... 0
B h 2h h
0 ... 0 C
B 6 3 6 C
B 0 h 2h h
... 0 C
B 6 3 6 C
C= B .. .. .. .. .. C
B . . . . . ... C
B C
@ 0 ... 0 h 2h h A
6 3 6
h 2h
0 ... 0 0 6 3
1
R
The matrix M = C , so that mij = I j i dx is often referred to as
the mass matrix
69
Assembly
Putting it all together, we deduce
0 2✏ 2 h ✏ h 1
h
+ 3 h
+ 2 + 6
0 ... 0
h
B h
✏
2
+ 6
2✏
h
+ 2 3h 2✏
h
+ 2 3h 0... 0 C
✏A+ B+C = B
@ .. .. .. .. C
A
. . . . ...
h
0 ... 0 h
✏
2
+ 6
2✏
h
+ 2 3h
Key remark:
In other words, for constant , the discretisation of the di↵erential operator given
by FEM corresponds to the finite di↵erence discretisation (upon division by h,
which is fine from RHS scaling):
and approximates 0th order term in a “funny” way (cf., Simpson’s rule.)
70
dvection/convection-dominated BVP
2
“Singularly-perturbed” case with = 1 and ✏ << 1, say ✏ = 10 .
1.6
1.4
1.2
0.8
0.6
0.4
0.2
−0.2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Remark:
The advection/convection term does not appear in k·kE , as it’s “skew-symmetric”.
72
Error analysis
Let e := u uh , we seek error bound for kekE , noting that e(a) = 0 = e(b).
73
Error analysis
i.e.,
| |
kekE ku vh kE + p ku vh kL2 (I )
✏
So we have proven the following “quasi-optimality” result.
Theorem (“Cèa’s Lemma”)
Let u 2 V solve Problem and uh solve Method. Then,
⇣ | | ⌘
ku uh kE inf ku vh kE + p ku vh kL2 (I )
vh 2Vh ✏
74
Error analysis: discussion
The size of the mesh-Péclet number gives rise to proportionally large constants,
which allow for validity of “quasi-optimality” and the presence of oscillations.
In the last two lectures we will discuss stable methods for transport and
convection-dominated problems.
75