CFD: finding the vorticity magnitude the streamwise direction of an airfoil

107 Views Asked by At

I am doing CFD and I have to find the magnitude of the vorticity vector in the streamwise direction of an airfoil in every mesh cell. The streamwise direction is defined as being parallel to the airfoil camber line.

What I have done is that I interpolated a third degree polynomial, using my mesh data, to represent the camber line. I then use that polynomial $f(x)$ to:

1: Map every cell in the mesh to the point on the camber line that is closest to that cell. (I checked the results of this mapping and it looks fine).

2: Differentiate $f(x)$ at that point to find the to find the angle $\theta$ between the streamwise direction and the $x$-axis

$$ \theta = \arctan(\frac{df(x)}{dx}) \text{.} $$

3: Use the vorticity vector components $\omega_x$ and $\omega_y$, which I calculated taking the curl of the velocity field, and find the vector magnitude in the streamwise direction, given by the angle $\theta$ (now this is where I believe my approach is failing, because the results I get are not physical). Finally, I can find the streamwise vorticity $\omega_s$

$$ \omega_s = \omega_x \cos(\theta) + \omega_y \cos(\frac{\pi}{2}-\theta) \text{.} $$

I am wondering what the fault is. My guess is that my trigonometry is off, but I can't see how. Any help would be much appreciated.

Edit: Turned out there was an error in my code...