CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Error reading variable velocity (0/U.air)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 2, 2015, 10:20
Question Error reading variable velocity (0/U.air)
  #1
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 45
Rep Power: 4
pici is on a distinguished road
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
pici is offline   Reply With Quote

Old   July 2, 2015, 15:13
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,132
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
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).
alexeym is offline   Reply With Quote

Old   July 3, 2015, 05:04
Unhappy
  #3
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 45
Rep Power: 4
pici is on a distinguished road
Quote:
Originally Posted by alexeym View Post
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.
pici is offline   Reply With Quote

Old   July 3, 2015, 06:50
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,132
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

Quote:
Originally Posted by pici View Post
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.
alexeym is offline   Reply With Quote

Old   July 5, 2015, 05:00
Cool again . . .
  #5
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 45
Rep Power: 4
pici is on a distinguished road
Quote:
Originally Posted by alexeym View Post
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: some Paraview developer does not like these things, but, because this things are standard in openFOAM and they work fine . . . . .

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
pici is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable velocity boundary condition Madeleine P. Vincent OpenFOAM Running, Solving & CFD 2 May 6, 2013 13:38
UDF for time based variable to calculate velocity longhuandu Fluent UDF and Scheme Programming 1 January 21, 2013 07:38
variable gas density - constant velocity mauz Main CFD Forum 0 March 15, 2010 10:38
time variable velocity Michelle FLUENT 4 March 7, 2008 06:23
Time Variable Velocity programming? Michelle FLUENT 2 February 18, 2008 13:38


All times are GMT -4. The time now is 04:58.