Loading [MathJax]/extensions/MathZoom.js
The Design of a Python Library for the Automatic Definition and Simulation of Transient Ionization Fronts | IEEE Journals & Magazine | IEEE Xplore

The Design of a Python Library for the Automatic Definition and Simulation of Transient Ionization Fronts


System architecture of the StrAFE (Streamers on Adaptive Finite Elements) Python library for the simulation of fast transient ionization fronts. Built atop the popular op...

Abstract:

In recent years, the interest in nonthermal plasma dynamics has grown significantly, within both industry and research. This has been driven by the development of several...Show More

Abstract:

In recent years, the interest in nonthermal plasma dynamics has grown significantly, within both industry and research. This has been driven by the development of several novel cold plasma technologies across a wide range of different fields, for example, for plasma medicine, chemical processing, pollution control, and surface treatment. The optimization of these technologies relies heavily upon the understanding of gas discharge plasmas: their generation, electrical characteristics, and interaction with their surroundings. Moreover, the manifestation of nonthermal plasmas in the form of streamers is of high relevance and critical importance to high voltage insulation technology, and has further significance to geophysical research concerning atmospheric discharges. The present work describes the development of the StrAFE (Streamers on Adaptive Finite Elements) package, a dedicated Python library built atop the popular open-source FEniCS finite element software, designed with the objective to simplify and to automate the solution of ionization front models. The library features support for mesh adaptivity, distributed memory parallelism, and an intuitive programming interface, while providing an exceptionally high level of user configurability. This article presents the software implementation, describes its features, and presents several code verification studies performed within simple and complex domains. It is concluded that the numerical results gained from this open-source framework are comparable to other well-established software in terms of accuracy. Therefore, it further demonstrates the great potential for open-source software to make significant contributions to technologies involving nonthermal plasmas, ionization fronts, and gas discharges.
System architecture of the StrAFE (Streamers on Adaptive Finite Elements) Python library for the simulation of fast transient ionization fronts. Built atop the popular op...
Published in: IEEE Access ( Volume: 11)
Page(s): 26577 - 26592
Date of Publication: 15 March 2023
Electronic ISSN: 2169-3536

Funding Agency:

Citations are not available for this document.

CCBY - IEEE is not the copyright holder of this material. Please follow the instructions via https://creativecommons.org/licenses/by/4.0/ to obtain full-text articles and stipulations in the API documentation.

Nomenclature

A. Finite Element Method
$u$

Arbitrary unknown function.

$u_{h}$

Approximation of the arbitrary function $u$ .

$U_{i}$

Coefficient to finite-element basis functions.

$\phi _{i}$

Finite-element basis function

$L$

Arbitrary differential operator.

$f$

Arbitrary known coefficient.

$v$

Finite-element test functions.

$\Omega $

Finite-element domain.

$\mathbf {A}$

Finite-element system matrix.

$\mathbf {U}$

Vector of unknown coefficients.

$\mathbf {b}$

Vector of known coefficients.

B. Ionization Front Model
$N$

Set of chemical species in a model.

$n_{i}$

Concentration of species $i$ .

$t$

Time.

$\vec {\Gamma }_{i}$

Total flux of species $i$ .

$S_{i}$

Total sources and sinks of species $i$ .

$q_{i}$

Electric charge of species $i$ .

$\mu _{i}$

Charge mobility of species $i$ .

$D_{i}$

Diffusion coefficient of species $i$ .

$\mu _{\varepsilon} $

Electron energy mobility.

$D_{\varepsilon} $

Electron energy diffusion coefficient.

$\varepsilon $

Dielectric permittivity.

$\varphi $

Scalar electric potential.

$E$

Electric field magnitude.

$\rho $

Net charge density.

$\bar {\alpha }$

Effective ionization coefficient.

$\alpha $

Ionization coefficient.

$\eta $

Attachment coefficient.

$h_{j}$

Sign for loss or gain source for $j$ -th reaction.

$k_{j}$

Reaction rate for the $j$ -th reaction.

$R$

Set of chemical reactions in a model.

$S_{ph}$

Photoelectron source term.

$S_{ion}$

Total ionizing reaction source term.

$p$

Gas pressure.

$p_{q}$

Collisional quenching pressure.

$p_{O_{2}}$

Partial pressure of oxygen.

$\nu _{u}$

Impact ionization frequency for level $u$ .

$\nu _{i}$

Ionization frequency.

$\xi $

Photoionization efficiency.

$A_{j}, ~\lambda _{j}$

Helmholtz fitting parameters

$n_{\varepsilon} $

Electron energy density.

$\bar {e}$

Elementary charge.

$\gamma $

Secondary emission (SE) coefficient.

$\hat {n}$

Unit normal.

$k_{b}$

Boltzmann constant.

$\bar {\varepsilon }_{\gamma} $

Mean energy of SE electrons.

$v_{th,i}$

Thermal velocity of species $i$ .

$r_{i}$

Reflection coefficient of species $i$ .

$m_{i}$

Mass of species $i$ .

$T_{i}$

