# Spherical Capacitor ## Introduction

The following tutorial presents an electrostatic application. This example looks at a spherical capacitor formed of a solid conductor sphere, marked with 1 in the figure, and a hollow spherical conductor shell, marked with 3 in the figure, where the region between the conductors is a dielectric material, marked with 2 in the figure. The aim is to reproduce an electric potential distribution using the finite element method and compare the result to an analytical solution of the capacitance. The following sketch shows the geometry of the capacitor in 3D, where the different colors represent the material of each region. Typically a 3D Poisson equation is used to create a partial differential equation model for a 3D capacitor. Since the geometry and the boundary conditions, in this case, are rotationally symmetric about any axis, including the -axis, a 2D axisymmetric Poisson equation can be used to model the capacitor. An axisymmetric model has the advantage that the computational cost in both time and memory is much less than in the case of solving a full 3D model.

## Electrostatic equation

Electrostatics can be modeled with a Poisson equation. The 2D axisymmetric Poisson equation is given as:  (-ϵ·r )+ (-ϵ )=ρ

where is the electric potential in , is the absolute permittivity in of the material and in is the charge density.

The axisymmetric Poisson equation uses a truncated cylindrical coordinate system in 2D with independent variables instead of the cylindrical coordinates . The cylindrical coordinate variable disappears because the system is rotationally symmetric about the -axis. For further reference see DiffusionPDETerm.

The symbols and corresponding units used throughout this tutorial are summarized in the Nomenclature section.

## Model

The model consists of a multilayered ball. The inner most layer, the inner conductor, extends to a radius of and has a charge of . The next layer is a dielectric layer and extends from to r2. This is the layer we are interested in. The out layer, a second conductor extends from r2 to r3. This outer layer is connected to ground and has a potential of .

Both conductors have different but constant electrostatic conditions. This implies that the potential on each surface is also constant, though different. The goal of this simulation is to compute the distribution of the electric potential in in the dielectric layer.

### Domain

The domain of the dielectric is an axially symmetric annulus. The external boundaries represent the interfaces between the dielectric and the conductors.

First, the dimensions of the domain are defined, and then an element mesh is created with ToElementMesh.

Specify the parameters of the geometry in : will be used for a three dimensional visualization.

Create the mesh:
Visualize the mesh:

### Parameters setup

Next, we set up the material parameters and the 2D axisymmetric Poisson equation. These include the relative permittivity , a dimensionless number, and the charge .

Define the material parameters of the model:
Define the vacuum permittivity and the absolute permittivity :

The DiffusionPDETerm function can produce the axisymmetric form of the Poisson equation. To do so the parameter "RegionSymmetry" is set to "Axisymmetric".

Set up the axisymmetric Poisson equation:

### Boundary conditions

The boundary conditions considered here include both DirichletCondition and NeumannValue. The DirichletCondition specifies a ground boundary potential of at the outer boundary of the annulus at . The use of point element markers will be used here to specify where the DirichletCondition is applied.

Inspect the point element markers for the mesh:
Visualize the point element markers:

The outer boundary has a point element marker of 3 assigned to it. Because the marker assignment algorithm cannot know what markers are supposed to be assigned at corners a unique marker is assigned there and thus allows for a choice whether that corner node should be part of the Dirichlet boundary condition or not.

Visualize the point element markers at the corners:

In the top left corner we see a corner point element marker of 8 and in the bottom left corner a point element marker of 7 where we also want the Dirichlet condition to apply.

Set up the DirichletCondition:

Point element markers are used for DirichletCondition. For NeumannValue boundary element markers are to be used. The NeumannValue specifies a surface charge density in at the boundary of the annulus at , which represents the charge that has the inner conductor.

The surface charge density of a sphere of radius is given by:
Inspect the boundary element marker for the mesh:
Visualize the boundary element markers:
Set up the NeumannValue:

On a boundary that falls on the symmetry axis, like the -axis in this case, a Neumann 0 value needs to be specified because we are dealing with a Symmetry Boundary Condition. As Neumann 0 boundary conditions are the natural default boundary conditions, these can be left out.

### Model evaluation

Compute the numeric solution of the PDE with NDSolveValue.

Solve the equation:

### Visualization

Plot the electric potential in the dielectric region with DensityPlot:
Plot the potential from { } at :

To visualize the full 3D solution from the axisymmetric model one approach is to apply the interpolating function to visualize the data in a 3D domain. In other words, do a revolution plot of the data. We use RegionPlot3D to make a plot showing the three-dimensional region in which pred is the equation of a sphere of radius and specify a color function that does the mapping from the 3D data point to the 2D solution function.

Visualize the solution from the 2D axisymmetric model in 3D:

### Verification

The definition of a capacitance is given as

C = where is the charge that has the inner conductor sphere and is the potential difference between the conductors.

For a spherical capacitor the capacitance is

C = where is the relative permittivity of the dielectric layer which is delimited by the radius and .

See [Hayt & Buck, 2012] for further reference.

Compute the capacitance from the numerical solution:
Compute the capacitance from the analytical solution:
Compare the values of capacitance between the numerical solution and the analytical solution in percent:

Another way to verify the 2D axisymmetric model is to compare it with a full 3D model.

Create the 3D mesh:
Compute the solution:
Plot the relative error between the 3D solution and the 2D axisymmetric solution:

The graph shows that the 2D axisymmetric model matches the full 3D model.

## Nomenclature ## References

1.  Hayt, W. H., & Buck, J. A. (2019). Engineering electromagnetics. McGraw-Hill Education.