


{"id":167267,"date":"2022-03-12T10:25:18","date_gmt":"2022-03-12T10:25:18","guid":{"rendered":"\/forum\/forums\/topic\/crashing-udf-wrong-input\/"},"modified":"2022-03-14T10:06:45","modified_gmt":"2022-03-14T10:06:45","slug":"crashing-udf-wrong-input","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/crashing-udf-wrong-input\/","title":{"rendered":"Crashing UDF wrong input?"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Hi, <\/p>\n<p>I&#039;m trying to get the volume of the each cell adjacent \/ on a face. A section of the UDF is shown below. The code crashes when i introduce C_VOLUME. I suspect that it might be caused by the wrong input here but I&#039;m struggling to see what the reason actually is. Can anybody advice me on this ? <\/p>\n<p>DEFINE_PROFILE(name,th,i)<\/p>\n<p>face_t f<\/p>\n<p>cell_t c;&nbsp;<\/p>\n<p>mixture_domain = Get_Domain(1);<\/p>\n<p>Thread* t; <\/p>\n<p>Thread* t_prim; \/*= THREAD_SUB_THREAD(mixture_domain, prim_phase_domain_index); <\/p>\n<p>Thread* t_sec; \/* = THREAD_SUB_THREAD(mixture_domain, sec_phase_domain_index); <\/p>\n<p>t = Lookup_Thread(mixture_domain, 11);<\/p>\n<p>begin_f_loop(f, th)<\/p>\n<p>&nbsp;&nbsp;{<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;if PRINCIPAL_FACE_P(f, th)&nbsp;&nbsp;&nbsp;{<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c = F_C0(f, t);&nbsp;<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;volume_fraction_ = C_VOF(c, t_sec);<\/p>\n<p> <strong>volume =C_VOLUME(c,t)<\/strong>; }<\/p>\n","protected":false},"template":"","class_list":["post-167267","topic","type-topic","status-closed","hentry","topic-tag-crash","topic-tag-multiphase","topic-tag-udf","topic-tag-volume"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_btv_view_count":["334"],"_bbp_likes_count":["0"],"_bbp_subscription":["246355"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["167267"],"_bbp_forum_id":["27792"],"_bbp_engagement":["22555","246355"],"_bbp_voice_count":["2"],"_bbp_reply_count":["1"],"_bbp_last_reply_id":["208168"],"_bbp_last_active_id":["208168"],"_bbp_last_active_time":["2022-03-14 10:06:45"]},"test":"preben-svartvatngmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/167267","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\/167267\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=167267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}