# Issues with the vector display

**URL:** https://discourse.paraview.org/t/issues-with-the-vector-display/7182
**Category:** ParaView Support
**Created:** [May 9, 2021, 8:50am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182 "2021-05-09T08:50:03Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![baba](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://discourse.paraview.org/u/baba)
#### Post date: [May 9, 2021, 8:50am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/1 "2021-05-09T08:50:04Z")

</div>

Hello there,

I use paraview in combination with openFOAM and I am a total noob in both. I tried to run the first tutorial in openFOAM, but I have some problems with vector rendering there.

1. The only vector I have in my data is U, however when I use the glyph filter I can only select the scalar p. U does not show up in the selection in the toolbar.
2. someone gave me the tip to create my vector with the calculater using the formula sqrt(U\_X^2+U\_Y^2+U\_Z^2), but when I enter this into the calculator, I get the following error message:

Syntax error: expecting a variable name; see position 5ERROR: In /build/paraview-vlxewD/paraview-5.7.0/VTK/Common/Misc/vtkFunctionParser.cxx, line 1243  
vtkFunctionParser (0x557c75c73230): Syntax error: expecting a variable name; see position 5

An error occurred when parsing the calculator’s function. See previous errors.Warning: In /build/paraview-vlxewD/paraview-5.7.0/VTK/Filters/Core/vtkArrayCalculator.cxx, line 363  
vtkPVArrayCalculator (0x557c750e7490): An error occurred when parsing the calculator’s function. See previous errors.

So, now I don’t know where it expects a variable and what variable name it should give.

I hope someone can help me to generate the velocity vector for the right vector representation.

---

<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: [May 9, 2021, 9:14am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/2 "2021-05-09T09:14:46Z")

</div>

please share your data

---

<div class="post-metadata">

### Author: ![baba](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://discourse.paraview.org/u/baba)
#### Post date: [May 9, 2021, 10:28am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/3 "2021-05-09T10:28:29Z")

</div>

I’m not completely sure how you mean that. After the calculation in OpenFOAM, I have 5 directories for 5 time steps, each with the files p, phi and U in them. In the file for U, for example, the data after the OpenFOAM header is as follows:

dimensions [0 1 -1 0 0 0 0];

internalField nonuniform List  
400  
(  
(0.000249136 -0.000245641 0)  
(0.000137297 0.000111667 0)  
(-0.00116243 0.000558043 0)  
(-0.00343171 0.000872759 0)  
(-0.00628217 0.00103011 0)  
(-0.00932353 0.00104524 0)  
(-0.012208 0.000942603 0)  
(-0.0146482 0.000748202 0)  
(-0.0164225 0.000486721 0)  
(-0.0173758 0.000181792 0)  
(-0.0174205 -0.000142538 0)  
(-0.0165407 -0.000460362 0)  
(-0.0147979 -0.000742949 0)  
(-0.0123365 -0.000958733 0)  
(-0.00938798 -0.00107452 0)  
(-0.00626732 -0.00105852 0)  
(-0.00335775 -0.000886232 0)

Is that what you meant?

---

<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: [May 9, 2021, 10:32am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/4 "2021-05-09T10:32:34Z")

</div>

What I mean is to zip your OpenFOAM directory and share the archive using wetransfer or similar.

---

<div class="post-metadata">

### Author: ![baba](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://discourse.paraview.org/u/baba)
#### Post date: [May 9, 2021, 10:43am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/5 "2021-05-09T10:43:38Z")

</div>

Ah ok, I hope it works like this now. Under the following link is the OpenFOAM directory where I had tried it:

> **[cavity.zip](https://wetransfer.com/downloads/db8a0442ef9c2ab0decdfea98ebeb64d20210509104107/8f6e90)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

---

<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: [May 9, 2021, 10:54am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/6 "2021-05-09T10:54:13Z")

</div>

I have no problem selecting the U vector as the orientation array:

 ![a](https://discourse.paraview.org/uploads/default/original/2X/2/2ede0f5123822e51560073e4dce890024da0194e.png)

---

<div class="post-metadata">

### Author: ![baba](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://discourse.paraview.org/u/baba)
#### Post date: [May 9, 2021, 11:21am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/7 "2021-05-09T11:21:24Z")

</div>

This is the same output I get, but it does not represent the velocity distribution.  
I should actually see in the top bar, where with me only solid color, p , vtk compositionindex,… I should also be able to select a U.

 ![Error](https://discourse.paraview.org/uploads/default/original/2X/c/c2c1757b47cc1b821bd527a2507a5802f26dbec7.png)

The correct output should actually look like this:

 ![RightOutput](https://discourse.paraview.org/uploads/default/original/2X/6/63ffb314c9f324cb7acfc212f8337495c4b6d960.png)

---

<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: [May 9, 2021, 11:46am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/8 "2021-05-09T11:46:33Z")

</div>

Which version of ParaView are you using ? I think this issue has been fixed already.

---

<div class="post-metadata">

### Author: ![baba](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://discourse.paraview.org/u/baba)
#### Post date: [May 9, 2021, 11:49am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/9 "2021-05-09T11:49:04Z")

</div>

My paraview version is 5.7.0, which was the one I got by sudo apt-get install paraview. Which version would I need?

---

<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: [May 9, 2021, 11:51am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/10 "2021-05-09T11:51:59Z")

</div>

I’d recommend 5.9.0, You can download it here: [https://www.paraview.org/download/](https://www.paraview.org/download/)

---

<div class="post-metadata">

### Author: ![baba](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/a5b964/32.png) [@baba](https://discourse.paraview.org/u/baba)
#### Post date: [May 9, 2021, 11:55am UTC](https://discourse.paraview.org/t/issues-with-the-vector-display/7182/11 "2021-05-09T11:55:52Z")

</div>

Thank you, I will try it.
