Discharge inception model
Overview
The discharge inception model computes the inception voltage and probability of discharge inception for arbitrary geometries and voltage forms.
For estimating the streamer inception, the module solves the electron avalanche integral
where \(E = |\mathbf{E}|\) and where \(\alpha_{\text{eff}}(E,\mathbf{x}) = \alpha(E,\mathbf{x}) - \eta(E,\mathbf{x})\) is the effective ionization coefficient. The integration runs along electric field lines.
The discharge inception model solves for \(K = K\left(\mathbf{x}\right)\) for all \(\mathbf{x}\), i.e., the inception integral is evaluated for all starting positions of the first electron. This differs from the conventional approach where the user will first extract electric field lines for post-processing.
In addition to the above, the user can specify a critical threshold value for \(K_c\) which is used for computing
The critical volume \(V_c = \int_{K>K_c} \textrm{d}V\).
The inception voltage \(U_c\).
The probability of having the first electron in the critical volume, \(dP(t,t+\Delta t)\).
Note that since the \(K\left(\mathbf{x}\right) = K(\mathbf{x}; U)\) where \(U\) is the applied voltage, these values are computed for a user-specified range of voltages. This “range of voltages” can be a series of discrete values, or a voltage curve (e.g., lightning impulse).
In addition to this, one may also track positive ions and solve for the Townsend inception criterion, which is formulated as
The interpretation of this criterion is that each starting electron grows into \(\exp\left[K\left(\mathbf{x}\right)\right]\) electron-ion pairs. The residual ions will drift towards cathode surfaces and generate secondary ionization with a user-supplied efficiency \(\gamma=\gamma\left(E,\mathbf{x}\right)\).
The discharge inception model can be run in two modes:
These are discussed below.
Implementation
The discharge inception model is implemented in $DISCHARGE_HOME/Physics/DischargeInception
as
template <typename P, typename F, typename C>
class DischargeInceptionStepper : public TimeStepper
The template complexity is due to flexibility in what solver implementations we use. The following solvers are used within the model:
The tracer particle solver (TracerParticleSolver) for reconstructing the inception integral.
The FieldSolver for computing the electric field.
The convection diffusion reaction module (CdrSolver) for modeling negative ion transport.
Stationary mode
The stationary mode solves the \(K\) integral for a range of input voltages. The computation is done for both polarities so that the user obtains:
\(K\) values for positive and negative voltages, as well as the Townsend criterion.
Critical volumes \(V_c\) for positive and negative voltages.
Inception voltage, using a combined Townsend-streamer criterion.
Transient mode
In the transient mode we apply a voltage curve \(U = U(t)\) reconstruct the \(K\) value at each time step and recompute the critical volume so that we obtain
We also assume that ions move as drifting Brownian walkers in the electric field (see Îto diffusion). This can be written in the fluctuating hydrodynamics limit as an evolution equation for the ion distribution (not density!) as
where \(\mathbf{Z}\) represents uncorrelated Gaussian white noise. Note that the above equation is a mere rewrite of the Ito process for a collection of particles; it is not really useful per se since it is a tautology for the original Ito process.
However, we are interested in the average ion distribution over many experiments, so by taking the ensemble average we obtain a regular advection-diffusion equation for the evolution of the negative ion distribution (note that we redefine \(\langle n_-\rangle\) to be the ensemble average).
This equation is sensible only when \(\langle n_-\rangle\) is interpreted as an ion density distribution (over many identical experiments).
The above quantities are then used for computing the probability of discharge inception in a time interval \([t,t+\text{d}t]\), which is
where \(\lambda(t)\) is a placeholder for the electron generation rate, given by
Inserting the expression for \(\lambda\) and integrating for \(P(t)\) yields
Here, \(\left\langle\frac{d n_{\text{e}}}{dt}\right\rangle\) is the electron production rate from both background ionization and electron detachment, i.e.
where \(S_{\text{bg}}\) is the background ionization rate set by the user, \(k_d\) is the negative ion detachment rate, and \(\left\langle n_-\right\rangle\) is the negative ion distribution. The second integral is due to electron emission from the cathode and into the critical volume. Note that, internally, we always ensure that \(j_{\text{e}} dA\) evaluates to zero on anode surfaces.
We also compute the probability of a first electron appearing in the time interval \([t, t+\Delta t]\), given by
When running in transient mode the user must set the voltage curve (see Voltage curve) and pay particular caution to setting the initial ion density, mobility, and detachment rates.
The statistical time lag, or average waiting time for the first electron, is available from the computed data, and is given by integrating \(t \text{d}P\), which yields
Other derived values (such as the standard deviation of the waiting time) is also available, and can be calculated from the \(P(t)\) and \(\lambda(t)\) similar to the procedure above. Numerically, this is calculated using the trapezoidal rule.
Input data
The input to the discharge inception model are:
Space and surface charge.
Streamer inception threshold.
Townsend ionization coefficient.
Townsend attachment coefficients.
Background ionization rate (e.g., from cosmic radiation).
Electron detachment rate (from negative ions).
Negative ion mobility.
Negative ion diffusion coefficient.
Initial negative ion density.
Secondary emission coefficients.
Voltage curve (for transient simulations).
The input data to the discharge inception model is mostly done by passing in C++-functions to the class. These functions are mainly in the forms
std::function<Real(const Real& E)>
std::function<Real(const Real& E, const RealVect& x)>
The user can specify analytic fields or use tabulated data, and pass these in through a C++ lambda function. An example of defining an analytic input function is
auto alphaCoeff = [](const Real& E, const RealVect& x) -> void {
return 1/E.
};
Tabulated data (see Chap:LookupTable1D) can also be used as follows,
LookupTable1D<2> tableData;
auto alphaCoeff = [tableData](const Real& E, const RealVect& x) -> void {
return tableData.getEntry<1>(E);
};
Note
The \(K\) integral is determined only by the Townsend ionization and attachment coefficients. The Townsend criterion is then a derived value of \(K\) and the secondary electron emission coefficient \(\gamma\) . The remaining transport data is used for calculating the inception probability (appearance of a first electron in the critical volume).
Free charges
By default, DischargeInceptionStepper
assume that the simulation region is charge-free, i.e. \(\rho = \sigma= 0\).
Nonetheless, the class has member functions for specifying these, which are given by
// Set the space charge
void setRho(const std::function<Real(const RealVect&x)>& a_rho) noexcept;
// Set the surface charge
void setSigma(const std::function<Real(const RealVect&x)>& a_sigma) noexcept;
Warning
This feature is currently a work-in-progress and relies on the superposition of a homogeneous solution \(\Phi_1\) (one without charges) and an inhomogeneous solution \(\Phi_2\) (one with charges), i.e. \(\Phi = U\Phi_1 + \Phi_2\) where \(U\) is the applied potential.
As this feature has not (yet) been sufficiently hardened, it is recommend to run with debugging enabled.
This can be done by adding DischargeInceptionStepper.debug=true
to the input script of command line, which should catch cases where the superposition is not properly taken care of (typically due to conflicting BCs).
Inception threshold
Use in class input value DischargeInceptionStepper.K_inception
for setting the inception threshold.
For example:
DischargeInceptionStepper.K_inception = 12.0
Townsend ionization coefficient
To set the Townsend ionization coefficient, use the member function
DischargeInceptionStepper::setAlpha(const std::function<Real(const RealVect& E, const RealVect& x)>& a_alpha) noexcept;
Townsend attachment coefficient
To set the Townsend attachment coefficient, use the member function
DischargeInceptionStepper::setEta(const std::function<Real(const Real& E, const RealVect& x)>& a_eta) noexcept;
Negative ion mobility
To set the negative ion mobility, use the member function
DischargeInceptionStepper::setIonMobility(const std::function<Real(const Real& E)>& a_mobility) noexcept;
Negative ion diffusion coefficient
To set the negative ion diffusion coefficient, use the member function
DischargeInceptionStepper::setIonDiffusion(const std::function<Real(const Real& E)>& a_diffCo) noexcept;
Negative ion density
To set the negative ion density, use the member function
DischargeInceptionStepper::setIonDensity(const std::function<Real(const RealVect x)>& a_density) noexcept;
Secondary emission
To set the secondary emission efficiency at cathodes, use the member function
DischargeInceptionStepper::setSecondaryEmission(const std::function<Real(const Real& E, const RealVect& x)>& a_coeff) noexcept;
This efficiency is position-dependent so that the user can set different efficiencies for different materials (or different positions in a single material).
Background ionization rate
The background ionization rate describes the appearance of a first electron from a background contribution, e.g. through cosmic radiation, decay of radioactive isotopes, etc.
To set the background ionization rate, use the member function
DischargeInceptionStepper::setBackgroundRate(const std::function<Real(const Real& E, const RealVect& x)>& a_backgroundRate) noexcept;
Detachment rate
The detachment rate from negative describes the apperance of electrons through the equation
where \(\left\langle n_-\right\rangle\) is the negative ion density in units of \(m^{-3}\) (or strictly speaking the negative ion probability density). This is used when calculating the inception probability, and the user sets the detachment rate \(k_d\) through
DischargeInceptionStepper::setDetachmentRate(const std::function<Real(const Real& E, const RealVect& x)>& a_backgroundRate) noexcept;
Field emission
To set the field emission current, use the function
DischargeInceptionStepper::setFieldEmission(const std::function<Real(const Real& E, const RealVect& x)>& a_currentDensity) noexcept;
This will set a field-dependent emission rate from cathodes given by the input function. Note that, under the hood, the function indicates a general cathode emission current which can be the sum of several contributions (field emission, photoelectric effect etc.).
Important
The input function should provide the surface current density \(j_e\) (in units of \(\text{C}\cdot\text{m}^{-2}\cdot \text{s}^{-1}\)).
Input voltages
By default, the model will always read voltage levels from the input script. These are in the format
DischargeInceptionStepper.voltage_lo = 1.0 # Low voltage multiplier
DischargeInceptionStepper.voltage_hi = 10.0 # Highest voltage multiplier
DischargeInceptionStepper.voltage_steps = 3 # Number of voltage steps
Voltage curve
To set the voltage curve, use the member function
DischargeInceptionSteppersetVoltageCurve(const std::function<Real(const Real& time)>& a_voltageCurve) noexcept;
This is relevant only when running a transient simulation.
Algorithms
The discharge inception model uses a combination of electrostatic field solves, Particle-In-Cell, and fluid advection for resolving the necessary dynamics. The various algorithms involved are discussed below.
Field solve
Since the background field scales linearly with applied voltage, we require only a single field solve at the beginning of the simulation. This field solve is done with an applied voltage of \(U = 1\,\text{V}\) and the electric field is then simply later scaled by the actual voltage.
Inception integral
We use a Particle-In-Cell method for computing the inception integral \(K\left(\mathbf{x}\right)\) for an arbitrary electron starting position. All grid cells where \(\alpha_{\textrm{eff}} > 0\) are seeded with one particle on the cell centroid and the particles are then tracked through the grid. The particles move a user-specified distance along field lines \(\mathbf{E}\) and the particle weights are updated using first or second order integration. If a particle leaves through a boundary (EB or domain boundary), or enters a region \(\alpha_{\text{eff}} \leq 0\), the integration is stopped. Once the particle integration halts, we rewind the particles back to their starting position and deposit their weight on the mesh, which provides us with \(K = K\left(\mathbf{x}\right)\).
Euler
For the Euler rule the particle weight for a particle \(p\) the update rule is
where \(\Delta x\) is a user-specified integration length.
Trapezoidal
With the trapezoidal rule the update is first
followed by
Note
When tracking positive ions for evaluation of the Townsend criterion, the same algorithms are used. The exception is that the positive ions are simply tracked along field lines until they strike a cathode, so that there is no integration with respect to \(\alpha_{\text{eff}}\).
Critical volume
The critical volume is computed as
Note that the critical volume is both voltage and polarity dependent.
Critical surface
The critical surface is computed as
Note that the critical surface is both voltage and polarity dependent, and is non-zero only on cathode surfaces.
Inception voltage
Arbitrary starting electron
The inception voltage for starting a critical avalanche can be computed in the stationary solver mode. In this case we compute \(K\left(\mathbf{x}; U\right)\) for a range of voltages \(U \in U_1, U_2, \ldots\).
If two values of the \(K\) integral bracket \(K_c\), i.e.
then we can estimate the inception voltage for a starting electron at position \(\mathbf{x}\) through linear interpolation as
A similar method is used for the Townsend criterion, using e.g. \(T\left(\mathbf{x}; U\right) = \gamma\exp\left[K\left(\mathbf{x}; U\right)\right]\), then if
then we can estimate the inception voltage for a starting electron at position \(\mathbf{x}\) through linear interpolation as
The inception voltage for position \(\mathbf{x}\) is then
Minimum inception voltage
The minium inception voltage is the minimum voltage required for starting a critical avalanche (or Townsend process) for an arbitrary starting electron. From the above, this is simply
From the above we also determine
which is the position of the first electron that enables a critical avalanche at the minimum inception voltage.
Note
The minimum inception voltage is the minimum voltage required for starting a critical avalanche. However, as \(U \rightarrow U_{\text{inc}}^{\text{min}}\) we also have \(V_c \rightarrow 0\), requires the a starting electron precisely in \(\mathbf{x}_{\text{inc}}^{\text{min}}\).
Inception probability
The inception probability is given by Eq. 9 and is computed using straightforward numerical quadrature:
and similarly for the surface integral.
Important
The integration runs over valid cells, i.e. grid cells that are not covered by a finer grid.
Advection algorithm
The advection algorithm for the negative ion distribution follows the time stepping algorithms described in the advection-diffusion model, see Advection-diffusion model.
Simulation control
Here, we discuss simulation controls that are available for the discharge inception model.
These all appear in the form DischargeInceptionStepper.<option>
.
verbosity
The verbosity
input option controls the model chattiness (to the pout.*
files).
Usually we have
DischargeInceptionStepper.verbosity = -1
mode
The mode flag switches between stationary and transient solves.
Accepted values are stationary
and transient
, e.g.,
DischargeInceptionStepper.mode = stationary
Important
When running in stationary mode, set Driver.max_steps=0
.
inception_alg
Controls the discharge inception algorithm (for computing the \(K\) integral). This should be specified in the form
DischargeInceptionStepper.inception_alg = <algorithm> <mode> <value>
These indicate the following:
<algorithm>
indicates the integration algorithm. Currently supported istrapz
(trapezoidal rule) andeuler
.mode
indicates the integration step size selection. This can be the following:fixed
for a spatially fixed step size.dx
for step sizes relative to the grid resolution \(\Delta x\).alpha
For setting the step size relative to the avalanche length \(1/\alpha\), and mode is eitherfixed
ordx
.
Normally,
alpha
will yield the best integration results since the step size is adaptively selected, taking large steps where \(\alpha\) is small and smaller steps where \(\alpha\) is large.value
indicates a step size, and has a different interpretation for the various modes. * If usingfixed
integration,value
indicates the physical length of the step size. * If usingdx
integration,value
indicates the step size relative to the grid cell resolution. * If usingalpha
integration,value
indicates the step size relative to the avalanche length \(1/\alpha\).
For example, the following will set an Euler integration with an adaptive step size:
DischargeInceptionStepper.inception_alg = euler alpha 0.5
full_integration
Normally, it will not necessary to integrate the particles beyond \(w > K_c\) since this already implies inception.
The flag full_integration
can be used to turn on/off integration beyond \(K_c\).
If the flag is set to false, the particle integration routine will terminate once a particle weight reaches \(K_c\).
If the flag is set to true, the particle integration routine will proceed until the particles leave the domain or ionization volumes.
Tip
Setting full_integration
to false can lead to large computational savings when the ionization volumes are large.
output_file
Controls the overall report file for stationary and transient solves. The user specifies a filename for a file which will be created (in the same directory as the application is running), containing a summary of the most important simulation output variables.
Warning
Running a new simulation will overwrite the specified output_file
.
For example:
DischargeInceptionStepper.output_file = report.txt
K_inception
Controls the critical value of the \(K\) integral. E.g.,
DischargeInceptionStepper.K_inception = 12
eval_townsend
Controls whether or not the Townsend criterion is also evaluated.
E.g.,
DischargeInceptionStepper.eval_townsend = true
Will turn on the Townsend criterion.
plt_vars
Controls plot variables that will be written to HDF5 outputs in the plt
folder.
Valid options are
field
- Potential, field, and charge distributions.K
- Inception integral.T
- Townsend criterion.Uinc
- Inception voltage.alpha
- Effective ionization coefficient.eta
- Eta coefficient.bg_rate
- Background ionization rate.emission
- Field emission.poisson
- Poisson solver.tracer
- Tracer particle solver.cdr
- CDR solver.ions
- Ion solver.
For example:
DischargeInceptionStepper.plt_vars = K Uinc bg_rate emission ions
For stationary mode
For the stationary mode the following input flags are required:
voltage_lo
Lowest simulated voltage.voltage_hi
High simulated voltage.voltage_steps
Extra voltage steps betweenvoltage_lo
andvoltage_hi
.
These voltages levels are used when running a stationary solve. For example:
DischargeInceptionStepper.voltage_lo = 10E3
DischargeInceptionStepper.voltage_hi = 30E3
DischargeInceptionStepper.voltage_steps = 5
For transient mode
For the transient mode the following input options must be set:
ion_transport
For turning on/off ion transport.transport_alg
For controlling the transport algorithm. Valid options areeuler
,heun
, orimex
(for semi-implicit with corner transport upwind).cfl
Which controls the ion advection time step.min_dt
For setting the minimum time step used.max_dt
For setting the maximum time step used.
For example,
DischargeInceptionStepper.ion_transport = true
DischargeInceptionStepper.transport_alg = imex
DischargeInceptionStepper.cfl = 0.8
DischargeInceptionStepper.min_dt = 0.0
DischargeInceptionStepper.max_dt = 1E99
Warning
The ctu
option exists because the default advection solver for the discharge inception model is the corner transport upwind solver (see CdrCTU).
Ensure that CdrCTU.use_ctu = true
if using DischargeInceptionStepper.transport_alg = ctu
algorithm and set CdrCTU.use_ctu = false
otherwise.
Caveats
The model is intended to be used with a nearest-grid-point deposition scheme (which is also volume-weighted). When running the model, ensure that the TracerParticleSolver flag is set as follows:
TracerParticleSolver.deposition = ngp
Adaptive mesh refinement
The discharge inception model runs its own mesh refinement routine, which refines the mesh if
where \(\lambda\) is a user-specified refinement criterion.
This is implemented in a class
class DischargeInceptionTagger : public CellTagger
and is automatically included in simulations when setting up the application through the Python setup tools (see Setting up a new problem). The user can control refinement buffers and criterion through the following input options:
DischargeInceptionTagger.buffer
Adds a buffer region around tagged cells.DischargeInceptionTagger.max_voltage
Maximum voltage that will be simulated.DischargeInceptionTagger.ref_alpha
Sets the refinement criterion \(\lambda\) as above.
For example:
DischargeInceptionTagger.buffer = 4
DischargeInceptionTagger.max_voltage = 30E3
DischargeInceptionTagger.ref_alpha = 2.0
Setting up a new problem
To set up a new problem, using the Python setup tools in $DISCHARGE_HOME/Physics/DischargeInception
is the simplest way.
To see available setup options, run
python3 setup.py --help
For example, to set up a new problem in $DISCHARGE_HOME/MyApplications/MyDischargeInception
for a cylinder geometry, run
python3 setup.py -base_dir=MyApplications -app_name=MyDischargeInception -geometry=Cylinder
This will set up a new problem in a cylinder geometry (defined in Geometries/Cylinder
).
The main file is named program.cpp`
and contains default implementations for the required input data (see Input data).
Example programs
Example programs that use the discharge inception model are given in
High-voltage vessel
$DISCHARGE_HOME/Exec/Examples/DischargeInception/Vessel
. This program is set up in 2D (stationary) and 3D (transient) for discharge inception in atmospheric air. The input data is computed using BOLSIG+.
Electrode with surface roughness
$DISCHARGE_HOME/Exec/Examples/DischargeInception/ElectrodeRoughness
. This program is set up in 2D (stationary) and 3D (transient) for discharge inception on an irregular electrode surface. We use SF6 transport data as input data, computed using BOLSIG+.
Electrode with surface roughness
$DISCHARGE_HOME/Exec/Examples/DischargeInception/ElectrodeRoughness
. This program is set up in 2D and 3D (stationary) mode, and includes the influence of the Townsend criterion.