Skip to content

foamMonitor fails to update the graph due to the deprecation of the 'reread' command in Gnuplot version 6

Summary

foamMonitor does not function properly with Gnuplot 6. This is due to its use of the 'reread' command, which has been deprecated in Gnuplot 6.0.

Steps to reproduce

Run the $FOAM_TUTORIALS/incompressible/pisoFoam/RAS/cavity example case. In a separate terminal, execute foamMonitor to graph the residual files, and wait for 10 seconds.

foamMonitor -l postProcessing/solverInfo1/0/solverInfo.dat

Example case

$FOAM_TUTORIALS/incompressible/pisoFoam/RAS/cavity

Increasing the endTime from 10 to 100 might make the problem more apparent.

What is the current bug behaviour?

The following error message appears in the terminal where foamMonitor is executed. Even when the monitored residual files are updated, the graph is not refreshed.

reread
^
"/tmp/tmp.SomeRandomNum" line 22: deprecated command

What is the expected correct behavior?

No error message is displayed in the terminal where foamMonitor is executed, and the residual graph is updated.

Environment information

  • OpenFOAM version : v2406
  • Operating system : Ubuntu 24.04
  • Gnuplot version : 6.0

Possible fixes

For example, use a while loop instead of the reread command, as shown in the following example.

while(1){
    plot
    pause $REFRESH
}

foamMonitor-r1.patch

Edited by Shinji Nakagawa