


{"id":367254,"date":"2024-05-17T06:40:58","date_gmt":"2024-05-17T06:40:58","guid":{"rendered":"\/forum\/forums\/topic\/udf-error-4\/"},"modified":"2024-05-17T06:40:58","modified_gmt":"2024-05-17T06:40:58","slug":"udf-error-4","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/","title":{"rendered":"UDF Error"},"content":{"rendered":"<p><span style=\"font-size: 10pt\">I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrong<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Temp of face 391: -nan(ind) K<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Heat flux on face 392: -4.41347e+07 W\/m^2<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Temp of face 392: -nan(ind) K<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Heat flux on face 393: -2.6595e+06 W\/m^2<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Temp of face 393: 99.0877 K<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Heat flux on face 408: 6.20341e+06 W\/m^2<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Temp of face 408: 1249.73 K<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Heat flux on face 409: 4.17052e+06 W\/m^2<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Temp of face 409: 921.292 K<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Heat flux on face 410: 3.9361e+06 W\/m^2<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Temp of face 410: 900.957 K<\/span><\/p>\n<p><span style=\"font-size: 10pt\">pdf_initial_enthalpy: failed to converge for T = -nan(ind), fmean = 0.7, fvar = 0, error = -nan(ind)<\/span><\/p>\n<p><span style=\"font-size: 10pt\">pdf_initial_enthalpy: failed to converge for T = -nan(ind), fmean = 0.7, fvar = 0, error = -nan(ind)<\/span><\/p>\n<p><span style=\"font-size: 10pt\">pdf_initial_enthalpy: failed to converge for T = -nan(ind), fmean = 0.7, fvar = 0, error = -nan(ind)<\/span><\/p>\n<p>&nbsp;<\/p>\n<div><span style=\"font-size: 10pt\">#include &#8220;udf.h&#8221;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#include &lt;math.h&gt;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define rho 754 \/\/kg\/m^3<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define Hg 2033631 \/\/J\/Kg<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define Hf -310000 \/\/J\/Kg<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define T_ref 298 \/\/T<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define A 0.01104 \/\/m\/s<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define Cp 1500 \/\/J\/(Kg*K)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define E 20557.188 \/\/J\/mol<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define R_u 8.314 \/\/J(m*K)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define D_p 0.04064 \/\/port diameter (m)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define L 0.43815 \/\/Length (m)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">#define alpha .1<\/span><\/div>\n<div><span style=\"font-size: 10pt\">DEFINE_PROFILE(surface_temperature_profile, t, position)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">{<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; face_t f;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; real Ts, heat_flux, heat, a_face, Hv, r, Ts_old, Ts_new_prime, Ts_new, error, Area[ND_ND];<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; int iter;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; begin_f_loop(f, t)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; {<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; if (THREAD_ID(t) == 8)&nbsp; \/\/ Adjust the surface thread ID as per your case<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; {<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ts = F_T(f, t);&nbsp; \/\/ Current temperature at the face<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; heat = BOUNDARY_HEAT_FLUX(f, t);&nbsp; \/\/ Calculating the heat flux at face f in watts<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_AREA(Area, f, t);<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a_face = NV_MAG(Area);<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; heat_flux = heat \/ a_face; \/\/ Heat flux in w\/m^2<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&#8220;Heat flux on face %d: %g W\/m^2\\n&#8221;, f, heat_flux);<\/span><\/div>\n<div>&nbsp;<\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ Iterative calculation for new surface temperature<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ts_old = Ts;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iter = 0;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error = 1;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (error &gt; 1e-6 &amp;&amp; iter &lt; 100)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hv = Hg &#8211; Hf + Cp * (Ts_old &#8211; T_ref);&nbsp; \/\/ Calculation heat of formation<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = (fabs(heat_flux)) \/ (Hv * rho);&nbsp; \/\/ Regression rate<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ts_new = E \/ (R_u * (log(A) &#8211; log(r)));&nbsp; \/\/ New surface temperature<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error = fabs(Ts_new &#8211; Ts_old);&nbsp; \/\/ Error calculation<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ts_old = Ts_new;&nbsp; \/\/ Update Ts_old for next iteration<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; iter++;&nbsp; \/\/ Increment iteration count<\/span><\/div>\n<div>&nbsp;<\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; Ts_new_prime = Ts+(alpha*(Ts_new-Ts));<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; printf(&#8220;Temp of face %d: %g K\\n&#8221;, f, Ts_new_prime);<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_PROFILE(f, t, position) = Ts_new_prime;&nbsp; \/\/ Update the face temperature profile<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; }<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; end_f_loop(f, t)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">}<\/span><\/div>\n<div><span style=\"font-size: 10pt\">DEFINE_PROFILE(mass_flow_rate_profile, t, position)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">{<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; face_t f;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; real heat_flux, heat, a_face, Hv, r, m_dot, Ts, Area[ND_ND];<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; begin_f_loop(f, t)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; {<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; if (THREAD_ID(t) == 8)&nbsp; \/\/ Adjust the inlet thread ID as per your case<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; {<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ts = F_T(f, t);&nbsp; \/\/ Get the current temperature at the face<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; heat = BOUNDARY_HEAT_FLUX(f, t);&nbsp; \/\/ Calculating the heat flux at face f<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_AREA(Area, f, t);<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a_face = NV_MAG(Area);<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; heat_flux = heat \/ a_face;<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hv = Hg &#8211; Hf + Cp * (Ts &#8211; T_ref);&nbsp; \/\/ Adjusted Hv calculation with temperature dependency<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; r = (fabs(heat_flux)) \/ (Hv * rho);&nbsp; \/\/ Regression rate calculation<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_dot = rho * r * a_face;&nbsp; \/\/ Mass flow rate calculation<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; printf(&#8220;m_dot fuel %d: %g kg\/s\\n&#8221;, f, m_dot);<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; F_PROFILE(f, t, position) = m_dot;&nbsp; \/\/ Set the profile for the mass flow rate<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; }<\/span><\/div>\n<div><span style=\"font-size: 10pt\">&nbsp; &nbsp; end_f_loop(f, t)<\/span><\/div>\n<div><span style=\"font-size: 10pt\">}<\/span><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-367254","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/\" \/>\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=\"UDF Error | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-05-17T06:40:58+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-05-17T06:40:58+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"UDF Error | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)\" \/>\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\\\/topic\\\/udf-error-4\\\/#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\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/udf-error-4\\\/#listItem\",\"name\":\"UDF Error\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/udf-error-4\\\/#listItem\",\"position\":3,\"name\":\"UDF Error\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}}]},{\"@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\\\/topic\\\/udf-error-4\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/udf-error-4\\\/\",\"name\":\"UDF Error | Ansys Learning Forum\",\"description\":\"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/udf-error-4\\\/#breadcrumblist\"},\"datePublished\":\"2024-05-17T06:40:58+00:00\",\"dateModified\":\"2024-05-17T06:40:58+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":"UDF Error | Ansys Learning Forum","description":"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/#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\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/forum\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/#listItem","name":"UDF Error"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/#listItem","position":3,"name":"UDF Error","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}}]},{"@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\/topic\/udf-error-4\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/","name":"UDF Error | Ansys Learning Forum","description":"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/#breadcrumblist"},"datePublished":"2024-05-17T06:40:58+00:00","dateModified":"2024-05-17T06:40:58+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":"UDF Error | Ansys Learning Forum","og:description":"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/","article:published_time":"2024-05-17T06:40:58+00:00","article:modified_time":"2024-05-17T06:40:58+00:00","twitter:card":"summary_large_image","twitter:title":"UDF Error | Ansys Learning Forum","twitter:description":"I have attached the UDF at the end. I am trying to use the heat flux to update the mass flow rate at different x values on the inlet surface. I keep getting errors and the temp distribution is weird. On some faces it make sense and others its completely wrongTemp of face 391: -nan(ind)"},"aioseo_meta_data":{"post_id":"367254","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:42:03","updated":"2024-10-28 16:42:03","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\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUDF Error\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/forum\/topics\/"},{"label":"UDF Error","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-error-4\/"}],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["343144","199"],"_bbp_author_ip":["23.11.229.223"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["333"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["367254"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","343144"],"_bbp_voice_count":["2"],"_bbp_reply_count":["6"],"_bbp_last_reply_id":["367971"],"_bbp_last_active_id":["367971"],"_bbp_last_active_time":["2024-05-22 00:02:40"]},"test":"zwernjaydengmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/367254","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\/367254\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=367254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}