# Electric field lines

**URL:** https://discourse.paraview.org/t/electric-field-lines/3152
**Category:** ParaView Support
**Tags:** vtk
**Created:** [December 9, 2019, 5:03pm UTC](https://discourse.paraview.org/t/electric-field-lines/3152 "2019-12-09T17:03:36Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Tommaso\_Scali](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tommaso_scali/32/2298_2.png) [@Tommaso\_Scali](https://discourse.paraview.org/u/Tommaso_Scali)
#### Post date: [December 9, 2019, 5:03pm UTC](https://discourse.paraview.org/t/electric-field-lines/3152/1 "2019-12-09T17:03:36Z")

</div>

Good morning,

I would like to visualize the stream lines of my Electric Field.  
I’m using a code that gives me the electric field components as output (2D --\> Ex,Ey).  
It’s varying over the time because I’m using different files for animation.  
Is there a way to do that?

Thank you very much, best regards,

Tommaso

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 9, 2019, 5:05pm UTC](https://discourse.paraview.org/t/electric-field-lines/3152/2 "2019-12-09T17:05:35Z")

</div>

I would say yes, but you will have to be more specific if you need help.

---

<div class="post-metadata">

### Author: ![Tommaso\_Scali](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tommaso_scali/32/2298_2.png) [@Tommaso\_Scali](https://discourse.paraview.org/u/Tommaso_Scali)
#### Post date: [December 9, 2019, 5:45pm UTC](https://discourse.paraview.org/t/electric-field-lines/3152/3 "2019-12-09T17:45:27Z")

</div>

Ok, thanks.  
Here for example there are 4 files.  
field.pvd contains the electric field at a certain point with the two components.  
field\_ani\_anim.pvd “calls” all the other files “field\_ani\_mesh\_xxx” (I just posted here two examples) to have the animation over time of the variables.  
By now I can visualize the total magnitude and the two components of the electric field, but I would need to visualize also the lines considering it as a vector.

[field.pvd](https://discourse.paraview.org/uploads/short-url/d4kKZ4gKVTy0j8rJLQh7bIHlrLX.pvd) (167 Bytes) [field\_ani\_anim.pvd](https://discourse.paraview.org/uploads/short-url/gDHlPIJbwKzJhkqnvc92kjH8aLX.pvd) (178 Bytes) [field\_ani\_mesh\_000001.vts](https://discourse.paraview.org/uploads/short-url/wU3I8qcbTF2ACdwJZcjofSRhIYV.vts) (1.8 MB) [field\_ani\_mesh\_000201.vts](https://discourse.paraview.org/uploads/short-url/zh8poYGdQneaUt9ae3KzJVMttYa.vts) (1.8 MB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 9, 2019, 5:48pm UTC](https://discourse.paraview.org/t/electric-field-lines/3152/4 "2019-12-09T17:48:26Z")

</div>

Which lines are you talking about ?

---

<div class="post-metadata">

### Author: ![Tommaso\_Scali](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tommaso_scali/32/2298_2.png) [@Tommaso\_Scali](https://discourse.paraview.org/u/Tommaso_Scali)
#### Post date: [December 9, 2019, 7:11pm UTC](https://discourse.paraview.org/t/electric-field-lines/3152/5 "2019-12-09T19:11:19Z")

</div>

The vector. With the x component and y component it should be possible to have the direction of the field.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 10, 2019, 9:49am UTC](https://discourse.paraview.org/t/electric-field-lines/3152/6 "2019-12-10T09:49:06Z")

</div>

Do you want to show glyphs ?

 ![image](https://discourse.paraview.org/uploads/default/original/2X/f/f51ee4c745a78782c0e710ac7451b5b07010016e.jpeg)

---

<div class="post-metadata">

### Author: ![Tommaso\_Scali](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tommaso_scali/32/2298_2.png) [@Tommaso\_Scali](https://discourse.paraview.org/u/Tommaso_Scali)
#### Post date: [December 10, 2019, 9:50am UTC](https://discourse.paraview.org/t/electric-field-lines/3152/7 "2019-12-10T09:50:53Z")

</div>

Yes exactly, in 2D.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 10, 2019, 10:02am UTC](https://discourse.paraview.org/t/electric-field-lines/3152/8 "2019-12-10T10:02:00Z")

</div>

So, add a Glyph filter.

---

<div class="post-metadata">

### Author: ![Tommaso\_Scali](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tommaso_scali/32/2298_2.png) [@Tommaso\_Scali](https://discourse.paraview.org/u/Tommaso_Scali)
#### Post date: [December 10, 2019, 10:08am UTC](https://discourse.paraview.org/t/electric-field-lines/3152/9 "2019-12-10T10:08:32Z")

</div>

Yes I tried to do that. But this is what I got. I don’t know if the problem is in the properties of the filter I’m using or if I have to manipulate the files before.  
 ![Glyph](https://discourse.paraview.org/uploads/default/original/2X/2/27bdd2a4cac4ead3ae20c9cf4a2798f229209e21.png)

[boundaries.vtp](https://discourse.paraview.org/uploads/short-url/tg0XtMwTLWieCvDmZ22zv9tIaNw.vtp) (4.7 KB) [field.pvd](https://discourse.paraview.org/uploads/short-url/d4kKZ4gKVTy0j8rJLQh7bIHlrLX.pvd) (167 Bytes)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 10, 2019, 10:09am UTC](https://discourse.paraview.org/t/electric-field-lines/3152/10 "2019-12-10T10:09:38Z")

</div>

Take a look into the properties of the filter. Play with the scaling until you find what you are looking for.

---

<div class="post-metadata">

### Author: ![Tommaso\_Scali](https://discourse.paraview.org/user_avatar/discourse.paraview.org/tommaso_scali/32/2298_2.png) [@Tommaso\_Scali](https://discourse.paraview.org/u/Tommaso_Scali)
#### Post date: [December 10, 2019, 10:13am UTC](https://discourse.paraview.org/t/electric-field-lines/3152/11 "2019-12-10T10:13:19Z")

</div>

Yes I’m trying to do that but the problem is as soon as I apply the filter my domain and my geometry disappears. Anyway I will work on it again and I’ll let you know if have more specific questions.  
Thank you!
