Home | News | Documentation | Download

Plotting gas properties

i ran a gasfile in garfield++ and i got gas files for different gas mixtures.i have a gas file for each mixture. how to plot the gas properties against electric field. that is for example,plotting the drift velocities of different gas mixtures vs.electric field in the same graph.some suggest using loops.if any one have suggestion or sample of loop code, i will appreciate your help.

One possibility to plot the electron transport properties of a given gas mixture is to use the class “ViewMedium”. For instance, to plot the Townsend coefficient as a function of the electric field, you can do something like this:

ViewMedium* viewer = new ViewMedium();
 viewer->SetMedium(gas);
 viewer->SetElectricFieldRange(100., 100000.);
 viewer->PlotElectronTownsend('e', 0., 0.);

This offers only a limited amount of flexibility though. For instance, it’s a bit tricky to superimpose transport properties of different gas mixtures this way. There is clearly some room for improvement here.

Alternatively, you can retrieve the transport properties from the Medium class, for instance using the function

Medium::ElectronVelocity(const double ex, const double ey, const double ez, 
                         const double bx, const double by, const double bz, 
                        double& vx, double& vy, double& vz);

if you want to get the interpolated values at a given electric and magnetic field, or

Medium::GetElectronVelocityE(const unsigned int ie, const unsigned int ib, const unsigned int ia, double& v);
Medium::GetElectronVelocityExB(const unsigned int ie, const unsigned int ib, const unsigned int ia, double& v);
Medium::GetElectronVelocityB(const unsigned int ie, const unsigned int ib, const unsigned int ia, double& v);

if you want to retrieve the components of the drift velocity at a given point in the gas table (ie, ib, ia are the indices in the list of electric fields, magnetic fields, and angles).
You can then plot them, for instance, using a TGraph.

thanks a lot for your reply. i’ll try to use these information.

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