Classes:
1) BatchPLS
2) SolverPLS
3) ExactSolutionPLS_PHI
4) SettingsPLS
Files:
1) pls/src/main.cpp
2) pls/include/solver.hpp
3) pls/src/solver.cpp
4) pls/include/exact_solution.hpp
5) pls/src/exact_solution.cpp
6) pls/src/static_scalar_input.cpp
7) pls/include/settings.hpp
In the framework of the finite element method the computational load is proportional to the size of the problem domain. For this reason, it is always desirable to keep the size of the domain as small a possible. Sometimes it is possible to reduce the size of the domain several times by exploiting symmetries in the problem domain. In general, there are three kinds of symmetry that we can exploit:
The first two types of symmetry are normally used to reduce a three-dimensional problem domain to a two-dimensional problem domain. For instance, the two-dimensional planar domain in the Floating conductor (flc/) numerical experiment is a result of exploiting the translation symmetry. The axisymmetric problem domain in the Axisymmetric - floating conductor (flc-axi) numerical experiment is a result of exploiting the rotation symmetry.
The third type of symmetry, the reflection symmetry, is normally exploited by cutting off a piece of a problem domain along symmetry lines (planes in 3D) thus reducing the size of the problem domain. The current numerical experiment illustrates this technique of reduction of problem domains. Exploiting the reflection symmetry is easy - just cut off a portion of the initial problem domain along the symmetry lines (planes in 3D) and apply no boundary conditions on the new boundaries created by cutting. The correct boundary condition, the homogeneous Neumann, will be applied to the new boundaries automatically as this boundary condition is implicitly implied by the first term of the functional. The first term of the functional is present in all problems, even in the most minimalistic. In this numerical experiment we will apply this cutting technique to the two problems solved in the Method of manufactured solutions (mms/) numerical experiment: the two-dimensional problem on a square and the three-dimensional problem on a cube.
Let us consider the results of the two-dimensional Method of manufactured solutions (mms/) simulation on a square problem domain. The figure below illustrates the results.
The calculated electric potential, \(\Phi\), is shown on the left plot above. The calculated electric field, \( \vec{E} \), and its magnitude, \( |\vec{E}| \), is shown on the right plot above. The contour lines on the left plot above are perpendicular to the symmetry lines. On the contrary, the vectors of the electric field on the right plot above are aligned with the symmetry lines. By contemplating these two plots we can come to a conclusion that the electric potential and the electric field are reflected in the \(x-\) and \(y-\) axes. That is, the \(x-\) and \(y-\) axes are the lines of symmetry in this particular case. Therefore, we can solve the problem in the first quadrant and deduce the solutions in other three quadrants by the invoking the rules of reflection symmetry. To do so, we cut the first quadrant off the problem domain as shown in the figure below and change the boundary condition on the right vertical boundary to Robin boundary condition, so, both, the Dirichlet and Robin, boundary conditions are tested.
We set the boundary IDs on the new boundaries to zero, so the homogeneous Neumann boundary condition is applied to them, see boundary ID convention.
Next, let us consider the three-dimensional Method of manufactured solutions (mms/) simulation in a cube-shaped domain. In this case the electric potential and the electric field are reflected in \(xy-\), \(xz-\), and \(yz-\) planes. Consequently, we can cut the first octant off the problem domain as illustrated in the figure below and change the boundary condition of the front facet to Robin boundary condition, so, both, the Dirichlet and Robin, boundary conditions are tested.
Here again, we set the boundary IDs on the new boundaries to zero, so the homogeneous Neumann boundary condition is applied to them, see boundary ID convention.
We will reuse the manufactured solutions of the Method of manufactured solutions (mms/) numerical experiment.
Both versions of this numerical experiment, the two- and three- dimensional, solve the following boundary value problem by the finite element method:
\begin{equation} \begin{array}{lrcll} \text{ }&- \vec{\nabla} \cdot \big( \epsilon \vec{\nabla} \Phi \big)= \rho_f & \text{in} & \Omega & \text{(i)},\\ \text{(e)} &\Phi = \eta & \text{on} & \Gamma_{D1} & \text{(ii)},\\ \text{(n)}&\epsilon\hat{n}\cdot\vec{\nabla}\Phi+\gamma\Phi=\sigma&\text{on}&\Gamma_{R1}&\text{(iii)},\\ \text{(n)}&\epsilon\hat{n}\cdot\vec{\nabla}\Phi=0&\text{on}&\Gamma_{R2}&\text{(iv)}.\\ \end{array} \end{equation}
This boundary value problem is a special case of the general static scalar boundary value problem.
The right- hand sides, \(\rho_f\), \(\eta\), and \(\sigma\) are calculated as discussed in the Method of manufactured solutions (mms/) numerical experiment.
Implementation of the program is essentially identical to that of the Method of manufactured solutions (mms/) numerical experiment. This time, however, we do not calculate the electric field and displacement. Only the electric scalar potential is calculated. The main difference between the mms/ and pls/ numerical experiments is in the gmsh/ subdirectories of the respective experiments, i.e., in the meshes and the boundary IDs.
The figure below compares the simulation results of the mms/ and the pls/ numerical experiments. As expected, the simulation result of the pls/ simulation looks exactly as the result of the mms/ simulation in the first quadrant.
The convergence rates of the pls/ simulation are summarized in the table below. As soon as the mesh approximates the problem domain exactly the convergence orders are at the upper boundary of the theoretical predictions.
p | r | cells | dofs | \(\|e\|_{L^2}\) | \(\alpha_{L^2}\) | \( \|e\|_{H^1}\) | \(\alpha_{H^1}\) |
---|---|---|---|---|---|---|---|
1 | 7 | 36 | 49 | 2.40e-02 | - | 4.73e-01 | - |
1 | 8 | 49 | 64 | 1.76e-02 | 1.99 | 4.06e-01 | 0.99 |
1 | 9 | 64 | 81 | 1.35e-02 | 2.00 | 3.55e-01 | 0.99 |
1 | 10 | 81 | 100 | 1.07e-02 | 2.00 | 3.16e-01 | 1.00 |
2 | 7 | 36 | 169 | 8.21e-04 | - | 3.20e-02 | - |
2 | 8 | 49 | 225 | 5.18e-04 | 2.99 | 2.35e-02 | 1.99 |
2 | 9 | 64 | 289 | 3.47e-04 | 2.99 | 1.80e-02 | 2.00 |
2 | 10 | 81 | 361 | 2.44e-04 | 3.00 | 1.42e-02 | 2.00 |
3 | 7 | 36 | 361 | 2.49e-05 | - | 1.42e-03 | - |
3 | 8 | 49 | 484 | 1.34e-05 | 3.99 | 8.92e-04 | 2.99 |
3 | 9 | 64 | 625 | 7.88e-06 | 4.00 | 5.98e-04 | 3.00 |
3 | 10 | 81 | 784 | 4.92e-06 | 4.00 | 4.20e-04 | 3.00 |
The following notations were used in the table header:
The figure below compares the simulation results of the mms/ program and the pls/ program. As expected, the simulation result of the pls/ simulation looks exactly as the result of the mms/ simulation in the first octant.
The convergence rates of the pls/ simulation are summarized in the table below. As soon as the mesh approximates the problem domain exactly the convergence orders are at the upper boundary of the theoretical predictions.
p | r | cells | dofs | \(\|e\|_{L^2}\) | \(\alpha_{L^2}\) | \( \|e\|_{H^1}\) | \(\alpha_{H^1}\) |
---|---|---|---|---|---|---|---|
1 | 5 | 64 | 125 | 6.52e-02 | - | 8.64e-01 | - |
1 | 6 | 125 | 216 | 4.18e-02 | 1.99 | 6.94e-01 | 0.98 |
1 | 7 | 216 | 343 | 2.91e-02 | 1.99 | 5.79e-01 | 0.99 |
1 | 8 | 343 | 512 | 2.14e-02 | 1.99 | 4.97e-01 | 0.99 |
2 | 5 | 64 | 729 | 3.37e-03 | - | 8.77e-02 | - |
2 | 6 | 125 | 1331 | 1.73e-03 | 2.98 | 5.63e-02 | 1.99 |
2 | 7 | 216 | 2197 | 1.01e-03 | 2.99 | 3.92e-02 | 1.99 |
2 | 8 | 343 | 3375 | 6.34e-04 | 2.99 | 2.88e-02 | 1.99 |
3 | 5 | 64 | 2197 | 1.54e-04 | - | 5.83e-03 | - |
3 | 6 | 125 | 4096 | 6.31e-05 | 3.99 | 2.99e-03 | 2.99 |
3 | 7 | 216 | 6859 | 3.05e-05 | 3.99 | 1.73e-03 | 2.99 |
3 | 8 | 343 | 10648 | 1.65e-05 | 3.99 | 1.09e-03 | 2.99 |
The following notations were used in the table header: