Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Segmentation fault using F_FLUX in DEFINE_DPM_SOURCE

    • psantoch
      Subscriber

      Hi there,

      I have a UDF that defines particle source terms in Fluent 17 using DEFINE_DPM_SOURCE with the pressure-based solver.

      I need to get the mass flow into the cell containing the particle for this calculation.

      I tried using F_FLUX but I keep getting a segmentation fault error, is the mass flow not stored for faces of cells?

      The relevant code that causes the crash (if I remove the "f_flow = F_FLUX(f,f_t);" line it doesn't crash):

      DEFINE_DPM_SOURCE(Source, c, t, S, strength, p)
      {
          Thread*f_t;
          face_t f;
          int n;
          real f_flow;
          
          c_face_loop(c, t, n)
              {
                  f = C_FACE(c,t,n);
                  f_t = C_FACE_THREAD(c,t,n);
                  f_flow = F_FLUX(f,f_t);
          }
      }

       

       

    • Rob
      Forum Moderator

      I'd move from R17 to 2024R2 for a start.  F_FLUX is defined here  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v242/en/flu_udf/flu_udf_DataAccessMacros.html

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