-
-
May 15, 2025 at 4:06 pm
tmkhare
SubscriberHello 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.
-
May 16, 2025 at 7:25 am
Ashish Khemka
Forum ModeratorHello,
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
-
- The topic ‘UDF not extracting data from 3D model accurately in Fluent’ is closed to new replies.
-
3139
-
1007
-
918
-
858
-
792
© 2025 Copyright ANSYS, Inc. All rights reserved.