ashch
Subscriber
Hi ArraynThank you for the comments.nYes, I did hook it up. Checked twice nIt seems to me the UDF is NOT getting read-only. It's because after having included the code lines, still the same warning messages are being displayed and the message Message(Temperature = %f , Cp = %f, T, cp);is not being displayed even once.  nNOTE - It shows NO ERROR while getting compiled nWARNING: Invalid cp (0.000000e+00 J/kgK) for melt at temperature 1370.089680 KnnHere's the UDF again- n #include udf.hn DEFINE_SPECIFIC_HEAT(my_user_cp, T, Tref, h, yi)n {n  real cp;n/* Specific Heat of Liquid Melt above T-liquidus(above 1185 deg C)*/n if (T > 1458. && T < 2000.)n   cp = 850.0e-0;n/* Specific Heat of Liquid Melt in between T-liquidus and T-eutectic-start (>1185 & <1145 deg C) (0.0170239*T*T) - (35.0263*T) + 18651.1 + 850.0*/n else if (T <= 1458. && T > 1418.)n   cp = 1890.0;n/* Specific Heat of Liquid Melt in between T-eutectic-start and T-solidus(>1100 & <1145 deg C) (1.264730168e-7*T*T) + (42.6196*T) - 43600 + 850.0;*/n else if (T >1373. && T <= 1418.)n   cp = 4262.0;n/* Specific Heat of Liquid Melt in below T-solidus(<1100 deg C) */n elsen   850.0e-0;n #if RP_HOSTntif (cp != 0) tnt{tMessage(Temperature = %f , Cp = %f, T, cp); }n#endiftn  *h = cp*(T-Tref);n  return cp;n }nnThanks,nAshishn