namrata mishra
Subscriber

Ok. Can you please suggest me what changes do I need to make . My udf code is as follows:

#include "udf.h"
#define UREF 4.7/* ref. speed 3.0 m/s */
#define CMU 0.09 
#define H 12
#define u_star 0.52
#define delta 36
#define p_constant 0.4
 
 
DEFINE_PROFILE(velocity_profile, thread, position)
{
float x[ND_ND];
float y;
float u_in;
        face_t f;
 
 
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y=x[1];
u_in = UREF*pow(y/H,0.3);
F_PROFILE(f,thread,position) = u_in;
}
end_f_loop(f, thread)
}
 
/*  profile for kinetic energy  */
 
 
DEFINE_PROFILE(k_profile, thread, position)
{
float x[ND_ND];
  face_t f;
        float y;
        float k;
 
        begin_f_loop(f, thread)
    {
      F_CENTROID(x,f,thread);
      y=x[1];
                k=(u_star*u_star/pow(CMU,0.5))*(1-(y/delta));
      F_PROFILE(f,thread,position)=k;
     
    }
  end_f_loop(f, thread)
}
 
/* profile for dissipation rate  */
 
 
DEFINE_PROFILE(dissip_profile, thread, position)
{
  float x[ND_ND];
  face_t f;
float y;
        float eps;
        
  begin_f_loop(f, thread)
    {
      F_CENTROID(x,f,thread);
y=x[1];
      eps=(pow(u_star,3)/(p_constant*y))*(1-(y/delta));
                F_PROFILE(f,thread,position)=eps;
    }
  end_f_loop(f,thread)
}