Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Parse error in UDF

    • Adwait Mahajan
      Subscriber

      Getting parse error in UDF while interpreting. Please let me know what is the issue. Thank you.

    • Rob
      Forum Moderator

      Where did you get that UDF code? 

    • Adwait Mahajan
      Subscriber

      From one of the seniors at my institute.

    • Rob
      Forum Moderator

      Did it work when they tried it? 

    • Adwait Mahajan
      Subscriber

       

      Yes, it did work for him. But I got a bit editted version of his code. I got this through my professor. The code originally didn’t have the “#include ” . I am guessing he had used some more libraries. 

       

    • Adwait Mahajan
      Subscriber

      Is there any specific library to which the command "local" belongs to?

    • Rob
      Forum Moderator

      It's more that it doesn't look like a UDF as it's not written in C. We (I checked with another colleague) also don't know what it's written in, as it's not Scheme or TUI script. 

    • Adwait Mahajan
      Subscriber

      Okay Rob. Thanks a lot for helping me out. Will try and figure out the code from scratch by myself.

      Can you atleast vouch for the Fluent specific commands he has used like "FLUENT_CELL_FIX", "FLUENT_CELL_NUMBER", etc. or maybe direct me in the direction of Fluent specific C commands library.

    • Rob
      Forum Moderator

      UDFs are covered in the Customisation manual. Neither of us recognised FLUENT_CELL_FIX as a macro, and it's not in any of the 2024R1 manuals as far as I can tell. 

      Start by figuring out what you want to the code to do. If the "negative pressure" part is an attempt to limit the pressure then there may already be tools in Fluent that do the same job. 

    • Adwait Mahajan
      Subscriber

      Yes. That is what I have to do. But at every iteration. As pressure goes below atmospheric pressure I have to set it to atmospheric pressure.

    • Rob
      Forum Moderator

      Why? Pressure may drop below atmospheric pressure and fixing the solver like that may cause unforeseen side effects. 

Viewing 10 reply threads
  • The topic ‘Parse error in UDF’ is closed to new replies.