Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Presentation Draft FMEFM

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

A Survey on a Mixed Finite Element Method

David Sacco

December 8, 2016

David Sacco Mixed Finite Element Method December 8, 2016 1 / 26


What is FEM?

Start with a PDE you wish to solve (in our case, Laplace’s
equation)
Use a specific (or multiple) Hilbert Space to approximate solutions
to PDE’s
Find the variational problem to the model problem.
Assuming the variational problem has an existing unique solution,
we use the basis of a subspace of our Hilbert Space(s) to rewrite
the weak form into a discrete form.
Write down the discrete form into a matrix equation, then solve
numerically with a triangulation of the domain.

David Sacco Mixed Finite Element Method December 8, 2016 2 / 26


What is FEM?

For this project, we aim to solve the following problem numerically via
a mixed method.
Model Problem
Let Ω ⊂ R2 be a bounded polygonal domain. We consider the following
problem.

−∆u = f in Ω, u = 0 on ∂Ω
where f ∈ L2 (Ω).

David Sacco Mixed Finite Element Method December 8, 2016 3 / 26


What makes it a Mixed Problem is by introducing a new variable
σ = −∇u to rewrite the Model Problem.
“Mixed” Model Problem
Let Ω ⊂ R2 be a bounded polygonal domain, and σ = ∇u. Then the
model problem becomes

∇ · σ = f and σ = −∇u in Ω, u = 0 on ∂Ω
where f ∈ L2 (Ω).

David Sacco Mixed Finite Element Method December 8, 2016 4 / 26


The Approximation Spaces
We need to have two Hilbert Spaces, since we wish to approximate u
and σ. For σ, we use
H(div; Ω) = p ∈ L2 (Ω) : ∇ · p ∈ L2 (Ω)


In order to approximate u, we will be using a subspace of L2 (Ω). The


approximation spaces are then the so called Raviart-Thomas Subspace
RT0 (Ω) ⊂ H(div; Ω), and space of piecewise constant polynomials on
T , Qh ⊂ L2 (Ω).
The Approximation Space for σ
Let a ∈ R2and b ∈ R, then
RT0 (T ) = p ∈ L2 (T ) : p(x) = a + bx, and [p]E · νE = 0

