Skip to content

pressureDifferencePatch / pressureDifferenceSurface not working

Summary

The pressureDifferencePatch & pressureDifferenceSurface scripts in $FOAM_ETC v2112 don't work as supplied.

They need a couple of tweaks to make them work - (see attached patch)

Steps to reproduce

In a solved case (motorBike tutorial for example):

  • foamGetDict pressureDifferencePatch (choose option 1)
  • Edit system/pressureDifferencePatch to reference inlet & outlet
  • Run postProcess -func pressureDifferencePatch -latestTime -field p

What is the current bug behaviour?

postProcess aborts with an error suggesting something's up with the config files:

--> FOAM FATAL IO ERROR: (openfoam-2112)
Entry 'regionType' not found in dictionary "/home/openfoam/motorBike_v2112/system/pressureDifferencePatch.functions.region1"

What is the expected correct behavior?

Output of the average pressure difference between specified patches

Environment information

  • OpenFOAM version : v2112
  • Operating system : Ubuntu / Docker
  • Hardware info : Mac
  • Compiler : ??

Possible fixes

See attached patch

0001-TUT-incorrect-pressureDifference-fixes-2482.patch

Edited by Robin Knowles