# Warning energy out of range,increase electron energy integration range

I want to generate the He gas at the 500 Torr, the error shows like below.

I think @hschindl can help.

Ok,Thanks a lot for your help.

Same question as when you reported a similar issue earlier (Warning energy out of range when generate the gas file):

What is the range of electric fields that you are using and at what electric field does the error occur?

Hi,
the range of electric fields I am using is from 187.5 V/cm to 1125V/cm.
How to see the electric field value when the error occur?

Thanks! And how many electric field points did you simulate? Maybe just share the lines of code that you used to setup the electric field grid.

Itâ€™s in the Magboltz output.

Hi,
Thatâ€™s my code ,honestly I am not sure about the fuction of nE and ncoll

`````` // Set the field range to be covered by the gas table.
const size_t nE = 50;
const double emin =187.5;//0.5/1.33=0.375
const double emax =1125;//3/1.33=2.25
// 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("He-500Torr.gas");
}*/
``````

Sorry, where to find the Magboltz output.

I meant the output of your program on the terminal.

Ok, thanks, I will try to reproduce the issue.

I would suggest a couple of changes though:

• The electric field range (187.5 - 1125 V/cm) is quite limited, so I think linear spacing is a better choice (set the `useLog` flag to `false`).
• 50 electric field points is really a lot. There is normally no point of having such fine spacing.
1 Like

1,The electric field range (187.5 - 1125 V/cm) is set according to the actual experimental situation of the detector at the 500 Torr. If I set the useLog flag to false , will there be a large deviation from the experimental data? Besides why the gas file at the other pressure bigger than 500Torr can be generated using the same code, but not less than 500 Torr?
2,what 's the electric field points used for? Is it for the computational accuracy? whatâ€™s the reasonable value of the electric field points in this case?

For some reason, the automatic calculation of the electron energy range in Magboltz seems to fail at 187.5 V/cm for this pressure and gas. This does happen sometimes but I donâ€™t have a good explanation why. Iâ€™ll raise the issue with the author of Magboltz.

As a workaround/solution you can slightly change the electric fields at which you run the Magboltz calculations. Youâ€™ll find attached a program that works for me.

generate.C (891 Bytes)

No.

No, itâ€™s the number of electric fields at which you run Magboltz. Please see the relevant documentation in the user guide or the website (in particular this page)

1 Like

Hi,