tutorials
tutorials copied to clipboard
Native ParaView .foam reader cannot render `fixedGradient` BCs correctly
This issue is mainly re-documenting the following issue from ParaView: https://discourse.paraview.org/t/internal-foam-reader-for-openfoam-data-issue-with-fixedgradient-boundary-condition/698, since it is quite relevant for our partitioned approaches. To sum the issue up: in order to visualize an OpenFOAM case with fixedGradient
boundary conditions correctly, one needs to use paraFoam
/ ParaView with the OpenFOAM plugins which reads .OpenFOAM
files. The native paraView reader assumes that a fixedGradient
BC is essentially a zero gradient boundary condition, which obviously leads to wrong values at the respective interface.
I visualized the same result file of our partitioned-heat case (domain length of 1 with 50 uniform elements in surface normal direction which is rather fine resolved) with native ParaView (.foam
) and the paraFoam (.OpenFOAM
) reader and exported the data plot in a csv
file in order to compare both plots. The result looks as follows (upper figure whole domain, lower figure zoom in):
Maybe we should document this somewhere in the adapter documentation.
Does this also happen when you use foam2vtk
?
Yes, foamToVTK
seems to resolve the boundary condition properly. As opposed to any ParaView, it even renders/evaluates time dependent groovyBC correctly.
To make an action out of this issue: would changing our tutorials to create a .OpenFOAM
instead of a .foam
resolve the issue?
The motivation for .foam
was just that the stand-alone ParaView (at least old versions, I am not sure now) did not know how to read .OpenFOAM
files. But in any case, the user can select the default .foam
reader even for the .OpenFOAM
files.
AFAIK the stand-alone paraView still does not render the .OpenFOAM
files (they don't show even up if you try to open them up). Of course, it would resolve the issue assuming that everybody has the OpenFOAM plugins installed, but I guess that's for many users not the case.
I understand that if there is something we can do, then this should be done in the tutorials scripts/documentation. Therefore, I am transfering the issue.