


{"id":431733,"date":"2025-05-15T16:13:17","date_gmt":"2025-05-15T16:13:17","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-not-extracting-data-from-3d-model-accurately-in-fluent-2\/"},"modified":"2025-05-15T16:13:17","modified_gmt":"2025-05-15T16:13:17","slug":"udf-not-extracting-data-from-3d-model-accurately-in-fluent-2","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-not-extracting-data-from-3d-model-accurately-in-fluent-2\/","title":{"rendered":"UDF not extracting data from 3D model accurately in Fluent"},"content":{"rendered":"<p>&lt;p&gt;Hello all,&lt;br&gt;&lt;br&gt;I&#8217;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&#8217;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&#8217;s what is puzzling me as to why it is giving a 0.0 value as output.&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;Pipe diameter = 4cm, length = 30cm&lt;br&gt;Inlet BC: transient velocity profile&lt;br&gt;Outlet BC: transient pressure profile&lt;br&gt;Time step = 0.001 s&lt;br&gt;&lt;br&gt;I have attached photos of the geometry, the inlet and outlet boundary conditions profiles, the UDF code written in C that I&#8217;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.&lt;\/p&gt;&lt;p&gt;You can access th UDF code written in C from the link:&nbsp;<a href=\"https:\/\/gtvault-my.sharepoint.com\/:t:\/g\/personal\/tkhare3_gatech_edu\/EU0PpWJYfZ9PvHAhJYfWOPYB3sy80oSkg7pGmGAi3x3D1w?e=LMxAAv\">UDF Code for Outlet Face Data Extraction<\/a>&lt;\/p&gt;&lt;p&gt;Looking forward to hearing from you all.&lt;\/p&gt;&lt;p&gt;Thank you.&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/05\/15-05-2025-1747325391-Screenshot 2025-04-27 110816.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/05\/15-05-2025-1747325451-Screenshot 2025-05-12 104518.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/05\/15-05-2025-1747325474-Screenshot 2025-05-12 104537.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/05\/15-05-2025-1747325496-Screenshot 2025-05-12 103807.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-431733","topic","type-topic","status-publish","hentry","topic-tag-cfd-udf-fleunt","topic-tag-extract-results-1","topic-tag-fluent-coupling","topic-tag-fluent-setup-1","topic-tag-scripting-journaling-udf-2","topic-tag-udf-error","topic-tag-udf-in-fluent"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27792"],"_bbp_topic_id":["431733"],"_bbp_subscription":["551847","199"],"_bbp_author_ip":["143.215.228.104"],"_bbp_last_reply_id":["431803"],"_bbp_last_active_id":["431803"],"_bbp_last_active_time":["2025-05-16 14:22:25"],"_bbp_reply_count":["3"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["551847","199"],"_btv_view_count":["275"],"_bbp_topic_status":["unanswered"]},"test":"tmkharegatech-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/431733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/431733\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=431733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}