CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Error when initializing the simulation using UDF (https://www.cfd-online.com/Forums/fluent-udf/181987-error-when-initializing-simulation-using-udf.html)

avi_sonu December 27, 2016 07:00

Error when initializing the simulation using UDF
 
Hi everyone,

Fluent show an error when I initialize the simulation.

"Error: received a fatal signal (Segmentation fault)."
"Error Object: #f"

I am using UDF for temperature dependent property of water. Can anyone tell me how to remove this error.

The UDF I am using for temperature dependent density is as follow:

#include "udf.h"

DEFINE_PROPERTY(water_density, cell, thread)
{
real den;
real t = C_T(cell,thread);
den=1000*(1-(((t+15.9414)*pow(t-276.9863,2)) / (508929.2*(t-204.87037))));
return den;
}

Thank you

pakk January 3, 2017 04:24

The UDF wants to read temperature, but that is not calculated yet, because you are initializing.

The solution that requires no programming: first initialize, then load the UDF.


All times are GMT -4. The time now is 20:30.