regarding UDF
Can anyone help me writing the UDF for the density varying with temperature
as follows rho(T)=1000*(1-((T+288.9414)/(508929.2*T+34673158.1))-(T-3.9863)^2) Thanks |
Ansys FLuent Customization manual
look for DEFINE_PROPERTY macro example Code:
/********************************************************************* best regards |
Regardin UDF
I have written the following UDF but I don't whether its correct or not. I tried it in fluent but its not working. Any idea for any correction please tell me
#include "udf.h" DEFINE_PROPERTY(cell_density,c,t) { real rho; real T= C_T(c,t); rho= 1000*(1-((T-273.15+288.9414)/(508929.2*(T-273)+34673158.1))-(T-273-3.9863)*(T-273-3.9863)); return rho; } |
why do you think it doesn't work?
udf seems to be correct did you apply this udf as material property? best regards |
Yes I applied it as material property but solution is not getting converged now. for constant density it was converging but now it is showing floating point error. I don't know how to proceed further.
Please help what to do now |
check your equation, put simple equation first to clarify, that everything works well, most likely problem comes from your equation
make more strict convergence criteria, make more iterations put smaller relaxation value best regards |
Getting different answer when intializing through udf
The below is a part of density udf for PCM
r1=(9*(pow(temp,3))) the value I am getting when initializing is 239613872.000000 but the actual value is 239613851.304 please help me due to this I am getting divergence |
Check your equation: rho= 1000*(1-((T-273.15+288.9414)/(508929.2*(T-273)+34673158.1))-(T-273-3.9863)*(T-273-3.9863));
It gives negative values Code:
temperature(K) value best regards |
All times are GMT -4. The time now is 03:58. |