CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Error reading variable velocity (0/U.air) (https://www.cfd-online.com/Forums/paraview/155522-error-reading-variable-velocity-0-u-air.html)

pici July 2, 2015 10:20

Error reading variable velocity (0/U.air)
 
Hi to everybody,
sometime, when I use a variable speed like this (in 0/U.air file):
Code:

boundaryField
{   
Bocca 
    {
        type                  uniformFixedValue;
        uniformValue    table (
            (0 (0 0 0))
            (0.1 (0 0 12))
            (3.5 (0 0 12))
            (4 (0 0 0))
            );
        phi                    phi.air;
        alpha                alpha.air;
    }
etc...

it happens that openFOAM solver (in my case is DMPFoam) works without any formatting error, but paraview 4.3.1 isn't able to read, showing this error code in Output Message Window:

Code:

ERROR: In /home/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6467
 vtkOpenFOAMReaderPrivate (0x40c36b0): Error reading line 39 of /media/piero/ExpansionDrive/Root/CMS_oF_2015/oF_cfd/CFL_test/0/U.air:
Expected a number, found (

It seems that paraview is unable to read vectors, in this situation.
Can someone suggest a solution?
Many thanks
Piero

alexeym July 2, 2015 15:13

Hi,

It is not paraview and vectors. It is native paraview OpenFOAM reader and uniformFixedValue (table). So either you ignore error for 0 time (first save will just write value in file, which paraview reads quite successfully), or use OpenFOAM file reader (i.e. compile plugin, use OpenFOAM extension).

pici July 3, 2015 05:04

Quote:

Originally Posted by alexeym (Post 553061)
Hi,

It is not paraview and vectors. It is native paraview OpenFOAM reader and uniformFixedValue (table). So either you ignore error for 0 time (first save will just write value in file, which paraview reads quite successfully), or use OpenFOAM file reader (i.e. compile plugin, use OpenFOAM extension).

Hi Alexey,
I tried you first suggestion (to ignore time 0 errors), but it doesn't work:
in fact, also the second time-step is written as the first, and Paraview 4.3.1 reports the same (=previous) error. The second time step 0.002/U.air is written as quoted:
Code:

internalField  nonuniform List<vector>
11343
(
(-0.00154137 -0.0263397 -0.000788795)
(-0.00271444 -0.0279804 6.3755e-05)

So, my feeling is that Paraview is going wrong to read vectors. I will try to send a bug-report to Kitware.
About you second suggestion (compile plugin, use OpenFOAM extension), I have no time in this moment, by I will do a.s.a.p.
Thank you for your help.

alexeym July 3, 2015 06:50

Hi,

Quote:

Originally Posted by pici (Post 553288)
I tried you first suggestion (to ignore time 0 errors), but it doesn't work:
in fact, also the second time-step is written as the first, and Paraview 4.3.1 reports the same (=previous) error. The second time step 0.002/U.air is written as quoted:
Code:

internalField  nonuniform List<vector>
11343
(
(-0.00154137 -0.0263397 -0.000788795)
(-0.00271444 -0.0279804 6.3755e-05)


Well, yes, you are partly right (I have confused error message with the one, which usually appears in case of #incude statements in boundary conditions). Yet still, the reason for the error is this

Code:

...
        uniformValue    table (
            (0 (0 0 0))
            (0.1 (0 0 12))
            (3.5 (0 0 12))
            (4 (0 0 0))
            );
...

part of BC file, as you have got scalar/vector tuples, and Paraview does not like these things. Fortunately Paraview reads pure vectors quite successfully.

pici July 5, 2015 05:00

again . . .
 
Quote:

Originally Posted by alexeym (Post 553436)
Hi,
Well, yes, you are partly right (I have confused error message with the one, which usually appears in case of #incude statements in boundary conditions). Yet still, the reason for the error is this
Code:

...
        uniformValue    table (
            (0 (0 0 0))
            (0.1 (0 0 12))
            (3.5 (0 0 12))
            (4 (0 0 0))
            );
...

part of BC file, as you have got scalar/vector tuples, and Paraview does not like these things. Fortunately Paraview reads pure vectors quite successfully.

So, Alexey, I rest of my opinion: :rolleyes: some Paraview developer does not like these things, but, because this things are standard in openFOAM and they work fine . . . . .

:cool: Well, this is my actual workaround:
- reconstructPar (if run was parallelized)
- foamToEnsight -nodeValues
At this point, paraView reads perfectly Ensight case
Thanks of your interest
Piero


All times are GMT -4. The time now is 05:40.