From 98a2c16953dede85e92d4b1dd61b589fe1c4cece Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 23 Apr 2019 18:56:40 -0600 Subject: [PATCH] Edit the results section of step-61. --- examples/step-61/doc/intro.dox | 6 +- examples/step-61/doc/results.dox | 107 +++++++++++++++++++------------ 2 files changed, 70 insertions(+), 43 deletions(-) diff --git a/examples/step-61/doc/intro.dox b/examples/step-61/doc/intro.dox index 8173bdbc23..1709c846ef 100644 --- a/examples/step-61/doc/intro.dox +++ b/examples/step-61/doc/intro.dox @@ -447,11 +447,11 @@ define the $L_2$-errors of pressure, velocity, and flux by the following formulas: @f{eqnarray*} \|p-p_h^\circ\|^2 - = \sum_{K \in \mathbb{T}} \|p-p_h^\circ\|_{L_2(K)}^2, \\ + &= \sum_{K \in \mathbb{T}} \|p-p_h^\circ\|_{L_2(K)}^2, \\ \|\mathbf{u}-\mathbf{u}_h\|^2 - = \sum_{K \in \mathbb{T}} \|\mathbf{u}-\mathbf{u}_h\|_{L_2(K)^2}^d,\\ + &= \sum_{K \in \mathbb{T}} \|\mathbf{u}-\mathbf{u}_h\|_{L_2(K)^2}^d,\\ \|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|^2 - = \sum_{K \in \mathbb{T}} \sum_{\gamma \subset \partial K} + &= \sum_{K \in \mathbb{T}} \sum_{\gamma \subset \partial K} \frac{|K|}{|\gamma|} \|\mathbf{u} \cdot \mathbf{n} - \mathbf{u}_h \cdot \mathbf{n}\|_{L_2(\gamma)}^2, @f} where $| K |$ is the area of the element, diff --git a/examples/step-61/doc/results.dox b/examples/step-61/doc/results.dox index 41b73af8e5..ed99e7b0ff 100644 --- a/examples/step-61/doc/results.dox +++ b/examples/step-61/doc/results.dox @@ -1,20 +1,25 @@

Results

-We run the test example $p = \sin(\pi x) \sin(\pi y)$ with homogeneous Dirichelet -boundary conditions in the domain $\Omega = (0,1)^2$. And $\mathbf{K}$ is the -identity matrix. We test it on $\mbox{WG}(Q_0,Q_0;RT_{[0]})$, $\mbox{WG}(Q_1,Q_1;RT_{[1]})$ -and $\mbox{WG}(Q_2,Q_2;RT_{[2]})$. We will visualize pressure values in interiors -and on faces. We want to see the pressure maximum is around 1 and the minimum -is around 0. With the mesh refinement, the convergence rates of pressure, -velocity and flux should be around 1 on $\mbox{WG}(Q_0,Q_0;RT_{[0]})$ , 2 on -$\mbox{WG}(Q_1,Q_1;RT_{[1]})$, and 3 on $\mbox{WG}(Q_2,Q_2;RT_{[2]})$. +We run the program with a right hand side that will produce the solution +$p = \sin(\pi x) \sin(\pi y)$ and with homogeneous Dirichlet +boundary conditions in the domain $\Omega = (0,1)^2$. In addition, we choose +the coefficient matrix in the differential operator $\mathbf{K}$ as the +identity matrix. We test this setup using $\mbox{WG}(Q_0,Q_0;RT_{[0]})$, +$\mbox{WG}(Q_1,Q_1;RT_{[1]})$ and $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ element +combinations. We will then visualize pressure values in interiors of cells +and on faces. We want to see that the pressure maximum is around 1 and the minimum +is around 0. With mesh refinement, the convergence rates of pressure, +velocity and flux should then be around 1 for $\mbox{WG}(Q_0,Q_0;RT_{[0]})$ , 2 +for $\mbox{WG}(Q_1,Q_1;RT_{[1]})$, and 3 for $\mbox{WG}(Q_2,Q_2;RT_{[2]})$.

Test results on WG(Q0,Q0;RT[0])

-The following figures are interior pressures and face pressures implemented -on $\mbox{WG}(Q_0,Q_0;RT_{[0]})$. The mesh is refined 2 times and 4 times -separately. +The following figures show interior pressures and face pressures using the +$\mbox{WG}(Q_0,Q_0;RT_{[0]})$ element. The mesh is refined 2 times (top) +and 4 times (bottom), respectively. When the mesh is coarse, one can see +the face pressures $p^\partial$ neatly between the values of the interior +pressures $p^\circ$ on the two adjacent cells. @@ -28,19 +33,20 @@ separately.
From the figures, we can see that with the mesh refinement, the maximum and -minimum are approaching to what we expect. -Since the mesh is a rectangular mesh and numbers of refinement are even, we -have symmetric solutions. From the 3d figures, we can see that on $\mbox{WG}(Q_0,Q_0;RT_{[0]})$, -pressure is a constant in the interior of the cell. +minimum pressure values are approaching the values we expect. +Since the mesh is a rectangular mesh and numbers of cells in each direction is even, we +have symmetric solutions. From the 3d figures on the right, +we can see that on $\mbox{WG}(Q_0,Q_0;RT_{[0]})$, the pressure is a constant +in the interior of the cell, as expected.

