I just started learning CFD
My problem is that the function of calculating vorticity in the filter is in the source code. I don’t understand the mathematical equation it represents.
Does anyone know how to write this source code as a mathematical equation.
The picture is the mathematical equation I want to calculate the vorticity
The variable gradients represents the velocity gradient tensor, and each component of the gradients array is as follows:
gradients[0]=\partial u/\partial x
gradients[1]=\partial u/\partial y
gradients[2]=\partial u/\partial z
gradients[3]=\partial v/\partial x
gradients[4]=\partial v/\partial y
gradients[5]=\partial v/\partial z
gradients[6]=\partial w/\partial x
gradients[7]=\partial w/\partial y
gradients[8]=\partial w/\partial z
Therefore, the source code, expressed as a mathematical expression, is shown below:
vorticity[0] = gradients[7]-gradients[5] = \partial w/\partial y - \partial v/\partial z
vorticity[1] = gradients[2]-gradients[6] = \partial u/\partial z - \partial w/\partial x
vorticity[2] = gradients[3]-gradients[1] = \partial v/\partial x - \partial u/\partial y