GasFile generate problem

Hi,

When I was generating the gas file, the program got stuck at 483293V. The program is still running, but after waiting here for several hours, no new results have been generated.

(Where the program stuck)

image

The code I used is as follows:

#include "Garfield/FundamentalConstants.hh"
#include "Garfield/MediumMagboltz.hh"

using namespace Garfield;

int main(int argc, char* argv[]) {
  const double pressure = 0.26 * AtmosphericPressure;
  const double temperature = 300;

  // Setup the gas.
  MediumMagboltz gas("Ar", 85., "CO2", 15.);
  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 = 1000.;
  const double emax = 1000000.;
  // Flag to request logarithmic spacing.
  constexpr bool useLog = true;
  gas.SetFieldGrid(emin, emax, nE, useLog);

  const int ncoll = 10;
  // Run Magboltz to generate the gas table.
  gas.GenerateGasTable(ncoll);
  // Save the table.
  gas.WriteGasFile("ar_85_co2_15.gas");
}

Hi, especially at very high fields this is normal behaviour, and a single step (so without update to the terminal) can easily take > 4h. You likely got stuck on the penultimate HV point. I would propose you let it run overnight. Alternatively you can run 2 separate gasfiles, one from 1kV/cm to 100kV/cm (in 15-20 steps), and a 2nd one that will go much slower from 100kV/cm to 1MV/cm (in 3-5 steps). Like this you do not lose the computing time for the first points. In your program you can load the two gasfiles and they will be merged.

greets
Piet

Hi,

Thanks for your reply. I was stuck for another 9 hours and terminated the program directly.

Alternatively you can run 2 separate gasfiles, one from 1kV/cm to 100kV/cm (in 15-20 steps), and a 2nd one that will go much slower from 100kV/cm to 1MV/cm (in 3-5 steps).

I will try to generate two gas files.

Sincerely

Migu