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 during initialization while using UDF (https://www.cfd-online.com/Forums/fluent-udf/223240-error-during-initialization-while-using-udf.html)

DnyanMiri January 2, 2020 01:46

Error during initialization while using UDF
 
I want to write UDF for wall heat flux boundary condition. When I initialize the setup it gets closed (in both serial and parallel mode) with error
Node 0: Process 2532: Received signal SIGSEGV.
MPI Application rank 0 exited before MPI_Finalize()

My UDF code is
#include "udf.h"
//Heat generation model from Mahamud and Park (Lumped heat capacity model)

DEFINE_HEAT_FLUX(Heat_gen,f,t,c0,t0,cid,cir)
{
#define I 24.984
#define EntCoeff -0.3
real Re;
real T = C_T(f,t);
real Td; //temperature in degree celcius
real Qirr;
real Qent;
real Qt;

Td=T-273.16;
Re=12.407-0.5345*Td+0.0134*Td*Td-0.0001*Td*Td*Td; //T in degree celcius and Re in milli ohms
Qirr=(I*I)*Re/1000; // Watt per metre square
Qent=-I*(Td+273.16)*EntCoeff/1000; // Watt per metre square
Qt=Qirr+Qent;
}

Please suggest a possible solution for this, I'm new to UDF. Thanks

AlexanderZ January 2, 2020 23:49

Code:

#include "udf.h"
#define I 24.984
#define EntCoeff -0.3
//Heat generation model from Mahamud and Park (Lumped heat capacity model)

DEFINE_HEAT_FLUX(Heat_gen,f,t,c0,t0,cid,cir)
{

real Re;
real T = C_T(f,t);
real Td; //temperature in degree celcius
real Qirr;
real Qent;
real Qt;

Td=T-273.16;
Re=12.407-0.5345*Td+0.0134*Td*Td-0.0001*Td*Td*Td; //T in degree celcius and Re in milli ohms
Qirr=(I*I)*Re/1000; // Watt per metre square
Qent=-I*(Td+273.16)*EntCoeff/1000; // Watt per metre square
Qt=Qirr+Qent;
}



All times are GMT -4. The time now is 14:19.