Temperature of species $i$ .

$\sigma _{s}$

Surface charge density.

C. Weak Formulation
$\mathbf {u}$

Vector of unknown functions.

$\mathbf {v}$

Vector of test functions.

$u_{j}$

$j$ -th component of $\mathbf {u}$ .

$v_{j}$

$j$ -th component of $\mathbf {v}$ .

$d\Omega $

External boundary of $\Omega $ .

$\omega _{j}$

$j$ -th boundary segment of $d\Omega $ .

D. Computational Aspects
$\Delta t$

Time integration step size.

$\mathcal {M}_{b}$

The base computational mesh.

$\mathcal {M}_{0}$

The initial computational mesh.

$\mathcal {M}_{t}$

A temporary computational mesh.

$\mathcal {F}$

Set of refinement functions.

$\mathcal {R}$

Set of refinement growth radii.

$\mathcal {K}$

Set of refinement tolerances.

$\theta $

Theta time-integration scheme parameter.

E. Other
$x$ , $y$

Cartesian geometric dimensions.

$r$ , $z$

Cylindrical geometric dimensions.

$U_{0}$

Applied voltage.

$N_{0}$

Peak density of initial charge distribution.

$E_{max}$

Maximum electric field strength in the domain.

$\varepsilon _{r}$

Relative dielectric constant.

$s$

Deviation parameter for gaussian seed.

SECTION I.

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.

SECTION II.

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 $u$ denote the exact solution of an unknown function, and $u_{h}$ be its approximation. FEM is defined when $u_{h}$ is sought as a linear combination of basis functions, $\phi _{i}$ , such that:\begin{equation*} u \approx u_{h} = \sum _{i} U_{i} \phi _{i}, \tag{1}\end{equation*} View SourceRight-click on figure for MathML and additional features. where $U_{i}$ are coefficients to $\phi _{i}$ which approximate $u$ . Suppose that $u$ satisfies the differential equation:\begin{equation*} L(u) = f, \tag{2}\end{equation*} View SourceRight-click on figure for MathML and additional features. in a bounded domain $\Omega $ , where $L$ is a differential operator; then the weighted residual reads:\begin{equation*} r = \int _{\Omega} v L(u) - \int _{\Omega} fv, \tag{3}\end{equation*} View SourceRight-click on figure for MathML and additional features. for weight function (or test function) $v$ . In the standard Galerkin method, weight functions $v$ are chosen to belong to the same function space as the approximating basis functions $\phi _{i}$ , then the Galerkin FEM problem is solved by requiring that the weighted residual be driven to zero, i.e., \begin{equation*} r = \int _{\Omega} v L\left ({\sum _{i} U_{i} \phi _{i}}\right)-\int _{\Omega} fv = 0, \tag{4}\end{equation*} View SourceRight-click on figure for MathML and additional features. where the integration over $\Omega $ is over each finite element which spatially discretizes the domain. Application of (4) over each element results in the linear system:\begin{equation*} \mathbf {AU} = \mathbf {b} \tag{5}\end{equation*} View SourceRight-click on figure for MathML and additional features. where $\mathbf {A}$ is a matrix, $\mathbf {b}$ is a vector, and $\mathbf {U}$ is the vector of unknown coefficients to be obtained. The system (5) can then be solved using any preferred linear algebra solution method. In physical problems, the differential operator $L$ often has order two, which due to (4) imposes the condition that $\phi _{i}$ must be at least twice-differentiable (i.e., elements with a linear basis cannot be used, which are preferred for their lower computational cost). To lift this constraint, Green’s identity can be applied to the integral (4), which reduces second-order derivative terms to two derivatives of order one, yielding the weak or variational formulation of (4). This is illustrated further in Section III-G for the specific case of coupled drift-diffusion-reaction-Poisson equations.

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:

  1. 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.

  2. Unified Form Assembly Code (UFC) [28] – An interface for finite element assembly from provided variational forms.

  3. 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.

  4. Finite Element Automatic Tabulator (FIAT) [29] – Handles the generation of finite element basis functions and elements of arbitrary order.

The components listed above work alongside the system assembler (v) to form the system matrix, to then be passed to the solver. FEniCS can additionally be programmed using Python, which significantly lowers the entry barrier to performing efficient FEM simulations. Furthermore, there is native support for distributed memory parallelization through MPI (vi), with built-in mesh partitioning and load balancing, performed using the PT-SCOTCH [30] or ParMETIS [31] libraries (vii). FEniCS can also be compiled with a selection of popular open-source linear algebra backends (viii), which provides efficient computation, e.g., PETSc [32], [33], uBLAS [34], or Epetra [35]. Direct programming through Python also facilitates the automated processing of data outputs, since scripts for data analysis can be constructed using any available third-party Python library (ix), and can directly communicate with FEniCS. The platform has proved highly capable in numerous studies across a range of disciplines [36], [37], [38], and has shown to adapt well to HPC settings with over 24,000 processes [22], [39]. StrAFE is primarily an automation tool built on top of FEniCS through its Python interface, but additionally implements crucial features such as adaptive mesh refinement for efficient multiscale modelling.
FIGURE 1. - Block diagram depicting the architecture of FEniCS, adapted from [48].
FIGURE 1.

