vertex-centered coordinates vs cell-centered variables
The variables (u, v, w, den, vis, p) are cell-centered (CC) in EllipSys. On the other hand the coordinates are vertex-centered (x, y, z).
It appears that this is currently not taken into account in the ellipsys_paraview_plugin, hence the CC values are wrongly displayed at the vertices. As a simple example, consider the 2D lid-driven cavity (https://gitlab.windenergy.dtu.dk/EllipSys/ellipsys2d_testcases/-/tree/lid_cavity/cavity), where one would expect V=0
at the walls (x=0
and x=1
), but ellipsys_paraview_plugin shows V\neq 0
there!
In other words, the CC variables need to be "moved" half a cell size to the right and half a cell size upwards.
In the EllipSys Fortran postprocessor (which outputs Plot3D files normally used for Fieldview) this is handled by doing an interpolation of the CC variables onto the vertices (https://gitlab.windenergy.dtu.dk/EllipSys/ellipsys2d/-/blob/master/SourcesMPI/PostProcessor/PostProcessor.f):
As I see it we have two options:
- Either we change to CC coordinates instead (do an interpolation of the coordinates).
- Interpolate the CC variables to the vertices like in the EllipSys postprocessor. However, this would mean that it doesn't make sense to have the "load ghost cells" option anymore.