Problem with O2 at low electric field

Hello, I have been trying to perform some simulations of electronic transport parameters in air. First I would like to start with dry air. The code I am using is quite similar to the one in Garfield’s examples. It is attached below:

#include <iostream>

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

using namespace Garfield;

int main(int argc, char * argv[]) {

  const double pressure = AtmosphericPressure;
  const double temperature = (273.15 + 20);

  MediumMagboltz gas;
  gas.SetComposition("N2", 75.5392, "O2", 23.1781, "Ar", 1.2827);
  gas.SetTemperature(temperature);
  gas.SetPressure(pressure);

  gas.EnableThermalMotion(true);

  gas.SetFieldGrid(100. , 20000., 1000, true);

  gas.GenerateGasTable(10);

  gas.WriteGasFile("Air_20C_760mmHg_NoHumid.gas");

}

However, when the electric field is low (<1000 V/cm, approximately) I get a message from which the program does not progress. I attach below the message:

This happens with Magboltz version 11.11 (not with version 11.9). However, in this version the attachment coefficient is not null (something that happens in version 11.9) and I think it describes better its behavior. However, due to the above mentioned problem I am not able to do a complete simulation.

I am not sure if the problem comes from my code or the latest version has a bug.

Thanks for your help !

Hi,
thanks for reporting this issue! The problem doesn’t come from your code, I can also reproduce with the standalone version of Magboltz. It seems to happen in the Magboltz subroutine that does the time-of-flight calculation of the Townsend coefficient. I’ll contact the author of Magboltz to see if we can implement a fix (it’s probably quite straightforward).

In the meantime, as a workaround you could start the calculation at 1000 V/cm or so and skip the lower fields.

By the way, I saw that in your program you set a grid with 1000 electric field points. That’s really a lot (too much). The relevant transport parameters like drift velocity, attachment coefficient, etc. typically don’t have features that require such a high resolution (and the calculation will take a long time).

Thank you for your response. I take note of the recommendation

Regards !

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