


{"id":312282,"date":"2023-10-19T11:17:34","date_gmt":"2023-10-19T11:17:34","guid":{"rendered":"\/forum\/forums\/reply\/312282\/"},"modified":"2023-10-19T11:17:34","modified_gmt":"2023-10-19T11:17:34","slug":"312282","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/","title":{"rendered":"Reply To: Modelling porous material"},"content":{"rendered":"<p>&lt;p&gt;Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time I run this as an energy source term in the porous material.&nbsp;&lt;\/p&gt;&lt;p&gt;I have attached the equation I am modelling for reference.&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;<img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png\" \/>#include &lt;\/span&gt;&lt;span style=&#8221;color: #ce9178; background: #1F1F1F;&#8221;&gt;&#8221;udf.h&#8221;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;#define&lt;\/span&gt;&lt;span style=&#8221;color: #569cd6; background: #1F1F1F;&#8221;&gt; Tsolidus &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;300.0&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;#define&lt;\/span&gt;&lt;span style=&#8221;color: #569cd6; background: #1F1F1F;&#8221;&gt; Tliquidus &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;304.0&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;#define&lt;\/span&gt;&lt;span style=&#8221;color: #569cd6; background: #1F1F1F;&#8221;&gt; L_f &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;250&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt; \/\/Latent heat of fusion&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;#define&lt;\/span&gt;&lt;span style=&#8221;color: #569cd6; background: #1F1F1F;&#8221;&gt; UDM_RHO_F_PREV &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;\/\/ UDM index for storing previous rho_f&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;#define&lt;\/span&gt;&lt;span style=&#8221;color: #569cd6; background: #1F1F1F;&#8221;&gt; UDM_LAMBDA_PREV &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;1&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;\/\/ UDM index for storing previous lambda&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;DEFINE_EXECUTE_ON_LOADING&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(init_values, udf_name)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;{&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;Thread &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;t;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #4ec9b0; background: #1F1F1F;&#8221;&gt;cell_t&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; c;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;Domain &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;d &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;Get_Domain&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(&lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;1&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;);&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt; \/\/ Get domain using Fluent API, assuming single-phase flow&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #6a9955;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;\/* Loop over all cells to initialize UDM values *\/&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;thread_loop_c&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(t, d)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;{&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;begin_c_loop_all&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;{&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_UDMI&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c,t,UDM_RHO_F_PREV) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;1000.0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;\/\/initializing previous rho_f&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_UDMI&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c,t,UDM_LAMBDA_PREV) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0.0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;\/\/initializing previous lambda&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;}&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;end_c_loop_all&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;}&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;}&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;DEFINE_SOURCE&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(energy_sourceN, c, t, dS, eqn)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;{&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;real lambda, lambda_prev, &lt;\/span&gt;&lt;span style=&#8221;color: #9cdcfe; background: #1F1F1F;&#8221;&gt;V&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;[ND_ND], rho_f, Sl, d_lambda_dt, grad_lambda_dot_V, T, rho_f_prev;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;T &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_T&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t);&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;rho_f &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_R&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t);&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_CENTROID&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(V, c, t);&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;rho_f_prev &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_UDMI&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t, UDM_RHO_F_PREV);&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;\/\/ Fetch the previous value of rho_f from UDM&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;lambda_prev &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_UDMI&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t, UDM_LAMBDA_PREV);&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;\/\/ Fetch the previous value of lambda from UDM&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;\/\/ Calculate lambda&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;if&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; (T &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;&lt;&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; Tsolidus)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;lambda &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0.0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;else if&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; (T &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; Tliquidus)&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;lambda &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;1.0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;else&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;\/span&gt;lambda &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;=&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; (T &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;-&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; Tsolidus) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;\/&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; (Tliquidus &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;-&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; Tsolidus);&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;\/\/ Calculate d(lambda*rho_f*L_f)\/dt&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;d_lambda_dt &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;=&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; ((rho_f &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; lambda &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; L_f &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;* &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0.85&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;-&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; (rho_f_prev &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; lambda_prev &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; L_f &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;* &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0.85&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;)) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;\/&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; CURRENT_TIMESTEP;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;\/\/ The gradient calculation requires more attention. Below is just a placeholder, and you need to implement the correct gradient calculation.&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;grad_lambda_dot_V &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;=&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; (&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_R_G&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c,t)[&lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;] &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;* &lt;\/span&gt;&lt;span style=&#8221;color: #9cdcfe; background: #1F1F1F;&#8221;&gt;V&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;[&lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;] &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;+ &lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_R_G&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c,t)[&lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;1&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;] &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;* &lt;\/span&gt;&lt;span style=&#8221;color: #9cdcfe; background: #1F1F1F;&#8221;&gt;V&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;[&lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;1&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;]) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; lambda &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;*&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; L_f;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;Sl &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;=&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; d_lambda_dt &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;+&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; grad_lambda_dot_V;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #9cdcfe; background: #1F1F1F;&#8221;&gt;dS&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;[eqn] &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;= &lt;\/span&gt;&lt;span style=&#8221;color: #b5cea8; background: #1F1F1F;&#8221;&gt;0&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt; \/\/ Adjust the source term linearization if necessary&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #6a9955; background: #1F1F1F;&#8221;&gt;\/\/ Store the current time step values of rho_f and lambda to UDM&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_UDMI&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t, UDM_RHO_F_PREV) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;=&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; rho_f;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #dcdcaa; background: #1F1F1F;&#8221;&gt;C_UDMI&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;(c, t, UDM_LAMBDA_PREV) &lt;\/span&gt;&lt;span style=&#8221;color: #d4d4d4; background: #1F1F1F;&#8221;&gt;=&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; lambda;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Calibri; font-size: 11.0pt;&#8221;&gt;&lt;br&gt;&nbsp;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt;&#8221;&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt;&lt;span style=&#8221;mso-spacerun: yes;&#8221;&gt;&nbsp; &lt;\/span&gt;&lt;\/span&gt;&lt;span style=&#8221;color: #c586c0; background: #1F1F1F;&#8221;&gt;return&lt;\/span&gt;&lt;span style=&#8221;color: #cccccc; background: #1F1F1F;&#8221;&gt; Sl;&lt;\/span&gt;&lt;\/p&gt;&lt;p style=&#8221;margin: 0in; line-height: 14pt; font-family: Consolas; font-size: 10.5pt; color: #cccccc;&#8221;&gt;&lt;span style=&#8221;background: #1F1F1F;&#8221;&gt;}&lt;\/span&gt;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-312282","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=\"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/\" \/>\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: Modelling porous material | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-10-19T11:17:34+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-10-19T11:17:34+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: Modelling porous material | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png\" \/>\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\\\/312282\\\/#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\\\/312282\\\/#listItem\",\"name\":\"Reply To: Modelling porous material\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/312282\\\/#listItem\",\"position\":2,\"name\":\"Reply To: Modelling porous material\",\"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\\\/312282\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/312282\\\/\",\"name\":\"Reply To: Modelling porous material | Ansys Learning Forum\",\"description\":\"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/312282\\\/#breadcrumblist\"},\"datePublished\":\"2023-10-19T11:17:34+00:00\",\"dateModified\":\"2023-10-19T11:17:34+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: Modelling porous material | Ansys Learning Forum","description":"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/#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\/312282\/#listItem","name":"Reply To: Modelling porous material"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/#listItem","position":2,"name":"Reply To: Modelling porous material","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\/312282\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/","name":"Reply To: Modelling porous material | Ansys Learning Forum","description":"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/#breadcrumblist"},"datePublished":"2023-10-19T11:17:34+00:00","dateModified":"2023-10-19T11:17:34+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: Modelling porous material | Ansys Learning Forum","og:description":"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/","og:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png","og:image:secure_url":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png","article:published_time":"2023-10-19T11:17:34+00:00","article:modified_time":"2023-10-19T11:17:34+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: Modelling porous material | Ansys Learning Forum","twitter:description":"Hi Rob, I completely understand that. Thank you for all your help so far. Would you be able to help with my code for an individual UDF for this energy source above. I have been stuck on this for the past week, and tried multiple methods but to no avail, with ANSYS crashing each time","twitter:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/10\/19-10-2023-1697714243-mceclip0.png"},"aioseo_meta_data":{"post_id":"312282","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 17:39:41","updated":"2026-08-20 13:18:56","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: Modelling porous material\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: Modelling porous material","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/312282\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/312282","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\/312282\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=312282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}