


{"id":44385,"date":"2020-05-26T02:20:22","date_gmt":"2020-05-26T02:20:22","guid":{"rendered":"\/forum\/forums\/topic\/heat-transfer-coefficient-porous-media-ltne\/"},"modified":"2020-05-26T02:20:22","modified_gmt":"2020-05-26T02:20:22","slug":"heat-transfer-coefficient-porous-media-ltne","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/heat-transfer-coefficient-porous-media-ltne\/","title":{"rendered":"Heat Transfer Coefficient &#8211; Porous Media &#8211; LTNE"},"content":{"rendered":"<p>Hello,&nbsp;<\/p>\n<p><\/p>\n<p>I have some general questions about a UDF I have been using to define the heat transfer coefficient between air and the material which makes up my porous domain (&#8220;sand&#8221;). The flow is Darcy governed.&nbsp;<strong>The UDF is described below and my QUESTIONS are found beneath the UDF.<\/strong><\/p>\n<p><\/p>\n<p><strong>Somethings to note about my UDF:<\/strong><\/p>\n<p><\/p>\n<p>d_p (particle diameter, meters) and Pr (Prandtl Number) are both explicitly defined.<\/p>\n<p><\/p>\n<p>In particular, Pr is a value from literature for which my Nusselt Number (Nu) expression is valid.<\/p>\n<p><\/p>\n<p>I also have used the UDF with a &#8220;calculated&#8221; Pr and simulation results did not seem to be noticeable different (at least from my assessment).&nbsp;<\/p>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p><\/p>\n<p>#include &#8220;udf.h&#8221;<\/p>\n<p><\/p>\n<p>DEFINE_PROFILE(Heat_Transfer_Coeff,t,i)<\/p>\n<p><\/p>\n<p>{<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; cell_t c;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; real Nu,Re,Pr;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; real dens, visc; \/*Fluid*\/<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; real cond, cp; \/* Fluid*\/<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; real d_p;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; d_p = 0.0001875;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; Pr = 0.72;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; begin_c_loop(c,t)<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; {<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; dens = C_R(c,t); \/*Density of fluid*\/<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; visc = C_MU_L(c,t); \/*Viscosity fluid*\/<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; cond = C_K_L(c,t); \/*Conductivity fluid*\/<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; cp = C_CP(c,t); \/*Specific heat fluid*\/<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; Re = (ND_MAG(C_U(c,t),C_V(c,t),C_W(c,t))*d_p*dens)\/visc;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; Nu = 0.001*(pow(Re,1.97)*pow(Pr,1.\/3.));<\/p>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; F_PROFILE(c,t,i) = (Nu*cond)\/d_p;<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; }<\/p>\n<p><\/p>\n<p>&nbsp; &nbsp; end_c_loop(c,t)<\/p>\n<p><\/p>\n<p>}<\/p>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p><\/p>\n<p>QUESTIONS:<\/p>\n<p><\/p>\n<p>1) I have read that DEFINE_PROFILE is used to create a custom boundary profile. Why then can it be used to define a heat transfer coefficient throughout the domain?<\/p>\n<p><\/p>\n<p>2) Why is it possible that F_PROFILE can be used while looping over cell values? I have also used C_PROFILE within this UDF in place of F_PROFILE with no significant difference in simulation results (to my knowledge).<\/p>\n<p><\/p>\n<p>3) Overall, are there any glaring improvements I can make to my UDF?<\/p>\n<p><\/p>\n<p>4) Finally, I have been wanting to implement some method to &#8220;tell me&#8221; if my UDF is outputting the correct values. I have thought of printing the heat transfer coefficient values to a .txt file. Any suggestions on the best way to check UDF outputs and debug?<\/p>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p><\/p>\n<p>Thanks in advance for any help that can be offered and please let me know if any further clarification is needed.&nbsp;<\/p>\n<p><\/p>\n<p>Ryan&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-44385","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_old_topic_id":["16566"],"_bbp_old_topic_author_name_id":["Anonymous"],"_bbp_old_is_topic_anonymous_id":["false"],"_bbp_old_closed_status_id":["publish"],"_bbp_author_ip":[null],"_bbp_old_sticky_status_id":["normal"],"_bbp_likes_count":["0"],"_btv_view_count":["1544"],"_bbp_subscription":["250390"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["44385"],"_bbp_forum_id":["27792"],"_bbp_engagement":["25","176224"],"_bbp_voice_count":["2"],"_bbp_reply_count":["6"],"_bbp_last_reply_id":["116129"],"_bbp_last_active_id":["116129"],"_bbp_last_active_time":["2020-05-29 18:06:18"]},"test":"rymor"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/44385","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\/44385\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=44385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}