Block diagram depicting the architecture of FEniCS, adapted from [48].

SECTION III.

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, $N$ , of different charged species, interacting under the presence of an electric field. According to the hydrodynamic approximation, the spatial and temporal evolution of their concentrations can be modelled following a set of advection-diffusion-reaction equations, given by:\begin{equation*} \frac {\partial n_{i}}{\partial t} + \nabla \cdot \vec {\Gamma }_{i} = S_{i}, \tag{6}\end{equation*} View SourceRight-click on figure for MathML and additional features. for $i \in N$ , where the term $S_{i}$ describes the sources and sinks of species $i$ , and the flux $\vec {\Gamma }_{i}$ is given by the sum of advective and diffusive components, \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*} View SourceRight-click on figure for MathML and additional features. where $q_{i}$ , $n_{i}$ , $\mu _{i}$ , and $D_{i}$ are the electric charge, concentration, (positive) mobility, and diffusion coefficient of species $i$ , respectively. $\varphi $ is the potential, coupled to the charge concentrations through the Poisson equation, \begin{equation*} -\nabla \cdot \left ({\varepsilon \nabla \varphi }\right)=\rho =\sum _{j\in N}q_{j} n_{j}, \tag{8}\end{equation*} View SourceRight-click on figure for MathML and additional features. where $\varepsilon $ is the permittivity. The self-consistent solution of (6) and (8) with appropriate boundary conditions, initial conditions, and charge sources, forms the basic hydrodynamic description of plasmas. The types of initial and boundary conditions which are supported in StrAFE are described in the following sections, as are several additional functions, which have been developed to improve modelling fidelity. Sections III-A to III-G firstly focuses on the mathematical formulation, while details regarding the usage and syntactical implementation of the software can be found in Section IV.

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*} View SourceRight-click on figure for MathML and additional features. where $\bar \alpha $ is the effective ionisation coefficient, and the subscript $e$ refers to electrons. Alternatively, $\bar \alpha $ can be split into $\bar \alpha = \alpha - \eta $ , where $\alpha $ , $\eta $ are the ionization and attachment coefficients, respectively, and the set $N$ includes negative ions, with the source term:\begin{equation*} S_{-} = \eta n_{e} \mu _{e} |\nabla \varphi |. \tag{10}\end{equation*} View SourceRight-click on figure for MathML and additional features. For advanced models using individual reaction rate coefficients, and considers specific plasma chemistry, Section III-C applies.

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*} View SourceRight-click on figure for MathML and additional features. where $k_{j}$ is the reaction rate for reaction $j$ , $n$ is the total number of reactions which involve species $i$ , and $R$ is the set of reactants involved in reaction $j$ . Symbol $h_{j}$ is either +1 or −1 for sources and sinks, respectively. Examples which employ the plasma chemistry module of StrAFE have been demonstrated in Section V.

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*} View SourceRight-click on figure for MathML and additional features. The photoelectron source can be efficiently obtained by using the Helmholtz approximation as described by Bourdon et al. [44]:\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*} View SourceRight-click on figure for MathML and additional features. for $j=1$ , 2, 3. Symbols $p$ , $p_{q}$ , and $p_{O_{2}}$ are the total gas pressure, collisional quenching pressure of nitrogen (accounting for non-radiative de-excitation), and the partial pressure of oxygen, respectively. $\nu _{u}$ is the impact ionisation frequency for level $u$ , $\nu _{i}$ is the ionisation frequency, $\xi $ is the photoionization efficiency [44], and $S_{ion}$ is the summed source term over all contributing ionizing reactions. Lastly, $A_{j}$ and $\lambda _{j}$ are fitting parameters for the $j$ -th equation, and the values which are used throughout the examples within Section V follow those computed in [44].

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 $\vec {E}=-\nabla \varphi $ . The range of validity of the LFA has been shown to be limited, and may become inaccurate for high- or spatially-inhomogeneous field conditions [45], [46]. In StrAFE, the LFA is the default option, however, there also exist the option to use the local mean energy approximation (LMEA), which attempts to include (to some extent) non-local electron transport processes, thereby extending the range of validity to beyond that of the LFA. Under the LMEA, transport and rate coefficients are dependent on the local value of the electron energy, which is dynamically computed by appending an additional balance equation to the model, given by:\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*} View SourceRight-click on figure for MathML and additional features. where the electron density flux $\vec {\Gamma }_{\varepsilon} $ is \begin{equation*} \vec {\Gamma }_{\varepsilon} =n_{\varepsilon} \mu _{\varepsilon} \nabla \varphi - D_{\varepsilon} \nabla n_{\varepsilon}. \tag{15}\end{equation*} View SourceRight-click on figure for MathML and additional features. Here, $n_{\varepsilon} $ is the electron energy density, $\bar {e}$ is the elementary charge, $\vec {\Gamma }_{e}$ is the electron flux, and $\Delta E_{j}$ is the energy loss or gain during reaction $j$ . $\mu _{\varepsilon} $ and $D_{\varepsilon} $ are the energy mobility and energy diffusion coefficient, respectively; these can either be user defined, or optionally, be approximated from the electron transport parameters [40] as:\begin{equation*} \mu _{\varepsilon} = \frac {5}{3}\mu _{e}, D_{\varepsilon} = \frac {5}{3}D_{e}. \tag{16}\end{equation*} View SourceRight-click on figure for MathML and additional features.

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*} View SourceRight-click on figure for MathML and additional features. for electrons, \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*} View SourceRight-click on figure for MathML and additional features. for heavy species, and \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*} View SourceRight-click on figure for MathML and additional features. for the electron energy density. The parameter $r$ is the reflection coefficient of the species at the boundary, $\gamma $ is the secondary emission coefficient, and $\bar {\varepsilon }_{\gamma} $ is the mean energy of secondary electrons. $v_{th}$ is the thermal velocity of the species identified by the subscript, given by:\begin{equation*} v_{th,i}=\sqrt {\frac {8k_{b} T_{i}}{\pi m_{i}}}, \tag{20}\end{equation*} View SourceRight-click on figure for MathML and additional features. where $k_{B}$ is the Boltzmann constant, $T_{i}$ is the species temperature, and $m_{i}$ is the species mass. For the electron temperature, $T_{e}$ is calculated from the energy following:\begin{equation*} T_{e} = \frac {2n_{\varepsilon} }{3 k_{b} n_{e}}, \tag{21}\end{equation*} View SourceRight-click on figure for MathML and additional features. and for the electron energy velocity, equation (22) holds:\begin{equation*} v_{th, \varepsilon }= 2k_{b} T_{e} v_{th,e}. \tag{22}\end{equation*} View SourceRight-click on figure for MathML and additional features. Across interfacial boundaries with differing permittivity, a discontinuity in the electric displacement is induced by the accumulation of surface charge, $\sigma _{s}$ , from incoming fluxes (volume conduction is currently not considered). To incorporate this, internal subdomain boundaries require that:\begin{equation*} \varepsilon \nabla \varphi \cdot \hat {n} = \sigma _{s}, \tag{23}\end{equation*} View SourceRight-click on figure for MathML and additional features. where the surface charge is computed based on the sum of boundary-directed fluxes, following:\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*} View SourceRight-click on figure for MathML and additional features.

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, $\mathbf {u}$ is hereby defined as a vector function with components $\mathbf {u} = \left [{u_{0}, u_{1}, u_{2}, \ldots, u_{p}}\right]$ , with index starting at zero, each of which represents a scalar field in a domain $\Omega $ , and where $p$ varies depending on the problem type (i.e., the number of species considered, whether LFA or LMEA is used, etc.). The rules for the construction of this vector are as follows:

  • Index 0 is always the potential field, $\varphi $ .

  • Index 1 is always the electron density, $n_{e}$ .

  • Index 2 to $N$ stores the densities of all other species under consideration, e.g., ($n_{+}, n_{-}, \ldots $ ).

  • Index $N+1$ to $N+3$ stores the three components of the photoionization source term, $S_{ph, 1}$ , $S_{ph, 2}$ , and $S_{ph, 3}$ , if enabled.

  • Index $N+4$ stores the surface charge $\sigma _{s}$ , defined only on element facets, and only if there are subdomains.

  • The last index of the vector (in Python, index −1) stores the electron energy density, $n_{\varepsilon} $ , if LMEA is enabled.

