Point data for OpenFOAM, coordinates

Good day to everyone. I would like to ask for an advice of somebody more experienced with ParaView than me, and I will be grateful for any input.

I use paraview (paraFoam) to postprocess and also to export data after an OpenFOAM simulation. Specifically I export point data in .csv files using SpreadSheetView. And I’ve noticed that actual coordinates of points are slightly different from those in OpenFOAM (in “points” file), in 7-8-th digits, but different. That happened to be significant for some of mine additional postprocessing, so I would like to ask a couple of questions:

  1. Is that really true that ParaView uses different points for interpolating point data, or I am doing something wrong? Because it was surprising for me, to be honest.

  2. If it is true - is there a way to similarly get point data but in exact vertices of the OpenFOAM mesh? I understand, that OpenFOAM uses cellcenters for computation, but anyway the whole mesh is there.

I use an ubuntu build of OpenFOAM-11, and it shows version 5.10.0-RC1 of paraview, which I launch through paraFoam.

Thanks in advance for your time,
Best,

ParaView is not paraFOAM, paraFOAM is not ParaView but is merely based on it.
This is a ParaView support discourse, not paraFOAM.

In any case, please share data to reproduce.

version 5.10.0-RC1 of paraview

This is old, please use 5.13 or 6.0.0-RC2

Dear Mathieu,

thank you for the answer. Sorry for the confusion of paraFOAM with ParaView, I thought one may treat them as equivalents.

I’ve downloaded the latest version of ParaView (6.0.0-RC2) for Windows and the issue is still there. So I attach the data to reproduce, and I’ll be very grateful for any thoughts and advice:

test_case.rar (529.0 KB)

Attached is a folder of an OpenFOAM case, it can be opened in ParaView through the file “file_to_open_the_case.foam” (the way I know to open cases). Then if one goes to SpreadSheetView for point data, sets Precision for 16 and in parallel opens file Points from folder Constant/polyMesh, it can be immediately seen that, for example, Z coordinates of the first points are messed up after 11-th digit (it is even -0.01365 in Points and -0.01365000009536743 in ParaView). So I would like to know why does that happen and is there something to do to change that (I mean to make ParaView to use the mesh from the case).

Thanks again for your time,
Best,
Nikita

I can open the data you shared and I see -0.01365 in the spreadsheet view.

Where do you see -0.01365000009536743 ?

Have you set Precision to 16 digits? In our application we happened to need high precision. I attach a screenshot of my ParaView:

Please precise which setting you set

Thanks for your collaboration, Mathieu! But what setting exactly do you mean? I downloaded ParaView for Windows and haven’t changed there anything general, so all settings should be default. Then I open the case through opening file “file_to_open_the_case.foam”, then I press apply and choose two panel view (Split Horizontal Axis). On the right side I choose SpreadSheetView, there I remove all visible data except Points to see only coordinates and then I change in the upper menu of the SpreadSheetView window Precision to 16 (instead of default 6). And that’s how I see the screen attached above

Ok got it.

What you see is due to the fact that in not all number can be accuretely represented using floating point numbers, which ParaView (and all software except very specialized software uses).

You can read it up here: Double-precision floating-point format - Wikipedia