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 resolves 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. Note that \(K\left(\mathbf{x}\right) = K(\mathbf{x}; U)\) where \(U\) is the applied voltage.
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\geq 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)\).
The discharge inception model is implemented through the following files:
DischargeInceptionStepper, which implements TimeStepper.DischargeInceptionTagger, which implements CellTagger and flags cells for refinement and coarsening.DischargeInceptionSpecies, which implements CdrSpecies for the negative ion transport description.
Tip
The source code for the discharge inception model is given in $DISCHARGE_HOME/Physics/DischargeInception.
See DischargeInceptionStepper for the C++ API for this time stepper.
Townsend criterion
One may also solve for the Townsend inception criterion, which is formulated as follows:
The interpretation of this criterion is that each starting electron produces \(\exp\left[K\left(\mathbf{x}\right)\right]-1\) secondary 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:
A stationary mode, where one only calculations \(K\left(\mathbf{x}\right)\) for a range of voltages, see Stationary mode.
In transient mode, where \(K\left(\mathbf{x}\right)\) is computed dynamically according to a user-supplied voltage shape. This mode can also be used to evaluate the inception probability for a given voltage curve, see Transient mode.
Implementation
The discharge inception model is implemented in $DISCHARGE_HOME/Physics/DischargeInception as
/*!
@brief Class for streamer inception integral evaluations.
@details P is the tracer particle type
F is the field solver type.
C is the convection-diffusion-reaction solver type.
*/
template <typename P = TracerParticle<2, 3>, typename F = FieldSolverGMG, typename C = CdrCTU>
class DischargeInceptionStepper : public TimeStepper
The template template parameters indicate which types of solvers to used within the compound algorithm. The template parameters indicate the following:
typename Pis the tracer particle solver (see TracerParticleSolver) for reconstructing the inception integral.typename Fis the field solver (see FieldSolver) that is used when computing the electric field.typename Cis the convection diffusion reaction solver (see CdrSolver) to use when resolving negative ion transport.
Stationary mode
The stationary mode resolves Eq. 14 for a range of voltages, including both positive and negative polarities. This procedure occurs through the following steps:
Solve for the background field with an applied voltage \(U = 1\) on all live electrodes.
Obtain the critical field by obtaining the root \(\alpha_{\text{eff}}(E) = 0\). This step is performed using Brent’s method.
Scale the voltage to the lowest voltage that exceeds the critical field.
Solve for \(K(\mathbf{x})\) from the lowest voltage that exceeds the critical field until a user-specified threshold. These calculations are performed for both polarities.
On output, the user is provided with the following:
\(K\) values for positive and negative voltages, as well as the Townsend criterion.
Critical volumes and surfaces.
Inception voltage, both for streamer inception and Townsend inception, for both polarities.
The critical position, i.e., the position corresponding to \(K(\mathbf{x})\).
Transient mode
In transient mode the user can apply a voltage curve \(U = U(t)\) reconstruct the \(K\) value at each time step, and recompute the critical volume so that we obtain
The rationale for computing the above quantities is that one may describe the availability of negative ions within the critical volumes by augmenting the model with an ion transport description. Furthermore, if one also has a description of the electron detachment rate, one may then evaluate the probability that an electron detaches from a negative ion inside of the critical region.
Negative ion transport
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 density
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 \(\langle n_-\rangle\):
This equation is sensible only when \(\langle n_-\rangle\) is interpreted as an ion density distribution (over many identical experiments).
Inception probability
The probability of discharge inception in a time interval \([t,t+\text{d}t]\) is given by
where \(\lambda(t)\) is a placeholder for the electron generation rate within the critical volume. The exact solution for \(P(t)\) is
An expression for the electron generation rate can be 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.
Statistical time lag
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, 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:
Streamer inception threshold.
Townsend ionization and attachment coefficient.
Background ionization rate (e.g., from cosmic radiation).
Electron detachment rate from negative ions.
Negative ion mobility and diffusion coefficients.
Initial negative ion density.
Secondary emission coefficients.
Voltage curve (for transient simulations).
Space and surface charge if resolving a space-charge influenced field.
The input data to the discharge inception model is done by passing in C++-functions to the class.
These functions are mainly in the forms of an std::function, so the user can pass in function pointers or lambdas for configuring the behavior of the model.
The relevant user API for setting the above variables are listed below.
/*!
@brief Set the voltage curve (used for transient mode)
@param[in] a_voltageCurve Voltage curve
*/
virtual void
setVoltageCurve(const std::function<Real(const Real& a_time)>& a_voltageCurve) noexcept;
/*!
@brief Set space charge distribution
@param[in] a_rho Space charge distribution
*/
virtual void
setRho(const std::function<Real(const RealVect& x)>& a_rho) noexcept;
/*!
@brief Set surface charge distribution
@param[in] a_sigma Surface charge distribution
*/
virtual void
setSigma(const std::function<Real(const RealVect& x)>& a_sigma) noexcept;
/*!
@brief Set the negative ion density
@param[in] a_density Negative ion density
*/
virtual void
setIonDensity(const std::function<Real(const RealVect x)>& a_density) noexcept;
/*!
@brief Set the negative ion mobility (field-dependent)
@param[in] a_mobility Negative ion mobility
*/
virtual void
setIonMobility(const std::function<Real(const Real E)>& a_mobility) noexcept;
/*!
@brief Set the negative ion diffusion coefficient (field-dependent)
@param[in] a_diffCo Negative ion diffusion coefficient
*/
virtual void
setIonDiffusion(const std::function<Real(const Real E)>& a_diffCo) noexcept;
/*!
@brief Set the ionization coefficient.
@param[in] a_alpha Townsend ionization coefficient. E is the field in SI units.
*/
virtual void
setAlpha(const std::function<Real(const Real& E, const RealVect& x)>& a_alpha) noexcept;
/*!
@brief Set the attachment coefficient.
@param[in] a_eta Townsend attachment coefficient. E is the field in SI units.
*/
virtual void
setEta(const std::function<Real(const Real& E, const RealVect& x)>& a_eta) noexcept;
/*!
@brief Get ionization coefficient
*/
virtual const std::function<Real(const Real& E, const RealVect& x)>&
getAlpha() const noexcept;
/*!
@brief Get attachment coefficient
*/
virtual const std::function<Real(const Real& E, const RealVect& x)>&
getEta() const noexcept;
/*!
@brief Set the background ionization rate (e.g. from cosmic radiation etc).
@param[in] a_backgroundRate Background ionization rate (units of 1/m^3 s).
*/
virtual void
setBackgroundRate(const std::function<Real(const Real& E, const RealVect& x)>& a_backgroundRate) noexcept;
/*!
@brief Set the detachment rate for negative ions.
@details The total detachment rate is dn_e/dt = k*n_ion; this sets the constant k.
@param[in] a_detachmentRate Detachment rate (in units of 1/s).
*/
virtual void
setDetachmentRate(const std::function<Real(const Real& E, const RealVect& x)>& a_detachmentRate) noexcept;
/*!
@brief Set the field emission current
@param[in] a_fieldEmission Field emission current density.
*/
virtual void
setFieldEmission(const std::function<Real(const Real& E, const RealVect& x)>& a_currentDensity) noexcept;
/*!
@brief Set the secondary emission coefficient
@param[in] a_coeff Secondary emission coefficient.
*/
virtual void
setSecondaryEmission(const std::function<Real(const Real& E, const RealVect& x)>& a_coeff) noexcept;
Tip
It is relatively simple to use tabulated data input for setting the input (e.g., the transport coefficients). See LookupTable1D.
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 later scaled by the appropriate 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}\), 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 for that particle is stopped. Once all the particle integrations have halted, 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)\).
Note
When tracking positive ions for evaluation of the Townsend criterion, the same algorithms are used.
Euler
For the Euler rule the particle weight for a particle \(p\) the update rule is
where \(\Delta x\) is an integration length.
Trapezoidal
With the trapezoidal rule we first update
which is followed by
Step size selection
The permitted tracer particle step size is controlled by user-specified maximum and minimum space steps:
The particle integration step size is then selected according to the following heuristic:
These parameters are implemented through the following input options:
# Particle integration controls
DischargeInceptionStepper.min_phys_dx = 1.E-10 ## Minimum permitted physical step size
DischargeInceptionStepper.max_phys_dx = 1.E99 ## Maximum permitted physical step size
DischargeInceptionStepper.min_grid_dx = 0.5 ## Minimum permitted grid step size
DischargeInceptionStepper.max_grid_dx = 5.0 ## Maximum permitted grid step size
DischargeInceptionStepper.alpha_dx = 5.0 ## Step size relative to avalanche length
DischargeInceptionStepper.grad_alpha_dx = 0.1 ## Maximum step size relative to alpha/grad(alpha)
DischargeInceptionStepper.townsend_grid_dx = 2.0 ## Space step to use for Townsend tracking
Note that the input variable townsend_grid_dx determines the spatial step (relative to the grid resolution \(\Delta x\)) when tracking ions for the Townsend region reconstruction.
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
The inception voltage for starting a critical avalanche can be computed in the stationary solver mode (see Stationary mode). This is done separately for the streamer and Townsend inception voltages.
Streamer inception
For streamer inception we use \(K\left(\mathbf{x}; U\right)\) for a range of voltages \(U \in U_1, U_2, \ldots\) and (linearly) interpolate between these values. 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
Townsend inception
A similar method to the one used above is used for the Townsend criterion, using e.g. \(T\left(\mathbf{x}; U\right) = \gamma\left(\exp\left[K\left(\mathbf{x}; U\right)\right]-1\right)\), then if
then we can estimate the inception voltage for a starting electron at position \(\mathbf{x}\) through linear interpolation as
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. For any position \(\mathbf{x}\), then
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.
Inception probability
The inception probability is given by Eq. 15 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.
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. The user can control refinement buffers and criterion through the following input options (see Solver configuration).
DischargeInceptionTagger.bufferAdds a buffer region around tagged cells.DischargeInceptionTagger.max_voltageMaximum voltage that will be simulated.DischargeInceptionTagger.ref_alphaSets the refinement criterion \(\lambda\) as above.
Tip
When using transient mode, it may be useful to simply set the maximum voltage to the peak voltage of the voltage curve.
For stationary solves it might be difficult because the range of voltages is determined automatically during run-time.
It may be beneficial to run the program twice, first using max_voltage = 1, and then running the program again using the peak voltage from the output file.
Solver configuration
The DischargeInceptionStepper class come with user-configurable input options which are given below.
# ====================================================================================================
# DischargeInceptionStepper class options
# ====================================================================================================
DischargeInceptionStepper.verbosity = -1 ## Chattiness.
DischargeInceptionStepper.profile = false ## Turn on/off run-time profiling
DischargeInceptionStepper.full_integration = true ## Use full reconstruction of K-region or not
DischargeInceptionStepper.mode = stationary ## Mode (stationary or transient)
DischargeInceptionStepper.eval_townsend = true ## Evaluate Townsend criterion or not
DischargeInceptionStepper.inception_alg = trapz ## Integration algorithm. Either euler or trapz
DischargeInceptionStepper.output_file = report.txt ## Output file
DischargeInceptionStepper.K_inception = 12 ## User-specified inception value
DischargeInceptionStepper.plt_vars = K T Uinc field ## Plot variables
# Particle integration controls
DischargeInceptionStepper.min_phys_dx = 1.E-10 ## Minimum permitted physical step size
DischargeInceptionStepper.max_phys_dx = 1.E99 ## Maximum permitted physical step size
DischargeInceptionStepper.min_grid_dx = 0.5 ## Minimum permitted grid step size
DischargeInceptionStepper.max_grid_dx = 5.0 ## Maximum permitted grid step size
DischargeInceptionStepper.alpha_dx = 5.0 ## Step size relative to avalanche length
DischargeInceptionStepper.grad_alpha_dx = 0.1 ## Maximum step size relative to alpha/grad(alpha)
DischargeInceptionStepper.townsend_grid_dx = 2.0 ## Space step to use for Townsend tracking
# Static mode
DischargeInceptionStepper.rel_step_dU = 0.05 ## Relative (%) voltage increase for each step
DischargeInceptionStepper.step_dK = 1.0 ## Desired increase in K for each voltage step
DischargeInceptionStepper.limit_max_K = 15.0 ## Limit the maximum K-value
# Dynamic mode
DischargeInceptionStepper.ion_transport = true ## Turn on/off ion transport
DischargeInceptionStepper.transport_alg = heun ## Transport algorithm. 'euler', 'heun', or 'imex'
DischargeInceptionStepper.cfl = 0.8 ## CFL time step for dynamic mode
DischargeInceptionStepper.first_dt = 1.E-9 ## First time step to be used.
DischargeInceptionStepper.min_dt = 1.E-9 ## Minimum permitted time step
DischargeInceptionStepper.max_dt = 1.E99 ## Maximum permitted time step
DischargeInceptionStepper.voltage_eps = 0.02 ## Permitted relative change in V(t) when computing dt
DischargeInceptionStepper.max_dt_growth = 0.05 ## Maximum relative change in dt when computing dt
In the above options, the user can select the integration algorithms, the mode, and where to place the output file (which contains, e.g., the values of the ionization integral).
The user can also include the following data in the HDF5 output files, by setting the plt_vars configuration option:
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.
Important
The interface for setting the transport data (e.g., ionization coefficients) occurs via the C++ interface.
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.
A full description is available in the README.md file contained in the folder:
# Physics/DischargeInception
This physics module predicts discharge inception.
The user must supply transport coefficients, geometry, and electron sources.
## Setting up a new application
To set up a new problem, use the Python script. For example:
```shell
python setup.py -base_dir=/home/foo/MyApplications -app_name=MyDischargeInception -geometry=Vessel
```
To install within chombo-discharge:
```shell
python setup.py -base_dir=$DISCHARGE_HOME/MyApplications -app_name=MyDischargeInception -geometry=Vessel
```
The application will then be installed to $DISCHARGE_HOME/MyApplications/MyDischargeInception.
To see available setup options, use
python setup.py --help
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.