Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Initialization Error – Droplet Evaporation

    • Sidharth_Raut
      Subscriber

      Hello there,

      I'm performing a 2D axisymmetric simulation - droplet evaporation in Ansys Fluent 2023 R1. I've prepared the udf and defined every parameter as per the requirement, however, whenever I go for initialization, I receive the following errors:

      Process 19816: Received signal SIGSEGV.

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
      = RANK 0 PID 4568 RUNNING AT Maxcore
      = EXIT STATUS: -1 (ffffffff)

      The fl process could not be started.

      Could you please help me in understanding why these errors are coming and how to resolve them?

      Thanks!
      Sidharth Raut

    • Rob
      Forum Moderator

      Turn the UDF off and see if the model will initialise. Then see what the UDF alters, and check the value the UDF takes from the model exist, and are sensible. Then see what value the UDF returns to the solver and see if that's physically sensible. 

    • Sidharth_Raut
      Subscriber

      Hello Rob,

       

      I tried your suggestion and the simulation is running without udf. Later, I imported only properties udf and still the simulation is working, however, when I'm trying to include the mass transfer model then I'm getting the same error. Could you please suggest what's the actual problem? I'm attaching the ansys reference udf for mass transfer which is mentioned in the udf tutorial and it too having the same problem. Please help me in figuring out the error in the process.

      Reference UDF for mass transfer:

      #include "udf.h"

      /********************************************************
       DEFINITION OF MASS SOURCE TERM
       *******************************************************/

      DEFINE_MASS_TRANSFER(liq_gas_source, c, t, from_index, from_species_index, to_index, to_species_index)
      {
          #if !RP_Host
          real m_lg;
          real T_sat = 373.15;
          real vol = C_VOLUME(c, t);                                  //SIGNIFIES THE CELL VOLUME FOR A CELL AND THREAD
          Thread *pt = THREAD_SUB_THREAD(t, 0);                       //PRIMARY PHASE THREAD
          Thread *st = THREAD_SUB_THREAD(t, 1);                       //SECONDARY PHASE THREAD

          m_lg = 0;
         
          if (C_T(c, pt) >= T_sat)
          {
              m_lg = -0.1 * C_VOF(c, pt) * C_R(c, pt) * fabs(C_T(c,pt) - T_sat) / T_sat;
          }

          if ((m_lg == 0.) && (C_T(c, st) <= T_sat))
          {
              m_lg = -0.1 * C_VOF(c, st) * C_R(c, st) * fabs(T_sat - C_T(c,st)) / T_sat;
          }

          return (m_lg);
          #endif
      }
    • Rob
      Forum Moderator

      Are you transferring from/to the phases in the right order? You need to be going from gas to liquid phases. 

    • Sidharth_Raut
      Subscriber

      Hello Rob,

      Thanks for your response but the mass transfer will take place from liquid to gas. Since I'm simulating the evaporation process, the mass transfer should be taking place from liquid to gas state. Please do correct me if I'm wrong.

    • Rob
      Forum Moderator

      You need to be going from gas to liquid phases, that's a code requirement. The SIGN of the transfer determines what mass goes where, but FROM and TO must be gas and liquid respectively. 

    • Sidharth_Raut
      Subscriber

      Hello Rob,

      I tried changing the FROM and TO, however, I'm getting the same error. The simulation is running fine without udf but the moment I plug in the mass transfer model, it gives the same error. Is there anything else that can be done or something that I'm missing?

    • Rob
      Forum Moderator

      Use UDMs to show what the equation is giving, the rate of change may be significantly higher than you were expecting. You may need to fix the mass exchange rate in the panel using Lee model or the like. 

    • Sidharth_Raut
      Subscriber

      Hello Rob,

      I'm having UDM in my UDF but it doesn't give me any value since the case is not even getting initialized. Can you have a good look at my UDF and let me know where I'm wrong? Also, I'm trying to run this in parallel with 4 processors. I'm sharing my actual code here.

      Also, is there a way that my udf is causing a cell or value or something similar that doesn't exist is getting written to and Fluent then crashes??  

      /********************************************************
       DEFINITION OF MASS SOURCE TERM FOR LIQUID PHASE
       *******************************************************/

      DEFINE_SOURCE(liq_src, c, t, ds, eqn)
      {
         #if !RP_Host
         
         real m_dot_l, T_sat;
         real vol = C_VOLUME(c, t);                                                                           //SIGNIFIES THE CELL VOLUME FOR A CELL AND THREAD
         Thread *pt = THREAD_SUB_THREAD(t, 0);                                                                //PRIMARY PHASE THREAD
         Thread *st = THREAD_SUB_THREAD(t, 1);                                                                //SECONDARY PHASE THREAD

         if (C_VOF(c, t) < 0.99 && C_VOF(c, t) > 0.01)
         {
          if (C_T(c,pt) >= T_sat)
          {
              m_dot_l = -0.1 * C_VOF(c,t) * C_R(c,t) * fabs(C_T(c,t) - T_sat) / T_sat;                      //LEE EVAPORATION MODEL
              ds[eqn] = -0.1 * C_R(c,t) * fabs(C_T(c,t) - T_sat) / T_sat;
          }
          else
          {
              m_dot_l = 0.1 * C_VOF(c,st) * C_R(c,st) * fabs(T_sat - C_T(c,pt)) / T_sat;                    //LEE CONDENSATION MODEL
              ds[eqn] = 0;
          }
         }
         else
         {
          m_dot_l = 0;
          ds[eqn] = 0;
         }

         C_UDMI(c, t, 9) = m_dot_l;
         return m_dot_l;
         
          #endif
      }

      /********************************************************
       DEFINITION OF MASS SOURCE TERM FOR VAPOR PHASE
       *******************************************************/

      DEFINE_SOURCE(vap_src, c, t, ds,eqn)
      {
          #if !RP_Host
             
         real m_dot_v, T_sat;
         real vol = C_VOLUME(c, t);                                                                           //SIGNIFIES THE CELL VOLUME FOR A CELL AND THREAD
         Thread *pt = THREAD_SUB_THREAD(t, 0);                                                                //PRIMARY PHASE THREAD
         Thread *st = THREAD_SUB_THREAD(t, 1);                                                                //SECONDARY PHASE THREAD

         if (C_VOF(c,t) < 0.99 && C_VOF(c,t) > 0.01)
         {
          if (C_T(c,pt) >= T_sat)
          {
              m_dot_v = 0.1 * C_VOF(c,t) * C_R(c,t) * fabs(T_sat - C_T(c,pt)) / T_sat;                       //LEE CONDENSATION MODEL
              ds[eqn] = 0;
          }
          else
          {
              m_dot_v = -0.1 * C_VOF(c,t) * C_R(c,t) * fabs(T_sat - C_T(c,pt)) / T_sat;                      //LEE CONDENSATION MODEL
              ds[eqn] = -0.1 * C_R(c,t) * fabs(T_sat - C_T(c,t)) / T_sat;
          }
         }
         else
         {
          m_dot_v = 0;
          ds[eqn] = 0;
         }

         C_UDMI(c, t, 10) = m_dot_v;
         return m_dot_v;
         
          #endif
      }

      /********************************************************
       DEFINITION OF ENERGY SOURCE TERM FOR BOTH PHASES
       *******************************************************/

      DEFINE_SOURCE(enrg_src, c, mix_th, ds, eqn)
      {
          #if !RP_Host
         
          real m_dot, T_sat, hfg;
          Thread *pt, *st;
          pt = THREAD_SUB_THREAD(mix_th, 0);
          st = THREAD_SUB_THREAD(mix_th, 1);

          if (C_VOF(c, pt) < 0.99 && C_VOF(c, pt) > 0.01)
          {
              if (C_T(c, mix_th) >= T_sat)
              {
                  m_dot = -0.1 * C_VOF(c,pt) * C_R(c,pt) * fabs(C_T(c,pt) - T_sat) / T_sat;                      //LEE EVAPORATION MODEL
                  ds[eqn] = -0.1 * C_VOF(c,pt) * C_R(c,pt) / T_sat;
              }
          }
          else
          {
              m_dot = 0.1 * C_VOF(c,st) * C_R(c,st) * fabs(T_sat - C_T(c,mix_th)) / T_sat;                      //LEE CONDENSATION MODEL
              ds[eqn] = -0.1 * C_VOF(c,st) * C_R(c,st) / T_sat;
          }
          else
          {
              m_dot = 0;
              ds[eqn] = 0;
          }
         
          C_UDMI(c, t, 11) = m_dot;
          return hfg * m_dot;
         
          #endif
      }

       

    • Rob
      Forum Moderator

      Turn off each part in turn and slowly switch back on. I've had a quick look, and that's all I'm doing and can't spot anything glaringly obvious. I do suggest checking the DEFINE_SOURCE examples in the manual, the degassing boundary case may give you some pointers. 

Viewing 9 reply threads
  • The topic ‘Initialization Error – Droplet Evaporation’ is closed to new replies.