How to locate cell in a specified thread based on given coordinates?
I'm working on a UDF for simulating Vertical-Axis Turbines in Fluent via an Actuator Line Model (ALM).
One of the main issues I've encountered is the sampling of the flow velocity in multiple points of a specified mesh thread, where the turbine rotor is. This has to be done inside the UDF for each blade element (considering 3 blade and 40 points for each blade, they are 120 in total).
So far, I've used a function based on DPM_Locate_Point:
t = Lookup_Thread(d, ID_thread);
a.ct.c = c;
a.ct.t = t;
DPM_Locate_Point(Ps, &a, 0.0, 0);
c = RP_CELL(&a);
t = RP_THREAD(&a);
which is repeated for every sampling point. This process however has revealed to be extremely slow. Is there a better way this can be done?
Thank you for your help,