Fluids

Fluids

User define memory

    • dhirajlote
      Subscriber

      Hello,


      I have written UDF for the breakage rate of Coulaloglou and Tavlarides model and interpreted in fluent 17.2 (for population balance modeling).


      However, I would like to store a memory of breakage rate. For the same I have used syntax C_UDMI (cell, thread, 0)=breakage rate. But, I am getting this stored value zero everywhere in the domain. Please suggest me the solution.


      Here is my UDF,


      ************************************************************************


      UDF that computes the particle breakage frequency


      *************************************************************************/


      #include "udf.h"


      #include "sg_pb.h"


      #include "sg_mphase.h"


       


       


      DEFINE_PB_BREAK_UP_RATE_FREQ(break_up_freq_tav, cell, thread, d_1)


      {


      real epsi, alpha, f1, f2, rho_d=1.225;


      real C1 = 0.00481, C2 = 0.08, sigma = 0.072;


      Thread *tm = THREAD_SUPER_THREAD(thread);/*passed thread is phase*/


      epsi = C_D(cell, tm);


      alpha = C_VOF(cell, thread);


      rho_d = C_R(cell, thread);


      f1 = C1*pow(epsi, 1./3.)/((1.+alpha)*pow(d_1, 2./3.));


      f2 = -(C2*sigma*(1.+alpha)*(1.+alpha))/(rho_d*pow(epsi,2./3.)*pow(d_1, 5./3.));


      C_UDMI(cell, thread, 0) = C1*f1*exp(f2);


      return C1*f1*exp(f2);


      }

    • Rob
      Ansys Employee

      I'd strongly recommend updating to 2019R2 given the significant improvements in the multiphase models.  


      Looking at the code, I'd also check whether f1 and f2 are giving sensible results: is the problem with the code not returning a number or the number returned is actually zero? 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.