Patch contributed by Timo Niemi, VTT. Resolves patch request https://bugs.openfoam.org/view.php?id=2452