We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

DPM UDF Compiling Error

    • Adam Cutright
      Subscriber

      I am writing a UDF that contains both a DPM law and DPM sources. I have two DPM injections of different particle types and at different locations, one injection is intended to represent CO2 bubbles that will dissolve in the aqueous phase which I had previously gotten working. The second injection is solid particles that are intended to grow in size based on the concentration of a corresponding species in the continuous phase. In order to distinguish between the two seperate injections I am trying to use an if-else statement shown below, with the associated "include" statements. When I try to compile using Fluent's built in compiler I get this error.

      lld-link: error: undefined symbol: TP_EVAP_SECIES_INDEX

      This would seem to indicate that that TP_EVAP_SPECIES_INDEX is not a recognized macro despite it being listed in the Fluent customization guide and me having the dpm_types being loaded in the UDF. If anyone understands why this is happening I would greatly appreciate the help. 

      #include "udf.h"
      #include "dpm.h"
      #include "dpm_types.h"
      if (TP_EVAP_SECIES_INDEX(tp) == 0)
    • Rob
      Forum Moderator

      Where did you find it in the manual? I've just checked the 2024R2 documentation and can't see it. Have a look at  P_INJ_ID(TP_INJECTION(tp))  

      • Adam Cutright
        Subscriber

        I was reading the Fluent Customization Manual and found that particular macro in 3.2.8.1. Can you point me to the section that contains P_INJ_ID(TP_INJECTION(tp))?

    • Rob
      Forum Moderator

      Which version of the manual are you looking at?   https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v242/en/flu_udf/flu_udf_DataAccessMacros.html  is the current 3.2.8.1 with no mention of that macro. The DPM macros were updated a few releases back, so it's possible you're reading an older version of the manual.  

    • Adam Cutright
      Subscriber

      I am reading the 2024 R2 Fluent Customization manual, when I followed the link you posted above I still see the macro I was talking about in section 3.2.8.1 which is in section 1 of the customization manual "creating and using user defined functions."

    • Rob
      Forum Moderator

      Can you check if your code has TP_EVAP_SECIES_INDEX or TP_EVAP_SPECIES_INDEX as I read the macro from the section of code you posted?

      • Adam Cutright
        Subscriber

        I'm sorry to have taken your time, that was the issue, my UDF is functioning properly now. Thank you for your help.

    • Rob
      Forum Moderator

      No worries. I think typos cause almost as many problems as bad coding! I'd not spotted it either. 

Viewing 5 reply threads
  • You must be logged in to reply to this topic.