CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Unable to read Positions file in IcoUncoupledParcelFoam in Paraview (https://www.cfd-online.com/Forums/paraview/199596-unable-read-positions-file-icouncoupledparcelfoam-paraview.html)

shanvach March 9, 2018 12:21

Unable to read Positions file in IcoUncoupledParcelFoam in Paraview
 
Hi all,

I am conducting OpenFoam simulations to track particles in a channel.However postprocessing the positions file gives me the following error

ERROR: In C:\ParaView\ParaView-5.4.1-src\VTK\IO\Geometry\vtkOpenFOAMReader.cxx, line 8307
vtkOpenFOAMReaderPrivate (0xe50baf0): Error reading line 23 of C:\OpenFOAM\17.10\cygwin64\opt\OpenFOAM\OpenFOAM-dev\tutorials\lagrangian\icoUncoupledKinematicParc elFoam\Spreading_of_RBCs_Bif\0.05/lagrangian/kinematicCloud/positions: Expected punctuation token ')', found 0

This error crops up in both Paraview 4.4 and Paraview 5.4.
How do I resolve this problem?

blebon June 15, 2018 10:17

Paraview does not display Lagrangian particles (even when writing in ascii format)
 
Title explicit. With OpenFOAM 5.x and even when dumping data in ascii format, this errors pop ups when trying to read Lagrangian results:


Code:

ERROR: In C:\bbd\2d618e80\build\superbuild\paraview\src\VTK\IO\Geometry\vtkOpenFOAMReader.cxx, line 8287 vtkOpenFOAMReaderPrivate (000000000CAE7A50): Error reading line 20 of Cyclone/Tutorial/2/lagrangian/kinematicCloud/positions: Expected punctuation token ')', found 0
Anyone knows a workaround for this?

olesen June 16, 2018 15:17

The problem is caused by the switch to barycentric coordinates. If you have access to OpenFOAM-v1712 you can enable writing of Lagrangian positions (in the etc/controlDict). This produces positions that are essentially xyz as per earlier versions and can be read by paraview. The barycentric coordinates are still used internally but are now saved on disk as 'coordinates'. In OpenFOAM-v1806 this flag will be on by default, since it is obviously quite useful.
Another option is to use foamToEnsight or foamToVTK to convert the Lagrangian parcels. With the ensight output you will preserve time information more easily than with the VTK output.


/mark

clemerlin June 26, 2018 03:38

Hi shanvach,
Which version of OF are you using ?
It seems that with OF 5.X, they are issues with the postions file... I don't really know why sorry.
But you can try to run your simulation with a previous version of OF and it should be ok

Cheers

wyldckat July 17, 2019 19:08

Quick note: The error message seems to be related to the barycentric 'positions' file that OpenFOAM 5 and newer create.

This makes ParaView's internal reader (file extension .foam) to not be able to load this information. A solution for this has been published here: https://www.cfd-online.com/Forums/op...nfoam-5-x.html

SimonStar May 18, 2020 04:26

1 Attachment(s)
Hello everyone,


i have been reading through all the hints and also been checking if they are working in my case but it was not helping me. This costs me more than a day now.

I can see the particles from the vtk-file but they are not moving by clicking play in ParaFoam. But if I open the vtk-files separately in Paraview (Picture), I see that they are there.

Else it gave me the same error than it gave you:

Code:

Error reading line 20 of /home/.../hopperEmptying/0.06/lagrangian/kinematicCloud/positions: Expected punctuation token ')', found 0
  • Like described in the post #5 from @wyldckat was not helping me.
Code:

foamToVTK -fields '()' -noInternal -excludePatches '(".*")'
  • Also not to open a foam.OpenFOAM-File instaed of a foam.foam-file with the OpenFOAM-Reader in Praview. This gives me the same error twice. By opening the vtk-files and by opening the mesh-geometry.
  • Also to delete the 0-File in the .../lagraingian/kinematicCloud-Folder had no positive effect.
The only thing that I left is to use the new alternative with a function object that wyldckat has created. https://github.com/blueCFD/lagrangia...unctionObjects. Is it still working in OpenFOAM v7 or not?

I read the error does not appear by using OpenFOAM from OpenFOAM.com (ESI-OpenCFD). Does this also belong to the latest version?
Is it really a good option to install OpenFOAM completely new just because of this?

Is there anything else I can do?


Thanks
Simon

SimonStar May 19, 2020 04:22

Hello guys,

one of my questions can I answer already:

The alternative with a function object does still work in openfoam v7.
With the guide for this I did it well without ever added a function object before.

https://github.com/blueCFD/lagrangia...o-run-it-again

Regards
Simon

CDVS June 26, 2020 16:22

I have OpenFOAM foundation 7 and I couldn't see the particles in paraview. The only one solution that I found for this was to open the results with extension .OpenFOAM. It seems that .com version doesn't have this error. I tried to add that function that you say but it didn't work for me. What have you done to visualize the results? in OpenFOAM foundation


All times are GMT -4. The time now is 03:29.