CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Unable to read Positions file in IcoUncoupledParcelFoam in Paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2018, 12:21
Post Unable to read Positions file in IcoUncoupledParcelFoam in Paraview
  #1
Member
 
Join Date: Apr 2016
Posts: 30
Rep Power: 10
shanvach is on a distinguished road
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?
shanvach is offline   Reply With Quote

Old   June 15, 2018, 10:17
Default Paraview does not display Lagrangian particles (even when writing in ascii format)
  #2
Member
 
Bruno Lebon
Join Date: Dec 2012
Posts: 33
Rep Power: 13
blebon is on a distinguished road
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?

Last edited by wyldckat; July 17, 2019 at 19:10. Reason: Note: This post was moved from another thread and relates to the comment below
blebon is offline   Reply With Quote

Old   June 16, 2018, 15:17
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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
olesen is offline   Reply With Quote

Old   June 26, 2018, 03:38
Default
  #4
New Member
 
Join Date: Mar 2018
Posts: 4
Rep Power: 8
clemerlin is on a distinguished road
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
clemerlin is offline   Reply With Quote

Old   July 17, 2019, 19:08
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: Writing the old 'positions' file in Lagrangian solvers as of OpenFOAM 5.x
joaran likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 18, 2020, 04:26
Default
  #6
Member
 
SimonStar's Avatar
 
Simon
Join Date: Sep 2019
Location: Germany
Posts: 51
Rep Power: 6
SimonStar is on a distinguished road
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
Attached Images
File Type: jpg Hopper.jpg (70.6 KB, 33 views)

Last edited by SimonStar; May 19, 2020 at 02:51.
SimonStar is offline   Reply With Quote

Old   May 19, 2020, 04:22
Default
  #7
Member
 
SimonStar's Avatar
 
Simon
Join Date: Sep 2019
Location: Germany
Posts: 51
Rep Power: 6
SimonStar is on a distinguished road
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
SimonStar is offline   Reply With Quote

Old   June 26, 2020, 16:22
Default
  #8
New Member
 
Cristian David Vargas
Join Date: Mar 2020
Posts: 5
Rep Power: 6
CDVS is on a distinguished road
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
CDVS is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 16:18
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 10:57


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