CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   error using C_VOF(c,t) in udf in fluet (https://www.cfd-online.com/Forums/main/190143-error-using-c_vof-c-t-udf-fluet.html)

abdoli July 6, 2017 02:54

error using C_VOF(c,t) in udf in fluet
 
hi friends
i am using udf in fluent 15 to find volume of fluid of secondary phase in liquid-gas flow for adjacent wall cells. fluent compiles udf but when hooking, i received this error.
Error: received a fatal signal (Segmentation fault).
Error Object: #f
the udf is as below:

#include "udf.h"
#include "sg.h"
#include "metric.h"
DEFINE_PROFILE(contact_angle_BC, t, i)
{
real x[ND_ND], c1x, c1y, CVOF, ContLVel[100];
int d;
face_t f;
Thread *t0;
cell_t c;
cell_t c0;
d=0;
begin_f_loop(f,t)
{
c0 = F_C0(f,t);
t0 = THREAD_T0(t);
ContLVel[d]=C_V(c0,t0);
C_CENTROID(x,c0,t0);
c1x=x[0];
c1y=x[1];
CVOF=C_VOF(c0,t0);
printf("x1 = %g y1 = %g Vel = %g VOF = %g\n", c1x, c1y, ContLVel[d], CVOF);
d=d+1;
}
end_f_loop(f,t)
}
i would be glad if someone help me with this problem.


All times are GMT -4. The time now is 18:54.