Create a batch of simulationsΒΆ

pyPENELOPE offers the possibility to generate a batch of simulations by varying one or many simulation parameters. For example, the same simulation can be run at 5, 10 and 15 keV with a beam diameter of 20, 60 and 150 nm. For these parameters, the batch wizard would create 9 simulations: 5 keV and 20 nm, 5 keV and 60 nm, etc.

To create a batch of simulations, the first step is to create one simulation using the PENEPMA wizard. Please refer to the Simple simulation of a substrate tutorial for more information. After creating this simulation, select it from the simulation tree and go in the File menu and select Batch. The following dialog will appear.


Dialog to create a batch of simulations.

The parameters that can be varied appear on the left side. The list gives the name of the parameter as well as the minimum and maximum allowed values. Please note that the available parameters will change depending on the geometry of the selected simulation. For instance, multi-layers and grain boundaries will have extra parameters to change the thickness of the layers.

To setup a parameter, select it from the left list and click on arrow. A dialog will pop up asking for the start value, end value and step size. The start and end value are inclusive. For example, to vary the beam energy between 5, 10 and 15 keV, the start value is 5, the end value is 15 and the step is 5.

After selecting all the parameters, the user needs to select the output directory where all the simulations will be saved. A directory will be created for each simulation in the batch.

These simulations can be run from the GUI as any other simulations or from the command line runner.