I want to define Density of water that varies with temperature I have written a UDF based on the following polynomial equation. I donot know it is right . If anycorrection plz inform me. Thanks

#include "udf.h"

DEFINE_PROPERTY(cell_density,cell,thread)

{

real rho;

real T = C_T(c,t);

rho = 765.33+1.8142*T – 0.0035*pow(T,2.)

C_UDMI(c,t,0) = rho;

return rho;

}