


{"id":460153,"date":"2026-06-22T03:08:51","date_gmt":"2026-06-22T03:08:51","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-to-change-particle-integration-step-and-print-it\/"},"modified":"2026-06-22T03:08:51","modified_gmt":"2026-06-22T03:08:51","slug":"udf-to-change-particle-integration-step-and-print-it","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-to-change-particle-integration-step-and-print-it\/","title":{"rendered":"UDF to change particle integration step and print it"},"content":{"rendered":"<p>&lt;p&gt;Hi&lt;\/p&gt;&lt;p&gt;I am using DEFINE_DPM_TIMESTEP to change the particle tracking time step following UDF manual, but when i am printing it using DEFINE_SCALAR_UPDATE, it is printing Fluents default time step value. What is the issue here? I have attached my UDF below.&lt;\/p&gt;&lt;div&gt;#include &#8220;udf.h&#8221;&lt;\/div&gt;&lt;div&gt;#include &#8220;dpm.h&#8221;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;DEFINE_DPM_TIMESTEP(my_dt,tp,dt)&lt;\/div&gt;&lt;div&gt;{&lt;\/div&gt;&lt;div&gt;&nbsp; &nbsp; if(dt&lt;0.001)&lt;\/div&gt;&lt;div&gt;&nbsp; &nbsp; {return 1;}&lt;\/div&gt;&lt;div&gt;&nbsp; &nbsp; return dt;&lt;\/div&gt;&lt;div&gt;}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/*UDF to check particle time step*\/&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;DEFINE_DPM_SCALAR_UPDATE(store_vel,c,t,initialize,tp)&lt;\/div&gt;&lt;div&gt;{&lt;\/div&gt;&lt;div&gt;&nbsp; &nbsp; if (initialize)&lt;\/div&gt;&lt;div&gt;&nbsp; &nbsp; &nbsp; &nbsp; return;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;&nbsp; &nbsp; &nbsp; &nbsp; Message(&#8220;part time step=%e\\n&#8221;,TP_DT(tp));&lt;\/div&gt;&lt;div&gt;&nbsp;&lt;\/div&gt;&lt;div&gt;}&lt;\/div&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-460153","topic","type-topic","status-publish","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27792"],"_bbp_topic_id":["460153"],"_bbp_subscription":["669668","199"],"_bbp_author_ip":["129.11.145.115"],"_bbp_last_reply_id":["460199"],"_bbp_last_active_id":["460199"],"_bbp_last_active_time":["2026-06-22 14:21:39"],"_bbp_reply_count":["3"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["669668","199"],"_btv_view_count":["40"],"_bbp_topic_status":["unanswered"]},"test":"aniruddhabose96gmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/460153","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\/460153\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=460153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}