In summary, the mapping of vector $\mathbf {u}$ can be expressed as:\begin{align*} \mathbf {u} = \begin{bmatrix} u_{0} \\ u_{1} \\ u_{2} \\ u_{3} \\ \vdots \\ u_{N} \\ u_{N+1} \\ u_{N+2} \\ u_{N+3} \\ u_{N+4} \\ u_{-1} \end{bmatrix} \equiv \begin{bmatrix} \varphi \\ n_{e} \\ n_{2} \\ n_{3} \\ \vdots \\ n_{N} \\ S_{ph, 1} \\ S_{ph, 2} \\ S_{ph, 3} \\ \sigma _{s} \\ n_{\varepsilon} \\ \end{bmatrix} \tag{25}\end{align*} View SourceRight-click on figure for MathML and additional features. Correspondingly, a vector of test functions, $\mathbf {v}=\left [{v_{0},v_{1},v_{2},\ldots,v_{p} }\right]$ , is stored for the construction of variational forms, with each function $v_{j}$ acting as the test function for the corresponding index in $\mathbf {u}$ .

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*} View SourceRight-click on figure for MathML and additional features. where $\partial \Omega $ denotes the external boundary of domain $\Omega $ , arising from Green’s identity. The last integral includes the term $\varepsilon \left ({\nabla u_{0} \cdot \hat {n}}\right)$ which may be chosen to enforce Neumann boundary conditions such as (23), or, if a Neumann-zero condition is present, this integral vanishes. Different Neumann conditions can also be prescribed to disjoint sections of $\partial \Omega $ , simply by splitting this integral into boundary segments such that:\begin{equation*} \bigcup _{j} \omega _{j} = \partial \Omega, \tag{27}\end{equation*} View SourceRight-click on figure for MathML and additional features. where $\omega $ is a boundary segment, and separate integrations are performed over each segment $j$ , respectively. For advection-diffusion-reaction equations (6), the weak form becomes:\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*} View SourceRight-click on figure for MathML and additional features. for $i \in N$ , and similarly for the energy balance equation (14), but with the right-hand-side replacing $S_{i}$ in (28). The Helmholtz weak form for photoionization (13) is obtained in the same way, yielding:\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*} View SourceRight-click on figure for MathML and additional features. for $i=N+1$ , $N+2$ , $N+3$ .

