TAGGED: initialization, vof
-
-
February 20, 2023 at 2:13 pmSidharth_RautSubscriber
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 -
February 20, 2023 at 4:14 pmRobForum 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.Â
-
February 27, 2023 at 2:39 pmSidharth_RautSubscriber
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} -
February 27, 2023 at 3:43 pmRobForum Moderator
Are you transferring from/to the phases in the right order? You need to be going from gas to liquid phases.Â
-
February 27, 2023 at 3:48 pmSidharth_RautSubscriber
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.
-
February 27, 2023 at 3:53 pmRobForum 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.Â
-
February 27, 2023 at 4:35 pmSidharth_RautSubscriber
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?
-
February 27, 2023 at 4:57 pmRobForum 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.Â
-
February 28, 2023 at 11:56 amSidharth_RautSubscriber
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}Â
-
February 28, 2023 at 1:24 pmRobForum 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.Â
-
- The topic ‘Initialization Error – Droplet Evaporation’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Script error Code: 800a000d
- Cyclone (Stairmand) simulation using RSM
- Fluent fails with Intel MPI protocol on 2 nodes
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
-
1241
-
543
-
523
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.