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.
Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

UDF not extracting data from 3D model accurately in Fluent

    • tmkhare
      Subscriber

      Hello all,

      I'm trying to write a simple UDF to extract the face area magnitude and outlet flow rate for the outlet face of a straight pipe. It is a transient simulation. The problem I'm facing is that the UDF is giving output of 0.0 for both parameters mentioned above, randomly for certain timesteps. I agree that the outlet flow rate value can be zero at certain time steps but the face area magnitude cannot be zero ever, and that's what is puzzling me as to why it is giving a 0.0 value as output.

      The UDF is executed at the end of every time step. I print the values extracted by the UDF in a text file at every time step. Eventually I want to use these values extracted by the UDF for calculations performed by a 3-element Windkessel model at every time step, and therefore it is important that the UDF extracts correct values at every time step.

      Pipe diameter = 4cm, length = 30cm
      Inlet BC: transient velocity profile
      Outlet BC: transient pressure profile
      Time step = 0.001 s

      I have attached photos of the geometry, the inlet and outlet boundary conditions profiles, the UDF code written in C that I'm using, and a photo of the output file which shows the erroneous output values (highlighted in yellow). I would really appreciate if someone can point what is going wrong with the UDF.

      You can access th UDF code written in C from the link: UDF Code for Outlet Face Data Extraction

      Looking forward to hearing from you all.

      Thank you.



    • Ashish Khemka
      Forum Moderator

      Hello,

      You have asked the same query here: UDF not extracting data from 3D model accurately in Fluent

      I will delete this post and keep the other one open.

      Regards,

      Ashish Khemka

Viewing 1 reply thread
  • The topic ‘UDF not extracting data from 3D model accurately in Fluent’ is closed to new replies.