Fluids

Fluids

Invalid Cp issue in FLUENT

    • Dubey92
      Subscriber

      I am modelling a Laser melting problem using Solidification/melting. I am applying the laser at a face using UDF. There is no issue in compilation. But the simulation does not starts and throws multiple warnings and errors. I have attache the screenshot. I have checked the properties also. They are fine. Any help is much appreciated. Thanks in advance.

    • Federico Alzamora Previtali
      Subscriber

      Hi there!

      floating point exception typically results from the solver trying to divide by zero. I see the warning states that Cp is zero at two given temperatures. Can you tell us how was Copper defined in your material properties? For example, is it using constant Cp? or other?

    • 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)
      }

    • Rob
      Ansys Employee

      If you're adjusting the cp using a UDF you might want to read  https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v222/en/flu_udf/flu_udf_ModelSpecificDEFINE.html%23flu_udf_sec_define_property  as opposed to DEFINE_PROFILE   Otherwise, check the exact curve you get with the cp values: it must be over 0 at all times. The 1K warning is generally when the energy equation is going horribly wrong, unless you're melting copper at VERY low temperatures.... 

    • Dubey92
      Subscriber

      Thanks Rob. I figured out the issue. In my DEFINE_PROFILE for Laser, the terms consist of Laser, Convective heat loss and Radiative heat loss. I ran the simulation with only Laser and Convective Loss and it worked. The issue of Invalid Cp, Floating point exception and Divergence in the solver comes when I add the radiative loss also. I don't know why this is happening.

    • Rob
      Ansys Employee

      Plot the radiative loss over the full range of temperatures (say 50K below the minimum your're expecting to 50K above) using the equation in the UDF. I wonder if you've sucked too much heat out of the domain somewhere. 

Viewing 5 reply threads
  • You must be logged in to reply to this topic.