# Evenly Spaced Streamlines 2D

**URL:** https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452
**Category:** ParaView Support
**Created:** [January 29, 2020, 7:04pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452 "2020-01-29T19:04:20Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [January 29, 2020, 7:04pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/1 "2020-01-29T19:04:20Z")

</div>

This seems right. Also make sure the seed point is in the same plane normal on Z.

If that does not work can you share you dataset?

Thanks,  
Dan

> Dear Dan,  
> I am in a similar situation to that of Nayla.  
> I have a 3D data set and I follow the path:
> 
> calculate 2D vector using U\_XiHat+U\_YjHat  
> take a 2D slice normal to z  
> try to use the filter and he tells me I am not on a XY plane.
> 
> Can you please give me a suggestion that might point me in the right direction?  
> Thanks a lot.
> 
> Joao

---

<div class="post-metadata">

### Author: ![JMir](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@JMir](https://discourse.paraview.org/u/JMir)
#### Post date: [January 30, 2020, 8:32am UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/2 "2020-01-30T08:32:24Z")

</div>

[3D data](https://drive.google.com/file/d/1ShKeS8c0TYw4bWF3J8s3e5Ix6amqOv5S/view?usp=sharing)

Dear Dan,  
Please see the downloadable data.  
Thanks a lot.

Best wishes,

Joao

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [January 30, 2020, 2:58pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/3 "2020-01-30T14:58:52Z")

</div>

It seems that  
2D\_data\_test/2D\_data\_test\_0\_0.vtu

is missing from the zip archive.

Can you check this?

Thanks,

Dan

---

<div class="post-metadata">

### Author: ![JMir](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@JMir](https://discourse.paraview.org/u/JMir)
#### Post date: [January 31, 2020, 7:35am UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/4 "2020-01-31T07:35:45Z")

</div>

Dear Dan, sorry.  
That file should not be required for the problem at hand.  
Basically I took a slice, used the calculator filter to get a 2D vector with U\_X_iHat+U\_Y_jHat and wrote it as a vtk file. Then I tried to open it and do the 2D streamlines but it did not work.  
Please see in annex the file. [2D\_data\_test\_0\_0.vtm](https://discourse.paraview.org/uploads/short-url/osUCnWslEv4VedzsekHHzi5h5JX.vtm) (637 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: [January 31, 2020, 7:44am UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/5 "2020-01-31T07:44:38Z")

</div>

please provide `2D_data_test/2D_data_test_0_0.vtu`

---

<div class="post-metadata">

### Author: ![JMir](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@JMir](https://discourse.paraview.org/u/JMir)
#### Post date: [January 31, 2020, 7:51am UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/6 "2020-01-31T07:51:35Z")

</div>

Can this be of use?  
Thanks a lot  
[2D\_data\_test\_0\_0.vtp](https://discourse.paraview.org/uploads/short-url/d7RD25CIDVc8hk9hkhiyMdNpKp4.vtp) (3.5 MB)

---

<div class="post-metadata">

### Author: ![Ali\_Shayegh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ali_shayegh/32/1837_2.png) [@Ali\_Shayegh](https://discourse.paraview.org/u/Ali_Shayegh)
#### Post date: [January 31, 2020, 11:52am UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/7 "2020-01-31T11:52:32Z")

</div>

I think you are looking for the data Joao has provided [here](https://discourse.paraview.org/t/best-practice-for-plotting-streamlines-around-a-cylinder/2351/18). I tested the evenlySpaced filter in this case many times with no success. As it is an OpenFOAM case, you only need to open “foam.foam” from within paraview.

---

<div class="post-metadata">

### Author: ![Pradip\_Aryal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pradip_aryal/32/8071_2.png) [@Pradip\_Aryal](https://discourse.paraview.org/u/Pradip_Aryal)
#### Post date: [October 14, 2022, 12:48pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/8 "2022-10-14T12:48:57Z")

</div>

Hi Dan,

I followed these steps and was able to create evenly-spaced streamlines on a 2D planE. But how can I place arrows on these streamline like the one seen here  
[https://www.kitware.com/evenly-spaced-streamlines-2d/](https://www.kitware.com/evenly-spaced-streamlines-2d/)

Best regards,

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [October 14, 2022, 3:55pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/9 "2022-10-14T15:55:21Z")

</div>

Hi Pradip,  
There is a paraview state file and a dataset (make sure you uncompress it) linked in the blog that will produce the two images shown.  
The links were broken, but we just fixed them.

You have to use the arc\_length filter to compute the length of the streamlines, contour filter to produce equally spaced points and the glyph filter to place the arrows at those points.

---

<div class="post-metadata">

### Author: ![Pradip\_Aryal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pradip_aryal/32/8071_2.png) [@Pradip\_Aryal](https://discourse.paraview.org/u/Pradip_Aryal)
#### Post date: [October 14, 2022, 9:54pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/10 "2022-10-14T21:54:29Z")

</div>

Hi Dan,

I couldn’t uncompress the data file. Seems it has been corrupt. When trying to extract, it returns “This does not look like a tar archive” (in Linux) and “The archive is corrupt” (in Windows). The Paraview state file opens to a new link and has no downloads. Could you please check again?

I did apply arc\_length filter and contour filter to get the points. I think it should be correct up to this point. After that, when applying the glyph filter, I can’t get the arrow quite like the ones in the blog.

1. If I apply a regular glyph filter then the arrows are like the regular arrows for velocity vectors where you can change glyps type to Arrow/cone/box etc.
2. If I apply GlyphWithCustomSource filter with the previous contour as an input/glyph source, it gives a thin line on those points.

Best regards,

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [October 14, 2022, 10:03pm UTC](https://discourse.paraview.org/t/evenly-spaced-streamlines-2d/3452/11 "2022-10-14T22:03:32Z")

</div>

Try right click and then Save link as… for both the pvsm and the tgz file. I use Chrome on Windows to download the files and Ubuntu 20.04 on Windows to untar the data file.  
Then I used ParaView 5.10 to load the pvsm. I got a warning about a deprecated Glyph filter but everything worked fine and got the two images.
