Thursday, October 2, 2014

How To Plot Residuals in OpenFOAM

A sample script.

#!/bin/bash

foamLog log.simpleFoam >/dev/null

gnuplot -persist > /dev/null 2>&1 << EOF
        set logscale y
        set title "Residual vs. Iteration"
        set xlabel "Iteration"
        set ylabel "Residual"
        plot "logs/Ux_0" with lines,\
                "logs/p_0" with lines
EOF

The video: