


{"id":250629,"date":"2023-02-20T16:22:42","date_gmt":"2023-02-20T16:22:42","guid":{"rendered":"\/forum\/?post_type=topic&#038;p=250629"},"modified":"2023-02-20T16:37:28","modified_gmt":"2023-02-20T16:37:28","slug":"fluid-velocity-in-dpm_drag","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/fluid-velocity-in-dpm_drag\/","title":{"rendered":"Fluid velocity in dpm_drag"},"content":{"rendered":"<p>Hi,<\/p>\n<p>to implement a custom drag model I need to calculate the difference in velocity between fluid and particle. Getting the particle velocity is no problem however the fluid velocity is causing me trouble. I am trying to access it using the following UDF:<\/p>\n<p>&nbsp;#include &#8220;udf.h&#8221;<br \/>&nbsp;#include &#8220;surf.h&#8221;<br \/>&nbsp;#include &#8220;dpm_types.h&#8221;<br \/>&nbsp;#include &#8220;dpm.h&#8221;<br \/>&nbsp;#include &#8220;dpm_mem.h&#8221;<br \/>&nbsp;#include &#8220;mem.h&#8221;<br \/>&nbsp;#include &#8220;materials.h&#8221;<br \/>&nbsp;#include &#8220;threads.h&#8221;<\/p>\n<p>DEFINE_DPM_DRAG (test_drag, Re, tp)<br \/>{<br \/>&nbsp; &nbsp; cell_t c;<br \/>&nbsp; &nbsp; Thread *t0;<br \/>&nbsp; &nbsp; real uvel;<br \/>&nbsp; &nbsp;&nbsp;<br \/>&nbsp; &nbsp; t0 = TP_CELL_THREAD(tp);<br \/>&nbsp; &nbsp; c = TP_CELL(tp);<br \/>&nbsp; &nbsp;&nbsp;<br \/>&nbsp; &nbsp; uvel = C_U(c,t0);<\/p>\n<p>}<\/p>\n<p>When executing this UDF I am getting the following error:<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">==============================================================================<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">&nbsp;<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">Node 0: Process 2364: Received signal SIGSEGV.<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">&nbsp;<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">==============================================================================<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">&nbsp;<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">999999: mpt_accept: error: accept failed: No error<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">&nbsp;<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">Can you help me, what am I doing wrong?<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">&nbsp;<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">Thank you!<\/p>\n<p style=\"text-indent: 0px;margin: 0px\">Chris<\/p>\n","protected":false},"template":"","class_list":["post-250629","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":["23.220.96.180"],"_bbp_subscription":["7540","199"],"_btv_view_count":["661"],"_edit_lock":["1676911021:198619"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["250629"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","7540"],"_bbp_voice_count":["2"],"_bbp_reply_count":["24"],"_bbp_last_reply_id":["251380"],"_bbp_last_active_id":["251380"],"_bbp_last_active_time":["2023-02-24 11:36:47"]},"test":"christoph-grafest-tu-darmstadt-de"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/250629","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\/250629\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=250629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}