The Ansys Innovation Space website recently experienced a database corruption issue. While service has been restored there appears to have been some data loss from November 13. We are still investigating and apologize for any issues our users may have as a result.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

    • sjohn
      Subscriber

      I wrote the following UDF for heteregeneous reactions in a case for multiphase flow. 

      #include "udf.h"
       
      /* Define constants */
      #define R 1.987
      /* Universal gas constant in cal/(mol*K) */
      #define Pre 1
      /* Pre-exponential factor in m^3/(mol*s) */
      #define EA 5000
      /* Activation energy in cal/mol */
       
      /* Define phase indices */
      #define liquid_index 3
      /* Index for liquid phase */
      #define gas_index 2
      /* Index for gas phase B */
       
      /* Heterogeneous reaction rate definition */
      DEFINE_HET_RXN_RATE(sj_reaction_rate, c, t, r, mw, yi, rr, rr_t)
      {
          /* Get the temperature of the liquid phase */
          real T_liquid = C_T(c, t); /* Temperature in K */
       
          /*Calculate the concentration of A in the liquid phase */
          real A_conc = C_YI(c, t, liquid_index);
       
          /* Calculate the reaction rate */
          *rr = Pre * exp(-EA / (R * T_liquid)) * A_conc;
       
          /* Optional: Store additional information if needed */
          C_UDMI(c, t, 0) = Pre; /* Store pre-exponential factor */
          C_UDMI(c, t, 1) = EA; /* Store activation energy */
          C_UDMI(c, t, 2) = R; /* Store gas constant */
          C_UDMI(c, t, 3) = T_liquid; /* Store temperature */
      }
       

      I am getting the following  warning upon compiling my UDF with the built-in compiler.

       scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

      File "C:\Users\....\libudf\win64\3ddp_host\SConstruct", line 20, in

      Compiler path: "C:\PROGRA~1\ANSYSI~1\v241\fluent"\ntbin\clang\bin\clang-cl

      Linker   path: "C:\PROGRA~1\ANSYSI~1\v241\fluent"\ntbin\clang\bin\lld-link

       

      After compiling, I click load and then initialize and run the simulation. Then I get a fatal error:

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

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

       Node 1: Process 6996: Received signal SIGSEGV.

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

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

       Node 2: Process 27464: Received signal SIGSEGV.

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

       Node 0: Process 26448: Received signal SIGSEGV.

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

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

       Node 3: Process 10824: Received signal SIGSEGV.

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

       Error in the fluent (fl) process : ended abnormally

       

      Other than checking the box for Setup Compilation Environment for UDF in Fluent Launcher, do I need to anything else?

       
       
    • sjohn
      Subscriber

      I also tried not using the built in compiler (after deleting the libudf folder) but get athe following error messages:

      Compiler and linker: Microsoft Visual C++

      # Generating ud_io1.h

      simple_reaction.c

      # Generating udf_names.c because of makefile simple_reaction.obj

      udf_names.c

      # Linking libudf.dll because of makefile user_nt.udf udf_names.obj simple_reaction.obj

      LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

      NMAKE : U1077: 'link -nologo /Libpath:"C:\PROGRA~1\ANSYSI~1\v241\fluent"\fluent24.1.0\win64\3ddp_node /Libpath:"C:\PROGRA~1\ANSYSI~1\v241\fluent"\fluent24.1.0\multiport\win64\mpi\shared /dll /out:libudf.dll udf_names.obj simple_reaction.obj mport.lib fl_mpi2410.lib ' : return code '0x450'

      Stop.

       

      Done.

       

      BSSPF3F1PZG: Opening library "C:\Users\...\libudf"...

      ERROR: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).

      The system cannot find the file specified.

       

      C:\\Users\\...\\libudf\\win64\\3ddp_host\\libudf.dll

       

      Done.

       

      BSSPF3F1PZG: Opening library "C:\Users\...\libudf"...

      ERROR: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).

      The system cannot find the file specified.

       

      C:\\Users\\...\\libudf\\win64\\3ddp_host\\libudf.dll

       

      Error: An error occurred in the previous operation.

       The details can be found in the text output.

      Error Object: #f

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