Convergence table

We run the code with finer meshes and get the following convergence rates of pressure, -velocity and flux. +velocity, and flux (as defined in the introduction). - +
- + @@ -55,23 +61,25 @@ velocity and flux. - +
number of refinements $\|p-p_h^\circ\|$ $\|\mathbf{u}-\mathbf{u}_h\|$ $\|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|$ number of refinements $\|p-p_h^\circ\|$ $\|\mathbf{u}-\mathbf{u}_h\|$ $\|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|$
2 1.587e-01 5.113e-01 7.062e-01 5 2.004e-02 6.297e-02 8.902e-02
Conv.rate 1.00 1.00 1.00 Conv.rate 1.00 1.00 1.00
We can see that the convergence rates of $\mbox{WG}(Q_0,Q_0;RT_{[0]})$ are around 1. +This, of course, matches our theoretical expectations.

Test results on WG(Q1,Q1;RT[1])

-The following figures are interior pressures and face pressures implemented on +We can repeat the experiment from above using the next higher polynomial +degree: +The following figures are interior pressures and face pressures implemented using $\mbox{WG}(Q_1,Q_1;RT_{[1]})$. The mesh is refined 4 times. Compared to the -previous figures on -$\mbox{WG}(Q_0,Q_0;RT_{[0]})$, on each cell, the result is not a constant. -Because we use higher order polynomials to do approximation. So there are 4 -pressure values in one interior, 2 pressure values on each face. We use -data_out_face.build_patches (fe.degree) -to divide each cell interior into 4 subcells. +previous figures using +$\mbox{WG}(Q_0,Q_0;RT_{[0]})$, on each cell, the solution is no longer constant +on each cell, as we now use bilinear polynomials to do the approximation. +Consequently, there are 4 pressure values in one interior, 2 pressure values on +each face. @@ -80,13 +88,20 @@ to divide each cell interior into 4 subcells.
+Compared to the corresponding image for the $\mbox{WG}(Q_0,Q_0;RT_{[0]})$ +combination, the solution is now substantially more accurate and, in +particular so close to being continuous at the interfaces that we can +no longer distinguish the interface pressures $p^\partial$ from the +interior pressures $p^\circ$ on the adjacent cells. +

Convergence table

-These are the convergence rates of pressure, velocity and flux on $\mbox{WG}(Q_1,Q_1;RT_{[1]})$ +The following are the convergence rates of pressure, velocity, and flux +we obtain from using the $\mbox{WG}(Q_1,Q_1;RT_{[1]})$ element combination: - +
- + @@ -101,16 +116,24 @@ These are the convergence rates of pressure, velocity and flux on $\mbox{WG}(Q_1 - +
number of refinements $\|p-p_h^\circ\|$ $\|\mathbf{u}-\mathbf{u}_h\|$ $\|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|$ number of refinements $\|p-p_h^\circ\|$ $\|\mathbf{u}-\mathbf{u}_h\|$ $\|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|$
2 1.613e-02 5.093e-02 7.167e-02 5 2.540e-04 7.979e-04 1.128e-03
Conv.rate 2.00 2.00 2.00 Conv.rate 2.00 2.00 2.00
-The convergence rates of $WG(Q_1,Q_1;RT_{[1]})$ are around 2. -

Test results on WG(Q2,Q2;RT[2])

+The convergence rates of $WG(Q_1,Q_1;RT_{[1]})$ are around 2, as expected. + -These are interior pressures and face pressures implemented on -$WG(Q_2,Q_2;RT_{[2]})$, with mesh size $h = 1/32$. +

Test results on WG(Q2,Q2;RT[2])

+ +Let us go one polynomial degree higher. +The following are interior pressures and face pressures implemented using +$WG(Q_2,Q_2;RT_{[2]})$, with mesh size $h = 1/32$ (i.e., 5 global mesh +refinement steps). In the program, we use +`data_out_face.build_patches(fe.degree)` when generating graphical output +(see the documentation of DataOut::build_patches()), which here implies that +we divide each 2d cell interior into 4 subcells in order to provide a better +visualization of the quadratic polynomials. @@ -118,14 +141,16 @@ $WG(Q_2,Q_2;RT_{[2]})$, with mesh size $h = 1/32$.
+

Convergence table

-This is the convergence table of $L_2$ errors of pressure, velocity and flux -on $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ +As before, we can generate convergence data for the +$L_2$ errors of pressure, velocity, and flux +using the $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ combination: - +
- + @@ -140,7 +165,9 @@ on $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ - +
number of refinements $\|p-p_h^\circ\|$ $\|\mathbf{u}-\mathbf{u}_h\|$ $\|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|$ number of refinements $\|p-p_h^\circ\|$ $\|\mathbf{u}-\mathbf{u}_h\|$ $\|(\mathbf{u}-\mathbf{u}_h) \cdot \mathbf{n}\|$
2 1.072e-03 3.375e-03 4.762e-03 5 2.107e-06 6.620e-06 9.362e-06
Conv.rate 3.00 3.00 3.00 Conv.rate 3.00 3.00 3.00
-The convergence rates of $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ are around 3. + +Once more, the convergence rates of $\mbox{WG}(Q_2,Q_2;RT_{[2]})$ is +as expected, with values around 3. -- 2.39.5