Nomenclature
A. Finite Element Method | |
Arbitrary unknown function. | |
Approximation of the arbitrary function | |
Coefficient to finite-element basis functions. | |
Finite-element basis function | |
Arbitrary differential operator. | |
Arbitrary known coefficient. | |
Finite-element test functions. | |
Finite-element domain. | |
Finite-element system matrix. | |
Vector of unknown coefficients. | |
Vector of known coefficients. | |
B. Ionization Front Model | |
Set of chemical species in a model. | |
Concentration of species | |
Time. | |
Total flux of species | |
Total sources and sinks of species | |
Electric charge of species | |
Charge mobility of species | |
Diffusion coefficient of species | |
Electron energy mobility. | |
Electron energy diffusion coefficient. | |
Dielectric permittivity. | |
Scalar electric potential. | |
Electric field magnitude. | |
Net charge density. | |
Effective ionization coefficient. | |
Ionization coefficient. | |
Attachment coefficient. | |
Sign for loss or gain source for | |
Reaction rate for the | |
Set of chemical reactions in a model. | |
Photoelectron source term. | |
Total ionizing reaction source term. | |
Gas pressure. | |
Collisional quenching pressure. | |
Partial pressure of oxygen. | |
Impact ionization frequency for level | |
Ionization frequency. | |
Photoionization efficiency. | |
Helmholtz fitting parameters | |
Electron energy density. | |
Elementary charge. | |
Secondary emission (SE) coefficient. | |
Unit normal. | |
Boltzmann constant. | |
Mean energy of SE electrons. | |
Thermal velocity of species | |
Reflection coefficient of species | |
Mass of species | |
Temperature of species | |
Surface charge density. | |
C. Weak Formulation | |
Vector of unknown functions. | |
Vector of test functions. | |
External boundary of | |
D. Computational Aspects | |
Time integration step size. | |
The base computational mesh. | |
The initial computational mesh. | |
A temporary computational mesh. | |
Set of refinement functions. | |
Set of refinement growth radii. | |
Set of refinement tolerances. | |
Theta time-integration scheme parameter. | |
E. Other | |
Cartesian geometric dimensions. | |
Cylindrical geometric dimensions. | |
Applied voltage. | |
Peak density of initial charge distribution. | |
Maximum electric field strength in the domain. | |
Relative dielectric constant. | |
Deviation parameter for gaussian seed. |
Introduction
Nonthermal plasmas belong to a class of non-equilibrium (non-Maxwellian) gas discharge plasma, where the electron temperature is far higher than that of the ion temperature. Such plasmas may be produced under the application of sufficiently intense electric fields to gaseous media. Also known as cold- or low-temperature plasmas, their properties have led to their application to various novel technologies, found across many different areas of engineering and science. For example, for surface processing [1], [2], air cleaning [3], [4], [5], plasma medicine [6], or chemical processing [7]. However, many aspects of nonthermal plasmas remains to be fully understood, and a deeper understanding of the related processes is crucial for the successful advancement and optimization of these developing technologies. Equally, the study of fast ionization fronts is also critical to the prevention of electrical failure in high-voltage equipment, as the initial development of streamers in high-field regions may result in partial (or complete) discharges across insulation, compromising system integrity. Streamer discharges are similarly important for the understanding of geophysical phenomena occurring in the upper atmosphere [8], and for certain plasma flow and propulsion applications [9]. These transient, filamentary-type discharges are multiscale in nature [10], rendering them highly difficult to characterize solely through experimental means.
In recent times, advances in computational power, and the growing accessibility to high performance computing (HPC), has facilitated complex multiphysics modelling, allowing it to become more widely available. For example, time-dependent simulations of streamer discharges have been successfully demonstrated on standard consumer grade hardware, using commercially available software [11], [12]. Specialized schemes using custom codes, employing techniques which are particularly effective for multiscale modelling have also been developed, and demonstrate major advances in computational efficiency and speed [13], [14]. The popularity of these methods has grown rapidly, with models that incorporate aspects such as complex plasma chemistry [15], nonuniform electric fields [16], and solid dielectric boundaries [17], [18], becoming increasingly prevalent. Currently, the software developed must typically strike a balance between issues such as computational speed, resource usage, accessibility, adaptability, accuracy, and model fidelity. Further difficulty comes with the sheer number of necessary parameters involved within plasma simulations, much of which must be manually entered into simulation software, a process which is highly susceptible to human error [19]. Generally, custom modifications to complex, often low-level, code are required when setting up new problems, which can be time consuming, and, in many cases, require some degree of computational expertise.
In this work, the development and design of StrAFE (Streamers on Adaptive Finite Elements), a convenient and user-friendly Python library, for the automation and solution of transient ionization front problems, is described. The StrAFE system was built atop the open-source FEniCS finite element (FE) framework [20], [21], [22], which provides an already convenient yet highly flexible set of software tools for general-purpose finite element modelling. The design philosophy behind StrAFE follows directly in the footsteps of FEniCS: the rapid translation of physical models to efficient FE code; reduction in the setup time necessary to generate new models, by reducing the need for computational expertise; and to allow maximum user control and configurability.
StrAFE was developed using the now legacy (2019.1.0) version of FEniCS. Development is now focused on a next-generation version known as FEniCSx, and documentation for both versions of this platform may be found at docs.fenicsproject.org. In this article, the technical implementation of StrAFE using FEniCS is described, while also discussing the many benefits which can be gained by employing open-source code. Results from several code verification and comparison studies are then presented. It should be noted that the StrAFE library itself has not been made openly available. Rather, the focus of this article is to demonstrate how software like StrAFE can be achieved using FEniCS, which itself is open-source and fully available. Consequently, this article acts as a guide for interested parties to develop similar software, and encourages the use of open-source frameworks such as FEniCS for simulating transient ionization fronts developed in gases.
Platform and Method
A. The Finite Element Method
When using the hydrodynamic description of plasmas, solving the set of hyperbolic conservation laws which arise (see Section III-A) generally benefits from numerical methods that guarantee exact local conservation, e.g., finite volume methods (FVM) as used in [13], [14], and [23]. However, this work is instead based on the continuous Galerkin finite element method (CG-FEM), to take advantage of some FEM-specific features. Despite only maintaining global conservation, FEM offers greater flexibility in terms of the order of spatial discretization, the type of finite element, and can handle complex boundaries with relative ease, without the need for any specialized numerical schemes. CG-FEM is mature, versatile, and has been frequently applied in many areas of science and engineering. Thus, a detailed review of FEM will not be conducted here, for which the reader is referred to [21], [24], and [25], and references therein. Instead, only a brief outline of necessary aspects is provided, to act as support for later discussion within this article.
To begin, let \begin{equation*} u \approx u_{h} = \sum _{i} U_{i} \phi _{i}, \tag{1}\end{equation*}
\begin{equation*} L(u) = f, \tag{2}\end{equation*}
\begin{equation*} r = \int _{\Omega} v L(u) - \int _{\Omega} fv, \tag{3}\end{equation*}
\begin{equation*} r = \int _{\Omega} v L\left ({\sum _{i} U_{i} \phi _{i}}\right)-\int _{\Omega} fv = 0, \tag{4}\end{equation*}
\begin{equation*} \mathbf {AU} = \mathbf {b} \tag{5}\end{equation*}
B. The FEniCS Project
The FEniCS Project [20], [21], [22] is an open-source collection of software components, designed with the aim to automate and simplify general FE problem generation and solution. Licensed under LPGL-v3, the original platform was developed using C++, and features several core components under the main user interface named DOLFIN. Fig. 1 outlines the corresponding system architecture; using corresponding labels:
FEniCS Form Compiler (FFC) [21], [26], [27] – Handles just-in-time (JIT) compilation and generation of finite element variational forms in high-speed C++ code.
Unified Form Assembly Code (UFC) [28] – An interface for finite element assembly from provided variational forms.
Unified Form Language (UFL) [20], [28] – A language developed for the discretization of partial-differential equations (PDE), in a form that closely resembles the original mathematical expressions.
Finite Element Automatic Tabulator (FIAT) [29] – Handles the generation of finite element basis functions and elements of arbitrary order.
Mathematical Modelling
A. Hydrodynamic Description of Nonthermal Plasmas
The hydrodynamic (or fluid) approximation of plasma arises from the zero-order moment of the Boltzmann equation [40], and becomes valid when charge concentrations are sufficiently high, or if the Knudsen number is within the bounds of validity [40]. Consider a plasma comprised of a set, \begin{equation*} \frac {\partial n_{i}}{\partial t} + \nabla \cdot \vec {\Gamma }_{i} = S_{i}, \tag{6}\end{equation*}
\begin{equation*} \vec {\Gamma }_{i} = -\textrm {sgn}\left ({q_{i}}\right)n_{i} \mu _{i} \nabla \varphi - D_{i} \nabla n_{i}, \tag{7}\end{equation*}
\begin{equation*} -\nabla \cdot \left ({\varepsilon \nabla \varphi }\right)=\rho =\sum _{j\in N}q_{j} n_{j}, \tag{8}\end{equation*}
B. Using Townsend Coefficients
A basic description of plasma can be gained using a minimum of two species– electrons, and generic positive ions. Using a minimal model, the Townsend ionisation coefficient can be used to define an ionisation source term of the form:\begin{equation*} S_{i} = \bar {\alpha }n_{e} \mu _{e} |\nabla \varphi |, \tag{9}\end{equation*}
\begin{equation*} S_{-} = \eta n_{e} \mu _{e} |\nabla \varphi |. \tag{10}\end{equation*}
C. Plasma Chemistry
For detailed studies which concern plasma composition, and which involve numerous active ionic species, source terms are computed following:\begin{equation*} S_{i}=\sum _{j=1}^{n} \left ({h_{j} k_{j} \prod _{m \in R} n_{m}}\right), \tag{11}\end{equation*}
D. Photoionization
In some gases (e.g., atmospheric air), photoionization induced by emitted photons from radiative de-excitation processes, are thought to be a major contributor of free electrons to sustained discharges such as positive streamers [41], [42], [43]. To account for this, Zheleznyak’s model [41] has been implemented with a photoelectron source term given by:\begin{equation*} S_{ph} = \frac {p_{q}}{p+p_{q}}\xi \frac {\nu _{u}}{\nu _{i}}\sum _{j=1}p_{O_{2}}^{2} A_{j} \iiint _{V'} \frac {S_{ion}e^{-\lambda p_{O_{2}}|r-r'|}}{4\pi |r-r'|} dV'. \tag{12}\end{equation*}
\begin{align*} \nabla ^{2} S_{ph,j} - \left ({p_{O_{2}}\lambda _{j}}\right)^{2} S_{ph,j}&=-\left ({A_{j} p_{O_{2}}^{2} \frac {p_{q}}{p+p_{q}}\xi \frac {\nu _{u}}{\nu _{i}}}\right)S_{ion}, \\ S_{ph}& = \sum _{j} S_{ph,j}, \tag{13}\end{align*}
E. Local Field and Local Mean Energy Approximations
In many previous studies, the local field approximation (LFA) has been used for simplicity, which assumes that transport and rate coefficients are dependent only on the local magnitude of the electric field, which becomes immediately available from the solution of (8), and then applying \begin{equation*} \frac {\partial n_{\varepsilon }}{\partial t}+\nabla \cdot \vec {\Gamma }_{\varepsilon} = \bar {e}\vec {\Gamma }_{e}\cdot \nabla \varphi -\sum _{j=1}^{n} \left ({\Delta E_{j} k_{j} \prod _{m \in R}n_{m}}\right), \tag{14}\end{equation*}
\begin{equation*} \vec {\Gamma }_{\varepsilon} =n_{\varepsilon} \mu _{\varepsilon} \nabla \varphi - D_{\varepsilon} \nabla n_{\varepsilon}. \tag{15}\end{equation*}
\begin{equation*} \mu _{\varepsilon} = \frac {5}{3}\mu _{e}, D_{\varepsilon} = \frac {5}{3}D_{e}. \tag{16}\end{equation*}
F. Boundary Conditions
For electrode boundaries, Dirichlet boundary conditions are prescribed for the electrostatic potential, while Neumann-zero conditions are applied at axes of symmetry. For studies involving subdomains (e.g., solid barriers, electrodes, walls), the accurate reflection of physical behavior requires appropriate boundary conditions for the normal charge fluxes to be prescribed at interfaces. In StrAFE, the option exists to have either a Neumann-zero condition, or wall conditions following Hagelaar et al. [47]. Using similar notation to Jovanovic et al. [19], these are given by:\begin{align*} \vec {\Gamma }_{e}\cdot \hat {n}& = \frac {1-r_{e}}{1+r_{e}}\left ({|n_{e} \mu _{e} \nabla \varphi \cdot \hat {n}|+\frac {1}{2}n_{e} v_{th,e}}\right) \\ &\quad -\frac {2}{1+r_{e}}\gamma \sum _{\substack {j \in N \\ j \neq e}} \textrm {max}\left ({\vec {\Gamma }_{j}\cdot \hat {n}, 0}\right) \tag{17}\end{align*}
\begin{equation*} \vec {\Gamma }_{i}\cdot \hat {n} = \frac {1-r_{i}}{1+r_{i}}\left ({|n_{i} \mu _{i} \nabla \varphi \cdot \hat {n}|+\frac {1}{2}n_{i} v_{th,i}}\right) \tag{18}\end{equation*}
\begin{align*} \vec {\Gamma }_{\varepsilon} \cdot \hat {n}& = \frac {1-r_{e}}{1+r_{e}}\left ({|n_{\varepsilon} \mu _{\varepsilon} \nabla \varphi \cdot \hat {n}|+\frac {1}{2}n_{\varepsilon} v_{th,\varepsilon }}\right) \\ &\quad -\frac {2}{1+r_{e}}\bar {\varepsilon }_{\gamma} \gamma \sum _{\substack {j \in N \\ j \neq e}} \textrm {max}\left ({\vec {\Gamma }_{j}\cdot \hat {n}, 0}\right) \tag{19}\end{align*}
\begin{equation*} v_{th,i}=\sqrt {\frac {8k_{b} T_{i}}{\pi m_{i}}}, \tag{20}\end{equation*}
\begin{equation*} T_{e} = \frac {2n_{\varepsilon} }{3 k_{b} n_{e}}, \tag{21}\end{equation*}
\begin{equation*} v_{th, \varepsilon }= 2k_{b} T_{e} v_{th,e}. \tag{22}\end{equation*}
\begin{equation*} \varepsilon \nabla \varphi \cdot \hat {n} = \sigma _{s}, \tag{23}\end{equation*}
\begin{align*} \frac {\partial \sigma _{s}}{\partial t}=\bar {e}\sum _{j \in N}\textrm {sgn}\left ({q_{i}}\right)\vec {\Gamma }_{j} \cdot \hat {n}+\bar {e}\gamma \sum _{\substack {j \in N \\ j \neq e}}\vec {\Gamma }_{j} \cdot \hat {n}. \tag{24}\end{align*}
G. Weak Formulation
As described in Section II-A, the application of the Galerkin method requires the reformulation of equations (6)–(24) to hold weakly with respect to an appropriate set of test functions. The weak formulation of the governing equations is fundamental to the implementation of StrAFE, which uses the UFL syntax to directly input math-like form expressions, which are passed to the system assembler. See [20] and [21] for a detailed description of UFL and of the FEniCS form compiler. In the interests of repeatability, the remainder of this Section focuses on providing the mathematical definition of the variational problem. To maintain consistency with indexing in Python,
Index 0 is always the potential field,
.$\varphi $ Index 1 is always the electron density,
.$n_{e}$ Index 2 to
stores the densities of all other species under consideration, e.g., ($N$ ).$n_{+}, n_{-}, \ldots $ Index
to$N+1$ stores the three components of the photoionization source term,$N+3$ ,$S_{ph, 1}$ , and$S_{ph, 2}$ , if enabled.$S_{ph, 3}$ Index
stores the surface charge$N+4$ , defined only on element facets, and only if there are subdomains.$\sigma _{s}$ The last index of the vector (in Python, index −1) stores the electron energy density,
, if LMEA is enabled.$n_{\varepsilon} $

Consider firstly the Poisson equation (8), from which one may construct the weak form following Section II-A to be:\begin{align*} &\hspace {-1pc}\int _{\Omega} v_{0} \nabla \varepsilon \cdot \nabla u_{0} d\Omega + \int _{\Omega} v_{0} \sum _{j \in N} q_{j} n_{j} d\Omega \\ &\quad -\int _{\Omega} \nabla \left ({v_{0} \varepsilon }\right)\cdot \nabla u_{0} d\Omega + \int _{\partial \Omega } v_{0} \varepsilon \left ({\nabla u_{0} \cdot \hat {n}}\right) dS = 0 \tag{26}\end{align*}
\begin{equation*} \bigcup _{j} \omega _{j} = \partial \Omega, \tag{27}\end{equation*}
\begin{align*} &\hspace {-1pc}\int _{\Omega} \frac {\partial u_{i}}{\partial t} v_{i} d\Omega - \textrm {sgn}(q_{i})\Bigg [\int _{\Omega} v_{i} \nabla \left ({u_{i} \mu _{i}}\right)\cdot \nabla \varphi d\Omega \\ &\quad - \int _{\Omega} \nabla \left ({v_{i} u_{i} \mu _{i}}\right)\cdot \nabla \varphi d\Omega \Bigg] \\ &\quad + \int _{\Omega} \nabla \left ({v_{i} D_{i}}\right)\cdot \nabla u_{i} d\Omega \\ &\quad - \int _{\Omega} v_{i} \nabla D_{i} \cdot \nabla u_{i} d\Omega \\ &\quad - \int _{\Omega} S_{i} v_{i} d\Omega + \int _{\partial \Omega } v_{i} \left ({\vec {\Gamma }_{i} \cdot \hat {n}}\right) dS = 0 \tag{28}\end{align*}
\begin{align*} &\hspace {-1pc}\int _{\Omega} \nabla v_{i} \cdot \nabla u_{i} d\Omega + \int _{\Omega} v_{i} \left ({p_{O_{2}} \lambda _{j}}\right)^{2} u_{i} d\Omega \\ &\quad - \int _{\Omega} v_{i} \left ({A_{j} p_{O_{2}}^{2} \frac {p_{q}}{p+p_{q}}\xi \frac {\nu _{u}}{\nu _{i}}}\right)S_{ion} d\Omega \\ &\quad - \int _{\partial \Omega } v_{i} \left ({\nabla u_{i} \cdot \hat {n}}\right) dS = 0, \tag{29}\end{align*}
StrAFE
Fig. 2 shows the architecture of the StrAFE library, and describes its interconnections to the core FEniCS system as laid out in [48] and in Fig. 1. StrAFE was developed with a strong emphasis on usability and flexibility, in-line with the original design philosophy for FEniCS. Classes provided through StrAFE have been designed to be intuitive, and to require only basic knowledge of the Python programming language. Sections IV-A to IV-E gives a broad overview of the components of StrAFE, providing details regarding their implementation and usage.
Block diagram of the architecture of the StrAFE library, and its connections to the core FEniCS library as shown in Fig. 1.
A. Basic Usage and Classes
In this section, classes which are central to StrAFE’s functionality are described, to highlight how the combination of FEniCS and Python has been used to significantly simplify the process of configuring simulation models.
At the core of any simulation is the computational mesh. The inheritance of StrAFE from FEniCS therefore permits that any mesh format supported by FEniCS as listed in [21], is also supported by StrAFE. This includes internally generated meshes using native FEniCS functions, and external meshes from any other software. Both 2D and 3D unstructured meshes are supported, and are compatible with mesh routines as described in Section IV-B. A simulation can then be configured using a number of dedicated StrAFE classes, the most important of which are described in brief below:
DriftDiffusionProblem() - The main problem class, where all simulation settings can be accessed and changed. Uses intuitive.set syntax, such asset_base_mesh(mesh) to provide a meshed domain object mesh to the solver. All settings pertaining to the problem can be set similarly, including the choice of LFA or LMEA, the species under consideration, AMR schemes, time-stepping, etc.ChargedSpecies() - Defines a single instance of a charged species to be tracked within the simulation. This class stores the species properties, such as its name, mass, charge, and transport parameters (can be provided as Python functions or tabulated data, such as those computed using BOLSIG+ [49]). Initial conditions are also stored in this class, where several popular initial charge distributions can be chosen from, e.g., a gaussian [50], capsule [17], or uniform distribution.Electrode() - Defines nodes on the mesh which are to be marked as electrodes. Doing so allows the application of potential boundary conditions. This is also a child class of the more generalDirichletCondition() , which can be used for the prescription of arbitrary Dirichlet conditions, and is not limited to the potential field.Wall() - Defines nodes on the mesh which are to be marked as a wall. Doing so allows the application of the wall conditions according to (17)–(19). This class stores the attributes of the wall, such as reflection and secondary emission properties. This is also a child class of the more generalNeumannCondition() , which can be used for the prescription of arbitrary Neumann conditions, and is not limited to the charge fluxes.
B. Adaptive Mesh Refinement (AMR)
A part of the motivation to develop StrAFE, was the want of a flexible and transparent framework to study fast-transient ionisation waves, such as streamer discharges, with emphasis on divergent field and time-varying field conditions. As mentioned, streamer discharges are multiscale phenomena [10], and often exhibit sharp features and steep spatial gradients, particularly within their electric field and ionic density distributions. This imparts considerable computational difficulty for mesh-based methods like FEM, where the accuracy is highly dependent on mesh resolution, but where computational resources are often limited. Therefore, adaptive meshing techniques have essentially become a necessity for simulating streamers in complex domains, or for longer time periods. These methods automatically adapt the mesh elements in time and space to suit the evolving dynamics of the simulation. Most commonly, this requires refinement of mesh cells in regions of fast-moving or high-gradient behavior, and subsequent de-refinement of cells where the solution is once again slow-varying (also known as
At the time of development of StrAFE, FEniCS did not include native support for time-dependent adaptive meshing schemes that allowed for per-cell de-refinement, and was limited to refinement only. To include this feature, StrAFE implements several refinement routines for the purpose of achieving dynamic meshes in time and in space. This is done through periodic domain remeshing at a user-defined frequency. Fig. 3 shows a flowchart of the AMR algorithm which has been employed, and which is also described in further detail by the following algorithm:
At the beginning of the simulation, store a base coarse mesh
, and a fine mesh$\mathcal {M}_{b}$ to solve for initial conditions.$\mathcal {M}_{0}$ If it is the first iteration, project initial conditions onto
, solve once for$\mathcal {M}_{0}$ , and store a temporary copy$u_{0}$ . If not, assign the current solution$u_{r} \leftarrow u_{0}$ . In either case, set a temporary mesh$u_{r} \leftarrow u_{k}$ .$\mathcal {M}_{t} \leftarrow \mathcal {M}_{b}$ Construct a set of functions
(or combination of functions) from those stored in$\mathcal {F}$ , which are chosen by the user, to be evaluated against the refinement criteria.$u_{r}$ For all functions
, mark cells of$f \in \mathcal {F}$ for refinement if$\mathcal {M}_{t}$ , where$f \geq \kappa _{\ell} $ is a tolerance defined by a set of tolerances in the simulation settings,$\kappa _{\ell} $ .$\kappa _{\ell} \in \mathcal {K}$ (Optional) grow the region of refinement markers by marking all cells within a distance
from all marked cells in$\mathcal {R}$ .$\mathcal {M}_{t}$ Refine
based on these markers$\mathcal {M}_{t}$ times, then reassign$g_{\ell} $ .$\mathcal {M}_{t} \leftarrow \mathcal {M}_{t}$ For the number of total required refinement levels,
, increment$\ell $ and repeat from step 4.$\ell $ Return the fully refined mesh
.$\mathcal {M}_{t}$ If it is the first iteration, re-project initial conditions onto
and re-solve before continuing.$\mathcal {M}_{t}$ Project the current solution onto
and re-assemble the variational problem.$\mathcal {M}_{t}$
C. Time Integration
For time-stepping, StrAFE currently employs the \begin{equation*} \frac {\partial \mathbf {u}}{\partial t} \approx \frac {\mathbf {u}_{k+1}-\mathbf {u}_{k}}{\Delta t}=\theta f_{k+1}\left [{t, \mathbf {u}_{k+1}}\right]+(1-\theta)f_{k}\left [{t, \mathbf {u}_{k}}\right]. \tag{30}\end{equation*}
D. Subdomain Support
In practice, many engineering systems are composite in nature, such that interfaces between materials (e.g., between gas and solid dielectrics) may exist inside the domain of interest, and may not necessarily be positioned at the external boundaries. In such cases, equations (23), (17)–(19) must be applied for internal nodes of the computational mesh. StrAFE currently supports subdomains for modelling solid dielectric material with different relative permittivity values.
To create subdomains in StrAFE, the user must first ensure that the attached mesh has nodes that align with the internal boundaries, which can be achieved with ease using available mesh generation software, e.g., gmsh [51]. Boundary and subdomain markers should also be generated from external software, unless the boundary interface conforms to simple shapes which can be described analytically, in which case, they can be marked using native FEniCS tools [21]. A subdomain is defined by passing the cell marker function, the boundary marker function, and the value of permittivity, reflection, secondary emission, etc., to the
An arbitrary number of solid subdomains can be defined, which are internally stored as a list of markers. These are automatically regenerated on each new mesh if AMR is enabled. The markers instruct the assembler to split the meshed domain
E. Problem Generation and Plasma Chemistry Input
In Section IV-A, the
F. Solver and Other Miscellaneous Options
On default settings, StrAFE solves the linear system using the solvers provided by the PETSc [33] backend through FEniCS. Newton’s method is used for the outer iteration, whilst the generalized minimum residual method (GMRES), preconditioned using the Hypre [52] algebraic multigrid (AMG) method is used as the inner linear solver. However, the solver interface is fully exposed, and can be configured to meet the user’s requirements. Other options include biconjugate gradient methods, various relaxation methods, and popular direct solvers such as MUMPS [53]. For a full list of supported linear algebra solvers and settings, the reader is referred to [21].
The versatility which StrAFE has inherited from FEniCS further enables other options to be readily changed, for example, the use of higher-order spatial discretization, or different element types. Moreover, it is possible to override or modify the variational form, which is assembled only when
Simulation Examples
Since StrAFE relies upon FEniCS for system assembly and for its solver routines, it is unnecessary for this article to concern itself with the detailed benchmarking and validation of the numerical assembly and solver components. Instead, the objective is to demonstrate the accuracy and capabilities of the StrAFE interface, specifically for streamer and plasma modelling, which has been subsequently developed. At the time of writing, there exists no standardized ‘benchmark’ problems for nonthermal plasma simulations, though this may change as the interest in such numerical codes increase, with studies like [50]. Instead, the present Section demonstrates several examples of streamer discharge simulations, in multiple configurations which have been reported in past literature, and were conducted by multiple other research groups. For each case, the simulation domain, boundary conditions, and relevant model settings have been briefly provided before the results are presented. Where possible, direct comparisons to original studies have been made, though this was not always possible, as it was dependent on data availability. Unless otherwise specified, all simulations were performed using triangular linear Lagrange elements with StrAFE running inside a Docker container [54], on either 16-core (AMD Ryzen 9 5950X) or 18-core (Intel Xeon W-2295) workstation computers with 64GB memory. It is remarked that while all the necessary components for 3D simulations have been implemented, only 2D (or 2D-axisymmetric) simulations have thus far been conducted. This is primarily due to the need for code verification and comparison, for which there is a far greater number of documented 2D studies. Since full 3D simulations have only become possible recently [13], [14], it would be difficult to evaluate the accuracy of the implementation based on limited data. However, it would be of high interest to conduct 3D simulations in the future, especially to evaluate StrAFE under HPC settings.
A. Axisymmetric Positive Streamer
For the hydrodynamic approximation used in StrAFE, [50] provides the most recent and comprehensive comparison of different codes used by different groups for the simulation of streamer discharges. At the time of writing, it is essentially the only study which has been conducted purely for the purposes of verification and comparison. As such, evaluating results attained using StrAFE against the multiple available datasets from [50] was prioritized.
Focus was placed on the ‘case 3’ simulation of [50], to allow for the implementation of the Helmholtz photoionization model to also be evaluated. The domain consisted of a 2D square box with dimensions \begin{equation*} n_{+}(t=0)=N_{0} \exp \left [{-\frac {\left ({r-r_{0}}\right)^{2}+\left ({z-z_{0}}\right)^{2}}{s^{2}}}\right], \tag{31}\end{equation*}
The panels of Fig. 4 are split down the axis of symmetry, where the left and right color plots correspond to the electric field magnitude, and electron density, respectively. Three timesteps of the positive streamer evolution have been shown, at 3, 9, and 15 ns. The streamer length over time, and the maximum field strength over the length of the streamer, has been additionally compared in Fig. 5 to the data from five other groups who participated in [50]. Results from StrAFE compare well to all other codes, and is well within the expected margin of error considering the many potential differences in implementation [50]. The results from StrAFE were found to resemble most closely those from group DE, whose computation was performed using the commercially available COMSOL Multiphysics [19] software. With a run-time of around three to four hours for the present code, and considering imperfect parallel scaling (see Appendix B), StrAFE compares well with this widely-used commercial option.
Time evolution of an axisymmetric positive streamers’ electric field and electron density, at times
Comparison of (top) streamer length over time, where
B. Double-Headed Counterpropagating Streamers
Demonstrated in several studies, e.g., [55], [56], and [57], is the initiation of streamers from an initially charged seed, which evolves into one positive and one negative streamer propagating in opposite directions, away from the location of the source. The morphology of negative streamers is known to differ significantly from their positive counterparts, as the differences in their sources of electrons have been suggested to result in vastly different characteristics, such as the maximum electric field, streamer radius, and propagation velocity [55]. When both are simultaneously present in a single simulation domain, it can be challenging to find a single set of AMR criteria which is equally effective for both streamers, because in general, the refinement criteria and tolerances require to be adjusted on a case-by-case basis. In these simulations, StrAFE is used with a partitioned-AMR scheme such that two different refinement criteria are used for the top half (
The domain in this case was once again axisymmetric, forming a cylinder of dimensions
Electric field magnitude at
Electron density at
C. Counterpropagating Streamers Toward Each Other from Needle Electrodes Under Fast-Rising Ramp Voltage
In practical electrical systems, such as HV power and pulsed power equipment, electrical pre-breakdown and breakdown phenomena are seldom initiated in regions of homogeneous electric fields. In most cases, highly nonuniform and divergent field conditions, induced by high aspect ratio geometry, field redistribution at triple-junctions, or accumulated space-charge, typically form the most pressing problems in HV insulating system design.
Here, StrAFE’s handling of curved geometries in the form of sharp needle electrodes is demonstrated, alongside a time-varying Dirichlet condition representing a fast-rising applied voltage. The simulation in question was initially performed in [62], between two needle electrodes with a curvature radius of \begin{equation*} U_{0}(t) = \frac {dU}{dt}t, \tag{32}\end{equation*}
Electric field magnitude down the axis of symmetry for various timesteps, during the development of counterpropagating streamers, generated using StrAFE. This figure corresponds to Fig. 9(a) of [62]. Solid black markers indicate the position of the peaks from the simulations conducted in [62].
Overall, excellent agreement with the results from [62] was found, including the time of streamer inception, the delayed propagation of the negative streamer, the electron density distribution, and propagation velocities. Minor differences are observed in the maximum electric field strength at the negative streamer head and in the position where the streamers collide. As indicated by the difference between the black markers of Fig. 9 and the obtained data, the positive streamer field agrees closely with [62], but there exists a larger discrepancy for peak field values with the negative streamer. However, the difference is within expectation considering the many possible differences in numerical implementation. The discrepencies are believed to be attributed to the differences in the waveform, the numerical implementation, or possible differences in the boundary conditions applied at the electrodes, as these were not specified in [62].
D. Positive Streamer with Solid Dielectric
Equally prevalent in, and important to, practical HV systems, are the interactions between nonthermal plasma discharges and dielectric surfaces. Knowledge of these processes would be hugely beneficial to the development of novel plasma technologies, e.g., surface treatment technologies [2], or any other apparatus involving dielectric barrier discharges [7].
Using the described subdomain support in Section IV-D, simulations from [17] have been recreated, showing the electrostatic attraction of streamers toward solid dielectric surfaces, and their subsequent propagation across these surfaces. Briefly, the domain consisted of a square geometry with
Fig. 10 shows the time evolution of the streamer electron density at
Conclusion
In summary, the present article has introduced and described the StrAFE (Streamers on Adaptive Finite Elements) Python library, a powerful automation tool for the study of transient ionization fronts, using the hydrodynamic approximation. Based on the open-source FEniCS framework, this article has presented the design and development of the library, showing how FEniCS and Python can be used to develop an effective platform for the simulation of nonthermal gas discharge plasmas, with emphasis on configurability, ease-of-use, and a high degree of flexibility.
StrAFE was developed in Python, known for its accessibility, due to its English-like syntax. The implementation of a number of dedicated classes allows the substantial simplification of generating transient ionization-FE problems, while also streamlining the process of passing the problem to FEniCS for efficient solving, using its high-speed C++ backend. StrAFE employs the hydrodynamic approach of coupled drift-diffusion-reaction-Poisson equations for nonthermal plasmas, and further includes crucial features necessary for multiscale modelling. These include: user-configurable adaptive mesh refinement and adaptive timestep controllers, support for problem generation from a single plasma chemistry file; support for both local field approximations and local mean energy approximations, and support for subdomains, e.g., solid dielectric materials. Since StrAFE inherits from FEniCS, it additionally offers full support for distributed memory parallelism through the message passing interface (MPI), and the same desktop-developed prototype code can be executed in HPC settings with little to no change.
This article has importantly showed how it can be used to significantly simplify the process of simulating streamer discharges. Several simulation examples have been presented in various domains, and were of varying complexity, which demonstrated the capabilities of StrAFE through comparison with existing work. It was found that the use of FEniCS compares very well to a range of existing and well-established codes, both commercial and custom-made. Yet, its open-source nature offers far greater flexibility and code transparency, and can be used to develop user-friendly software with a very low entry barrier. Such innovations are exceptionally well-suited for interested parties who may be new, or unfamiliar, with the field of gas discharge modelling, and thus possesses immense educational value. From this study, it can be concluded that open-source frameworks such as FEniCS, have great potential to make significant contributions to the study of nonthermal plasmas, ionization fronts, and gas discharges; and can help to further increase the accessibility of computational modelling of complex phenomena in engineering and science.
In future, StrAFE will be used to explore nonthermal plasma dynamics in practical topologies of interest. The flexibility offered by the library further facilitates experimentation with different numerical schemes, the exploration of higher-order discretization, the possibility to use discontinuous Galerkin methods (DG-FEM), additional physics, and more. It is also of high interest to conduct three-dimensional simulations in the future, and to further evaluate StrAFE in HPC settings– 3D features have theoretically been implemented, but not yet thoroughly tested.
Appendix AExample of AMR and Load Balancing
Example of AMR and Load Balancing
Fig. 11(a) shows a visualization of the load-balanced mesh generated by FEniCS, around the initial seed of the example from Section V-A. Fig. 11(b) shows the corresponding mesh around the initial seed region. Mesh cells belonging to the same color group are owned by the same MPI process. Fig. 11(c) additionally shows the adaptive mesh overlaid on half of the domain at
(a) Load balanced mesh, each color demarcates nodes which are owned by a unique computational process, (b) adaptive mesh around an initially gaussianly-distributed charge seed, (c) example of the dynamic AMR scheme tracking a streamer head, overlaid on top of the electric field color map.
Appendix BParallel Scaling
Parallel Scaling
Fig. 12 shows the results of a basic parallel scaling test, up to 16 MPI processes, conducted by varying the number of processes the program ran with, when simulating example V-A. Note that only physical cores were used here, the use of virtual cores was disabled, since it did not appear to offer any additional computational speedup.
Data from a basic parallel scaling test. Red circles are measured data, dashed black line is a best fit curve, and the solid black line represents ideal scaling.