We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Error in DEFINE_PB_BREAK_UP_RATE_FREQ UDF example from manual

    • Jussan Jaeger
      Subscriber

      Hello!

       

      I'm trying to use the break-up kernel from fluent manual:

      #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;
      real C1 = 0.00481, C2 = 0.08, sigma = 0.07;
      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 = pow(epsi, 1. / 3.) / ((1. + epsi)*pow(d_1, 2. / 3.));
      f2 = -(C2*sigma*(1. + alpha)*(1. + alpha)) / (rho_d*pow(epsi, 2. / 3.)*pow(d_1, 5. / 3.));
      return C1 * f1*exp(f2);
      }
       
      I get the following error during the solution: 

      Node 0: Process 1660: Received signal SIGSEGV.

      ==============================================================================

      ==============================================================================

      Node 1: Process 22400: Received signal SIGSEGV.

      ==============================================================================

      ===================================================================================

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 0 PID 1660 RUNNING AT DESKTOP-CF17HIG

      = EXIT STATUS: -1 (ffffffff)

       
       
       
      The error stops if I change epsi to a constant like "epsi = 1.;" Does anyone knows how to solve it?
    • SRP
      Ansys Employee

      Hi,

      The error you're encountering (SIGSEGV) typically indicates a segmentation fault, which commonly occurs due to accessing memory that you don't have permission to access.

      To debug Print out the values of epsi, alpha, and rho_d before using them in calculations to ensure they are not causing any issues.

Viewing 1 reply thread
  • The topic ‘Error in DEFINE_PB_BREAK_UP_RATE_FREQ UDF example from manual’ is closed to new replies.