SECTION IV.

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.

FIGURE 2. - Block diagram of the architecture of the StrAFE library, and its connections to the core FEniCS library as shown in Fig. 1.
FIGURE 2.

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 as set_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 general DirichletCondition(), 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 general NeumannCondition(), which can be used for the prescription of arbitrary Neumann conditions, and is not limited to the charge fluxes.

A subsequent call to the .solve() method launches the system assembler, which automatically constructs the UFL forms of equations (26)–​(29), based on the provided settings. This is subsequently passed to the solver environment, and the time-stepping loop is invoked. In this way, simulation problems can be configured using minimal lines of highly-readable code. This facilitates the rapid development and refinement of computational models, and has strong support for integration with external, Python-developed code. This is particularly useful for performing batch parametric studies, or to conduct automatic post-processing tasks on the simulation outputs using other Python-based programs.

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 $h$ -type adaptivity, as opposed to $p$ -type adaptivity which locally adapts the order of the approximating basis functions). The criterion for refinement is typically based upon an error estimate, or alternatively, can simply be based upon some combination of cell or nodal values of the most recently computed solution.

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:

  1. At the beginning of the simulation, store a base coarse mesh $\mathcal {M}_{b}$ , and a fine mesh $\mathcal {M}_{0}$ to solve for initial conditions.

  2. If it is the first iteration, project initial conditions onto $\mathcal {M}_{0}$ , solve once for $u_{0}$ , and store a temporary copy $u_{r} \leftarrow u_{0}$ . If not, assign the current solution $u_{r} \leftarrow u_{k}$ . In either case, set a temporary mesh $\mathcal {M}_{t} \leftarrow \mathcal {M}_{b}$ .

  3. Construct a set of functions $\mathcal {F}$ (or combination of functions) from those stored in $u_{r}$ , which are chosen by the user, to be evaluated against the refinement criteria.

  4. For all functions $f \in \mathcal {F}$ , mark cells of $\mathcal {M}_{t}$ for refinement if $f \geq \kappa _{\ell} $ , where $\kappa _{\ell} $ is a tolerance defined by a set of tolerances in the simulation settings, $\kappa _{\ell} \in \mathcal {K}$ .

  5. (Optional) grow the region of refinement markers by marking all cells within a distance $\mathcal {R}$ from all marked cells in $\mathcal {M}_{t}$ .

  6. Refine $\mathcal {M}_{t}$ based on these markers $g_{\ell} $ times, then reassign $\mathcal {M}_{t} \leftarrow \mathcal {M}_{t}$ .

  7. For the number of total required refinement levels, $\ell $ , increment $\ell $ and repeat from step 4.

  8. Return the fully refined mesh $\mathcal {M}_{t}$ .

  9. If it is the first iteration, re-project initial conditions onto $\mathcal {M}_{t}$ and re-solve before continuing.

  10. Project the current solution onto $\mathcal {M}_{t}$ and re-assemble the variational problem.

The refinement functions $\mathcal {F}$ , tolerances $\mathcal {K}$ , refinement multipliers $g_{\ell} $ , refinement levels $\mathcal {\ell }$ , and radial growth distance $\mathcal {R}$ , can all be user-defined as Python functions and passed to the problem environment, using similar .set syntax as described in Section IV-A. The AMR routine also supports time as an input argument, which allows the refinement criteria to be adjusted automatically over the course of the simulation. Moreover, marker functions can be provided, which allows the refinement region to be limited to a user-specified sub-domain of the mesh. Additional routines which permit the static refinement of the base mesh $\mathcal {M}_{b}$ around a point, a line, or a user provided region have also been developed. These are particularly useful for simulations involving static features, like dielectric boundaries or particles, which may require a denser mesh near its interfacial region, to ensure good numerical convergence. AMR would then refine on top of the already refined base mesh. Using this scheme, granular control of the mesh is provided to the user, as there exists many different methods to refine the mesh precisely where required over the course of the simulation. It is remarked that the AMR algorithm operates in parallel with MPI, and has been designed to minimize inter-process communication where possible. An example of an adaptively refined mesh using this scheme is shown in Appendix A.
FIGURE 3. - Flowchart of the adaptive mesh refinement algorithm implemented in StrAFE.
FIGURE 3.

