


{"id":51563,"date":"2021-01-24T10:37:29","date_gmt":"2021-01-24T10:37:29","guid":{"rendered":"\/forum\/forums\/topic\/is-the-udf-for-herschel-bulkley-viscosity-model-right-i-am-receving-amg-solver-error\/"},"modified":"2021-01-24T10:37:29","modified_gmt":"2021-01-24T10:37:29","slug":"is-the-udf-for-herschel-bulkley-viscosity-model-right-i-am-receving-amg-solver-error","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/is-the-udf-for-herschel-bulkley-viscosity-model-right-i-am-receving-amg-solver-error\/","title":{"rendered":"Is the UDF for Herschel-Bulkley viscosity model right? I am receving AMG solver error."},"content":{"rendered":"<p>Hello,nI have written a UDF code for the Herschel-Bulkley viscosity model. n<strong>CODE:<\/strong>n#include udf.hnFILE *fp;nDEFINE_PROPERTY(hb_viscosity, c, t)n{nreal viscosity;nreal stress;nreal ys;nreal n, m;nreal k;nreal Max, Min;nn = 0.94;\u00a0nys = 4.022;\u00a0nk = 0.04;\u00a0nm = 1000;nMax = 100000;nMin = 0.00000000001;nstress = C_STRAIN_RATE_MAG(c,t);nnviscosity = ys*(1-exp(-m*stress))\/stress + k*pow(stress,n-1);nnreturn viscosity;n}nnI am receiving an AMG solver error when I try to run the solution.  Which equation does ANSYS use to calculate the viscosity?nWhen I try to use the in-built Herschel-Bulkley model, I don&#8217;t get a stable value from the Grid sensitivity analysis. Any kind of help will be very kind.nThanks.n<\/p>\n","protected":false},"template":"","class_list":["post-51563","topic","type-topic","status-closed","hentry","topic-tag-divergence-in-amg-solver","topic-tag-diverging","topic-tag-herschel-bulkley","topic-tag-udf","topic-tag-udf-viscosity-model"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_old_topic_id":["23836"],"_bbp_old_topic_author_name_id":["Anonymous"],"_bbp_old_is_topic_anonymous_id":["false"],"_bbp_old_closed_status_id":["publish"],"_bbp_author_ip":["z?0\u0002"],"_bbp_old_sticky_status_id":["normal"],"_bbp_likes_count":["0"],"_btv_view_count":["524"],"_bbp_subscription":["254705"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["51563"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","180586"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["139984"],"_bbp_last_active_id":["139984"],"_bbp_last_active_time":["2021-01-25 18:06:40"]},"test":"uditkumar007"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/51563","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\/51563\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=51563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}