I am working on the analysis of a data set that resulted from a simulation of a Tornado. I need to be able to transform the vectors for the velocities at each measured point in the space from Cartesian to Polar coordinates. That requires me to be able to located the centre of the tornado at each time step to be able to locate my origin in the Polar coordinates.
I have ran into issues where the centre is not clearly defined by obvious things such as the highest velocities (being the tornado wall) having close proximity to the lowest velocity (the eye of the tornado) as this simulation is not a simple one, it attempts to be very true to real life including other funnel formations off to the side. This meant that simply searching for a point where the vectors have no velocity or even point in a circular pattern resulted in logical errors where my centre would be way off from where I can see it should be.
The vector field, the red dot representing where my current code located the eye to be
The gradient of the same vector field shown as vector arrows
I have looked around on here but haven't been able to find much, the closest thing I could find was a topic that did get a reply but I don't really know how to apply it to my data set as I have velocity in the x and velocity in the y directions for each x and y position on my plane (only looking at one plane of height at a time) for 110 x 190 points. So to find the dot product of this to find a direction I think wouldn't work on it's own. An idea I had was to use the gradients to find a "well" in the velocities, but actually implementing a search for this has proven quite difficult. Any suggestions on how to do this no matter the size of the eye and other smaller formations that mimic but are not a centre would be greatly appreciated.
Using what Stefan said above, I was inspired by the idea of using the overlap of the transformed circles to make a "probability" of my circle centre. This method would have been quite the overkill though, so I looked deeper and (with help of a friend) found an AMAZING paper on the topic! I didn't quite use the method mentioned in this paper either though.
Instead I used the curl to make my "well" that should outline the vortex wall instead of the gradients. Looking at a surface plot of the curl it seemed that I should be able to use the maximum values (the yellow volcano-like peak) for the curl to locate my centre. To do this, I decided to make a value that would capture the x highest curl values (for either direction). The value was based on how large my dataset is so that should I have many many points and a large vortex I can choose more max values for better interpolation here is what the vortex looks like with the velocity vectors. From there, I simply found the mean of the points and eliminated any outliers that fall too far from the mean and indicate an error (resulting from an outside swirling).
Finally then, I could apply what the paper linked above describes where they take the normal to the tangential of the vectors (in my case only the ones that matched the max curl criterion) and then find the intersection of those lines. From this point, since there is not an exact intersection between all points, I simply picked a point right by most of the intersections and did a double linear interpolation between the nearest 4 points to get my centre!
I hope this is useful to someone out there with this specific problem!