# How to get the drift velocity under 100V/cm

**URL:** <https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424>\
**Category:** Garfield++\
**Created:** [June 25, 2023, 1:11am UTC](https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424 "2023-06-25T01:11:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsw](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/71c47a/32.png) [@fsw](https://root-forum.cern.ch/u/fsw)\
**Post date:** [June 25, 2023, 1:11am UTC](https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424/1 "2023-06-25T01:11:31Z")

</div>

i have used the medium::GetElectronVelocity to print the e velocity ,but the result under 100V/cm is always same. what should i do to calculate the velocity under 100V/cm？  
 ![20230625091059](https://root-forum.cern.ch/uploads/default/original/3X/3/d/3d62827ee4c7d730070eae9964f1491bc3ffefe5.png)

---

<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:** [June 26, 2023, 5:46am UTC](https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424/2 "2023-06-26T05:46:33Z")

</div>

Hi,  
I guess 100 V/cm is the lowest electric field included in your gas table. By default, the velocity below the lowest field in the table is assumed to be constant. You can change this behaviour using the function `SetExtrapolationMethodVelocity`. For instance, if you want linear extrapolation towards low fields and towards high fields:

```auto
MediumMagboltz gas;
// ...
gas.SetExtrapolationMethodVelocity("linear", "linear");

```

If you want accurate results for the velocity below 100 V/cm you should adjust the electric field range such that it covers all values you are interested in and re-run Magboltz.

---

<div class="post-metadata">

**Author:** ![fsw](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/71c47a/32.png) [@fsw](https://root-forum.cern.ch/u/fsw)\
**Post date:** [June 28, 2023, 4:22am UTC](https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424/3 "2023-06-28T04:22:03Z")

</div>

Thank you for your reply!  
Which function can I use to adjust the electric field range ? I haven`t found other function relating this or i need to change the head file

---

<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:** [June 28, 2023, 8:59am UTC](https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424/4 "2023-06-28T08:59:13Z")

</div>

`SetFieldGrid`

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

---

<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:** [July 12, 2023, 8:59am UTC](https://root-forum.cern.ch/t/how-to-get-the-drift-velocity-under-100v-cm/55424/5 "2023-07-12T08:59:41Z")

</div>

Closed on July 12, 2023, 8:59am UTC

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