# DriftLineRKF will fail to operate when encountering a zero electric field region

**URL:** <https://root-forum.cern.ch/t/driftlinerkf-will-fail-to-operate-when-encountering-a-zero-electric-field-region/62701>\
**Category:** Garfield++\
**Created:** [January 19, 2025, 11:01am UTC](https://root-forum.cern.ch/t/driftlinerkf-will-fail-to-operate-when-encountering-a-zero-electric-field-region/62701 "2025-01-19T11:01:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedro](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pedro/32/37605_2.png) [@pedro](https://root-forum.cern.ch/u/pedro)\
**Post date:** [January 19, 2025, 11:01am UTC](https://root-forum.cern.ch/t/driftlinerkf-will-fail-to-operate-when-encountering-a-zero-electric-field-region/62701/1 "2025-01-19T11:01:28Z")

</div>

Greetings,

I’m having some issues with the simulation of DriftLineRKF in the electric field generated by COMSOL.  
When I normally add positive and negative high voltages, the operation is normal, and its electric potential field is as follows:

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/9/7/97c9ff4470d000f75a9dc1d449051f9ca6b47fa1.jpeg)  
However, when I apply high voltages at two positions simultaneously, there are some positions in the electric field where the electric field is zero. When the program runs to the middle, the program does not continue to run and no error is reported either. Its electric potential field is as follows:  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/2/9/2985c0dea10f69799559838536689a7256a555db.jpeg)  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/4/5/45aafc6d8ba4c7b126e10fea393875b6f899b51c.jpeg)  
May I ask if this situation occurs with DriftLineRKF?What can I do to solve this problem?  
@hschindl

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [January 19, 2025, 1:21pm UTC](https://root-forum.cern.ch/t/driftlinerkf-will-fail-to-operate-when-encountering-a-zero-electric-field-region/62701/2 "2025-01-19T13:21:02Z")

</div>

Hello,

Thanks for the post. I think the right person to ping is indeed @hschindl .

Best,  
D

---

<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:** [January 19, 2025, 5:45pm UTC](https://root-forum.cern.ch/t/driftlinerkf-will-fail-to-operate-when-encountering-a-zero-electric-field-region/62701/3 "2025-01-19T17:45:39Z")

</div>

Hi,  
indeed, if the electric field (and hence the drift velocity) at a point is zero, `DriftLineRKF` will stop the drift line calculation. If you want to transport electrons in a region with zero (or low) electric field, you could use `AvalancheMC` or `AvalancheMicroscopic` which do include diffusion.

---

<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:** [February 2, 2025, 5:45pm UTC](https://root-forum.cern.ch/t/driftlinerkf-will-fail-to-operate-when-encountering-a-zero-electric-field-region/62701/4 "2025-02-02T17:45:56Z")

</div>

Closed on February 2, 2025, 5:45pm UTC

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