Fluids

Fluids

    • dhirajlote
      Subscriber

      Hello, I have written UDF for Wang aggregation Kernel in fluent. Udf is as follows


       


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


      UDF that computes the particle aggregation rate


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


      #include "udf.h"


      #include "sg_pb.h"


      #include "sg_mphase.h"


       


      DEFINE_PB_COALESCENCE_RATE(aggregation_kernel_Wang,cell,thread,d_1,thread_2,d_2)


      {


      real agg_kernel, epsi, w_ag, p_ag, A, B, C, void_s, void_max = 0.6;


      real rho_c = 998.2, sig  = 0.072, C1=1.1107, mu_c = 0.001003, u_crit = 0.08;


      /*calculating void fraction of secondary phase*/


      void_s = C_VOF(cell, thread);


      /*Thread *tm = THREAD_SUPER_THREAD(thread);*/


      /*passed thread is phase*/


      /*epsi = C_D(cell, tm);*/


      /*calculation of aggregation freaquency of collision*/


      A = exp(-pow((pow(void_max, 1/3)/pow(void_s, 1/3))-1,2));


      B = 1-(exp(pow(void_max,1/3.)*pow(void_s, 1/3)*3/(pow(void_max, 1/3)-pow(void_s, 1/3))));


      w_ag =  C1*A*B*pow(epsi, 1/3)*(d_1+d_2)*(d_1+d_2)*pow(pow(d_1, (2/3))+pow(d_2, (2/3)), 0.5);


      /*probability of aggregation*/


      C = 1.4142*pow(epsi, 1/3)*pow(pow(d_1, (2/3))+pow(d_2, (2/3)), 0.5);


      p_ag = MIN((u_crit/C),1);


      /*compute agregation kernel*/


      agg_kernel = (w_ag)*(p_ag);


      return agg_kernel;


      }


      When i interpret it in fluent it shows no error and it get interpret well. But when I start the simulation it shows following messase and run could not start. the message is as follows. 


      # Divergence detected in AMG solver: bin-0-fraction -> Increasing relaxation sweeps!


      # You may try the enhanced divergence recovery with (rpsetvar 'amg/protective-enhanced? #t)


       


      Divergence detected in AMG solver: bin-0-fraction


      Divergence detected in AMG solver: bin-1-fraction


      Divergence detected in AMG solver: bin-2-fraction


      Divergence detected in AMG solver: bin-3-fraction


      Divergence detected in AMG solver: bin-4-fraction


      Divergence detected in AMG solver: bin-5-fraction


      Divergence detected in AMG solver: bin-6-fraction


      Divergence detected in AMG solver: bin-7-fraction


      Divergence detected in AMG solver: bin-8-fraction


      Divergence detected in AMG solver: bin-9-fraction


      Divergence detected in AMG solver: bin-10-fraction


      Divergence detected in AMG solver: bin-11-fraction


       


      Divergence detected in AMG solver: bin-12-fraction


      Error at host: floating point exception


       


      Error at Node 0: floating point exception


       


      Error at Node 1: floating point exception


       


      Error at Node 2: floating point exception


       


      Error at Node 3: floating point exception


       


      Error at Node 4: floating point exception


       


      Error at Node 5: floating point exception


       


      Error: floating point exception


      Error Object: #f


       


       


       


      any suggestion or comment is highly appreciated.


       

    • Rob
      Ansys Employee

      That means the solver is struggling to run. The cause could be the UDF trying to move too much material too quickly (you may need to reduce the time step) but could also be poor mesh or other case settings. 


      I'll also move to Fluids for more attention. 

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