Skip to content

Electrostatics Model

Introduction

The electrostatics model describes a static electric field \(\mathbf{E}\) in terms of the scalar electric potential \(\phi\) and solves the following equation:

\[ \begin{align} \nabla \cdot \left(\varepsilon \nabla \phi\right) = -\rho, \end{align} \]

where \(\varepsilon\) is the electric permittivity and \(\rho\) is the density of free electric charges. With appropriate boundary conditions, this equation determines the distribution of the electric potential \(\phi\) in the region of interest. So it gives the corresponding distribution of the static electric field \(\mathbf{E}\) from \(\mathbf{E}=-\nabla\phi\). The electrostatics model studies electrostatic phenomena that arise from the forces with which stationary electric charges act on each other. You can use it to study capacitors and their stored energy, the forces on charge distributions, and shielding effects such as Faraday cages. You can also use the model to study polarization in dielectrics and space charge distributions in semiconductors and insulators. This model is also very useful in field analysis to show field lines and equipotential surfaces.

Typical industrial applications include high-voltage insulator design, capacitor and MEMS-comb-drive characterisation, electrostatic shielding and Faraday-cage studies, semiconductor space-charge analysis, and electron-optics or ion-source modelling.

Model

The model is created and added to the simulation with

electrostatics_model = ElectrostaticsModel(
    marker=electric_domain,
    order=2,
)

sim.get_model_manager().add_model(electrostatics_model)

where

  • marker specifies the domain on which the model is solved (defaults to the whole volume),
  • order is the polynomial order of the finite-element discretisation (default 1),
  • formulation selects Formulation.Continuous (H1, default) or Formulation.Discontinuous (DG); the latter is useful for problems with strong material discontinuities.

The model has these methods to manage its setup: add_material, add_materials, add_condition, add_conditions, get_materials, get_conditions, clear_materials, clear_conditions, get_marker, get_solver, get_mesh_refiner, and number_of_dofs. The clear_* methods remove all materials or conditions from the model.

Solver

The model owns a solver, obtained with get_solver():

solver = electrostatics_model.get_solver()
solver.set_verbose(True)

See Solver for the available controls.

Mesh Refiner

The model owns an adaptive mesh refiner. Use get_mesh_refiner() to get it. The refiner estimates the error in each cell and marks the cells to refine. The refiner does not change the mesh itself. A Refinement Model must be in the simulation. The refine_mesh() (h-refinement) and refine_order() (p-refinement) calls of this model get the marked cells from the refiner:

from mufem.electromagnetics.electrostatics import RefinementStrategy

refinement_model = mufem.RefinementModel()
sim.get_model_manager().add_model(refinement_model)

mesh_refiner = electrostatics_model.get_mesh_refiner()
mesh_refiner.set_refinement_strategy(RefinementStrategy.L2ZienkiewiczZhu)
mesh_refiner.set_refinement_fraction(0.8)
mesh_refiner.set_smooth_rt(True)

where

  • set_refinement_strategy selects the error estimator: L2ZienkiewiczZhu (default) and LSZienkiewiczZhu (Zienkiewicz–Zhu recovery estimators with L2 or least-squares flux smoothing), Kelly (the Kelly flux-jump estimator), or RefinementStrategy.NoRefinement (no cells are marked),
  • set_refinement_fraction sets the threshold fraction \(f \in [0, 1]\) (default 0.8). The refiner marks each cell with an estimated error \(\eta_K > f \, \max_K \eta_K\), where \(\eta_K\) is the estimated error of cell \(K\). A smaller value marks more cells,
  • set_smooth_rt selects the space for the smoothed flux in the L2ZienkiewiczZhu estimator (True for H(div), default; False for H1).

Each setter has a matching getter (get_refinement_strategy, get_refinement_fraction, get_smooth_rt).

p-refinement (refine_order()) is available only for H1 or L2 spaces on meshes with only quadrilateral or hexahedral cells.

Note

Since version 0.6.0, adaptive refinement also operates on Windows and macOS. The refinement gives the same result on all platforms.

Materials

In the most general case, the electric permittivity \(\varepsilon\) in the governing equation can be a spatially varying quantity. It can also depend on additional physical properties, such as temperature. To define \(\varepsilon\) as a function of all these parameters we use a corresponding material. A set of functions represents a material. These functions give \(\varepsilon\) as a function of various parameters in the form of analytic expressions, tabulated data, or external models. For more details, please refer to Electrostatics Material.

To simplify the setup of the electric permittivity \(\varepsilon\) for the most common cases, we provide a set of predefined material functions, listed below:

Name Description
Constant Constant relative electric permittivity $\varepsilon_\text{usr}$: $$ \varepsilon = \varepsilon_0 \varepsilon_\text{usr}. $$
Function Spatially varying or field-dependent relative permittivity supplied through a scalar coefficient function (for inhomogeneous dielectrics or coupling with other models).

Conditions

To solve the governing equation in a given region, it is necessary to specify boundary conditions at the boundaries of this region. You may also need to set a charge distribution or fix the potential at a point in the volume. For all these cases, we can use the following list of supported conditions:

Name Supported Entities Description
Charge Density Volume, Boundary This condition specifies the distribution of charge density $\rho$ in a volume, on a surface, or along a line (wire).
Displacement Field Boundary This condition sets a specific value of the electric displacement field $\mathbf{D}$ at the selected boundary.
Electric Potential Volume, Boundary This condition establishes a fixed electric potential $\phi$ in the volume or at the boundary of the region of interest.
Floating Potential Volume This condition imposes a constraint on the electric potential $\phi$, requiring that its value in a given region be constant.
Potential Jump Boundary This condition defines a discontinuous electric potential $\phi$ with a given difference in value at the boundary of two contacting regions.
Single-Point Grounded Point Pins $\phi = 0$ at the origin. Use to fix the gauge in pure-Neumann (charge-density-only) problems where the potential is otherwise defined only up to an additive constant.

Coefficients

The following functions are available in the electrostatics model for visualization or querying:

Name Field Type Description
Electric Potential Scalar Electric potential: $~ \phi$
Electric Field Vector Electric field vector: $~ \mathbf{E} = -\nabla \phi$
Electric Displacement Field Vector Electric displacement field vector: $~ \mathbf{D} = \varepsilon \mathbf{E}$
Electric Energy Density Scalar Electric energy density: $~ U = \frac{1}{2} \mathbf{E} \cdot \mathbf{D}$
Electric Permittivity Scalar Electric permittivity $\varepsilon$ as evaluated from the material.
Electrostatics Model Order Scalar The degree of the polynomial that represents the electric potential within each element of the mesh.