Dubey92
Subscriber

Hi Federico. I am defining copper properties using UDF. Also when I tried to apply a constant flux on the surface instead of the Laser, it works. I am applying the Laser using UDF and that is what creating the problem. I am using DEFINE_PROFILE for applying the Laser. Here is my UDF:

DEFINE_PROFILE(Laser, t, i)                     // The name of the UDF is Laser
{
    real x[ND_ND], time;                                         // Define face centroid vector, time
    time = RP_Get_Real("flow-time");                          // Acquire time from Fluent solver
    face_t f;                                      // face thread

    begin_f_loop(f,t)
    {
        F_CENTROID(x,f,t);
        real r = sqrt(pow(x[0]-x0-v*time,2.0) + pow(x[1]-y0,2.0));
        real T = F_T(f,t);

        if(r<=R)
            {
                F_PROFILE(f,t,i) = (((2*eta*P)/(Pi*R*R))*exp((-2*(r*r))/(R*R))) - ha*(T-Ta) - (s*e*(pow(T,4) - pow(Ta,4)));
                F_UDMI(f,t,0) = F_PROFILE(f,t,i);
            }
        else
            {
                F_PROFILE(f,t,i) = - ha*(T-Ta) - (s*e*(pow(T,4) - pow(Ta,4)));
            }
    }
    end_f_loop(f,t)
}