


{"id":301458,"date":"2023-08-15T02:42:49","date_gmt":"2023-08-15T02:42:49","guid":{"rendered":"\/forum\/forums\/topic\/the-udf-of-heat-transfer-coefficient-in-two-fluids-model-eulerian-model\/"},"modified":"2023-08-15T02:42:49","modified_gmt":"2023-08-15T02:42:49","slug":"the-udf-of-heat-transfer-coefficient-in-two-fluids-model-eulerian-model","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/the-udf-of-heat-transfer-coefficient-in-two-fluids-model-eulerian-model\/","title":{"rendered":"The UDF of Heat Transfer Coefficient In Two-Fluids Model (Eulerian Model)"},"content":{"rendered":"<p>Hello everyone, I have a question regarding the usage of a User-Defined Function (UDF) to <strong>define the interphase heat transfer coefficient<\/strong> for the Eulerian model (Two-Fluids Model,TFM) within ANSYS FLUENT. I&#8217;m wondering whether the UDF should return the heat transfer coefficient &#8216;h&#8217; (measured in W\/m&sup2;K) directly, or if it should return the product of the heat transfer coefficient &#8216;h&#8217; and the interface area &#8216;Ai&#8217; (measured in 1\/m). Additionally, I have a few minor questions to ask:<\/p>\n<ol>\n<li>\n<p>I&#8217;ve developed a UDF based on the <strong>Ranz-Marshall correlation<\/strong> to compute the interphase heat transfer coefficient <strong>between the liquid phase and the interface<\/strong>. However, the computed results differ from those obtained using FLUENT&#8217;s internal Ranz-Marshall correlation. I&#8217;m seeking insights into the potential reasons for this disparity.<\/p>\n<\/li>\n<li>\n<p>Concerning the correlation itself, should the &#8216;Pr&#8217; value in the correlation refer to the <strong>Prandtl number of the gas phase<\/strong>? I came across this information in the FLUENT Theory Guide, but I&#8217;m uncertain about its accuracy.<\/p>\n<\/li>\n<li>\n<p>Here is the UDF code I have written:<\/p>\n<\/li>\n<\/ol>\n<h1>include &#8220;udf.h&#8221;<br \/>DEFINE_EXCHANGE_PROPERTY(htc_1, c, mixthread, pi1, pi2)<br \/>{<br \/>&nbsp; &nbsp; Thread* liqthread, * vapthread;<br \/>&nbsp; &nbsp; real Nu, h, h_eff, Re, Pr, vel,d,k,cp,mu,Ai;<br \/>&nbsp; &nbsp; real NV_VEC(v);<br \/>&nbsp; &nbsp; liqthread = THREAD_SUB_THREAD(mixthread, pi1);<br \/>&nbsp; &nbsp; vapthread = THREAD_SUB_THREAD(mixthread, pi2);<br \/>&nbsp; &nbsp; d = C_PHASE_DIAMETER(c, vapthread);<br \/>&nbsp; &nbsp; k = C_K_L(c, vapthread);<br \/>&nbsp; &nbsp; cp = C_CP(c, vapthread);<br \/>&nbsp; &nbsp; mu = C_MU_L(c, vapthread);<br \/>&nbsp; &nbsp; Pr = (cp * mu) \/ k;<br \/>&nbsp; &nbsp; NV_DD(v, =, C_U(c, liqthread), C_V(c, liqthread), C_W(c, liqthread), -, C_U(c, vapthread), C_V(c, vapthread), C_W(c, vapthread));<br \/>&nbsp; &nbsp; vel = NV_MAG(v);<br \/>&nbsp; &nbsp; Re = (C_R(c, liqthread) * vel * d) \/ (C_MU_L(c, liqthread));<br \/>&nbsp; &nbsp; Nu = 2.0 + 0.6 * pow(Re, 0.5) * pow(Pr, 1. \/ 3.);<br \/>&nbsp; &nbsp; h = C_K_L(c, liqthread) * Nu \/ d;<br \/>&nbsp; &nbsp; Ai = 6.0 * C_VOF(c, vapthread) \/ d;<br \/>&nbsp; &nbsp; h_eff = h * Ai;<br \/>&nbsp; &nbsp; return h_eff;<br \/>}<\/h1>\n<p>Thanks!?<\/p>\n","protected":false},"template":"","class_list":["post-301458","topic","type-topic","status-closed","hentry","topic-tag-udf"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["291444","14311"],"_bbp_author_ip":["23.206.193.146"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1651"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["301458"],"_bbp_forum_id":["27792"],"_bbp_engagement":["14311","291444"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["301695"],"_bbp_last_active_id":["301695"],"_bbp_last_active_time":["2023-08-16 13:02:26"]},"test":"1105808579qq-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/301458","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\/301458\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=301458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}