Dear all,

How to calculate the major and minor axes of a bubble based on 3D inclined bubble interface vtk data?

I sample some vtk bubble interface data from OpenFOAM, at the same time, I also saved the 6 extreme points of the bubble interface in the XYZ direction(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax), the coordinate data of these points are used to calculate the major axis and minor axis of the bubble. In addition, mass center (Xc, Yc, Zc) is also recorded

The (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax) of this bubble is known,

ΔX=Xmax-Xmin & ΔY=Ymax-Ymin & ΔZ=Zmax-Zmin;

**So, the major axis equals to ΔY or ΔX, the minor axis equals to ΔZ;**

This approach works well when the bubbles are not incline, **but**,As the size of the bubble increases, it will incline and the method of directly evaluating the major and minor axes of the bubble using the coordinates of the 6 extreme points fails.

For inclined bubbles, now I have vtk files for each moment of the bubble, but the calculated major axis and minor axis are all wrong (because the calculation scheme of the major axis and minor axis of the non-inclined bubble is adopted). In addition, I also have the centroid coordinates at each moment. Most papers indicate that the short axis can be aligned with the velocity direction. I wonder if I can extract the minor axis from this scheme?

But how can this be done from various vtk files in paraview?

For example, how to establish the vector formed by the centroid coordinates of adjacent time steps in paraview and find the coordinates of the two intersections with the vtk interface. In addition, consider that this work needs to be performed in batches, because the long and short axes of multiple vtk files need to be calculated (I guess at present whether we need to cooperate with python script to achieve the purpose)

At one moment, I wanted to measure manually, but suddenly I thought, I am a follower of Paraview, how can I do such a thing.

guys, give me a hands!

If it is really impossible to calculate ratio with vtk, we will finally go back to OpenFOAM to improve the solver to output the correct major and minor axes of the inclined bubble. If you have experience, or if you have suggestions on algorithm, can you tell us more? thx

Best regards!

Na