Skip to content

madshaven/cerman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cerman

streamer breakdown, dielectric liquid, simulation model, python, computational physics

Electrical breakdown in liquids is preceded by a breakdown channel called a streamer. This software is developed to simulate a model for the propagation of positive streamers in dielectric liquids. The name Cerman is an abbreviation of ceraunomacy.

References [1-3] provide information on streamers and the model. Reference [4] provides information on the implementation of the model and its usage.

Getting started

Installation

  • Note: The software is developed for OSX and Linux, and has not been tested on Windows.
  • Install Python 3.6 or above - for instance from Python.org or Anaconda.
  • If desired, create a virtual environment, see for example conda create.
  • Clone (or download) the current repo.
  • Install the package using pip from the appropriate folder. pip also installs the dependencies numpy, simplejson, matplotlib, scipy, and statsmodels if needed.
$ git clone https://github.com/madshaven/cerman.git
$ cd cerman
$ pip install .  # installs cerman and dependencies
  • The software provides the command cerman. Verify the installation by running the command to display usage and actions.
$ cerman        # display usage
$ cerman help   # display actions

Example files

  • Each example input file, example_name.json, specifies a simulation series.
  • Example files are located in cerman/examples/example_name.
  • The Makefile, in the same folder, specifies how the example can be simulated and how some of the results can be plotted.
  • The example files can be used to replicate results from the references [1-4].

Example of usage

Copy one of the example input files, for instance small_gap.json to an appropriate project folder.

$ mkdir small_gap_test
$ cd small_gap_test
$ cp path_to_cerman/examples/small_gap/small_gap.json .

Create simulation input parameter files, in this case, 100 files named small_gap_###.json. Plot the parameters, for instance for the voltage, as below.

$ # create input files
$ cerman ci -f small_gap.json
$ # plot input files
$ cerman pp -g "_0?1.json"

Start a series of simulations in loop, globbing for files matching a pattern.

$ # simulate in sequential loop
$ cerman sims -g "_0?0.json"
$ # simulate in parallel loop using 4 threads
$ cerman sims -g "_0?0.json" -m 4

Each simulation small_gap_###.pkl creates a corresponding save file small_gap_###_stat.pkl. Plot simulation results saved in these files.

$ # plot streamer position vs simulated time
$ cerman ps streak -g _stat -o "legend=v"  # voltage as legend label
$ # plot streamer, xz and yz, 0.3 hspace between each series
$ cerman ps shadow -g _stat -o "legend=v diffx=.3"
$ # plot streamer position vs overall average speed
$ cerman ps speed -g _stat -o "legend=v xmax=2 method=average_v"
$ # plot streamer position vs windowed average speed
$ cerman ps speed -g _stat -o "legend=v xmax=2 method=window_v"

Parse simulation results in small_gap_???_stat.pkl to create small_gap_stat.stat and plot the average propagation speed and final propagation length against voltage.

$ # parse results and compile archive
$ cerman ca -g _stat
$ # plot results from archive
$ cerman pr v -g _stat -o "ykeys=psa_ls"

License

License

References

  1. Inge Madshaven, Per-Olof Åstrand, Øystein Leif Hestad, Stian Ingebrigtsen, Mikael Unge, Olof Hjortstam
    Simulation model for the propagation of second mode streamers in dielectric liquids using the Townsend–Meek criterion
    Journal of Physics Communications 2:105007 (2018)
    doi: 10/cxjf | arXiv: 1804.10473
  2. Inge Madshaven, Øystein Leif Hestad, Mikael Unge, Olof Hjortstam, Per-Olof Åstrand
    Conductivity and capacitance of streamers in avalanche model for streamer propagation in dielectric liquids
    Plasma Research Express 1:035014 (2019)
    doi: 10/c933 | arXiv: 1902.03945
  3. Inge Madshaven, Øystein Leif Hestad, Mikael Unge, Olof Hjortstam, Per-Olof Åstrand
    Photoionization model for streamer propagation mode change in simulation model for streamers in dielectric liquids
    Plasma Research Express 2:015002 (2020)
    doi: 10/dg8m | arXiv: 1909.12694
  4. Inge Madshaven, Øystein Leif Hestad, Per-Olof Åstrand
    Cerman: Software for simulating streamer propagation in dielectric liquids based on the Townsend–Meek criterion
    doi: 10/f9bw | arXiv: 2007.02999

About

Software for simulating streamer propagation in dielectric liquids based on the Townsend–Meek criterion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages