


{"id":346880,"date":"2024-01-28T06:55:10","date_gmt":"2024-01-28T06:55:10","guid":{"rendered":"\/forum\/forums\/topic\/how-to-vary-specific-heat-with-spatial-co-ordinates-not-with-temperature\/"},"modified":"2024-01-28T06:55:10","modified_gmt":"2024-01-28T06:55:10","slug":"how-to-vary-specific-heat-with-spatial-co-ordinates-not-with-temperature","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-vary-specific-heat-with-spatial-co-ordinates-not-with-temperature\/","title":{"rendered":"How to vary specific heat with spatial co-ordinates not with Temperature"},"content":{"rendered":"<p>I&#8217;m trying to write an UDF for the variaton of specific heat along the length of the micro-combustor.<br \/>I already wrote two UDFs to vary the thermal_conductivity and density along the length of micro-combustor and they worked well. I was even able to extract the graphs for them. The macro I used to write the the thermal_conductivity and density UDFs is DEFINE_PROPERTY. That is not working for the specific_heat. Later I tried another macro to vary the specific_heat that is DEFINE_SPECIFIC_HEAT. But this macro only takes T as input arguments not the cell and thread as the input arguments.<\/p>\n<p>DEFINE_PROPERTY(specific_heat,c,t)<br \/>{<br \/>&nbsp; &nbsp;real x[ND_ND];<br \/>&nbsp; &nbsp;real cp;<br \/>&nbsp; &nbsp;C_CENTROID(x,c,t);<br \/>&nbsp; &nbsp;cp=a*x[0]+e;<br \/>&nbsp; &nbsp;return cp;<br \/>}<\/p>\n<p>DEFINE_SPECIFIC_HEAT(user_cp,c,t)<br \/>{<br \/>&nbsp; &nbsp;real x[ND_ND];<br \/>&nbsp; &nbsp;real cp;<br \/>&nbsp; &nbsp;C_CENTROID(x,c,t);<br \/>&nbsp; &nbsp;cp=a*x[0]+e;<br \/>&nbsp; &nbsp;return cp;<br \/>}<\/p>\n<p>These are the codes I tried to vary the specific heat along the length of the micro-combustor but they didn&#8217;t work well.<br \/>Can you help me with this<\/p>\n","protected":false},"template":"","class_list":["post-346880","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["61840","199"],"_bbp_author_ip":["23.52.43.16"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["292"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["346880"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","61840"],"_bbp_voice_count":["2"],"_bbp_reply_count":["5"],"_bbp_last_reply_id":["347326"],"_bbp_last_active_id":["347326"],"_bbp_last_active_time":["2024-01-30 16:07:17"]},"test":"pa962051student-nitw-ac-in"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/346880","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\/346880\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=346880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}