Home | News | Documentation | Download

How to modify the gas file?

Hello, sir. I was using example drifttube with the gas card “ar_93_co2_7_3bar.gas” before. Now I want to fix the proportion of gas to co2 20%& ar 80% .How should I do and whether I could define my own gas card?

I guess @hschindl can help.

Hi,
you’ll need to create a gas file for Ar/CO2 (80:20). You can find instructions in the first part of the
drift tube example and here.
You can find an example program in the directory Examples/GasFile of the source tree.

What is 2T or 0T mean in file “ar_80_co2_20_2T.gas” ?

I run ./generate to create my new file but the program is running too slow, is it normal?

“0T” = no magnetic field (0 Tesla)
“2T” = 2 Tesla

Magboltz can indeed take a while to run…

I have finished running this program but i didn’t get the output file. Didn’t gas.WriteGasFile(“ar_60_co2_40.gas”) create a new file?

Yes, the program should normally have created a new file. Do you still have the last few lines of output from your program?

like this

Hm, that doesn’t look like it terminated normally. Not sure if it’ll help but could you try increasing the stack size limit

ulimit -s unlimited 

and re-running?

Still have problem…Everytime i run it took me an hour, too long isn’t it …

Running Magboltz to generate a gas file can indeed take several hours, depending on the number of fields, the requested accuracy, and the gas gain.
Can you try to reduce the number of fields and upper limit of the electric field range and see if the program terminates?

As a general guideline, please don’t post screenshots but logs of the output.

I fixed nE=2 emax=1000 .It worked, I got the file.The log is as follow.output_log.txt (29.9 KB)

So, how many field I should choose to simulate the real case?

Great!

It really depends on your application. You can find some pointers on this page.

To avoid losing all the results if the program crashes, you can also split the range of fields that you want to cover in multiple intervals, generate a separate gas table for each interval and then stitch the gas files together.

For example, In radius 1.5cm drifttube, I set 3000v Voltage on wire and 0v on tube. Then emin=0 and emax=3000v/1.5cm ,and nE mean divide the electric field into n segments between emin and emax .Is it right?

Not quite… The field close to the wire is much higher. The electric field in a drift tube is given by

E = (V / log(b / a)) * (1 / r)

where a is the wire radius and b is the radius of the tube. For 3000 V, b = 1.5 cm and a = 25 um you would get a field of around 188 kV / cm at the wire.