Issues with the vector display

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.

please share your data

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?

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

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

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

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.

The correct output should actually look like this:

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

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

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

Thank you, I will try it.