for all T , x ∈ T , and all E ∈ EΩ . Here, EΩ is the set of all interior edges
of the triangulation, [p]E = p|T+ − p|T− is the jump of p across the
edge shared by the two neighboring triangular elements, and νE is the
outward pointing normal at the midpoint of the edge E.
David Sacco Mixed Finite Element Method December 8, 2016 5 / 26
The Raviart-Thomas Element
Basis for RT0 (Ω)
The basis functions for the Raviart-Thomas Space, RT0 (Ω), are given
by (
|E|
± 2|T ±|
(x − P± ) for x ∈ T±
ψE (x) =
0 elsewhere

The main property of these functions is that ψE · νE = 1 along the


midpoint of an edge of a given triangular element, T , and ∇ · ψ is
constant in T± . Here, we choose the orientation of νE to always point
from T+ to T− . This determines the sign of ψ, negative only when
pointing inwards.

David Sacco Figure 1


Mixed Finite Element Method December 8, 2016 6 / 26
Properties of the Triangulation
Let Ω be a polygonal domain, we require that the triangulation Th be a
quasi-uniform triangulation. Define h = max{diam(T ) : T ∈ Th }.

Quasi-uniformity of T
Let Ω be a polgyonal domain. Th is said to be quasi uniform if there
exists ρ > 0 such that

min{diam(BT ) : T ∈ Th } ≥ ρhdiam(Ω)

where BT is the largest ball contained in T .

David Sacco Mixed Finite Element Method December 8, 2016 7 / 26


Error Estimates

We regard um m
h and σh to be the finite element method solutions, and
k · ks the L2 norm when s = 0, and the H s norm for s > 0.

Theorem 1
Let Ω be a polygonal domain. For the axillary function σ corresponding
to mixed model problem, we have that

||σ − σhm ||0 ≤ Ch||σ||1 ≤ Ch||u||2

Where u is the solution to the model problem, and C > 0 is


independent of h.

David Sacco Mixed Finite Element Method December 8, 2016 8 / 26


Error Estimates

Theorem 2
Let Ω be a polygonal domain. For the solution u to the model problem,
with f the forcing term, and um
h the mixed finite element solution, then

ku − um 2
h k0 ≤ C(hkuk1 + h (kuk2 + kf k1 ))

For some C > 0 independent of h.

The proofs of these theorems require properties of the subspaces RT0


and Qh , and properties involving the Galerkin Method solution, uG
h.

David Sacco Mixed Finite Element Method December 8, 2016 9 / 26


Variational Formulation

Manipulating the mixed model problem, we may arrive to the following.


The Variational Problem
For given f ∈ L2 (Ω), find σ ∈ H(div; Ω) and u ∈ L2 (Ω) such that
Z Z
σ · q dx + u∇ · q dx = 0 ∀q ∈ H(div; Ω)
Ω Z Ω Z
v∇ · σ dx = vf dx ∀v ∈ L2 (Ω)
Ω Ω

Here, q and v may be regarded as test functions.

David Sacco Mixed Finite Element Method December 8, 2016 10 / 26


Discrete Formulation

Now, we write the problem framed in the approximation spaces, RT0


and Qh .
The Discrete Problem
For given f ∈ L2 (Ω), find σh ∈ RT0 (Th ) and uh ∈ Qh such that
Z Z
σh · qh dx + uh ∇ · qh dx = 0 ∀qh ∈ RT0
Ω ZΩ Z
vh ∇ · σh dx = vh f dx ∀vh ∈ Qh
Ω Ω

Here, qh and vh may be regarded as test functions in their respective


spaces.

David Sacco Mixed Finite Element Method December 8, 2016 11 / 26


The Linear System
We must use the basis of RT0 to now rewrite the discrete problem into
a system of linear equations. Suppose in a triangulation of Ω, that
there are M interior edges, and L triangular elements,
Th = (T
P1 , T2 , ..., TL ). By properties of the subspace’s basis, we have
σh = M k=1 xk ψk , so we may rewrite the discrete problem.

Linear System

M
X Z L
X Z
xk ψj · ψk dx + xM +l ∇ · ψj dx =0
k=1 Ω l=1 Tl

M
X Z Z
xk ∇ · ψk dx = f dx
k=1 Tl Tl

with j = 1, 2, ..., M and l = 1, 2, ..., L.


David Sacco Mixed Finite Element Method December 8, 2016 12 / 26
The Linear System

From the linear system, we have M + L equations with M + L


unknowns. Let xψ = (x1 , x2 , ..., xM ), and xu = (xM , xM +1 , ..., xM +L ),
then we may cast the linear system into the matrix equation
    
B C xψ 0
=
CT 0 xu bf
R
Here, bf comes from the approximation of the integral T f dx on each
triangle. B and C are blocks, representing each of the sums from the
Linear System. The key to their computation is in the evaluation of
the integrals, which may be computed exactly.

David Sacco Mixed Finite Element Method December 8, 2016 13 / 26


In order to implement the mixed finite element method, we need the
following:
A quasi-uniform triangulation
keep track of the various data – edges, nodes, elements, boundary
conditions
Form a relationship (function) between the data
Build a Local Stiffness Matrix to construct the Global Stiffness
Matrix
Approximate the right hand side
Solve the matrix equation

David Sacco Mixed Finite Element Method December 8, 2016 14 / 26


For the triangulation, we use an external package, iF EM , to generate
our mesh. The package’s squaremesh function yields the following
triangulation that we will use.

David Sacco Mixed Finite Element Method December 8, 2016 15 / 26


The triangulation function squaremesh yields files coordinate.dat
and element.dat, which consists of the coordinates of nodes, as
well as numbering of the elements.
In our figure the node 1 has the coordinates (0, 0), while element 1
is composed of nodes {(1, 4, 5)}.
dirichlet.dat is also generated from iF EM , and enumerates the
edges that are on the boundary. Edges are just denoted by pairs of
nodes. For example, { (1, 4) } would be a row in the file.

David Sacco Mixed Finite Element Method December 8, 2016 16 / 26


Nodes to Elements Matrix

Let N be the number of nodes, then nodes2element is a N × N sparse


matrix assigning pairs of nodes to a triangular element. We define it by
Matrix Definition
For a pair of nodes (k, l), and element j,

j if (k, l) are nodes of the element number j
nodes2element(k, l) =
0 otherwise

For us, N 2E(1, 5) = 1, but note N 2E(5, 1) = 5, by definition N 2E(k, l)


is assigned to T+ , while N 2E(l, k) is assigned to T− .

David Sacco Mixed Finite Element Method December 8, 2016 17 / 26


Nodes 2 Edges Matrix

nodes2edge is a N × N sparse symmetric matrix, assigning nodes to


edges.
Matrix Definition
For a pair of nodes (k, l),

j if edge Ej is connected by nodes (k, l)
nodes2edge(k, l) =
0 otherwise

To create this matrix, let B = N 2E + N 2E T , so that every pair of


nodes is assigned a number in B. Since B is symmetric, find all of the
indices in the upper triangular portion where B holds a nonzero value.
These nodes that hold a nonzero value in B are edges, are then
assigned number 1 through M in the sparse matrix at those indices.

David Sacco Mixed Finite Element Method December 8, 2016 18 / 26


Edge to Element Matrix

edge2element is a M × 4 sparse matrix, assigning edges (pairs of


nodes) to elements. Each row of this matrix consists of a pair of nodes
(k, l), with a pair of elements (m, n). Recall in matlab notation that
arrays may be input to a matrix to focus on a submatrix.
Matrix Definition
Let (k,l) be labels of nodes, (m, n) be labels of elements. Then

[m, n] if edge j belongs to elements [m, n]
edge2element(j, [3, 4]) =
[m, 0] if edge j belongs to only m

This definition focuses on the 3rd and 4th columns of Ed2El. It also is
worth noting that this defines elements in the 3rd column as T+ , while
the 4th column describes T− . This also tells how to choose the ± in the
basis functions.

David Sacco Mixed Finite Element Method December 8, 2016 19 / 26


Local Stiffness Matrices

It is customary to write a smaller matrix to ‘generate’ the bigger


matrix. Denote BL and CL the local 3 × 3 matrices for B and C, and
|T | the area of T , |E| the length of E. For a given triangular element
T , with nodes {P1 , P2 , P3 }. Let
 
2 0 1 0 1 0
0 2 0 1 0 1  

1
 0 P1 − P2 P1 − P3
0 2 0 1 0
M := 
0 and N := P2 − P1 0 P2 − P3 
1 0 2 0 1

1
 P3 − P1 P3 − P2 0
0 1 0 2 0
0 1 0 1 0 2
1 T T
Then we may write BL = 48|T | CL N M N CL .

David Sacco Mixed Finite Element Method December 8, 2016 20 / 26


Local Stiffness Matrices

R
CL requires us to compute ∇ · ψ dx. Fortunately ∇ · ψ is constant,
T
since ( |E|
± |T± | on T±
∇ · ψE =
0 elsewhere

David Sacco Mixed Finite Element Method December 8, 2016 21 / 26


Global Stiffness Matrix

To form the larger matrix, we note


X X
B= B(T ), C = C(T )
T ∈T T ∈T

If (m1 , m2 , m3 ) are edge numbers for T , and σEmk = ±1, then we


compute

B(T ) = diag(σEm1 , σEm2 , σEm3 )BL diag(σEm1 , σEm2 , σEm3 )

and

C(T ) = diag(σEm1 , σEm2 , σEm3 )(|P3 − P2 |, |P1 − P3 |, |P2 − P1 |)T

Hence the global matrix is formed.

David Sacco Mixed Finite Element Method December 8, 2016 22 / 26


Forcing Term

In order to assemble the right hand side, we approximate the integral


by a one point quadrature rule,
Z
f dx = |T |f (z)
T

where z is located in the centroid of each triangle.

David Sacco Mixed Finite Element Method December 8, 2016 23 / 26


Numerical Experiment

Let Ω = [0, 1] × [0, 1]. For this numerical example, we consider the
problem (
−∆u = (2(x2 − x) + 2(y 2 − y)) in Ω
u = 0 on ∂Ω
The exact solution is

u(x, y) = (x2 − x)(y 2 − y)

with
σ(x, y) = ((2x − 1)(y 2 − y), (x2 − x)(2y − 1))

David Sacco Mixed Finite Element Method December 8, 2016 24 / 26


Numerical Experiment

Figure 2: The plot of the approximate displacement, u.

Figure 3: The plot of the x and y direction of σ, denoted px and py .

David Sacco Mixed Finite Element Method December 8, 2016 25 / 26


Numerical Experiment

The error for the experiment coincides with the theoretical estimates as
well.
mk
kσ−σh ku−um
h k0
h ku − um m
h k0 kσ − σh k0 m k
kσ−σh/2
0
0 ku−um k
h/2 0
.5 0.015539 0.061658 1.737737 1.81479
.25 0.008562 0.035482 1.928159 1.96097
125 0.004366 0.018402 1.981351 1.99115
.0625 0.002192 0.009287 1.995273 1.99795
.03125 0.001097 0.004654 1.998797 1.99942
.015625 0.000548 0.002328 1.999656 1.99985
0.0078125 0.000274 0.001164 − −

David Sacco Mixed Finite Element Method December 8, 2016 26 / 26


David Sacco Mixed Finite Element Method December 8, 2016 26 / 26

You might also like