


{"id":363174,"date":"2024-04-19T10:57:39","date_gmt":"2024-04-19T10:57:39","guid":{"rendered":"\/forum\/forums\/topic\/dpm-particle-injection-total-flow-rate-as-a-function-of-time\/"},"modified":"2024-04-19T11:01:25","modified_gmt":"2024-04-19T11:01:25","slug":"dpm-particle-injection-total-flow-rate-as-a-function-of-time","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/dpm-particle-injection-total-flow-rate-as-a-function-of-time\/","title":{"rendered":"DPM Particle Injection Total Flow Rate as a function of time"},"content":{"rendered":"<p>Hello,<\/p>\n<p>i am doing a transient simulation with a DPM Injection.<\/p>\n<p>I want the injection not to be constant but to be a function of the simulation time (for example t^2).<\/p>\n<p>I think that the only way to implement that is with a UDF, i came up with this Code, but it is not working at all:<\/p>\n<p>#include &#8220;udf.h&#8221;<\/p>\n<p>DEFINE_DPM_SOURCE(dpm_mass_flow, c, t, initialize, p)<br \/>{<br \/>&nbsp; &nbsp; real time = CURRENT_TIME;<br \/>&nbsp; &nbsp; real mass_flow_rate;<\/p>\n<p>&nbsp; &nbsp; mass_flow_rate = time * time;<\/p>\n<p>&nbsp; &nbsp; return mass_flow_rate;<br \/>}<\/p>\n<p>My questions are:<\/p>\n<p>1) Is there an easier way to achieve a total flow rate of t^2<\/p>\n<p>2) If not do you know a better option for a UDF Code?<\/p>\n<p>Thanks in advance<\/p>\n","protected":false},"template":"","class_list":["post-363174","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["344063","199"],"_bbp_author_ip":["23.206.193.59"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["246"],"_bbp_topic_status":["unanswered"],"_edit_lock":["1713524501:296540"],"_bbp_topic_id":["363174"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","344063"],"_bbp_voice_count":["2"],"_bbp_reply_count":["5"],"_bbp_last_reply_id":["363202"],"_bbp_last_active_id":["363202"],"_bbp_last_active_time":["2024-04-19 13:16:11"]},"test":"paul-richter-lbgmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/363174","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":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/363174\/revisions"}],"predecessor-version":[{"id":363176,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/363174\/revisions\/363176"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=363174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}