Closed semi-h closed 6 months ago
I dropped _v2v
from the name of the curl subroutine. I realised that we have transeq
, der1st
, der2nd
and so on all start on velocity grid and end on velocity grid. I think it is okay to omit _v2v
everywhere, because its the primary grid and making it default makes sense. If we switch from p2v
, v2p
, or work on pressure grid directly (p2p
), it is important to highlight this in the name.
I dropped
_v2v
from the name of the curl subroutine. I realised that we havetranseq
,der1st
,der2nd
and so on all start on velocity grid and end on velocity grid. I think it is okay to omit_v2v
everywhere, because its the primary grid and making it default makes sense. If we switch fromp2v
,v2p
, or work on pressure grid directly (p2p
), it is important to highlight this in the name.
Agreed, the main place where this came up in Xcompact3d was when doing the derivatives/interpolation from velocity to pressure and back again. These were marked v2p
or equivalent, otherwise there was generally no marking. I think this gives a good balance between ease of reading and "self documenting" code. If felt necessary we can put comments/documentation about where the transeq and poisson equations operate.
I added two new vector operators
divergence_v2v: required for checking the divergence of velocity fieldAlso renamed original divergence -> divergence_v2p and gradient -> gradient_p2v to clarify that these are switching from vertex grid to pressure grid.
Had a quick chat with @slaizet and he pointed out that we actually check the divergence of velocity field at the pressure grid and divergence of velocity at velocity grid wouldn't be zero. So removing divergence_v2v as we don't see any use case for it.