kavatar
Subscriber

Hello Dr Amine,

If I replace the line 

if ((C_VOF(c,t_water) > 0.00001) && (C_VOF(c,t_water) < 0.99999))
{
                dist = fabs(Get_Surface_Distance(c,t_water));
                C_UDMI(c,t,0)=dist;
}

with

if ((C_VOF(c,t_water) > 0.00001) && (C_VOF(c,t_water) < 0.99999))

 {
                C_UDMI(c,t,0)=C_VOF(c,t_water);
 }

UDF works fine. And C_UDMI(c,t,0) stores the value of mass fraction inside interface cells. So the error seems to be in the Get_Surface_Distance Macro only.

I have checked the documentation. Yes its not listed in the UDF manual. But its there some authors have reported using this. Even its listed in the macos listed in the link.

https://searchcode.com/file/11999225/fluent_udf/hylab/lib/fluent12.1.2/ntx86/2d_node/fl_mpi1212.def/  

 

Actually, I need to get the information about the reconstructed plane (Equation of reconstructed plane in each interface cell) such as normal and distance from cell center. Normal I am able to get with the help of Grad(alpha) but I need distance from the cell to know the equation of reconstructed plane. If you have got any other suggestion about how to get the equation of the reconstructed plane then that would also solve my problem. 

Sincerely

Krishna