Hello,
I have two problems when simulating electron avalanches in my geometry:
The avalanche size is very different from DriftLineRKF (~10^5) to AvalancheMicroscopic (~10^2).
When I enhance the field (boundary condition 2, cathode, in sif file), I get the error:
DriftLineRKF::DriftLine: Step size has become smaller than int. accuracy. Stop.
DriftLineRKF::AddIonTail:
Unable to obtain an ion tail; tail not added.
For weaker fields like -550 V, this error does not occur. I enhanced the accuracy using the statement (also with lower numbers):
void SetIntegrationAccuracy(const double eps = 1.e-4);
There are similar topics in the forum, but they didn’t help.
Does someone has an idea what is happening here or see a problem in my code? It is attached. I use Gmsh+Elmer+Garfield++.
I am missing a couple of files to compile your code. Could you maybe upload a new version that includes the following:
THGEM/mesh.header does not exist.
THGEM/mesh.elements does not exist.
THGEM/mesh.nodes does not exist.
THGEM/THGEM.result does not exist.
THGEM/THGEM_WTlel.result does not exist.
I ll try to install gmesh and elmer in the meanwhile and see if I can calculate those files.
Thanks
Piet
if there is a discrepancy between DriftLineRKF and AvalancheMicroscopic, it could be due to the low pressure. Can you try switching on RKN steps in AvalancheMicroscopic (EnableRKNSteps)? Also, the avalanche size that you get from AvalancheMicroscopic will fluctuate from avalanche to avalanche; the average gain should be consistent with DriftLineRKF though.
Regarding the message Unable to obtain an ion tail; tail not added.: was the ion mobility imported successfully? Can you show the output log?
I also noticed a couple of things reading through the code:
The lines
const size_t nMaterials = elm.GetNumberOfMaterials();
for (size_t i = 0; i < nMaterials; ++i) {
const double eps = elm.GetPermittivity(i);
if (fabs(eps - 1.) < 1.e-3) elm.SetMedium(i, &gas);
}
and
elm.SetGas(&gas);
are redundant, i. e. do the same thing (associate regions with ε = 1 with the gas medium).
Thank you for reviewing the code! Yes, it requires some clean-up…
I now used EnableRKNSteps for AvalancheMicroscopic and will check whether the avalanches are now similar in size to those calculated using RKF. Thank you for this hint! I did not find it in the documentation, is it described somewhere what this is?
The output is attached. The IonMobility was imported successfully.
I couldn’t get rid of the accuracy problem when playing around with SetIntegrationAccuracy.
DriftLineRKF::AddIonTail:
Unable to obtain an ion tail; tail not added.
disappears. The error
DriftLineRKF::DriftLine: Step size has become smaller than int. accuracy. Stop.
persists. Only for really high values like 10, this error disappears. What is a reasonable value for the accuracy?
I also tried to set a maximum step size of 1e-3, but that doesn’t help here.
As said, for lower fields, this problem does not occur.
Regarding AvalancheMicroscopic: Using
aval.EnableRKNSteps(true);
on the first look. the avalanches are still underestimated, compared the DriftLineRKF result, by a factor of about 3 to 10 - depending on the fields. I will have a closer look at it.