Fem 2
Fem 2
1900010694
2 Stokes: Pressure-robustness 4
2.1 MINI elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Scott-Vogelius elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.1 Stiffness matrix, RHS and B.C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.2 Error Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1
1.2 Stiffness matrix, RHS, B.C. and Error estimation 1 STOKES: MINI ELEMENTS
We use MINI elements and quasi-uniform triangular mesh to construct a corresponding FEM problem.
Namely
Vh = P
⃗1 ⊕ B
⃗ T , Q h = P1
Define Vh (0) := Vh ∩ H
⃗ 1 (Ω), then we can write the corresponding FEM problem
0
a(⃗uh , ⃗vh ) + b(⃗vh , ph ) = F (⃗vh ) ∀ ⃗vh ∈ Vh (0)
Find uh ∈ Vh (0), ph ∈ Qh such that
b(⃗uh , qh ) = 0 ∀ qh ∈ Q h
To solve this FEM problem, we shall first write this discrete variational form into a linear equation solving
problem. It’s obvious that we can just verify the equation with respect to all the base function of (v⃗h , qh ).
Noticed that
∑ ∑
vh = ⃗ci φi , qh = di ϕ i
i i
while A corresponds with P1 and D corresponds with BT . B.C., RHS and Error estimation are all built-in and
we can just run the code below.
1 option.elemType = 'P1bP1';
2 pde = Stokesdata1;
3 pde.f = @(p) exactf(p(:, 1), p(:, 2));
4 pde.exactu = @(p) exactu(p(:, 1), p(:, 2));
5 pde.exactp = @(p) exactp(p(:, 1), p(:, 2));
6 pde.g_D = @(p) [0,0];
7 [soln,eqn,err,time,solver] = femStokes(mesh,pde,option);
2
1.3 Results 1 STOKES: MINI ELEMENTS
1.3 Results
We are going to show the streamline diagram of u⃗h and the surface graph of ph . We also tests the error
order of the numerical solution, from which we learned O(h 2 ) for ||⃗u − u⃗h ||H 1 , O(h2 ) for ||⃗u − u⃗h ||L2 , O(h 2 ) for
3 3
||p − ph ||L2 .
4: Quiver u⃗h
5: Quiver u⃗h
3
2 STOKES: PRESSURE-ROBUSTNESS
2 Stokes: Pressure-robustness
During the error estimation for u⃗h , we will obtain an inequality just like
1
|⃗u − u⃗h |H 1 ≲ inf |⃗u − v⃗h | + inf ||p − qh ||L2
v⃗h ∈Vhdiv µ qh ∈Qh
while Vhdiv = {v⃗h ∈ Vh : b(qh , v⃗h ) = 0, ∀qh ∈ Qh }. The pressure term in error estimation plays a role as
pollution, which can have a significant effect when µ → 0. FEM methods that can escape from this pollution
effect are defined as pressure-robust.
1
µ
1 102 104 106
h = 2−4 5.43e-06 5.43e-04 5.43e-02 5.43
h = 2−5 6.93e-07 6.93e-05 6.93e-03 6.93e-01
|⃗u − u⃗h |H 1
h = 2−6 8.76e-08 8.76e-06 8.76e-04 8.76e-02
h = 2−7 1.10e-08 1.10e-06 1.10e-04 1.10e-02
We use barycentric Lagrange node groups to define FEM function basis. The order of nodes are plotted
below. We decide to arrange the coefficients of u⃗h and ph in a specific order.
Node contains 1 coefficient while Edge and Elem contains 3 coefficient such as local 4, 5, 6 and local 13, 14,
15. When 2 elements are sharing a same edge, conefficients on edge will start from the node with the smallest
number. Since ph is discontinuous, Elemp contains 10 coefficients.
4
2.2 Scott-Vogelius elements 2 STOKES: PRESSURE-ROBUSTNESS
3
3
6
5
7
5 6
8
15 4
4
7 10
13 14
9
1 10 11 12 2 1 8 9 2
The stiffness matrix consists of A and B due to our previous discussion. A can be written into A =
diag{A, A} while
aij = µ(∇φi , ∇φj )
Bx
Matrix B can be written into B = while
By
bxij = −(∂x φi , ϕj ).
π 3π
All the elements can be divided into 2 classes: the 2
rotation class and the 2
rotation class. We can
pre-calculate the local ATij = (∇φi , ∇φj ), BTij = −(∂x φi , ϕj ) in each class and assemble the stiffness matrix by
simply adding them together.
1 for t = 1:NT
2 localType = formLocalType();
3 localMap = formLocalMap();
4 for ti = 1:15
5 for tj = 1:15
6 index = index + 1;
7 i(index) = localMap(ti);
8 j(index) = localMap(tj);
9 s(index) = AT(ti,tj,localType);
10 end
11 end
12 end
13 A = sparse(i, j, s, N+NE, N+NE)
1 for t = 1:NT
2 localType = formLocalType();
3 localMap = formLocalMap();
4 for ti = 1:15
5 for tj = 1:10
6 index = index + 1;
7 i(index) = localMap(ti);
8 j(index) = localMap(tj);
9 s(index) = BTx(ti,tj,localType);
5
2.2 Scott-Vogelius elements 2 STOKES: PRESSURE-ROBUSTNESS
10 end
11 end
12 end
13 Bx = sparse(i, j, s, N+NE, N+NE)
1
µ
1 102 104 106
h = 2−3 3.05e-10 4.95e-9 4.62e-07 4.61e-05
|⃗u − u⃗h |H 1 h = 2−4 2.17e-10 1.38e-9 1.04e-05 4.26e-05
h = 2−5 4.55e-11 1.22e-8 4.24e-07 4.24e-05
6
3 APPLICATION ON LID-DRIVEN CAVITY
We are going to plot the streamline diagram of ⃗uh as below. The ph however seems too large and has a bad
display effect.
7
3.2 Scott-Vogelius elements REFERENCES
References
[1] Boffi D, Brezzi F, Fortin M. Mixed finite element methods and applications[M]. Heidelberg: Springer, 2013.
[2] Cioncolini A, Boffi D. The MINI mixed finite element for the Stokes problem: An experimental investiga-
tion[J]. Computers & Mathematics with Applications, 2019, 77(9): 2432-2446.
[3] Hu X, Lee S, Mu L, et al. Pressure-robust enriched Galerkin methods for the Stokes equations[J]. Journal
of Computational and Applied Mathematics, 2024, 436: 115449.
[4] https://mathsfromnothing.au/triangle-quadrature-rules/?i=1