# How to plot streamline on 2D velocity contour?

**URL:** https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225
**Category:** ParaView Support
**Tags:** python
**Created:** [January 14, 2021, 11:58am UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225 "2021-01-14T11:58:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fidu13](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@fidu13](https://discourse.paraview.org/u/fidu13)
#### Post date: [January 14, 2021, 11:58am UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225/1 "2021-01-14T11:58:37Z")

</div>

I have some simulations done with openfoam and have some wind tunnel data, where I have the vertical and streamline velocity. I would like to compare this two with a image including the velocity magnitude contour and streamlines. As I am writing a follow up thesis I would like to do this in the similar manner as my predecessor. I would like to achieve a images such as this:  
 ![Capture](https://discourse.paraview.org/uploads/default/original/2X/1/19c350304342e57816062b41757b17501a2ab8b1.png)

I am unable so far to generate the streamline on a 2D plot so far. I think there is a python option streamslice, which should enable this. I however do not understand how I can apply this, even after quite a research… Could you give you explain to my the workflow for this?  
I also would like to have the same horizontal length scales with x/H and y/H. How can I achieve this?

Sorry if this questions is to simply but I am quite stuck right now.

Many thanks already in advance.

Best Fidu13

---

<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 14, 2021, 2:24pm UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225/2 "2021-01-14T14:24:03Z")

</div>

Did you tried  
[https://blog.kitware.com/evenly-spaced-streamlines-2d/](https://blog.kitware.com/evenly-spaced-streamlines-2d/)

?

---

<div class="post-metadata">

### Author: ![fidu13](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@fidu13](https://discourse.paraview.org/u/fidu13)
#### Post date: [January 15, 2021, 6:32pm UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225/3 "2021-01-15T18:32:53Z")

</div>

Hi thanks for the quick reply. I tried but I get the following error:

```
ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Filters\FlowPaths\vtkEvenlySpacedStreamlines2D.cxx, line 125
vtkEvenlySpacedStreamlines2D (0000017C53E8E7A0): vtkEvenlySpacedStreamlines2D does not support planes not aligned with XY.

ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (0000017B05A8AEB0): Algorithm vtkEvenlySpacedStreamlines2D(0000017C53E8E7A0) returned failure for request: vtkInformation (0000017BA0016140)
  Debug: Off
  Modified Time: 29153292
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_DATA
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1
  FROM_OUTPUT_PORT: 0

```

Respective if I use it on z-plane:

`ERROR: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753 vtkCompositeDataPipeline (0000017AB5754D50): Algorithm vtkPVGeometryFilter(0000017BA0098320) returned failure for request: vtkInformation (0000017AE9B67870) Debug: Off Modified Time: 50048809 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA_OBJECT FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 FROM_OUTPUT_PORT: 0`

My workflow for is so far:  
-slice vertical or horizontal plane

- claculate with Calculator : U\_X_iHat + U\_Y_jHat
- apply EvenlySpacedStreamlines2D

Do I need to do something else?

---

<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 18, 2021, 1:51pm UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225/4 "2021-01-18T13:51:42Z")

</div>

Can you share your data (and ParaView state file you are using). The horizontal plane should work

---

<div class="post-metadata">

### Author: ![fidu13](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/a87d85/32.png) [@fidu13](https://discourse.paraview.org/u/fidu13)
#### Post date: [January 18, 2021, 3:10pm UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225/5 "2021-01-18T15:10:32Z")

</div>

Yea sure.  
[streamlines\_horizontal.pvsm](https://discourse.paraview.org/uploads/short-url/gLRNUfjWdIZV1AmrWOD2hJtT9gm.pvsm) (575.3 KB)  
I hope like this it works. Is there any way to get the streamlines for verticaly planes?

Many thanks for your help and time!

---

<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 18, 2021, 3:50pm UTC](https://discourse.paraview.org/t/how-to-plot-streamline-on-2d-velocity-contour/6225/6 "2021-01-18T15:50:25Z")

</div>

Please attach the data as well: alee\_2\_LAD1\_non\_isothermal
