OpenFOAM – Postprocessing


Paraview is the chosen postprocessor for OpenFOAM. You should download and install ParaView on your local workstation or laptop, because running this over network might be slow (for extremely large cases with tenths or hundreds of GB with data this not might be the case, but that is not a topic here). Paraview works on most operating systems, both Linux, Windows and Mac.

  1. Download the case files to your computer, i.e. all the time step folders (00.10.2 etc). In addition you might also download the system and constant folders, but the parallel work directories processor0processor1 etc is not needed (you can delete them if you want).
  2. Create a file <case name>.foam in the root of the case directory. <case name> might be any string of your choice. Leave the file empty.
  3. Open Paraview, and open the <case name>.foam file. The window should look like:
  5. Press the Apply button to show the computational domain. The domain will be shown as a grey box.
  6. If you want to show the mesh, this is done by selecting the Display tab in the left pane, and select Wireframe as the representation style:
  8. To show the velocity magnitude, set Representation back to Surface, and select U as the color by variable. There are two options of each variable. The one marked with a square is the raw data, and the one with a dot is interpolated data to give a smoother representation. Go to the last timestep (in the right part of the top menu) and press the Rescale to Data Range button. This should give you something like this:

          Try to show both the interpolated data and smoothed data. You could also choose to color by the pressure.
  9. To create streamlines, press the Stream tracer button in the menubar. Choose the Properteis tab, enter the information given in the image below and press Apply.

          The case shown here is the low Reynolds number case with a 20 by 20 mesh. Try to do this procedure yourself with the 200 by 200 case, and experiment with other tools. One nice exercise is to add velocity vectors (hint: this is called glyphs).

More information about postprocessing can be found in the official tutorial.

Scroll to Top