Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

turbulent viscosity UDF fatal error in DES

    • Kevin Hoffer
      Subscriber

      We noticed that the turbulent viscosity for the detached eddy simulation is determined purely on the RANS model: S-A. This gives issues for simulating a single jet flow as it is unable to capture kelvin-helmholtz instabilities. After careful research, it was found that the turbulent viscosity in the free-mixing regions is about 50 times higher than for a purely large eddy simulation (LES). In order to overcome this issue we are seeking to replace the turbulent viscosity with a UDF that utilizes the SA turbulent viscosity definition when TKE DIS multiplier is < 0.9 (close to the wall) and converts to the Smagorinsky turbulent viscosity formulation otherwise. Our interpreted UDF is formulated as follows:

      ----------------------------------------------

      #include "udf.h"
      #include "dpm_tools.h"

      DEFINE_TURBULENT_VISCOSITY(mix_visc, c, t)
      {
          real nu_ratio, tke_diss_mult, mu_t;
          real cv_volume, c_str_mg;

          nu_ratio = C_R(c,t) / C_MU_L(c,t);
          tke_diss_mult = C_UDMI(c, t, 22);
          cv_volume = C_VOLUME(c,t);
          c_str_mg = C_STRAIN_RATE_MAG(c, t);
         
          if (tke_diss_mult > 0.9)
          {
              mu_t = 0.012*pow(cv_volume, 0.66667)*c_str_mg;
          }
          else
          {
              mu_t = 1.2*nu_ratio/0.0000155*pow(nu_ratio, 3)/(pow(nu_ratio, 3) + 7.1);
          }

          return mu_t;
      }

      ------------------------------------------

      And is generating the following errors when attempting to run it (8 cores Windows 11):

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

      Node 6: Process 12700: Received signal SIGSEGV.

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

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

      Node 3: Process 15496: Received signal SIGSEGV.

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

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

      Node 4: Process 22168: Received signal SIGSEGV.

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

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed: No such file or directory

      999999: mpt_accept: error: accept failed:

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

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 0 PID 15472 RUNNING AT KHLT01

      = EXIT STATUS: -1 (ffffffff)

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

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

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 1 PID 7268 RUNNING AT KHLT01

      = EXIT STATUS: -1 (ffffffff)

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

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

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 2 PID 17460 RUNNING AT KHLT01

      = EXIT STATUS: -1 (ffffffff)

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

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

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 4 PID 22168 RUNNING AT KHLT01

      = EXIT STATUS: -1 (ffffffff)

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

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

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 5 PID 23452 RUNNING AT KHLT01

      = EXIT STATUS: -1 (ffffffff)

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

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

      = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES

      = RANK 7 PID 19944 RUNNING AT KHLT01

      = EXIT STATUS: -1 (ffffffff)

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

      The fl process could not be started.

      There is no further error message given in the generated error file. We suspect that there is an error in the formulated UDF, is someone able to identify the issue? we would appreciate it greatly!

       

    • Rob
      Forum Moderator

      What value does UDM 22 have when you initialise the model?

    • Kevin Hoffer
      Subscriber

      Hi Rob,

       

      Thank you for your response. 

       

      Below you will find the initial contour of the instantaneous 'des tke dissipation multiplier' which should be equal to its call function C_UDMI(c, t, 22). All the values are between 0 and 1. 


    • Rob
      Forum Moderator

      OK. What do you get if you put the mu_t value in as a custom field function & plot? 

    • Kevin Hoffer
      Subscriber

      I noticed that fluent crashes when initializing or data loading is performed while my UDF is loaded for the turbulent viscosity.... with the following message multiple times again:
      999999: mpt_accept: error: accept failed: No such file or directory.




    • Rob
      Forum Moderator

      OK, next step is to eliminate parts of the UDF. Maybe start by setting the returned value as a constant?  With debugging you've passed the first step in that it compiles. Next is to figure out which part of your maths isn't working as intended. 

    • Rob
      Forum Moderator

      Double check the manual, https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_udf/flu_udf_ModelSpecificDEFINE.html%23flu_udf_sec_define_turbulent_viscosity  is the macro available for DES? 

    • Kevin Hoffer
      Subscriber

      After careful debugging, it was found that the call for tke_diss_mult was indeed the issue. It is now computed in de UDF and works as intended. Thank you for the support Rob. 

    • Rob
      Forum Moderator

      You're welcome. Please post the working code for others to learn from. 

Viewing 8 reply threads
  • The topic ‘turbulent viscosity UDF fatal error in DES’ is closed to new replies.