


{"id":160603,"date":"2021-07-22T09:34:30","date_gmt":"2021-07-22T09:34:30","guid":{"rendered":"\/forum\/forums\/topic\/need-help-in-6dof-udf-with-a-face-loop\/"},"modified":"2021-07-27T13:43:53","modified_gmt":"2021-07-27T13:43:53","slug":"need-help-in-6dof-udf-with-a-face-loop","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/need-help-in-6dof-udf-with-a-face-loop\/","title":{"rendered":"Need help in 6dof udf with a face loop"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Hello Dear,<\/p>\n<p>I hope this thread will find you well.<\/p>\n<p>I am doing a very simple test where i use 6dof udf but in that udf i want to get the velocity from the actual results. The main problem is complex but i receive the same error as shown below. I just want to have some results in my udf through looping or some other way which i do not know. I also wrote the UDF here below for reference. The thing is that when i do not use a loop then it works fine but i need to have a loop to get the velocity or some other variable from the results.<\/p>\n<p>I hope you understand the problem and give me feedback asap with your experience. Thank you.<\/p>\n<p><\/p>\n<\/p>\n<p>UDF:<\/p>\n<p>\/************************************************** *****<\/p>\n<p>SDOF property compiled UDF with external forces\/moments<\/p>\n<p>************************************************** *****\/<\/p>\n<p>#include &quot;udf.h&quot;<\/p>\n<p>static real acc = 4.631;<\/p>\n<p>static real mass = 5;<\/p>\n<p>static real velocity;<\/p>\n<p><\/p>\n<p><\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p>DEFINE_SDOF_PROPERTIES(acce, prop, dt, time, dtime)<\/p>\n<p>{<\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p>prop[SDOF_MASS] =5;<\/p>\n<p>prop[SDOF_IXX] = 5.2e-5;<\/p>\n<p>prop[SDOF_IYY] = 4.1667e-3;<\/p>\n<p>prop[SDOF_IZZ] = 1;<\/p>\n<p>prop[SDOF_ZERO_TRANS_X] = False;\/* boolean, allow translation in x-direction *\/<\/p>\n<p>prop[SDOF_ZERO_TRANS_Y] = True; \/* boolean, suppress translation in y-direction *\/<\/p>\n<p>prop[SDOF_ZERO_TRANS_Z] = True; \/* boolean, suppress translation in z-direction *\/<\/p>\n<p>prop[SDOF_ZERO_ROT_X] = True; \/* boolean, suppress rotation around x-axis *\/<\/p>\n<p>prop[SDOF_ZERO_ROT_Y] = True; \/* boolean, suppress rotation around y-axis *\/<\/p>\n<p>prop[SDOF_ZERO_ROT_Z] = True; \/* boolean, allow rotation around z-axis *\/<\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p>{<\/p>\n<p>if(time &gt;= 0) {<\/p>\n<p>Thread *f_thread;<\/p>\n<p>face_t f;<\/p>\n<p>velocity=0;<\/p>\n<p>begin_f_loop(f, f_thread)<\/p>\n<p>{<\/p>\n<p>velocity += F_U(f, f_thread);<\/p>\n<p>}<\/p>\n<p>end_f_loop(f, f_thread)<\/p>\n<p><\/p>\n<\/p>\n<p>Message(&quot;<br \/>\nV1 %d \/n&quot;,velocity);<\/p>\n<p><\/p>\n<\/p>\n<p>prop[SDOF_LOAD_F_X] = mass*acc;<\/p>\n<p><\/p>\n<\/p>\n<p>}<\/p>\n<p><\/p>\n<\/p>\n<p>}<\/p>\n<p><\/p>\n<\/p>\n<p>}<\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p>Error:<\/p>\n<p>&quot;V1 0 \/n<\/p>\n<p>=========================<\/p>\n<p><\/p>\n<\/p>\n<p>==============<\/p>\n<p>================================================== ================================================== ============<\/p>\n<p><\/p>\n<\/p>\n<p>Node 5: Process 20896: Receiv============================================ ==============<\/p>\n<p>========================================<\/p>\n<p><\/p>\n<\/p>\n<p>Node 1: Proc=================ess 20948: Received signal ====================SIGSEGV.<\/p>\n<p><\/p>\n<\/p>\n<p>================================================== ============================================<\/p>\n<p>=========================================<\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p>=============================Node 3: Process 20648: Received si=ed signal gn======================SIGSEGV.<\/p>\n<p><\/p>\n<\/p>\n<p>================================================== =al SI========G===============================<\/p>\n<p>S==EG====V.<\/p>\n<p>=======<\/p>\n<p><\/p>\n<\/p>\n<p>No======<\/p>\n<p>============<\/p>\n<p><\/p>\n<\/p>\n<p>Node 0: Prde 2: Process 17612: Received sig=====================o========================= ========================================<\/p>\n<p>============ncess 1936: Received signal Sal SIGSEGV.<\/p>\n<p><\/p>\n<\/p>\n<p>=========================IGSEGV.<\/p>\n<p><\/p>\n<\/p>\n<p>================================================== ================================================== ========<\/p>\n<p><\/p>\n<\/p>\n<p>Node 4: ===========Process 10852: Rece======ived signal SIGSEGV.===<\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p>================================================== =======================<\/p>\n<p>==================<\/p>\n<p><\/p>\n<\/p>\n<p>999999: mpt_accept: error: accept failed: No such file or directory&quot;<\/p>\n","protected":false},"template":"","class_list":["post-160603","topic","type-topic","status-closed","hentry","topic-tag-6dof-1","topic-tag-ansys","topic-tag-faceloop-1","topic-tag-fluent"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":[""],"_bbp_old_reply_author_name_id":["Anonymous"],"_bbp_old_is_reply_anonymous_id":["false"],"_btv_view_count":["465"],"_bbp_likes_count":["0"],"_bbp_subscription":["232142"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["160603"],"_bbp_forum_id":["27792"],"_bbp_engagement":["5120","213508"],"_bbp_voice_count":["2"],"_bbp_reply_count":["6"],"_bbp_last_reply_id":["186390"],"_bbp_last_active_id":["186390"],"_bbp_last_active_time":["2021-07-27 13:43:53"]},"test":"burhan-ibrarmb-tu-chemnitz-de"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/160603","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\/160603\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=160603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}