Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

help in writing the UDF

    • rishuhcdefs
      Subscriber

      Hi,


      I am performing analysis on a Toroidal based IC engine and is facing issues in writing the UDF for a part. This part moves up and down in a specific axis but its velocity is constantly changing with respect to the degrees of the main drive rotor. For instance I want to rotate this engine at 1000 RPM's and move forward from there.


      Any help would be highly appreciated.

    • Amine Ben Hadj Ali
      Ansys Employee
      Which macro are u using for That? A CG motion?
    • rishuhcdefs
      Subscriber

      yes, I am using CG motion for that. I am planing to input a dynamic mesh with CG coordinates and input the UDF once written.


      Correct me if I am wrong.


      Thanks

    • Rob
      Forum Moderator

      Have a look in the UDF manual: there are a few examples. You may also want to check the tutorials that are with the documentation. 

    • rishuhcdefs
      Subscriber

      I looked in the manual, but couldn't figure out the program as I am unaware with C language, however I am trying my best to write a program but would end


      up in errors. UDF for intake valve


      I have attached screenshot of UDF, can you please help me with this.


      Thanks

    • Rob
      Forum Moderator

      We don't debug UDFs, so I'd suggest find a C teaching resource and reading that along with the UDF guide. It's a useful skill (which I barely have) so worth pursuing.  When you compile the code use the error messages (you're bound to have some while you're learning) to locate the issues. Also look in the tutorials, they also contain sample code. 

    • rishuhcdefs
      Subscriber
      Thank you, I will look for the same.
    • Amine Ben Hadj Ali
      Ansys Employee
      Attend a couple of online c training and check the examples.
    • rishuhcdefs
      Subscriber

      thank you, I will look for same

Viewing 8 reply threads
  • The topic ‘help in writing the UDF’ is closed to new replies.