CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Vorticity in OpenFOAM; Negative to when I compute from fvc::grad(U) (https://www.cfd-online.com/Forums/openfoam-programming-development/224058-vorticity-openfoam-negative-when-i-compute-fvc-grad-u.html)

tzaht February 5, 2020 20:44

Vorticity in OpenFOAM; Negative to when I compute from fvc::grad(U)
 
Hi there,



I output the values of the velocity gradient tensor, as well as, the vorticity for my simulation.


Let's just consider the rotation about the x-axis for simplicity.


The problem that I am having is that when I compute \omega_x =  \frac{\partial w}{\partial y} - \frac{\partial v}{\partial z}, this is the definition of curl in the OpenFOAM Programmer's guide 2.1.3. Howeber, I actually get the negative of the vorticity in the standard OpenFOAM output file.


Now, when I again follow the maths in the Progammer's guide, I see that OpenFOAM is actually computing the hodge dual of the rotation rate tensor, so for [math] \omega_x = \omega_{23}[\math]. This should indeed be \omega_x =  \frac{\partial w}{\partial y} - \frac{\partial v}{\partial z}.


Now, the only thing I can think of that I may be doing wrong is that I assume that OF is writing the VGT in the following order: \partial_x{u} ,\partial_y{u},\partial_z{u},\partial_x{v}...
Any help appreciated.

HPE February 11, 2020 16:18

is it possible for you to provide a test case?


All times are GMT -4. The time now is 19:20.