Flowchart of the adaptive mesh refinement algorithm implemented in StrAFE.

C. Time Integration

For time-stepping, StrAFE currently employs the $\theta $ -scheme, such that the time derivative of the function $\mathbf {u}$ as featured in (25)–​(29) is discretized as:\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*} View SourceRight-click on figure for MathML and additional features. Setting the parameter $\theta =0$ or $\theta =1$ results in the first-order explicit and implicit Euler schemes, respectively, while the default $\theta =1/2$ recovers the Crank-Nicolson scheme, giving second order accuracy in time. Currently, StrAFE also has some initial support for adaptive time stepping, which when enabled, returns an estimate of the local truncation error, from which the user may implement custom timestep controllers, to update $\Delta t$ for the next step based on their own specified tolerances. In future, the implementation of higher order schemes would be highly beneficial, to increase solution accuracy and numerical convergence.

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 .set_solid_subdomain() method. If this subdomain boundary function is used, conditions given by (17)–​(19) are automatically applied, and do not need to be manually provided by setting Neumann conditions. If not, the boundary defaults to a Neumann-zero condition.

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 $\Omega $ into two sets, $\Omega =\Omega _{s} \cup \Omega _{g}$ , for solid and gas, respectively, where the drift-diffusion equations (6) are solved in $\Omega _{g}$ only, while Poisson’s equation (8) is defined over the full domain $\Omega $ . It is remarked that, although StrAFE currently does not provide a convenient interface to define additional physics within subdomains, this could theoretically be done in future, by simply appending the corresponding variational forms before passing to the solver. This may be useful for studies involving simultaneous charge transport in solid media, or subdomains which contain liquid dielectrics and fluid flow.

E. Problem Generation and Plasma Chemistry Input

In Section IV-A, the ChargedSpecies() class was described, which is used to define and include a single charged species. However, in many nonthermal plasma applications, e.g., [7] and [15], knowledge of the plasma composition, and of the exact combination of charged species developed during a discharge, is of critical importance. Manual definition of each individual species using ChargedSpecies() would be tedious and error-prone. For this, StrAFE features automated generation of the species list from a plaintext file, containing a list of ionic species, neutral species, table of chemical reactions, rate coefficients, and energy loss coefficients. Using the TabulatedSpecies() class, this user provided file can be read, and the list of species is automatically generated and attached to the problem environment. Parameters can be provided within the text file as constants, plaintext functions, or a file path pointing toward tabulated data. The chemistry data is independent of the mesh data, therefore allowing studies in different gases to be achieved with ease, simply by switching to a different chemistry file.

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 .solve() is called. This allows the implementation of additional physics, stabilization schemes, or other, to suit the exact application.

SECTION V.

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 $(r,z)=$ [1.25, 1.25] cm, and was rotationally symmetric around $r=0$ . Dirichlet conditions of $U_{0}=18.75$ kV and 0 kV were prescribed at $z=1.25$ cm and $z = 0$ cm, respectively, and Neumann-zero conditions were present on all four sides for all charge fluxes and photoionization source terms. Only electrons and generic positive ions were considered, and transport parameters were supplied as empirically fitted expressions given in [50], using the local field approximation. Initial conditions consisted of a gaussian-distributed positive charge density placed at $(r_{0},z_{0})=$ (0, 1.0) cm following the expression:\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*} View SourceRight-click on figure for MathML and additional features. where $N_{0}= 5\times10\,\,^{\mathrm{ 18}}$ m $^{\mathrm{ -3}}$ and $s=0.4$ mm. A uniform background density for both electrons and positive ions was set to 10 9 m $^{\mathrm{ -3}}$ , and photoionization was enabled with the three-term exponential fitting parameters as provided in [50]. An adaptive timestep between 1 and 3 ps was used, with AMR enabled to perform remeshing every 30 iterations based on the value of the electric field normalized by the maximum field, and of the magnitude of the net space charge. The use of 30 iterations was determined from initial trial-and-error testing, and was found to provide a good balance between solution accuracy and total required computational time (frequent remeshing can be become detrimental to computational speed, but may not necessarily increase the solution accuracy). There currently exist no automated method to determine the optimal number of iterations between AMR, though this would be of interest to develop in the future.

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.

FIGURE 4. - Time evolution of an axisymmetric positive streamers’ electric field and electron density, at times 
$t=3$
, 9, and 15 ns, generated using StrAFE. Original study from [50]. Equipotential lines are spaced by 2 kV. This simulation completed in approximately 3–4 hours.
FIGURE 4.

Time evolution of an axisymmetric positive streamers’ electric field and electron density, at times $t=3$ , 9, and 15 ns, generated using StrAFE. Original study from [50]. Equipotential lines are spaced by 2 kV. This simulation completed in approximately 3–4 hours.

FIGURE 5. - Comparison of (top) streamer length over time, where 
$v=0.06$
 cm ns 
