Home | News | Documentation | Download

gas.LoadGasFile() vs gas.Initialise(true)


Thus far, I have been using gas.Initialise(true) to calculate the cross-section upfront (like this post suggested: Is it possible to parallelize Garfield? - #16 by Pete). However, s this the equivalent of gas.LoadGasFile(‘filename.gas’)?

the two methods do different things. LoadGasFile prepares the tables of macroscopic transport parameters (drift velocity, diffusion coefficients, Townsend coefficient, etc.) while Initialise prepares the table of microscopic scattering rates.


I see. When is the gas file necessary? Like what am I missing at the moment because I am not loading a gas file?

More specifically, what happened when a gas file is not provided? How does Garfield handle that?

if you are using microscopic tracking for the electrons (AvalancheMicroscopic), then you don’t need the gas file at all. The only consequence of not having a gas file loaded is that the tables of macroscopic electron transport parameters will be empty (but AvalancheMicroscopic doesn’t need and doesn’t access them).
You do need to load a gas file if you use AvalancheMC or DriftLineRKF for simulating electron drift lines (Gas files | Garfield++).


Thank you for clarifying. For my case, I use both AvalancheMicroscopic and DriftLineRKF. To simulate the avalanche, I first call AvalancheElectron() and then retrieve the coordinates of the electrons in the avalanche by calling GetElectronEndpoint(). Next, I use those coordinates as the coordinates of the ions created in the avalanche and drift them by calling DriftIon(). Can you please let me know if this is the correct way to simulate an avalanche inside of a gas medium?

Also, based on your reply, it seems I may have been simulating things incorrectly since I have not provided a gas file for the DriftLineRKF class, right?

No, that’s absolutely fine. For simulating ion drift lines you need indeed a table of the relevant macroscopic ion transport parameters (specifically the ion mobility), but this table is typically imported using the function LoadIonMobility. I guess you have a line like that in your program?

Yes! I took some values based on a paper and imported it using LoadIonMobility.

Regarding my other question on how to simulate an avalanche, should I make a different post since it does not really relate to the topic of this thread?

As you prefer. We can also use this thread…

At the moment, here are the steps that I take to simulate the avalanche process:

  1. drift the primary and secondary electrons that were created by the incident particle using AvalancheElectron()
  2. grab the coordinates of the electrons that were created inside of the avalanche using GetElectronEndpoint()
  3. use those coordinates as the initial position of the positive ions that were created alongside the avalanche electrons and drift them using DriftIon()

Is this the correct approach? Please let me know if the above steps are not clear.

Yes, that’s absolutely correct.

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