Many thanks in advance for your help.
#include "udf.h"
#include "mem.h"
#include "unsteady.h"
DEFINE_PROFILE(pressure_outlet4, thread, index)
{
face_t f;
real p,p1,p2;
real t = CURRENT_TIME;
real dt = CURRENT_TIMESTEP;
real area[ND_ND];
real total_area;
real total_flux;
Thread *t0;
cell_t c0;
begin_f_loop(f, thread)
{
double CC,R;
double k1,k2,k3;
k1=2;
k2=-22.53;
k3=8.65;
F_AREA(area,f,thread);
total_area +=NV_MAG(area);
total_flux +=F_FLUX(f,thread);
t0 = THREAD_T0(thread); /* adjacent cell thread to f */
c0 = F_C0(f, thread);
p1=C_P(c0,t0);
C_UDMI(c0,t0,0)=C_P_M1(c0,t0);
CC=1.5*total_area/(k1*exp(k2*sqrt(total_area/M_PI))+k3);
R=8*0.0035*17.73*0.001/(total_area*total_area/M_PI);
p=-R*CC*(p1-C_UDMI(c0,t0,0))/dt+R*ABS(total_flux)/1050;
F_PROFILE(f, thread, index)=p;
}
end_f_loop(f, thread)
}