$^{\mathrm{ -1}}$
, (bottom) maximum field strength over streamer length with other group data from [50]. The identifying labels for each group correspond to the country or institution of the original authors: CWI = Centrum Wiskunde Informatica, FR = France, CN = China, ES = Spain, DE = Germany. Full details are provided in [50].
FIGURE 5.

Comparison of (top) streamer length over time, where $v=0.06$ cm ns $^{\mathrm{ -1}}$ , (bottom) maximum field strength over streamer length with other group data from [50]. The identifying labels for each group correspond to the country or institution of the original authors: CWI = Centrum Wiskunde Informatica, FR = France, CN = China, ES = Spain, DE = Germany. Full details are provided in [50].

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 ($z\geq7.5$ mm), and bottom half ($z< 7.5$ mm), of the domain, ensuring that sufficiently fine meshes are provided for both streamers. This demonstrates a useful feature which can significantly aid convergence for some simulations, where there exists some prior knowledge of how the discharge will evolve in space. To avoid over-refinement in the early stages of the simulation, the AMR scheme was also configured to be time-dependent. The usage of $E/E_{max}$ is effective as a refinement threshold, but not during the initial stages where $E/E_{max}\approx 1$ everywhere in the domain, due to the presence of a neutral seed. Therefore, this criterion is only introduced once $t \geq $ 4 ns.

The domain in this case was once again axisymmetric, forming a cylinder of dimensions $(r,z)=$ [4], [15] mm, with a constant voltage of 65 kV applied at $z=15$ mm, and 0 kV at $z=0$ mm. In this study, a simplified set of plasma chemical reactions for air was used, reaction rates following Pancheshnyi and Starikovskii [58], while electron transport parameters were obtained using BOLSIG+ [49] with Phelps’ cross-sectional data [59], [60], [61]. These can be found tabulated together in Appendix C. Equal densities of $N_{0}= 5\times10\,\,^{\mathrm{ 18}}$ m $^{\mathrm{ -3}}$ electrons and $N_{2}^{+}$ ions were placed at the center of the domain, again following the gaussian form of (31), but with $s=0.2$ mm. A background ionisation level of 10 9 m $^{\mathrm{ -3}}$ was again used, as was photoionization. Fig. 6 shows the electric field distribution at 2, 4, and 6 ns, while Fig. 7 shows the corresponding electron density. The double-headed streamer was successfully resolved, and the propagating characteristics of both positive and negative streamers are in agreement with past studies [55].

FIGURE 6. - Electric field magnitude at 
$t=2$
, 4, and 6 ns of a double-headed streamer developed in a homogeneous background electric field.
FIGURE 6.

Electric field magnitude at $t=2$ , 4, and 6 ns of a double-headed streamer developed in a homogeneous background electric field.

FIGURE 7. - Electron density at 
$t=2$
, 4, and 6 ns of a double-headed streamer developed in a homogeneous background electric field.
FIGURE 7.

Electron density at $t=2$ , 4, and 6 ns of a double-headed streamer developed in a homogeneous background electric field.

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 $25 \mu \text{m}$ , and with an interelectrode gap distance of 1.2 mm. Once again, the domain is axisymmetric around $r = 0$ . In the original study, a waveform generated using the CST studio suite [63] from their experimental configuration was also used for simulation, but was not made openly available. However, since the simulation was performed only over the initial stages of the discharge, and during the rising edge, an alternative waveform was used in this study, which closely approximates the rising-edge of the original signal, using a linearly increasing ramp voltage of the form:\begin{equation*} U_{0}(t) = \frac {dU}{dt}t, \tag{32}\end{equation*} View SourceRight-click on figure for MathML and additional features. where the rate of voltage rise $dU/dt$ was chosen to be 75 kV/ns, to roughly align with the slope of the original waveform from [62]. The plasma chemistry model of Appendix C and photoionization was once again used, with initial background densities of 10 9 m $^{\mathrm{ -3}}$ for electrons and $N_{2}^{+}$ ions. No initial seed was necessary in this simulation, as the streamers would initiate directly from the electrode tips, where the electric field was maximally enhanced. The LMEA was additionally used in this simulation, with energy-dependent electron transport data computed using BOLSIG+ [49] with Phelps’ cross-sectional data [59], [60], [61]. Results are presented in the same format as in [62] to facilitate direct comparison. These include Fig. 8(a) and 8(b), which show streak plots of the electric field magnitude and electron density along the axis of symmetry, respectively; and Fig. 9, which plots the electric field strength along the same axis, at timesteps between $t=160$ and 260 ps.

FIGURE 8. - Streak images of (a) electric field magnitude, (b) electron density, of counterpropagating streamers developed between needle-needle electrodes of 
$25 \mu \text{m}$
 radius, generated using StrAFE. This figure corresponds to Fig. 8(a) and 8(b) of [62].
FIGURE 8.

Streak images of (a) electric field magnitude, (b) electron density, of counterpropagating streamers developed between needle-needle electrodes of $25 \mu \text{m}$ radius, generated using StrAFE. This figure corresponds to Fig. 8(a) and 8(b) of [62].

