Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

user defined function error

    • feroz.mulani85
      Subscriber

      I was trying to simulate melting of PCM with some nanoparticles. with eulerian approach, I also developed a udf code  to take care of melting of the PCM. as the solidification/melting option is not compatible with eulerian approach. 

      In the code there are some terms like "C_PHASE_INT" . when i tried to interpret the code, fluent is showing error as undeclared variable.

      Fluent does not have a built-in macro for the phase indicator ?

      is it true that using Fluent with the Eulerian model and the enthalpy-porosity approach, the phase indicator may not be directly accessible in a UDF. ?

    • Rob
      Forum Moderator

      Not all macros are available in the interpreter, use the built in compiler and see what errors you get. Also, Eulerian has distinct phases, so we'd call the phase domain thread which is known from the set up. 

    • feroz.mulani85
      Subscriber

      which distinct phases ? , how to call the phase domain thread. 

      I tried using "use built-in compiler " option in the compiled udfs option. but then it is showing an error message: "The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform. "

    • Rob
      Forum Moderator

      The error suggests the compilation stage failed, so look further up the text to see if there were any more errors, they should be in the transcript .trn file too. 

      Phase domains are how we interact with the mixture, primary and (however many) secondary phases there are in the model. There are a few examples here, https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_MultiphaseDEFINE.html  I'd start with the phase interaction/transfer options. 

      • feroz.mulani85
        Subscriber

        Do you have any tutorial regarding the same. Because I searched in the fluent documentation

    • feroz.mulani85
      Subscriber

      the link you have shared is of tutorial ?

    • Rob
      Forum Moderator

      No, that the documentation for multiphase UDF macros. 

    • Rob
      Forum Moderator

      For UDFs we only have what's in the documentation. You can try searching for the macro in AIS/Knowledge or in the headers for information, but no tutorials. 

Viewing 6 reply threads
  • The topic ‘user defined function error’ is closed to new replies.