# How to model volume electric field?

**URL:** <https://forum.spis.org/t/how-to-model-volume-electric-field/1435>\
**Category:** SPIS\
**Created:** [25 November 2024 17:26 UTC](https://forum.spis.org/t/how-to-model-volume-electric-field/1435 "2024-11-25T17:26:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amha3329](https://forum.spis.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@amha3329](https://forum.spis.org/u/amha3329)\
**Post date:** [25 November 2024 17:26 UTC](https://forum.spis.org/t/how-to-model-volume-electric-field/1435/1 "2024-11-25T17:26:57Z")

</div>

Hi,

I would like to be able to model the electric field of a spacecraft that results within the entire control volume. When I run my simulations, I see there is an empty file for “Volume Electric Field”. How to enable my simulation to generate this?

Thanks.

---

<div class="post-metadata">

**Author:** ![frejon](https://forum.spis.org/letter_avatar_proxy/v4/letter/f/7feea3/32.png) [@frejon](https://forum.spis.org/u/frejon)\
**Post date:** [10 December 2024 15:32 UTC](https://forum.spis.org/t/how-to-model-volume-electric-field/1435/2 "2024-12-10T15:32:47Z")

</div>

Hi Amy. I’ve had issues generating this file before. I’m not sure what is wrong, but you can calculate the electric field from the plasma potential files.

---

<div class="post-metadata">

**Author:** ![amha3329](https://forum.spis.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@amha3329](https://forum.spis.org/u/amha3329)\
**Post date:** [10 December 2024 16:00 UTC](https://forum.spis.org/t/how-to-model-volume-electric-field/1435/3 "2024-12-10T16:00:26Z")

</div>

Hi Fredrik,  
Do you have any suggestions on how to calculate the electric field from the plasma potential files? I am new to SPIS and Paraview, so any advice is appreciated.

---

<div class="post-metadata">

**Author:** ![frejon](https://forum.spis.org/letter_avatar_proxy/v4/letter/f/7feea3/32.png) [@frejon](https://forum.spis.org/u/frejon)\
**Post date:** [16 December 2024 14:07 UTC](https://forum.spis.org/t/how-to-model-volume-electric-field/1435/4 "2024-12-16T14:07:18Z")

</div>

Hi Amy. Also tagging Yongshan Ba, who had a similar question @23131213962

1. export the final plasma potential (or whatever potential you want) from spis to .vtk
2. Open it in Paraview
3. Apply the filter “Gradient” in Paraview. It gives you values in x, y, z as well as the magnitude. As long as your coordinate system is in meters, this should be V/m [https://www.paraview.org/paraview-docs/latest/python/paraview.simple.Gradient.html](https://www.paraview.org/paraview-docs/latest/python/paraview.simple.Gradient.html)

Save the data (e.g. export to .csv / .vtk) or visualize it, whatever you want.

---

<div class="post-metadata">

**Author:** ![23131213962](https://forum.spis.org/letter_avatar_proxy/v4/letter/2/ce7236/32.png) [@23131213962](https://forum.spis.org/u/23131213962)\
**Post date:** [17 December 2024 05:21 UTC](https://forum.spis.org/t/how-to-model-volume-electric-field/1435/5 "2024-12-17T05:21:09Z")

</div>

I had never used paraview before and now I have solved my problem, thanks a lot!