FIGURE 9. - 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].
FIGURE 9.

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 $(x,y)=$ [40], [40] mm. A solid dielectric subdomain was defined where $0 \leq x \leq 10$ mm, and with relative permittivity $\varepsilon _{r}=2$ , while a neutral seed composed of electrons and positive ions initiated the discharge (plasma chemistry was not used in this simulation, following the original. Only electrons, generic positive ions, and generic negative ions were included). The seed followed the capsule definition as in [17], placed with its center 0.5 mm away from the solid surface, and near the anode that was set to 100 kV. Townsend coefficients were computed using BOLSIG+ [49] as before. The base mesh was refined along the gas-solid interface, while AMR was enabled to perform a remesh every 30 iterations - this value was once again determined from manual testing. No significant difference in the solution was observed when only 20 iterations per AMR was used, but signs of numerical nonconvergence near the fast-moving streamer head at 40 iterations per AMR were observed. 30 was therefore chosen to reduce computational time and to provide good convergence, yet have minimal effect on the computed solution.

Fig. 10 shows the time evolution of the streamer electron density at $t=10$ , 12.5, 15, and 20 ns. The streamer initiates from the charged seed due to the field enhancement at the bottom of the seed, as electrons drift upward. The streamer then begins to propagate before 10 ns, and is drawn toward the solid dielectric surface, before evolving into a surface streamer. Here, the streamer is observed to gain velocity, and accelerates down the surface, as in [17] and [18]. StrAFE was also shown capable of resolving the thin sheath region between the positive streamer and the surface, as described in [17]. The maximum electric field strength at the streamer head was found to be very similar to that of [17], as was the propagation velocity during the gas-stage and surface streamer stage. The electron density was similarly comparable, with the channel density stabilizing at around 10 21 m $^{\mathrm{ -3}}$ . Additional studies on the effects of increasing the solid permittivity were also conducted, results which recreated characteristics as observed in [17], such as the thinner surface streamer with increased $\varepsilon _{r}$ , and a far more rapid surface attachment speed.

FIGURE 10. - Positive streamer attaching to a solid dielectric surface (solid red line), and forming a surface streamer at timesteps 
$t=10$
, 12.5, 15, and 20 ns, generated using StrAFE. Equipotential lines are spaced by 5 kV. Originally studied in [17].
FIGURE 10.

Positive streamer attaching to a solid dielectric surface (solid red line), and forming a surface streamer at timesteps $t=10$ , 12.5, 15, and 20 ns, generated using StrAFE. Equipotential lines are spaced by 5 kV. Originally studied in [17].

SECTION VI.

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 A

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 $t=8$ ns, showing the fine mesh tracking the streamer head.

FIGURE 11. - (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.
FIGURE 11.

(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 B

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.

FIGURE 12. - 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.
FIGURE 12.

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.

Appendix C

Plasma Chemistry for Air

Table 1 encloses the plasma chemical reactions for air, which were included in several of the simulations presented in Section V.

TABLE 1 Plasma Chemical Reactions Used in Example Simulations for 80/20 Air. Notation $f(\bar{\varepsilon})$ Means That the Reaction Rate was a Function of the Local Electron Energy. Chemical Symbol $M$ Represents $O_{2}$ or $N_{2}$
Table 1- 
Plasma Chemical Reactions Used in Example Simulations for 80/20 Air. Notation 
$f(\bar{\varepsilon})$
 Means That the Reaction Rate was a Function of the Local Electron Energy. Chemical Symbol 
$M$
 Represents 
$O_{2}$
 or 
$N_{2}$

Cites in Papers - |

Cites in Papers - IEEE (1)

Select All
1.
Timothy Wong, Igor Timoshkin, Scott MacGregor, Mark Wilson, Martin Given, "Modelling of Transient Discharges Along a Sub-mm Air-Solid Dielectric Interface Under Fast-rising Ramp Voltages", 2023 IEEE Pulsed Power Conference (PPC), pp.1-5, 2023.

Cites in Papers - Other Publishers (3)

1.
Junwen He, Guanglin Yu, Ju Li, Nan Jiang, Jie Li, Yan Wu, "Numerical Simulation of 50\\xa0Hz/5\\xa0kHz Dual-Frequency Dielectric Barrier Discharge in Atmospheric-Pressure Air", Proceedings of the 5th International Symposium on Plasma and Energy Conversion, vol.398, pp.111, 2024.
2.
Junwen He, Bangfa Peng, Guanglin Yu, Ronggang Wang, Nan Jiang, Jie Li, Yan Wu, "Experimental and numerical study on atmospheric‐pressure air dielectric barrier discharge via 50\\xa0Hz/5000\\xa0Hz dual‐frequency excitation", High Voltage, 2024.
3.
Timothy Wong, Igor Timoshkin, Scott MacGregor, Mark Wilson, Martin Given, "A computational study on the effects of fast-rising voltage on ionization fronts initiated in sub-mm air and CO$$_{2}$$ gaps", Scientific Reports, vol.14, no.1, 2024.

References

References is not available for this document.