# Plotting Drift Velocity as a function of Electric field with Garfield++

**URL:** <https://root-forum.cern.ch/t/plotting-drift-velocity-as-a-function-of-electric-field-with-garfield/40522>\
**Category:** Garfield++\
**Created:** [July 20, 2020, 7:01am UTC](https://root-forum.cern.ch/t/plotting-drift-velocity-as-a-function-of-electric-field-with-garfield/40522 "2020-07-20T07:01:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![etastar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/5e9695/32.png) [@etastar](https://root-forum.cern.ch/u/etastar)\
**Post date:** [July 20, 2020, 7:01am UTC](https://root-forum.cern.ch/t/plotting-drift-velocity-as-a-function-of-electric-field-with-garfield/40522/1 "2020-07-20T07:01:50Z")

</div>

Hello,  
I would like to plot the drift velocity as a function of the drift field.  
Consider for example the simple GEM example where the the ANSYS files are loaded (no gas file).  
Appreciate help with a short example.  
Many thanks!

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [July 20, 2020, 7:16am UTC](https://root-forum.cern.ch/t/plotting-drift-velocity-as-a-function-of-electric-field-with-garfield/40522/2 "2020-07-20T07:16:59Z")

</div>

Hi,  
you’ll first need to run Magboltz to create a table of the drift velocity (and other transport parameters) as function of the electric field. As a starting point, you can use this example

> **[Examples/GasFile/generate.C · master · garfield / garfieldpp](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/GasFile/generate.C)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

  
(you’ll probably need to adapt the gas mixture and the field grid).  
Once you have this table, you can create a plot as in this example:  

> **[Examples/GasFile/read.C · master · garfield / garfieldpp](https://gitlab.cern.ch/garfield/garfieldpp/-/blob/master/Examples/GasFile/read.C)**
>
> http://garfieldpp.web.cern.ch/garfieldpp/

---

<div class="post-metadata">

**Author:** ![etastar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/5e9695/32.png) [@etastar](https://root-forum.cern.ch/u/etastar)\
**Post date:** [July 20, 2020, 10:03am UTC](https://root-forum.cern.ch/t/plotting-drift-velocity-as-a-function-of-electric-field-with-garfield/40522/3 "2020-07-20T10:03:33Z")

</div>

Many thanks for the quick reply. I will try the examples.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 3, 2020, 10:03am UTC](https://root-forum.cern.ch/t/plotting-drift-velocity-as-a-function-of-electric-field-with-garfield/40522/4 "2020-08-03T10:03:34Z")

</div>

Closed on August 3, 2020, 10:03am UTC

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