paraview crashes when openning a specific variable from openfoam results

I have a solution from an openFOAM simulation. In addition to velocity (U) and pressure ( p), I also have a user-defined variable (called D) in each time folder. This D is actually a scalar being transported in my domain.
When I want to open my results in paraview, it crashes when the variable D is selected to be loaded (it crashes without any error). But when I de-select D and exclude it from loading up, then paraview is happy and show my results for U and p.

Since these results are from a solver I wrote I am just not sure if the issue is from my solver in openfoam, or from paraview.

Below is the link to my openfoam case folder (20 MB, a zip file) with only a few time folders. Can anybody take a look at it and see if you can load it up successfully.

Thanks

The error says:

( 46.610s) [paraview ] vtkOpenFOAMReader.cxx:7184 ERR| vtkOpenFOAMReaderPrivate (0x197d1670): Error reading line 18 of /home/glow/tmp/ScalarTransportWithSource_NewSolver/1/D: Expected a number, found a non-digit character .

Not sure if this is a bug in the OpenFOAM reader or an issue in your file.

FYI @olesenm

Thanks @mwestphal ;
I may have found the reason.
Will update here if that is the case.

@mwestphal
@olesenm

Ok, I think I have found the reason why paraview is crashing in my case:
Generally, each variable in time directories from OpenFOAM simulations have their units (dimensions) in a format like this (this one is for velocity as an example):

dimensions [0 1 -1 0 0 0 0];

It seems like paraview doesn’t like it when the units are not integers. For example, in my case attached above, the unit for D is:

dimensions [0 0 -1.60261437908 0 0 0 0];

which paraview does not like. But, if I manually change the units to integers, paraview will be happy to load it up.
You may wonder where such a weird unit (-1.60261437908) is coming from; but when you are dealing with empirical data fitting, you may end up having a variable with non-integer units.
Can you explain why paraview doesn’t like non-integer units??

Note that OpenFOAM has the dimension checking as a built-in feature, but never complained about my weird unit.

Please see the pending merge-request 7602 which also addresses the issue 18103.

Not sure when it will get finalized and merged.

2 Likes

The OpenFOAM dimension checking is something entirely different. It provides a top-level check to catch inconsistency (Eg, (p + T) => dimension error).

1 Like