Maybe a bug in class MediumMagboltz

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

the relevant code is:

MediumMagboltz gas;
gas.SetComposition(“Ar”, 93.,“CO2”, 7.);
gas.SetTemperature(293.15);
gas.SetPressure(760.);
gas.SetFieldGrid(10,5e5,50,true);

Hi,

Have you had a look to this answer? Maybe a bug - #3 by hschindl
Best,
D

@Danilo , yes, but the error occured at 2kV/cm.

By the way, for argon, at ELECTRIC FIELD = 10. VOLTS/CM, the same error occured.

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…

when the code is:
MediumMagboltz gas;

gas.SetComposition(“Ar”, 93.,“CO2”,7.);

gas.SetTemperature(293.15);

gas.SetPressure(760.);

gas.SetFieldGrid(100,2e5,50,true);

int ncoll=10;

gas.GenerateGasTable(ncoll);

everything worked well.


but when change the code from
gas.SetFieldGrid(100,2e5,50,true);
to
gas.SetFieldGrid(100,1e5,50,true);

the error
“WARNING ENERGY OUT OF RANGE,INCREASE ELECTRON ENERGY INTEGRATION RANGE”
at electric field value 1930.6977 VOLTS/CM.


so, maybe, the Magboltz would stall at large electric field value
or some values
or some range.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.