Classes:
1) BatchFLC
2) SolverFLC
3) ExactSolutionFLC_PHI
4) SettingsFLC
Files:
1) flc/src/main.cpp
2) flc/include/solver.hpp
3) flc/src/solver.cpp
4) flc/include/exact_solution.hpp
5) flc/src/exact_solution.cpp
6) flc/src/static_scalar_input.cpp
7) flc/include/settings.hpp
A floating conductor is a conductor which is not connected to a voltage source or to the ground. The surface of a floating conductor is equipotential, but the value of the potential is unknown. For this reason, it is impossible to set up a Dirichlet boundary condition on the surface of a floating conductor. Strictly speaking, the standard finite element method cannot deal with floating conductors. There is, however, an alternative approach. The problem of floating conductor is modified by replacing the floating conductor with a dielectric material of a very high permittivity. Then the modified problem is treated by the standard finite element method.
The goal of this numerical experiment is to test this method of dealing with floating conductors. We will do so by means of the method of exact solutions. That is, we will solve two textbook problems with a help of the class template StaticScalarSolver::Solver on progressively refined meshes and calculate \(L^2\) and \(H^1\) error norms. As a consequence of the mesh refinement, the error norms should converge to zero.
The following textbook problem is solved in the two-dimensional version of the experiment. (Section 6.1.5. Floating cylindrical tube)
The system consists of three conductors and two layers of dissimilar dielectric materials. All conductors and dielectrics are shaped as infinitely long coaxial tubes. The two dielectric materials fill all the space between the conductors. The inner conductor is at a potential of \(\Phi=\Phi_0\) Volts. The outer conductor is grounded. The third conductor is a floating conductor. It is sandwiched between the dielectrics. The figure below illustrates the system and the problem domain.
We would like to calculate the electric potential.
As soon as the system exhibits translation symmetry, we can reduce the problem domain to a two-dimensional planar domain. We remove the first and the second conductors from the problem domain and model them by setting up Dirichlet boundary conditions on the surfaces that delineate them. We replace the third conductor, i.e., the floating conductor, with a dielectric of a high permittivity. Consequently, the problem domain consists of three dissimilar dielectric materials with Dirichlet conditions applied on the boundaries.
This problem can be solved separately for each subdomain by the analytical methods. The solution reads
\begin{equation} \begin{aligned} &\Phi_1 = -\alpha\epsilon_2 \bigg[ \ln(r/d_1) - \frac{\epsilon_1}{\epsilon_2} \big[\ln(b/d_2)\big]\bigg]\Phi_0, \\ &\Phi_2 = -\alpha\epsilon_1 \bigg[ \ln(r/b) \bigg]\Phi_0, \\ &\Phi_d = -\alpha\epsilon_1 \bigg[ \ln(d_2/b) \bigg]\Phi_0, \end{aligned} \end{equation}
\begin{equation} \begin{aligned} &\vec{\nabla} \Phi_1 = -\alpha\epsilon_2 \frac{1}{r}\Phi_0\hat{r}, \\ &\vec{\nabla} \Phi_2 = -\alpha\epsilon_1 \frac{1}{r}\Phi_0\hat{r}, \end{aligned} \end{equation}
where
\begin{equation} \alpha=\frac{1}{\epsilon_1 \ln(b/d_2) + \epsilon_2 \ln(d_1/a)} \end{equation}
is a constant.
The following textbook problem is solved in the three-dimensional version of this numerical experiment. (Section 6.1.6. Floating spherical shell)
The system consists of three conductors and two layers of dissimilar dielectric materials. All conductors and dielectrics are shaped as concentric spherical shells. The two dielectric materials fill all the space between the conductors. The inner conductor is at a potential of \(\Phi=\Phi_0\) Volts. The outer conductor is grounded. The third conductor is a floating conductor. It is sandwiched between the dielectrics. The figure below illustrates the system and the problem domain.
We would like to calculate the electric potential.
Due to the spherical symmetry of the problem we can reduce it to one dimension. Our intension, however, is to test the solver in three-dimensional space. Therefore, we will leave the problem domain as it is: a regular three-dimensional domain. We remove the first and the second conductors from the problem domain and model them by setting up Dirichlet boundary conditions on the surfaces that delineate them. We replace the third conductor with a layer of dielectric of high permittivity. Consequently, the problem domain consists of three dissimilar dielectric materials with Dirichlet conditions applied on the boundaries.
This problem can be solved by analytical methods. The solution reads
\begin{equation} \begin{aligned} &\Phi_1=-\alpha\epsilon_2 \Bigg[ \frac{1}{r}-\frac{1}{d_1} - \frac{\epsilon_1}{\epsilon_2}\Bigg(\frac{1}{b}-\frac{1}{d_2}\Bigg)\Bigg]\Phi_0, \\ &\Phi_2=-\alpha\epsilon_1 \Bigg[ \frac{1}{r} - \frac{1}{b} \Bigg]\Phi_0, \\ &\Phi_d=-\alpha\epsilon_1 \Bigg[ \frac{1}{d_2} - \frac{1}{b} \Bigg]\Phi_0, \end{aligned} \end{equation}
\begin{equation} \begin{aligned} &\vec{\nabla} \Phi_1 = \alpha\epsilon_2 \frac{1}{r^2}\Phi_0\hat{r}, \\ &\vec{\nabla} \Phi_2 = \alpha\epsilon_1 \frac{1}{r^2}\Phi_0\hat{r}, \end{aligned} \end{equation}
where
\begin{equation} \alpha=\frac{1}{\epsilon_1 \bigg[\dfrac{1}{b} - \dfrac{1}{d_2}\bigg] + \epsilon_2 \bigg[\dfrac{1}{d_1} - \dfrac{1}{a}\bigg]} \end{equation}
is a constant.
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)= 0 & \text{in} & \Omega & \text{(i)},\\ \text{(e)} &\Phi = \Phi_0 & \text{on} & \Gamma_{D1} & \text{(ii)},\\ \text{(e)} &\Phi = 0 & \text{on} & \Gamma_{D2} & \text{(iii)},\\ \text{(e)} &\Phi_{+} = \Phi_{-} & \text{on} & \Gamma_{I1} & \text{(iv)},\\ \text{(n)}&\epsilon_{+}\hat{n}\cdot\vec{\nabla}\Phi_{+}-\epsilon_{-}\hat{n} \cdot\vec{\nabla}\Phi_{-}=0&\text{on}&\Gamma_{I1}&\text{(v)},\\ \text{(e)} &\Phi_{+} = \Phi_{-} & \text{on} & \Gamma_{I2} & \text{(vi)},\\ \text{(n)}&\epsilon_{+}\hat{n}\cdot\vec{\nabla}\Phi_{+}-\epsilon_{-}\hat{n} \cdot\vec{\nabla}\Phi_{-}=0&\text{on}&\Gamma_{I2}&\text{(vii)}. \end{array} \end{equation}
This boundary value problem is a special case of the general static scalar boundary value problem.
The FLC experiment is implemented in accordance with the base code structure. This time we use second-order mapping and attach a spherical manifold to all faces of the mesh. That is, we declare the spherical manifold in the SolverFLC template,
and attach it to the mesh as the following:
Then we pass 2 as the second parameter to the constructor of SolverFLC class template to enable second-order mapping,
The build process generates two executable files: flc-ring and flc-shell. That is, one executable file for the two-dimensional experiment, flc-ring, and one executable file for the three-dimensional experiment, flc-shell. To rebuild them change into flc/build/Release directory and execute the following:
Then all executable files must be executed again. This can be done by changing into the flc/bin/Release directory and executing run-all script there,
This will generate various files in the flc/bin/Release/Data directory. Among the generated files there are vtu files that can be viewed with a help of ParaView software package of the Kitware, Inc. The data files in tex and txt format contain the convergence tables. The flc/bin/Release/Data directory also contains gpi files. They can be used to visualize the calculated potential along the \(x\) axis.
Note that executable files require a set of meshes to be present in the flc/gmsh/data directory. If they are missing, they can be generated anew. This can be done by changing into flc/gmsh directory and executing the following:
This will generate a set of globally refined meshes in flc/gmsh/data.
The SettingsFLC class allows switching on three useful features: printing time tables on the computer screen, logging convergence data of the conjugate gradient solver, and saving the exact solution into the vtu files next to the numerical solution.
Both, two- and three- dimensional versions of the experiment were executed with the following settings (see SettingsFLC): \(a = 0.4[m]\), \(b=1.0[m]\), \(d_1=0.6[m]\), \(d_2 = 0.8[m]\), \(\epsilon_1 = 32\epsilon_0\big[\frac{C^2}{Nm^2}\big]\), \(\epsilon_2 = 4\epsilon_0\big[\frac{C^2}{Nm^2}\big]\), and \(\epsilon_3 = 10^9\epsilon_0\big[\frac{C^2}{Nm^2}\big]\).
The figure below illustrates the numerically calculated electric potential. As expected, the potential is continuous on the interfaces, i.e., at \(x = 0.6[m]\) and at \(x = 0.8[m]\). The potential within the conductor is constant.
The convergence table below illustrates that the analytical solution is approximated well by the numerical simulation, see the theoretical predictions.
p | r | cells | dofs | \(\|e\|_{L^2}\) | \(\alpha_{L^2}\) | \(\|e\|_{H^1}\) | \(\alpha_{H^1}\) |
---|---|---|---|---|---|---|---|
1 | 2 | 24 | 32 | 1.79e-02 | - | 2.92e-01 | - |
1 | 3 | 96 | 112 | 4.79e-03 | 1.90 | 1.47e-01 | 1.00 |
1 | 4 | 216 | 240 | 2.16e-03 | 1.97 | 9.78e-02 | 1.00 |
1 | 5 | 384 | 416 | 1.22e-03 | 1.98 | 7.33e-02 | 1.00 |
2 | 2 | 24 | 112 | 1.92e-03 | - | 2.74e-02 | - |
2 | 3 | 96 | 416 | 1.42e-04 | 3.76 | 5.35e-03 | 2.35 |
2 | 4 | 216 | 912 | 3.28e-05 | 3.61 | 2.23e-03 | 2.16 |
2 | 5 | 384 | 1600 | 1.21e-05 | 3.47 | 1.22e-03 | 2.08 |
3 | 2 | 24 | 240 | 1.86e-03 | - | 2.04e-02 | - |
3 | 3 | 96 | 912 | 1.24e-04 | 3.91 | 2.57e-03 | 2.99 |
3 | 4 | 216 | 2016 | 2.51e-05 | 3.93 | 7.58e-04 | 3.01 |
3 | 5 | 384 | 3552 | 8.03e-06 | 3.96 | 3.19e-04 | 3.01 |
The figure below illustrates the numerically calculated electric potential. As expected, the potential is continuous on the interfaces, i.e., at \(x = 0.6[m]\) and at \(x = 0.8[m]\). The potential within the conductor is constant.
The corresponding convergence data is summarized in the table below.
p | r | cells | dofs | \(\|e\|_{L^2}\) | \(\alpha_{L^2}\) | \(\|e\|_{H^1}\) | \(\alpha_{H^1}\) |
---|---|---|---|---|---|---|---|
1 | 3 | 576 | 686 | 1.27e-02 | - | 3.54e-01 | - |
1 | 4 | 1944 | 2180 | 5.72e-03 | 1.97 | 2.36e-01 | 1.00 |
1 | 5 | 4608 | 5018 | 3.23e-03 | 1.98 | 1.77e-01 | 1.00 |
1 | 6 | 9000 | 9632 | 2.07e-03 | 1.99 | 1.42e-01 | 1.00 |
2 | 3 | 576 | 5018 | 3.39e-04 | - | 1.85e-02 | - |
2 | 4 | 1944 | 16454 | 9.14e-05 | 3.24 | 8.18e-03 | 2.01 |
2 | 5 | 4608 | 38450 | 3.72e-05 | 3.12 | 4.60e-03 | 2.00 |
2 | 6 | 9000 | 74462 | 1.87e-05 | 3.08 | 2.94e-03 | 2.00 |
3 | 3 | 576 | 16454 | 2.10e-04 | - | 3.83e-03 | - |
3 | 4 | 1944 | 54488 | 4.12e-05 | 4.02 | 1.10e-03 | 3.07 |
3 | 5 | 4608 | 127946 | 1.31e-05 | 3.99 | 4.61e-04 | 3.03 |
3 | 6 | 9000 | 248492 | 5.37e-06 | 3.99 | 2.35e-04 | 3.02 |
An inspection of the convergence tables above suggests that the convergence order of the \(L^2\) error norm can be described as
\[ \alpha_{L^2} \approx p + 1. \]
Consequently, we can conclude that the scalar solver implemented by the class StaticScalarSolver::Solver handles floating conductors well. The observed convergence rates are at the upper boundary of the theoretical predictions.