2018-06-23 13:04 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002962OpenFOAM[All Projects] Bugpublic2018-06-22 10:43
Assigned To 
PlatformHP Z640OSDebianOS Version9.4
Product Versiondev 
Target VersionFixed in Version 
Summary0002962: Refresh button in Paraview (using paraFoam) does not work
DescriptionWhen postprocessing with Paraview (using paraFoam with OpenFOAM reader) pressing the refresh button does not load newly created timesteps.
This functionality existed in a prior version of the OpenFOAM reader and is very useful when postprocessing a big transient case.
Without this funtionality paraview has to be closed an re-opened which can be very time-consuming.
Steps To ReproduceRun tutorial case, e.g., ./tutorials/incompressible/simpleFoam/windAroundBuildings, start paraFoam after time=50 has been written and press reload after time=100 has been written. The new timestep is not read in.
TagsNo tags attached.
Attached Files




henry (manager)

I use the "Refresh Times" button several time a day and just used it now without any problems.


chris (manager)

I just ran the example with windAroundBuildings using:
- openfoam-dev pack, version 20180527
- paraviewopenfoam54, version 0-3

It worked fine, I cannot reproduce the issue.


chris (manager)

I can reproduce the issue if I start paraFoam BEFORE time=50 has been written and press reload after time=50 has been written.


henry (manager)

I cannot reproduce the problem even if I start paraFoam BEFORE time=50 has been written and press reload after time=50 has been written; time=50 loads fine.


shildenbrand (reporter)

I use locally compiled version of both. I'll check the compilations again to see if there are any errors.


will (manager)

Go to "View > Animation View", and set "Mode" in the new panel to "Snap To TimeSteps". Does that fix it?


shildenbrand (reporter)

My compilation of the PVReader shows many warnings (see file attached) but I am not sure if this is connected to my problem. If I provide "stdbool.h" manually the problem of not being able to refresh persists.
In "View > Animation View", "Mode" was already set to "Snap To TimeSteps", so this doesn't fix it.


shildenbrand (reporter)

Additional information:
If I leave Paraview open, close the loaded case, and re-open it (when there are more timesteps available), I still only see the number of timesteps available at the first start of Paraview.

When using the builtin-reader (.foam extension), refresh works fine


will (manager)

The warnings generated when compiling the reader module are a result of paraview's code. They are irritating, but they do not affect functionality.

I have built on debian 9.4 in a virtual machine, and I cannot reproduce your issue.


shildenbrand (reporter)

Thank you for testing this in my environment. I made some more tests this morning. Could you please try to reproduce the issue when you set

fileHandler collated;

in ./OpenFOAM-dev/etc/controlDict and do a wmRefresh?

We have set collated as standard, I tried this morning the uncollated filehandler and now the refresh button works again.


will (manager)

OK, the fact that you are using collated file handling was the crucial bit of information. I can reproduce this now. The file handler is keeping a cache of the times and this cache is not being rebuilt when you hit refresh. If the first half of the if statement in masterUncollatedFileOperation::findTimes is removed then the problem goes away. That's not a solution, though. @MattijsJ could you please advise how this should be fixed?


MattijsJ (reporter)

This is not easily fixed. The masterUncollated and collated file handlers cache times to avoid excessive directory reading. They internally keep track of any additional time directories being added. The paraFoam is external to this so does not know that time directories have been added.

For now as a workaround run paraFoam with uncollated. In bash:

FOAM_FILEHANDLER=uncollated paraFoam


shildenbrand (reporter)

The workaround works for me. Thank you.


will (manager)

We can't expect users to know of this limitation and modify their execution of paraFoam accordingly. I would have thought that we need to either (a) allow paraFoam/vtkPVFoam to disable the caching and live with the additional read-times, or (b) add a method so that paraFoam/vtkPVFoam can clear the cache when the user hits refresh. @Mattijs, what is your preference, or do you have an alternative?


MattijsJ (reporter)

A similar (but different) issue lives inside e.g. decomposePar (and that thermo field writing business) where we need to switch off the threading. In fact we don't need to switch off threading - we just need to be able to wait for everything to be written.

Similar to your suggestion I would add a 'clearOut' or 'flush' method which would clear the cache and guarantee any files to be written. This would cover both the thread business and time caching issues.

-Issue History
Date Modified Username Field Change
2018-05-29 10:26 shildenbrand New Issue
2018-05-29 11:17 henry Note Added: 0009665
2018-05-29 11:21 chris Note Added: 0009666
2018-05-29 11:44 chris Note Added: 0009667
2018-05-29 11:48 henry Note Added: 0009668
2018-05-29 12:02 shildenbrand Note Added: 0009669
2018-05-29 18:19 will Note Added: 0009670
2018-05-30 07:28 shildenbrand File Added: compile_PVReader
2018-05-30 07:28 shildenbrand Note Added: 0009671
2018-05-30 07:33 shildenbrand Note Added: 0009672
2018-06-14 16:23 will Note Added: 0009766
2018-06-15 06:44 shildenbrand Note Added: 0009771
2018-06-15 10:19 will Note Added: 0009775
2018-06-19 11:52 MattijsJ Note Added: 0009795
2018-06-19 12:15 shildenbrand Note Added: 0009796
2018-06-20 12:46 will Note Added: 0009805
2018-06-22 10:43 MattijsJ Note Added: 0009810
+Issue History