


{"id":247381,"date":"2023-01-24T19:02:13","date_gmt":"2023-01-24T19:02:13","guid":{"rendered":"\/forum\/forums\/topic\/gradient-of-uds\/"},"modified":"2023-01-24T19:02:13","modified_gmt":"2023-01-24T19:02:13","slug":"gradient-of-uds","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/gradient-of-uds\/","title":{"rendered":"Gradient of UDS"},"content":{"rendered":"<p>I want to calculate the gradient of UDS0 and save it in a UDMI to later use it in the UDF. I calculate the cell values of gradient of UDS0 by using C_UDSI_G macro and save it to UDMI. i.e.:<\/p>\n<p>C_UDMI(c,t,0) = -1.*C_UDSI_G(c,t,0)[0]; \/\/Ex<\/p>\n<p>Based on UDF manual tha face value of an scalar is calculated by:<\/p>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/01\/24-01-2023-1674586611-mceclip0.png\"><\/p>\n<p>As there are no macros (as far as I know) to give me the face values of scalar so I do the next for boundary faces:<\/p>\n<pre>BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0)<br>F_UDMI(f,t,0) = C_UDMI(c,t0,0) + (C_UDSI_G(c0,t0,0)[0]*dr0[0]);<\/pre>\n<p>Is it a correct way of calculating the gradient? my code compiles corrrectly but after one iteration fluent gives me an error message like this:<\/p>\n<pre>Node 0 Fatal signal raised sig = Segmentation fault<br><br><\/pre>\n","protected":false},"template":"","class_list":["post-247381","topic","type-topic","status-closed","hentry","topic-tag-udf"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["263554","199"],"_bbp_author_ip":["23.220.96.180"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1826"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["247381"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","263554"],"_bbp_voice_count":["2"],"_bbp_reply_count":["7"],"_bbp_last_reply_id":["247931"],"_bbp_last_active_id":["247931"],"_bbp_last_active_time":["2023-01-30 11:13:27"]},"test":"ehsan-sadeghischako-es"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/247381","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\/247381\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=247381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}