Respected Sirs,

I am trying to specify the properties of water in supercritical region by interpreting a property UDF in fluent but unable to initialize due to following error

received a fatal signal (Segmentation fault).

the UDF is

/*********************************************************************/

/* UDF for specifying a temperature-dependent density property */

/*********************************************************************/

#include "udf.h"

DEFINE_PROPERTY(cell_density, cell, thread)

{

real den;

real T = C_T(cell, thread);

if (T < 656.)

den = -37540000000 + 366700000000*cos(T*0.002949) - 139500000000*cos(2*T*0.002949) - 494500000000*sin(2*T*0.002949) - 378500000000*cos(3*T*0.002949) + 201700000000*sin(3*T*0.002949) + 156100000000*cos(4*T*0.002949) + 189600000000*sin(4*T*0.002949) + 62480000000*cos(5*T*0.002949) - 75910000000*sin(5*T*0.002949) - 23330000000*cos(6*T*0.002949) - 12700000000*sin(6*T*0.002949) - 1336000000*cos(7*T*0.002949) + 4171000000*sin(7*T*0.002949) + 332400000*cos(8*T*0.002949) + 40860000*sin(8*T*0.002949);

else

den = 66200000000 + 506600000000*cos(T*0.001925) + 242500000000*cos(2*T*0.001925) - 661000000000*sin(2*T*0.001925) - 475200000000*cos(3*T*0.001925) - 344100000000*sin(3*T*0.001925) - 259400000000*cos(4*T*0.001925) + 213400000000*sin(4*T*0.001925) + 57380000000*cos(5*T*0.001925) + 121600000000*sin(5*T*0.001925) + 35620000000*cos(6*T*0.001925) - 7114000000*sin(6*T*0.001925) + 266200000*cos(7*T*0.001925) - 5986000000*sin(7*T*0.001925) - 439800000*cos(8*T*0.001925) - 128700000*sin(8*T*0.001925);

return den;

}

please help me in finding error.

Similar questions and discussions