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? |
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 |
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 |
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 |
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 |
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
Code:
foamToVTK -fields '()' -noInternal -excludePatches '(".*")'
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 |
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 |
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. |