Cerman: Software for simulating streamer propagation in dielectric liquids based on the Townsend-Meek criterion
CCerman: Software for simulating streamer propagationin dielectric liquids based onthe Townsend–Meek criterion
I. Madshaven a , O. L. Hestad b , P.-O. Åstrand a, ∗ a Department of Chemistry, NTNU –Norwegian University of Science and Technology, 7491 Trondheim, Norway b SINTEF Energy Research, 7465 Trondheim, Norway
Abstract
We present a software to simulate the propagation of positive streamers indielectric liquids. Such liquids are commonly used for electric insulation ofhigh-power equipment. We simulate electrical breakdown in a needle–planegeometry, where the needle and the extremities of the streamer are modeled byhyperboloids, which are used to calculate the electric field in the liquid. If thefield is sufficiently high, electrons released from anions in the liquid can turninto electron avalanches, and the streamer propagates if an avalanche meetsthe Townsend–Meek criterion. The software is written entirely in Python andreleased under an MIT license. We also present a set of model simulationsdemonstrating the capability and versatility of the software.
Keywords:
Streamer breakdownDielectric liquidSimulation modelPythonComputational physics
1. Introduction
Dielectric liquids, specifically transformer oils, are used as electric insulationin high-power equipment such as power transformers [1]. Equipment failure isalways a possibility, and in a world with ever-growing need for energy, thereis a continuous effort to make equipment better, cheaper, more compact, andmore environmentally friendly. To prevent equipment failure due to electrical ∗ Corresponding author: [email protected]
Preprint a r X i v : . [ phy s i c s . c o m p - ph ] J u l erman I. Madshaven et al. discharges, new insulating liquids as well as additives are tested, experimentsare carried out to better understand the physical nature of the phenomena, andsimulations are performed to test the validity of predictive models [2, 3].Since electrical discharge events are rare at operating conditions, modelexperiments are designed to induce discharge in the liquid. In one such modelexperiment, a needle electrode is placed opposing a planar electrode, where theneedle–plane gap is insulated by a liquid [2]. If high voltage is applied, resultingin a sufficiently strong electric field close to the needle, the liquid will lose itsinsulating properties and begin to conduct electricity, and subsequent (partial)discharges from the needle into the liquid can occur. The charge transportedinto the liquid can increase the electric field and lead to partial dischargesin new regions in a self-induced manner. Shadowgraphic images (an imagingtechnique exploiting differences in permittivity) reveal that a gaseous channel, a“streamer”, is formed and how it branches as it propagates through the liquid [4].If a streamer bridges the gap between two electrodes, an electric discharge canfollow, possibly destroying the affected equipment.Streamers are commonly classified by their polarity and speed of propagationfrom the slow 1st mode to the fast 4th mode, ranging from below 0.1 km/s towell above 100 km/s [2]. Streamers with negative polarity typically have a lowerinception voltage than streamers with positive polarity (positive streamers),however, positive streamers typically lead to breakdowns at lower voltage thannegative streamers, and as such, research is mainly concerned with positivestreamers. The streamer phenomenon involves processes covering several lengthand time scales. Speed and branching is studied in gaps of different sizes (mm–m), while many of the interesting processes, such as field ionization, high-fieldconduction, electro-hydrodynamic movement, bubble nucleation, cavitation, elec-tron avalanches, photoionization, occur on a µm-scale [2, 3]. A streamer usuallystops or leads to a breakdown on a µs-scale (km / s = mm / µs), whereas processessuch as recombination of electrons and anions can occur within picoseconds.Consequently, experimentation as well as simulation is challenging. While sophisticated equipment is required for experiments, simulations ofteninvestigate the effect of given processes through relatively simple models. Thefractal nature of the streamer structure can be simulated by considering a latticewhere each point is either part of an electrode, the liquid, or the streamer [5].Here, the streamer expands to new lattice points when some criterion, such aselectric field strength, is obtained. Through kinetic Monte Carlo methods, thestochastic nature and the physical time can also be studied in such simulations [6].By considering the streamer as an electrical network of resistors and capacitors,the charge and conduction can be studied, without necessarily confining thepoints of the network to a grid [7]. Models where the streamer consists of a set ofdiscrete points are simplistic but also efficient. Conversely, with a higher demandfor computational power, computational fluid dynamic (CFD) methods can beapplied to solve the equations for generation and transport of charged particles(the flow of natural particles is often ignored) during a streamer discharge [8, 9],2 erman
I. Madshaven et al.
Needle V V Head V V Plane StreamerROI
AvalanchesElectronsAnions
Figure 1: Illustration of the main components in the simulation model. The needle electrodeand the streamer heads are hyperboloids, each with a potential V i . A region of interest (ROI)is used to limit the computational effort to a region surrounding the active part of streamer.The ROI controls the position of the “seeds”, which are classified as anions, electrons, oravalanches, depending on the electric field strength at their position. The “shadowgraphic”image of the streamer is created by plotting all former positions of streamer heads. while the stochasticity and branching of streamers can be introduced by addingimpurities [10]. Such CFD-calculations often ignore the phase change from liquidto gas as well and are confined to a small region because of the computationalcomplexity. However, for simplified, single-channel streamers, both the phasechange and the processes in the channel can be simulated [11, 12]. Code usedfor simulation of streamers in liquids is rarely published, in fact, we found just asingle example [13]. We have previously described our streamer model for positive streamerswhere the propagation is based on an electron avalanche mechanism [14]. Themodel has been extended to account for conductance in the streamer channeland capacitance between the streamer and the planar electrode [15], as well asphotoionization in front of the streamer [16], the latter as a mechanism for thetransition from slow to fast propagation.3 erman
I. Madshaven et al.
Streamer propagation is simulated in a setup resembling model experiments,a needle–plane gap filled with a model liquid, see figure 1 for details. The needleand streamer give rise to an electric field, affecting charged particles in the liquid.A number of anions, “seeds” for electron avalanches, is modeled within a volumesurrounding the streamer, a “region of interest” (ROI). Electrons released fromthe anions can create electron avalanches, and the streamer propagates whenan avalanche meets the Townsend–Meek criterion, i.e. exceeds a critical numberof electrons [14]. The needle and the streamer heads (the extremities of thestreamer) are modeled as hyperboloids, which simplifies calculating the electricalfield since the Laplacian is analytic in prolate spheroid coordinates [17]. Theelectric field and potential is calculated by considering electrostatic shielding [14],as well as the conductance in the channel and the capacitance towards the planarelectrode [15]. The streamer undergoes a transition into a fast propagation modewhen radiation from the streamer head can ionize molecules directly in front ofthe streamer [16]. More details on the model is given in section 3.The main output of the simulations include the propagation speed, thestreamer shape (branching), and propagation distance. In addition, propertiessuch as the initiation time, the potential of individual streamer heads, electricbreakdown within the streamer channel, and avalanche growth, can also beinvestigated. Simulations show how various parameters affect the results, wherethe gap size, applied voltage, and type of liquid are important parameters for asimulation. Furthermore, other parameters such as the size of a streamer head,the conductivity of the streamer channel, properties of additives, and avalanchegrowth parameters can be varied to validate whether the underlying physicalmodels are reasonable.
The present work describes the use, functionality and implementation of
Cerman [18], a software to do simulations with our model [14, 15, 16], with thepurpose to make the software publicly available. Section 2 demonstrates howto set up, simulate, and evaluate results of a relevant problem. Further detailson the model and its implementation are given in section 3, whereas section 4outlines the current functionality and some prospects for the future. A summaryis then given in section 5. Furthermore, details on the algorithm is included inAppendix A, simulation parameters in Appendix B, and simulation exampleinput files in Appendix C.
2. Simulation – using the software
The software name
Cerman is an abbreviation of ceraunomancy , which meansto control lightning or to use lightning to gain information. The implementationis done in Python, an open-source, interpreted, high-level, dynamic programminglanguage [19], and the software is available on GitHub [18] under an MIT license.The software is script-based, and controlled through the command cerman ,4 erman I. Madshaven et al.
Listing 1: Example of JSON-input file, cmsim.json , defining a simulation serieswith several values for the needle voltage V and the threshold for breakdownin the streamer channel E bd , both with and without photoionization enabled.Furthermore, each permutation is to be carried out 10 times with different initialseed positions. Note, by setting alphakind to A1991 , α is calculated by (5).See Appendix B for a description of the parameters. { " gap_size ": ," needle_radius ": ," needle_voltage ": " linspace ( 60e3 , 150e3 , 10 )" ," liquid_name ": " cyclohexane " ," alphakind ": " A1991 " ," liquid_Ealpha ": ," liquid_IP ": ," streamer_head_radius ": ," streamer_U_grad ": ," streamer_d_merge ": ," streamer_scale_tvl ": ," streamer_photo_enabled ": [ false , true ]," streamer_photo_efield ": ," streamer_photo_speed ": ," rc_tau0 ": ," rc_breakdown ": [ , , , , ]," random_seed ": ," simulation_runs ": ," save_specs_enabled ": {" stat ": true ," gp5 ": true }} erman I. Madshaven et al.
Figure 2: Visualization of the difference in parameter values between a selection of input files. which is used for creation of input files, running simulations, and evaluatingthe results. When a simulation is started, the simulation parameters are loadedfrom an input file, and the classes for the various functions are initiated. SeeAppendix B for a summary of simulation parameters. The simulation itself isessentially a loop where seeds in the liquid are moved and the streamer structureis updated until the streamer stops or leads to a breakdown. The algorithm isdetailed in Appendix A.
Download Cerman from GitHub [18] and install it by running pip install . from the downloaded folder. This installs the python package and the script cerman . Python 3.6 or above is required, as well as the packages numpy [20], scipy [21], matplotlib , simplejson , and statsmodels . The dependenciesare automatically installed by pip . The software has been developed in OSXand has been tested on Linux as well. Each simulation requires a JSON-formatted input file where the parametersare given. Such files can be created from a master input file, specifying theparameters for a simulation series. A master input file can be created from aregular input file by changing a parameter value into a list of values. Morethan one parameter can contain lists, and all possible combinations of valuesis found to create the input files for the simulation series. To demonstrate,we use cmsim.json in listing 1, which specifies a simulation series exploringthe influence of various parameters. The ten values for the applied voltage are6 erman
I. Madshaven et al. specified through a linspace -command, while the values for the threshold forbreakdown in the channel and photoionization (fast mode) enabled are givenin list form. Furthermore, simulation_runs specifies the number of similarsimulations, only differing by random_seed . If random_seed is null , theneach input file is created with a random number as random_seed , and when anumber is specified, a range of number is generated, in this case, the numbers 1through 10. Note that random_seed refers to the seed number for initializingthe random number generator, not to the seeds within the ROI. However, agiven random_seed does corresponds to a given initial positions of the seedanions. Defining fixed a random_seed for each simulation series makes it easierto see how a change in a given value affects the simulation, but for analyzing alarger assemble of simulations, it is usually preferable that the simulations areuncorrelated, i.e. have random initial anion placement.Individual input files are created by running the cerman with the argument ci (create input) and specifying which file to expand with -f : cerman ci -f < filename > This command creates a a number of new files by permutation of all lists inthe given input file. The permutation of 10 random seeds, 10 applied voltages,5 breakdown thresholds, and 2 modes for photoionization in listing 1 resultsin 1000 files. By default, the random seed is expanded first, followed by theneedle voltage, which is is useful to consider when designing a simulation series.Choosing an appropriate number of values for these two parameters makes iteasier to search for simulation files with given properties. When expanding theexample in listing 1, the least significant digit ??X indicates random seed number,the second digit ?X? indicates the needle voltage, while the most significant digit
X?? indicates the threshold for breakdown in the streamer channel and whetherphotoionization is enabled or not.The action pp (plot parameters) creates a matrix representation of theparameter variation in set of input files, and is used like cerman pp -g < pattern > The argument -g specifies the pattern to search (or “glob”) for, e.g. cmsim_?00.json .The files are plotted at the x -axis and the varied parameters on the y -axis, seefigure 2 for an example output. The name of the output file is based on the firstfile in the pattern.After ensuring that the input parameter values are as desired, simulationsare run using cerman sims -g < pattern > -m < no > which creates a queue of all files matching the pattern, and simulates a givennumber in parallel. For instance, cerman sims -g "cmsim_?5?.json" -m 15 ,simulates all input files with the same voltage, creating a queue where up to15 separate subprocesses each run one simulation. These python processes aresingle threaded, and works best if numpy is limited to a single thread as well.Each simulation dumps the input parameters and progress information to a log7 erman I. Madshaven et al. file. For each simulation we then have a parameter file, a log file, and one ormore save files. The files are named by extending the name of the master file,e.g. cmsim.json
The results are evaluated by parsing the data stored from one or more simu-lations. The input file, listing 1, defines two “save specifications” as true , i.e.enabled, each defining various simulation data to be dumped to disk at givenintervals or occasions. The save_spec called stat saves iteration number, CPUtime, simulation time, leading head z position, number of critical avalanches, andthe position of each new streamer head, for every iteration. This enables evalua-tion of the shape of the streamer and its propagation speed. The save_spec called gp5 saves most of the data available, including the position of all the seeds(anions/electrons/avalanches), for every 5 percent of streamer propagation, i.e. atotal of 20 times for a breakdown streamer. The data is saved using pickle andcan be loaded to analyze a given iteration, a whole simulation, or by combiningdata from several simulation. Evaluate iterations.
Iteration data can be used to analyze the details ofa simulation. This is particularly useful when evaluating the validity of thesimulation parameters. Use for instance cerman pi seedheads -r < start stop > -g < pattern > where pi means “plot iteration” and seedheads is a scatter plot of avalanchesand the streamer head configuration. The option -r controls the range ofiterations to plot. Figure 28 in [14] shows a number of such plots. Evaluate simulations.
Use ps for simulation plots. These are mainly plottedwith the z -position in the gap on the y -axis. Plotting the x - or y -position ofstreamer heads on the x -axis, using shadow , gives a “shadowgraphic” plot ofthe streamer: cerman ps shadow -g < pattern > -o < options > Similarly, plotting the propagation time on the x -axis is done in a streak plot.Options can be added to control the limits/extents of the plot, the figure size,the behavior of the legend, redefining the axis labels, starting each plot withan offset, saving the plotted data to a JSON-file, and much more. Use help toshow available commands and options, for instance: cerman help erman I. Madshaven et al.
Single simulation data may be of interest, but it is often better to compareseveral simulations in the same plot to visualize how the input parameters affectthe results. The gp5 save requires a lot of disk space, but can be very useful inanalyzing the data. For plotting the potential of each head, use cerman ps headsestr -g < pattern > -o < options >
The current (active) heads of the streamer is selected, their potential is scaled(electrostatic shielding, using a nnls-approach, cf. [14]), and then, the electricfield at their position is calculated. However, the options can be used to specifythe method for scaling and which positions to calculate the field for, e.g. at theposition of each appended (new) streamer head. The electric field strength andelectric potential are presented as scatter plots against the z -position of eachgiven position, as well as dashed line indicating the average value, see figure 4. Evaluate a series of simulations.
The difference in the simulated parameterscan be visualized using pp and globbing for the pkl -files or log -files. Anexisting log -file indicates that a simulation was initiated. The command cerman psr -g < pattern > parses log files and plots the reasons why the simulations were terminated. Anexample of such a plot is shown in figure 5. This is a good way to verify thatsimulations have completed successfully.When all simulations are completed and verified, parse all the save files andbuild a combined database of the results: cerman ca -g < pattern > -o mode = reload The option reload forces files to be parsed, even if they already are in thedatabase. When parsing the save files, a number of properties are extracted orcalculated. Results such as propagation length (ls), average propagation speed(psa), inception time (ita), average jump distance (jda), simulation time (st),and computational time (ct) are saved in the database. The results are plottedby using
Figure 3: (left) Streak plots where “options” have been used to limit the x -axis and to show V , E bd , and photoionization on the legend. (right) Shadow plots where each streamer is plottedwith an offset and the legend is hidden. The legend is the same for both plots. erman I. Madshaven et al.
Figure 4: The electric strength (left) and the electric potential (right) at the tip of each newstreamer head. The streamer heads are sampled for every 5 % of propagation. The “options”are used to control which streamer heads to use for the calculation and which positions tocalculate for.Figure 5: Example, parsing the log files to visualize how simulations have terminated.“Unknown” implies that the simulation is not complete (ongoing or aborted). erman I. Madshaven et al.
Figure 6: Example, combination plots: (left) propagation speed using both markers andcolors, and (right) propagation length for only a given value of one parameter with the otherparameter colored. cerman pr < parameter > -f < file > -o < options >
The parameter gives the x -axis of the plot, for instance v (needle voltage). Theresults to plot is given through the option, e.g. -o ykeys=ls_psa . The softwareinspects the database of parsed save files for varied parameters and automaticallycreate plots of all possible permutations using colors and markers. Figure 6shows a selection of such plots, where needle voltage is on the x -axis and theother parameters have been added automatically.As illustrated, the software has been designed to facilitate simulating andanalyzing a large simulations series in a semi-automatic fashion. The individualsimulations have their parameters defined in dedicated files, while the behaviorof the cerman -script is defined by command line arguments.
3. Model implementation
This section describes the implementation of our model [14, 15, 16] in moredetail. An overview of the model is already given in section 1.3, and figure 1 isuseful for understanding the principal setup, a needle–plane gap where electronavalanches grow from single electron seeds.
The electric field.
The needle electrode and the streamer heads are modeledas hyperboloids. The Laplacian electric potential V i and electric field E i from astreamer head i is calculated analytically in prolate spheroid coordinates [14].For a position r , the electric potential V ( r ) and field E ( r ) is given by thesuperposition principle, V ( r ) = X i k i V i ( r ) and E ( r ) = X i k i E i ( r ) , (1)where the coefficients k i are introduced to account for electrostatic shielding. Anoptimization is performed such that the unshielded potential at the tip of any11 erman I. Madshaven et al. streamer head j equals the sum of all the shielded potentials at that position, V j ( r j ) = P k i V i ( r j ) [14]. Region of interest (ROI).
The ROI is a cylindrical volume used to controlthe position of seeds, see figure 1. Note, the seeds in this respect include allanions, electrons, and even all avalanches. The number of seeds in a simulationis given by the specified density of seeds and the volume of the ROI. Initially,the seeds are placed at random positions within the ROI. When a seed fallsbehind the ROI, collides with the streamer, or creates a critical avalanche, it isremoved and replaced by a new seed. The new seed is placed with a z -positionone ROI-height closer to the plane, at a random xy -position (at a radius lessthan the ROI radius). The ROI volume is defined by a distance from the z -axis,and a given length above and below the leading streamer head, which is the partof the streamer closest to the planar electrode. When a new streamer head iscreated closer to the plane, the streamer propagates, and the ROI moves as well. Anions, electrons, and electron avalanches.
The electric field E is calculatedfor each seed and the seeds are classified as avalanches ( E ≥ E c ), electrons( E ≥ E d ), or anions ( E < E d ), where the avalanche threshold E c and detachmentthreshold E d are given as input parameters. Seeds move in the electric field witha speed dependent on their mobility µ , which gives the distance the seed moves,∆ s = E µ ∆ t , for a time step ∆ t . The number of electrons N e in an electronavalanche, starting from a single electron, can be calculated by [14] N e = exp X i ∆ s i α i = exp X i E i µ e α m e − E α /E i ∆ t i , (2)where α is the avalanche growth, µ e is the electron mobility, ∆ t is the time step,and i is an iteration, whereas the avalanche growth parameters α m and E α havebeen obtained from experiments [14]. In practice, however, we only calculateand store the exponent in (2), Q e = ln N e , Q e = X i ∆ Q i = X i ∆ s i α i , (3)for each electron avalanche. When a low-IP additive is present, α is modified byadding a factor [14] α i, add = α i (1 − x add + x add e k α ( I b − I a ) ) (4)which is dependent on the mole fraction of the additive x add , and the differencein IP between the base liquid I b and the additive I a modified by a factor k α asprescribed by [22]. This is the default setting for the software. Another modelfor α given in [23] is also implemented: α i, mod = 3 eE α I b E i e − EαEi . (5)This method is applied in listing 1. Expanding the streamer structure.
According to the Townsend–Meek crite-rion [24], streamer breakdown occurs when an avalanche exceeds a critical number12 erman
I. Madshaven et al. of electrons N c = exp( Q c ). When an avalanche obtains Q e > Q c , we place a newstreamer head at its position [14]. The initial potential of a new streamer headis calculated by considering the capacitance and potential of the closest existingstreamer heads [15]. If adding the new head implies removing another head(see the paragraph below), the potential changes slightly, mimicking transfer ofcharge. However, if both the new and the present head stays, they share the“charge”, which gives a moderate reduction in the potential of both heads. Optimizing the streamer structure.
There are three criteria for removingheads. A streamer head i is removed if ν j ( r i ) < ν j ( r j ) or k i < k c or (cid:0) ( | r i − r j | < d m ) and ( z i > z j ) (cid:1) , (6)are satisfied for any other streamer head j [14]. The first condition checkswhether the tip of one hyperbole ( r i ) is inside another hyperbole, a collision (the ν -coordinate describes a hyperboloid, specifically the asymptotic angle). Thesecond condition removes heads whose potential are to a high degree shielded byother heads (if the coefficient k i in (1) lower than a threshold k c ). The thirdcondition checks whether two streamer heads are closer than d m and should bemerged to a single head, where the one at the highest z -coordinate is removed. Conduction and breakdown in the streamer channel.
Conduction in thestreamer channel increases the potential of each streamer head i each itera-tion, ∆ V i = V − V i → V i = V − ∆ V i e − ∆ t/τ i . (7)The time constant τ i = RCτ (for a given head i ) is calculated from the resistance R in the channel and the capacitance C towards the plane [15] R ∝ ‘ , and C ∝ (cid:18) ln 4 z + 2 r s r s (cid:19) − , (8)where ‘ is the channel length (distance to the needle), r s is the tip curvatureradius of the streamer head, and z is the z -position of the streamer head. Assuch, each streamer head is treated as an individual RC-circuit, e.g. the threestreamer heads in figure 1 would each have an individual resistance (channel) aswell as an individual capacitance towards the planar electrode. If the conductionis low, the potential difference ∆ V i increases as the streamer propagates, andthe electric field within the streamer channel E s = ∆ V i /‘ i may increase as well.If E s exceeds a threshold E b , a breakdown occurs, equalizing the potential ofthe streamer head and the needle, which is achieved by setting τ i = 0 in (7) forthe given iteration. Photoionization.
Photoionization is a possible mechanism for fast streamerpropagation [25]. We have proposed a mechanism in which the propagationspeed of a streamer increases if the liquid cannot absorb radiation energy toexcited states, as a result of a strong electric field reducing the ionizationpotential [16]. Since the full model, considering fluorescent radiation from thestreamer head, and a field-dependent photoionization absorption cross section, iscomputationally expensive, a simpler model is used in the simulations. Instead13 erman
I. Madshaven et al. we calculate the field strength E w required to reduce the ionization potentialbelow the energy of the fluorescent radiation. In each iteration, if the electricfield E at the tip of a streamer head i exceeds the parameter E w , the head ismoved a distance ∆ s i towards the planar electrode,∆ s i = − v w ∆ t Θ( E ( r i ) − E w ) ˆ z , (9)where v w is the photoionization speed, and Θ is the Heaviside step function. Formore details on the entire model, see our previous work [14, 15, 16].
4. Current functionality and future prospects
The main function of the model and the software is to simulate streamersin a point–plane gap, using the Townsend–Meek criterion for propagation. Thepropagation criterion is met when electron avalanches obtain a given size. Thismodel and the algorithm are fixed, but there are several parameters which canbe adjusted. Changing experiment features such as needle tip radius, gap size,voltage, liquid properties, or the parameters of the algorithms, is straightforward.Proposals to extend the software to encompass new functionality is given in thissection.In [14] we explored the fundamental features off the model, i.e. a streamerconsisting of charged hyperbolic streamer heads, and streamer growth by electronavalanches initiating from anions. The model predicts several aspects of streamerpropagation, and shows how they are linked towards the values of given inputparameters. The predicted propagation speed and the degree of branching wereboth lower than expected. We found how the speed was dependent mainly onthe number of electron avalanches and their growth, while the branching wasmainly related to how the streamer heads were configured and managed, whichis mainly controlled by the parameters k c and d m in (6).When new streamer heads were added, their potential was set assuming aconstant electric field within the channel, resulting in a moderate voltage dropbetween the needle electrode and the streamer head [14]. To better representthe dynamics of the streamer channel, an RC-model was developed [15]. In theRC-model, the potential of new streamer heads is dependent of the potential ofthe closest existing streamer heads. If the conductance of the streamer channel ishigh, then the potential of the streamer head is kept close to that of the needle,giving results comparable to those without the RC-model. Conversely, havinglow conduction regulates the speed of the streamer, increasing the likelihoodthat more branches are able to propagate. Furthermore, the RC-model alsoallows for simulation of a breakdown within the streamer channel itself, which islikely what occurs during a re-illumination. This breakdown occurs when theelectric field within the channel exceeds a given threshold.The importance of photoionization during a streamer breakdown is unknown.We explored different aspects of photoionization in [16], and implemented amodel for change to a fast propagating mode. Molecules excited by energeticprocesses, such as electron avalanches, can relax to a lower energy state by14 erman I. Madshaven et al. emitting radiation. We argued that fluorescent radiation can be important, andmodeled how this radiation can cause ionization in high-field areas, since thehigh-field reduces the ionization potential.In the current implementation, a square wave voltage is applied to the needleat the beginning of the simulation. It is easy to change the behavior to a voltageramp, from zero to max over a given time. This can be the basis for a study onstreamer inception where other parameters such as needle size and the electronproperties of the liquid are investigated as well. Simulating a dynamic voltage,such as a lightning impulse, requires some more work, but is also achievable.We have focused on cyclohexane since many of its properties are well known,but other non-polar insulating liquids can be studied by changing relevantparameters. The seed density n ion is based on the low-field conductivity σ andelectron mobility µ e of the liquid, and the propagation speed scales linearly withboth seed density n ion and electron mobility µ e . The electron avalanche growthparameters are also liquid-dependent, and E α in particular has a big impacton the results [14]. Streamer parameters, such as conductivity of the streamerchannel and streamer head radius, need to be reevaluated as well for other liquids.The properties of the streamer channel are also important to simulate the effectsof external pressure, which mainly affects processes in the gaseous phase [26].The effect of additives with a low ionization potential (IP) are modeled ascausing an increase in electron avalanche growth [22, 14]. Other additives caneasily be used as long as the IP of both the base liquid and the additive are known.Low-IP additives are known to facilitate the propagation of slow streamers and toincrease the acceleration voltage, possibly as a result of increased branching [27],however the mechanisms involved are not known. It is possible that low-IPadditives are sources of electrons that can initiate avalanches, produced forinstance through photoionization or fluctuations in the electric field. Suchmechanisms can be added to the model and simulated, but will require somework. Furthermore, the mechanisms of added electron scavengers can also beinteresting for further investigation, and particularly if negative streamers are tobe simulated [22].Our primary concern have been with positive streamers, since these are morelikely to lead to a complete breakdown than negative streamers. The modelrelies on electrons detaching from anions, moving towards regions where the fieldis higher, and then forming electron avalanches. The polarity of our model caneasily be reversed, however, the electrons would then drift away and be unableto form avalanches. As such, a model for creation of new electrons is needed tosimulate negative streamers with the software. Charge injection from the needleand the streamer can be one such mechanism [28]. Another option is to modelelectron generation (charge separation) in the high-field region surrounding theneedle and the streamer. Such mechanisms are interesting for simulating positivestreamers as well.The hyperbole approximation simplifies the calculation of the electric field,both from the needle electrode and from the streamer heads. Other experimentalgeometries, such as plane–needle–plane, or even more realistic real-life geometriescan be implemented. The challenge is to set the correct shielding or scaling of15 erman I. Madshaven et al. the streamer heads according to the influence of the geometry. Simpler geometricrestrictions are easier to implement, for instance by manipulating the ROI. Thestreamer can be restricted to a tube by setting a low value for the maximumradius of the ROI. Another method is setting the “merge threshold” very high,such that the streamer is restricted to a single channel with a single head, whichcan be representative for a streamer in a tube [29].There are many mechanisms that can be added to investigate differentmethods of streamer propagation, for instance effects of Joule heating or electro-hydrodynamic cavitation [30]. There are also several parts of the existing modelthat can be improved. Better calculation and balancing of charges and energywould greatly improve the model. For instance an electric network model wherethe streamer is consisting of several interconnected parts, in contrast to thecurrent implementation where all the streamer heads are individually “connected”to the needle. Such an approach can give a better understanding of the chargeflow in the different parts and branches of the streamer, as well as a betterrepresentation of the electric field. Development towards a model for a space-charge limited field [31] can further improve the electric field representation,however, possibly at a high computational cost.
5. Summary
We present a software for simulating the propagation of positive streamersin a needle–plane gap insulated by a dielectric liquid. The model is based onthe Townsend–Meek criterion in which an electron avalanche have to obtain agiven size for the streamer to propagate. The software was developed and usedfor simulating our models for electron avalanche growth [14], conductance andcapacitance in the streamer channels [15], as well as photoionization in frontof the streamer [16]. From the examples on how to set up, run, and evaluatesimulations, others can recreate our previous results or create their own set ofsimulations. Furthermore, the overview of the implementation and algorithmserves as a good starting point for others to change or extend the functionalityof the software.
Acknowledgment
This work has been supported by The Research Council of Norway (RCN),ABB and Statnett, under the RCN contract 228850.
Appendix A. The algorithm
This section describes the algorithm used to implement the model in moredetail, essentially each part of figure 7, while referencing relevant parts fromsection 3.
Initialize simulation.
The simulation input parameters are read and used toinitialize classes for code profiling, simulation logging, calculation of avalanche16 erman
I. Madshaven et al.
START terminate? initializesimulationupdateseedsphoto-ionizationmanagenew headsmanagestreamerupdateROIevaluateiteration no yes read input init classes create seeds dump to fileclassify seeds update avalanches repeat? move seedsnoyesget field move headscreate heads trim heads classify set potentialrelax potentials trim heads set shieldingreplace seeds update z -pos update radiusextract data dump to file print to screen clear temp vardump to file print to screen END
Figure 7: The simulation algorithm consists of initialization, a loop where the seeds and thestreamer structure is updated, and then a finalization. It the loop, first the seeds (anions,electrons avalanches) are affected by the electric field, then the streamer structure is modifiedand this changes the electric field, finally the region of interest (ROI) is updated and the datafrom the iteration is evaluated. The loop concludes when one (of several) criterion is met,typically low propagation speed or reaching the opposing electrode. Details on each step isfound in Appendix A. erman I. Madshaven et al. growth, the needle, the streamer, the region of interest (ROI), the seeds (anions,electron, avalanches), how to save data, and how to evaluate simulation data.The initiation of the log file includes dumping the input parameters to the file.Given the ROI volume and the seed density, a number of seeds is created andplaced within the ROI at random positions. Then, the save files are initializedby dumping the initial data, mainly information concerning the needle and theseeds.
Update seeds.
The electric field E is calculated for each seed (applying(1)) and the seeds are classified as avalanches, electrons, and anions. All theavalanches move in the electric field and grow in size (see (2)). The procedure isrepeated until an avalanche collides with a streamer head, an avalanche meetsthe Townsend–Meek criterion, or a total of N msn repetitions has been performed.The “time” spent in this inner loop sets the time step for the current iteration ofthe main simulation loop. Finally, all the electrons and anions are moved. Theinner loop over just the avalanches save significant computational time since thecalculation of the electric field is the most expensive part of the computationand the avalanches is usually a small fraction of all the seeds. Photoionization.
The electric field at the tip of each streamer head is cal-culated and compared with the threshold for photoionization. Each streamerhead where
E > E w is “moved” a distance v w ∆ t towards z = 0. Moving impliescreating a new head, setting the potential by “transferring charge”, and removingthe old head. Manage new heads.
For each critical avalanche a new head is created. Ifthe simulation time step is set sufficiently low, there is usually zero or just onenew head. The new head is discarded if it satisfies any of the criteria in (6),however, if adding it will cause another to be removed (later), the new headis classified as “merging”. If none of the criteria in (6) is met by adding thenew head, i.e. all heads are kept, then it is a “branching” head, since addingit is potentially the start of a new branch. The potential of “merging” is setby “charge transfer” from the closest head, while “branching” heads have theirpotential set by “sharing charge” with the closest head, where the latter methodalso modifies the potential of the existing head [15].
Manage streamer.
The potential of each streamer head is relaxed towards thepotential of the needle by applying (7). This step increases the potential of thestreamer head to the potential of the needle when a breakdown in the channeloccurs. As mentioned above, the calculation of the electric field for the seeds iscomputationally expensive, and it actually scales with both the number of seedsand the number of streamer heads. It is therefore preferable to keep the numberof heads to a minimum. Superfluous heads are trimmed according to the criteriain (6). Then, the electrostatic shielding is set for the trimmed structure.
Update ROI.
Seeds that have moved behind the ROI, collided with thestreamer, or lead to a critical avalanche are removed and replaced by a new seed.When a seed is replaced, the new seed is placed a distance, equal to the heightof the ROI, closer to the plane, at a random xy -position within the ROI radius.If the streamer has moved closer to the plane, the ROI moves as well, and seedsbehind the new position are replaced. If a streamer head is close to the edge of18 erman I. Madshaven et al. the ROI, the ROI expands towards the maximum radius. New seeds are createdat random position within the expanded region.
Evaluate iteration.
Iteration data is extracted from the various classes to besaved for later use. The data is used to evaluate whether any stop condition isfulfilled, and stored to dedicated classes. Which data to store and how oftento sample the data is controlled by the user input. The saved data is dumpedto a file at regular intervals to keep memory requirements of the program low.Information to monitor the progress is printed to the screen, at regular intervals.Finally, a number of temporary variables, relevant only to the iteration is cleared,and the program is prepared for a new iteration.
Terminate?
If none of the conditions for stopping a simulation are met,the next iteration is performed. These conditions includes low streamer speed,streamer head close to the plane (breakdown), simulation time exceeded, compu-tation time exceeded, and more. When a criterion is met, any unsaved data isdumped to disk, and a final logging to file and screen is performed, before theprogram terminates.
Appendix B. Parameters
The parameters for a simulation is supplied by the user in a JSON-formattedfile (see listing 1). A list of all important parameters are shown in table 1.The potential, position and size of the needle are important parameters in anexperiment and included in the first section, followed by parameters controllingthe creation and movement of seeds (anions, electrons, and avalanches). The thirdsection contains parameters related to the threshold for electron detachment,electron avalanche growth, and critical avalanche size. The parameters for thestreamer can be split in two groups. The first group controls creation of thestreamer heads and how the streamer heads are treated in relation to each other,whereas the second groups is related to the RC-model, controlling the potentialof the streamer heads and the electric field in the streamer channel. There is alsothe option to choose whether the electric field from the streamer, acting on theseeds, is calculated using 32- or 64-bit precision. The latter requires about twicethe time to compute. The parameters in the last section are mainly related tothe simulation algorithm itself. The time step and the number of steps per loopare essential for a good results. The random seed, used to initialize the randomnumber engine, controls the initial placement of seed anions. Choosing the samerandom number enables the study of, for instance, changing voltage with thesame initial seed configuration. Conversely, not setting the random numbermakes the simulations uncorrelated, which is better for statistics. The size ofthe ROI decides how many seeds that are included in a simulation. For instance,an ROI of 10 mm in combination with a seed density of 2 × /m results in20 000 seeds generated, a size which is easily treated by most computers. Finally,several parameters can be used to control how long a simulations will run, or tostop a simulation if the streamer stops or reaches the other electrode. There arealso parameters controlling how often information is logged, and how detailedthe logging should be. 19 erman I. Madshaven et al.
Table 1: Main parameters for simulation program. The experimental conditions specifies anovervoltage applied to medium size needle–plane gap. The values of the physical parametersin seeds and avalanches and streamer structure are justified in our previous work [14, 15, 16].Parameter values related to the simulation algorithm , or the model in general, have also beendiscussed in previous work. See further description in Appendix B.
Property
Keyword
Symbol Default
Experimental conditions
Distance from needle to plane gap_size d g
10 mmVoltage applied to needle needle_voltage V n
100 kVNeedle tip radius needle_radius r n Seeds and avalanches
Seed number density seeds_cn n seeds × /m Anion mobility liquid_mu_ion µ ion /VsElectron mobility liquid_mu_e µ e
45 mm /VsLiquid low-field conductivity liquid_sigma σ ion liquid_Ed_ion E d alphakind – I2009
Critical avalanche threshold
Q_crit Q c liquid_Ec_ava E c liquid_Ealpha E α liquid_alphamax α m
130 µm −1 Additive IP diff. factor liquid_k1 k α −1 Base liquid IP liquid_IP I b additive_IP I a additive_cn x add Streamer structure
Streamer head tip radius streamer_head_radius r s streamer_U_grad E s streamer_d_merge d m
25 µmElectrostatic shielding threshold streamer_scale_tvl k c streamer_photo_efield E w streamer_photo_speed v w
20 km/sData type for field calculation efield_dtype – float32 RC-model time constant rc_tau0 τ rc_resistance – linear RC capacitance model rc_capacitance – hyperbole RC breakdown field rc_breakdown E bd Simulation algorithm
Time step of avalanche movement time_step ∆ t micro_step_no N msn random_seed – None
Number of similar simulations simulation_runs – 10ROI – behind leading head roi_dz_above z + roi roi_dz_below z − roi roi_r_max r roi stop_speed_avg v min
100 m/sStop – streamer close to plane stop_z_min z min
50 µmStop – avalanche time stop_time_since_avalanche t avamax
100 nsSequential start number seq_start_no – 0Enable profiling of code profiler_enabled – FalseInterval – dump save data to file file_dump_interv – 500Interval – display data on screen display_interv – 500Level of logging to file log_level_file – 20Level of logging to console log_level_console – 20 erman I. Madshaven et al.
Appendix C. Example files
This appendix contains a number of examples of possible simulations. Thefiles in listings 2 to 5 are all included in the folder examples on GitHub [18].
Listing 2:
The example file small_gap.json specifies a small gap and arange of voltages along with many parameter values equal to the defaults (cf.table 1). Although all values used in a simulation is stored in the log, it is niceto be explicit in the input as well. By specifying 10 simulation_runs and 10voltages, a total of 100 simulations is created from this file. Each simulationinitiated with the seeds at uncorrelated positions since random_seed is none . Listing 3:
The example file small_gap_mod.json builds on listing 2, buta number of parameters are modified, notably the seed density and the electronavalanche parameters, as well as several parameters for the streamer. All datais stored every 5th percent of propagation by gp5 and every 100th nanosecondby ta07 . Storing the properties of tens of thousands of seeds enables plottingof the development of seeds, but also requires a lot of disk space. Specifying streamer saves all the streamer heads every 0.1 percent of propagation andis used to evaluate the development of the streamer. Since random_seed is1 and simulation_runs is 10, a range of random_seed from 1 through 10 isgenerated, giving the same 10 initial seed positions for each voltage.
Listing 4:
The example file rc.json specifies the low and high conductivitywithin the streamer channel, and a range of threshold fields for electric break-down in the streamer channel. The linspace -command is a convenient methodfor creating a list of values. By combining 2 values for the conductivity and 5values for breakdown with 10 values for the voltage, a total of 100 simulationsare created from this file.
Listing 5:
The example file pi.json specifies electrical breakdown in thestreamer channel, with and without photoionization enabled, The keyword user_comment does not affect the simulations, but can be convenient to set. 600input files are created when expanding this file (100 voltages, with and withoutphotoionization, for three different breakdown thresholds).21 erman
I. Madshaven et al.
Listing 2: The example file small_gap.json specifies simulations similar to thebaseline studies in section 3.1 in [14]. { " gap_size ": ," needle_radius ": ," needle_voltage ": [ , , , , , , , , , ]," liquid_name ": " cyclohexane " ," liquid_alphamax ": ," liquid_Ealpha ": ," seeds_cn ": ," Q_crit ": ," streamer_head_radius ": ," streamer_U_grad ": ," streamer_d_merge ": ," streamer_scale_tvl ": ," streamer_photo_enabled ": false ," random_seed ": null ," simulation_runs ": ," stop_sim_time ": ," stop_time_since_avalanche ": ," stop_speed_avg ": } Listing 3: The example file small_gap_mod.json specifies simulations similarto the attempts to facilitate branching in section 3.5 in [14]. { " gap_size ": ," needle_radius ": ," needle_voltage ": " linspace ( 30e3 , 120e3 , 10 )" ," liquid_name ": " cyclohexane " ," liquid_alphamax ": ," liquid_Ealpha ": ," seeds_cn ": ," streamer_head_radius ": ," streamer_U_grad ": ," streamer_d_merge ": ," streamer_scale_tvl ": ," streamer_photo_enabled ": false ," random_seed ": ," simulation_runs ": ," save_specs_enabled ": {" stat ": true ," streamer ": true ," gp5 ": true ," ta07 ": true }} erman I. Madshaven et al.
Listing 4: The example file rc.json specifies simulations similar to thoseperformed in section 4 in [15]. { " gap_size ": ," needle_radius ": ," needle_voltage ": " linspace ( 30e3 , 120e3 , 10 )" ," liquid_name ": " cyclohexane " ," liquid_alphamax ": ," liquid_Ealpha ": ," streamer_head_radius ": ," streamer_U_grad ": ," streamer_d_merge ": ," streamer_scale_tvl ": ," rc_tau0 ": [ , ]," rc_resistance ": " linear " ," rc_capacitance ": " hyperbole " ," rc_breakdown ": [ , , , , ]," random_seed ": null ," save_specs_enabled ": {" streamer ": true ," stat ": false }} Listing 5: The example file pi.json specifies simulations similar to thoseperformed in section 7 in [16]. { " user_comment ": " Photoionization and breakdown " ," gap_size ": ," needle_radius ": ," needle_voltage ": " linspace ( 60e3 , 150e3 , 100 )" ," liquid_alphamax ": ," liquid_Ealpha ": ," seeds_cn ": ," streamer_U_grad ": ," streamer_d_merge ": ," streamer_scale_tvl ": ," streamer_photo_enabled ": [ false , true ]," streamer_photo_efield ": ," streamer_photo_speed ": ," rc_tau0 ": ," rc_breakdown ": [ , , ]," simulation_runs ": ," random_seed ": null ," file_dump_interv ": ," display_interv ": ," save_specs_enabled ": {" streamer ": true ," stat ": false }} erman I. Madshaven et al.
References [1] P. Wedin (2014) Electrical breakdown in dielectric liquids - a short overview.
IEEE Electr Insul Mag :20–25. doi:10/cxmk[2] O. Lesaint (2016) Prebreakdown phenomena in liquids: propagation ‘modes’and basic physical properties. J Phys D: Appl Phys :144001. doi:10/cxmf[3] A. Sun, C. Huo, J. Zhuang (2016) Formation mechanism of streamer dis-charges in liquids: a review. High Volt :74–80. doi:10/dbt2[4] B. Farazmand (1961) Study of electric breakdown of liquid dielectrics usingschlieren optical techniques. Br J Appl Phys :251–254. doi:10/bhcrhp[5] L. Niemeyer, L. Pietronero, H. J. Wiesmann (1984) Fractal dimension ofdielectric breakdown. Phys Rev Lett :1033–1036. doi:10/d35qr4[6] P. Biller (1993) Fractal streamer models with physical time. In Proc 1993IEEE 11th Int Conf Conduct Break Dielectr Liq (ICDL ’93) , 199–203.doi:10/dctxz7[7] I. Fofana, A. Beroual (1998) Predischarge models in dielectric liquids.
JpnJ Appl Phys :2540–2547. doi:10/bm4sd5[8] J. Qian, R. P. Joshi, E. Schamiloglu, J. Gaudet, J. R. Woodworth, J. Lehr(2006) Analysis of polarity effects in the electrical breakdown of liquids. JPhys D: Appl Phys :359–369. doi:10/c75hff[9] I. Simonovi´c, N. A. Garland, D. Boˇsnjakovi´c, Z. L. Petrovi´c, R. D. White,S. Dujko (2019) Electron transport and negative streamers in liquid xenon. Plasma Sources Sci Technol :015006. doi:10/dcjj[10] J. Jadidian, M. Zahn, N. Lavesson, O. Widlund, K. Borg (2014) Abruptchanges in streamer propagation velocity driven by electron velocity satu-ration and microscopic inhomogeneities. IEEE Trans Plasma Sci :1216–1223. doi:10/f55gj5[11] G. V. Naidis (2015) Modelling of streamer propagation in hydrocarbonliquids in point-plane gaps. J Phys D: Appl Phys :195203. doi:10/cxmj[12] G. V. Naidis (2016) Modelling the dynamics of plasma in gaseous channelsduring streamer propagation in hydrocarbon liquids. J Phys D: Appl Phys :235208. doi:10/cxmg[13] H. Fowler, J. Devaney, J. Hagedorn (2003) Growth model for filamentarystreamers in an ambient field. IEEE Trans Dielectr Electr Insul :73–79.doi:10/ffwcfd[14] I. Madshaven, P.-O. Åstrand, O. L. Hestad, S. Ingebrigtsen, M. Unge,O. Hjortstam (2018) Simulation model for the propagation of second modestreamers in dielectric liquids using the Townsend-Meek criterion. J PhysCommun :105007. doi:10/cxjf 24 erman I. Madshaven et al. [15] I. Madshaven, O. L. Hestad, M. Unge, O. Hjortstam, P.-O. Åstrand (2019)Conductivity and capacitance of streamers in avalanche model for streamerpropagation in dielectric liquids.
Plasma Res Express :035014. doi:10/c933[16] I. Madshaven, O. Hestad, M. Unge, O. Hjortstam, P. Åstrand (2020)Photoionization model for streamer propagation mode change in simulationmodel for streamers in dielectric liquids. Plasma Res Express :015002.doi:10/dg8m[17] R. Coelho, J. Debeau (1971) Properties of the tip-plane configuration. JPhys D: Appl Phys :1266–1280. doi:10/fg43t7[18] I. Madshaven. Cerman - A software for simulation of streamers in liquids. https://github.com/madshaven/cerman [19] Python Software Foundation. Python Language Reference. [20] T. E. Oliphant (2007) Python for scientific computing. Comput Sci Eng :10–20. doi:10.1109/MCSE.2007.58[21] P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, et al.(2020) SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods :261–272. doi:10/ggj45f[22] S. Ingebrigtsen, H. S. Smalø, P.-O. Åstrand, L. E. Lundgaard (2009) Effectsof electron-attaching and electron-releasing additives on streamers in liquidcyclohexane. IEEE Trans Dielectr Electr Insul :1524–1535. doi:10/fptpt5[23] V. M. Atrazhev, E. G. Dmitriev, I. T. Iakubov (1991) The impact ionizationand electrical breakdown strength for atomic and molecular liquids. IEEETrans Electr Insul :586–591. doi:10/d2mg8n[24] A. Pedersen (1989) On the electrical breakdown of gaseous dielectrics - anengineering approach. IEEE Trans Electr Insul :721–739. doi:10/d2kthj[25] D. Linhjell, L. Lundgaard, G. Berg (1994) Streamer propagation underimpulse voltage in long point-plane oil gaps. IEEE Trans Dielectr ElectrInsul :447–458. doi:10/chdqcz[26] D. Linhjell, L. E. Lundgaard, M. Unge (2019) Pressure Dependent Propa-gation of Positive Streamers in a long Point-Plane Gap in Transformer Oil.In , vol. 2019-June, 1–3. doi:10/dvbz[27] O. Lesaint, M. Jung (2000) On the relationship between streamer branchingand propagation in liquids: influence of pyrene in cyclohexane. J Phys D:Appl Phys :1360–1368. doi:10/c4xf8425 erman I. Madshaven et al. [28] H. S. Smalø, O. L. Hestad, S. Ingebrigtsen, P.-O. Åstrand (2011) Fielddependence on the molecular ionization potential and excitation energiescompared to conductivity models for insulation materials at high electricfields.
J Appl Phys :073306. doi:10/dmkszm[29] G. Massala, O. Lesaint (1998) Positive streamer propagation in large oilgaps: electrical properties of streamers.
IEEE Trans Dielectr Electr Insul :371–380. doi:10/cfk7km[30] O. Lesaint, L. Costeanu (2018) Positive streamer inception in cyclohexane:Experimental characterization and cavitation mechanisms. IEEE TransDielectr Electr Insul :1949–1957. doi:10/gfhkt8[31] S. Boggs (2005) Very high field phenomena in dielectrics. IEEE TransDielectr Electr Insul12