When producing .gas file of mixture with 93% argon and 7% carbon dioxide, the error occured at ELECTRIC FIELD = 2002.3331 VOLTS/CM, the output on terminal is:
WARNING ENERGY OUT OF RANGE,INCREASE ELECTRON ENERGY INTEGRATION RANGE
I ran Jan 15th an Ar:CO2 93:7 gas mixture using the latest nightly built on lxplus, with the following setup and it ran without any problem. Note my max field was 1e5 V/cm, not 5e5 V/cm as yours, so I would suggest that if you are interested in the outcome for fields of 2kV/cm or 10kV/cm you leave the maximum field 100kV/cm as in the example.
const double pressure = 760.;
const double temperature = 293.15;
// Setup the gas.
MediumMagboltz gas(“Ar”, 93., “CO2”, 7.);
gas.SetTemperature(temperature);
gas.SetPressure(pressure);
// Set the field range to be covered by the gas table.
const size_t nE = 20;
const double emin = 100.;
const double emax = 100000.;
// Flag to request logarithmic spacing.
constexpr bool useLog = true;
gas.SetFieldGrid(emin, emax, nE, useLog);
// Define precision
const int ncoll = 10;
// Run Magboltz to generate the gas table.
gas.GenerateGasTable(ncoll);
// Save the table.
gas.WriteGasFile(“ar_93_co2_07.gas”);
Instead you can prepare a second file where you cover the fields between 100kV/cm and 500kV/cm:
gas.SetFieldGrid(1e5,5e5,9,true);
and for this one I would suggest you increment the maximum electron energy (defaults to 40eV) to something one or few orders of magnitude higher, I would try first with 400eV:
SetMaxElectronEnergy(const double e);
see Garfield++ usergide §3.2.3 p31. Let us know if you can reproduce the “bug” running at a lower maximum electric field.
Unfortunately this issue does occur from time to time. It means that the estimate of the max. electron energy made internally in Magboltz before running the simulation fails. As a workaround you can slightly modify the electric field value(s). I’ll put it on my to-do list to see if we can find a proper fix…