Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Error in printing DPM Body Force

    • sidkamat
      Subscriber

      I have written a UDF to apply a body force in the Discrete Phase Model. I want the UDF to report the force at each iteration on the console. I am getting the error: passing 'double' to parameter of incompatible type 'const char *' for the following code:

      DEFINE_DPM_BODY_FORCE(DEP,tp,i)

      {

      double beta=L/D;

      double xi=beta/sqrt(beta*beta-1);

      double c1=0.5*log((xi+1)/(xi-1));

      double f=xi*((1-xi*xi)*c1*xi+xi);

      double Fd=0;

      if (TP_POS(tp)[0] >= 0.05)

      {

      if(i == 1)

      {

      Fd = -1 * (pi * km * epsilon * D * D * L / 6) / (alpha / (alpha - 1) - f) * pow(V / log(R2 / R1), 2) * pow(1 / TP_POS(tp)[1], 3);

      printf(Fd)

      }

      else

      Fd = 0;

      }

      return(Fd/TP_MASS(tp));

      }

      Can someone tell me what my mistake is?

    • RK
      Ansys Employee
      Hello The error says it all.. You are defining / passing a value which is incompatible. It's expecting a character and it receives a numerical value. Please cross check.
Viewing 1 reply thread
  • The topic ‘Error in printing DPM Body Force’ is closed to new replies.