


{"id":367437,"date":"2024-05-18T11:58:11","date_gmt":"2024-05-18T11:58:11","guid":{"rendered":"\/forum\/forums\/reply\/367437\/"},"modified":"2024-05-18T11:58:11","modified_gmt":"2024-05-18T11:58:11","slug":"367437","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/","title":{"rendered":"Reply To: Melting and solidification process for different boundary condition&amp; time period"},"content":{"rendered":"<p>&lt;p&gt;Sir, I wrote a UDF regarding the above-stated problem, which is given below,&lt;\/p&gt;&lt;p&gt;#include &#8220;udf.h&#8221;&lt;br&gt;real pcm_tavg;&lt;br&gt;real gc_tavg;&lt;\/p&gt;&lt;p&gt;#define T_S 494 &nbsp;\/*pcm solidus temperature*\/&lt;br&gt;#define T_L 514 &nbsp;\/*pcm liquidus temperature*\/&lt;br&gt;#define h 10 \/*heat transfer coefficient*\/&lt;br&gt;#define T_amb 300 \/*ambient temperature*\/&lt;\/p&gt;&lt;p&gt;\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/&lt;\/p&gt;&lt;p&gt;DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature)&lt;br&gt;{&lt;br&gt;statement&lt;br&gt;&#8212;&#8212;&#8212;-&lt;br&gt;pcm_tavg = &#8212;&#8211;;&lt;br&gt;}&lt;\/p&gt;&lt;p&gt;\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/&lt;\/p&gt;&lt;p&gt;DEFINE_EXECUTE_AT_END(glass_cover_average_temperature)&lt;br&gt;{&lt;br&gt;statement&lt;br&gt;&#8212;&#8212;&#8212;-&lt;br&gt;gc_tavg = &#8212;&#8211;;&lt;br&gt;}&lt;\/p&gt;&lt;p&gt;\/* APPLYING CHARGING AND DIS-CHARGING BOUNDARY CONDITION *\/&lt;br&gt;&nbsp;&lt;br&gt;DEFINE_PROFILE(bound_condition,thread,position)&lt;br&gt;{&lt;br&gt;&nbsp; &nbsp; real x[ND_ND];&lt;br&gt;&nbsp; &nbsp; real current_time = CURRENT_TIME;&lt;br&gt;&nbsp; &nbsp; int current_time_step = N_TIME;&lt;br&gt;&nbsp; &nbsp; real current_time_step_size = CURRENT_TIMESTEP;&lt;br&gt;&nbsp; &nbsp; real total_time = current_time_step*current_time_step_size;&lt;br&gt;&nbsp; &nbsp; current_time=0;&lt;br&gt;&nbsp;#if !RP_HOST&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; face_t face;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; while(current_time&lt;=total_time)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin_f_loop(face,thread)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(pcm_tavg&gt;=T_L)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Message(&#8220;pcm completely melts, pcm_Tavg = %g\\n&#8221;,v_w_tavg);&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while(current_time&lt;=total_time)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin_f_loop(face,thread)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(pcm_tavg&lt;=T_S)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Message(&#8220;pcm completely solidifies, pcm_Tavg = %g\\n&#8221;,v_w_tavg);&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&nbsp;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_CENTROID(x,face,thread);&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_PROFILE(face,thread,position) = h*(T_amb-gc_tavg);&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_f_loop(face,thread)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;current_time = current_time + current_time_step_size;&nbsp;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_CENTROID(x,face,thread);&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_PROFILE(face,thread,position) = 20000;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_f_loop(face,thread)&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; current_time = current_time + current_time_step_size;&lt;br&gt;&nbsp; &nbsp; &nbsp; &nbsp; }&lt;br&gt;&nbsp; &nbsp; #endif &nbsp; &nbsp;&lt;br&gt;}&lt;\/p&gt;&lt;p&gt;First, I calculated the PCM domain volume-weighted average temperature and area-weighted average temperature for the glass cover outer surface, respectively, using the UDF &#8211; DEFINE_EXECUTE_AT_END macros, as shown in the UDF above. These two UDFs work fine.&nbsp;&nbsp;&lt;\/p&gt;&lt;p&gt;The change of boundary condition is done by using the DEFINE_PROFILE macro. Initially, the flux value applies as per the condition. But, the problem arises when the PCM average temperature exceeds the T_L; it doesn&#8217;t enter the if condition statement of the 1st while statement; rather, it continues with the else statement. Can you please suggest why the if statement doesn&#8217;t work?&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-367437","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include &quot;udf.h&quot;real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reply To: Melting and solidification process for different boundary condition&amp; time period | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include &quot;udf.h&quot;real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-05-18T11:58:11+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-05-18T11:58:11+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: Melting and solidification process for different boundary condition&amp; time period | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include &quot;udf.h&quot;real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/367437\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/367437\\\/#listItem\",\"name\":\"Reply To: Melting and solidification process for different boundary condition&amp; time period\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/367437\\\/#listItem\",\"position\":2,\"name\":\"Reply To: Melting and solidification process for different boundary condition&amp; time period\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/367437\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/367437\\\/\",\"name\":\"Reply To: Melting and solidification process for different boundary condition& time period | Ansys Learning Forum\",\"description\":\"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include \\\"udf.h\\\"real pcm_tavg;real gc_tavg;#define T_S 494 \\\/*pcm solidus temperature*\\\/#define T_L 514 \\\/*pcm liquidus temperature*\\\/#define h 10 \\\/*heat transfer coefficient*\\\/#define T_amb 300 \\\/*ambient temperature*\\\/\\\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\\\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\\\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\\\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\\\/*\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/367437\\\/#breadcrumblist\"},\"datePublished\":\"2024-05-18T11:58:11+00:00\",\"dateModified\":\"2024-05-18T11:58:11+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reply To: Melting and solidification process for different boundary condition& time period | Ansys Learning Forum","description":"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include \"udf.h\"real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/#listItem","name":"Reply To: Melting and solidification process for different boundary condition&amp; time period"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/#listItem","position":2,"name":"Reply To: Melting and solidification process for different boundary condition&amp; time period","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/","name":"Reply To: Melting and solidification process for different boundary condition& time period | Ansys Learning Forum","description":"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include \"udf.h\"real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/#breadcrumblist"},"datePublished":"2024-05-18T11:58:11+00:00","dateModified":"2024-05-18T11:58:11+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"Reply To: Melting and solidification process for different boundary condition&amp; time period | Ansys Learning Forum","og:description":"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include &quot;udf.h&quot;real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/","article:published_time":"2024-05-18T11:58:11+00:00","article:modified_time":"2024-05-18T11:58:11+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: Melting and solidification process for different boundary condition&amp; time period | Ansys Learning Forum","twitter:description":"Sir, I wrote a UDF regarding the above-stated problem, which is given below,#include &quot;udf.h&quot;real pcm_tavg;real gc_tavg;#define T_S 494 \/*pcm solidus temperature*\/#define T_L 514 \/*pcm liquidus temperature*\/#define h 10 \/*heat transfer coefficient*\/#define T_amb 300 \/*ambient temperature*\/\/* CALCULATING THE PCM DOMAIN VOLUME WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(pcm_domain_average_temperature){statement----------pcm_tavg = -----;}\/* CALCULATING THE GLASS COVER AREA WEIGHTED AVERAGE TEMPERATURE*\/DEFINE_EXECUTE_AT_END(glass_cover_average_temperature){statement----------gc_tavg = -----;}\/*"},"aioseo_meta_data":{"post_id":"367437","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"content","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-10-28 16:41:49","updated":"2026-08-25 02:14:07","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReply To: Melting and solidification process for different boundary condition&amp; time period\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: Melting and solidification process for different boundary condition&amp; time period","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/367437\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/367437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/367437\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=367437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}