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/)
-   -   souce term-error in both "interpreting and compiling" (https://www.cfd-online.com/Forums/fluent-udf/119114-souce-term-error-both-interpreting-compiling.html)

ahvz June 10, 2013 07:39

souce term-error in both "interpreting and compiling"
 
when I interpreting the code I receiving :
two "parse error" for the highlighted lines . what is wrong in the code?

Code:

#include "udf.h"
DEFINE_SOURCE(energy_udf,c,t,dS,eqn)
{
real source;
if(N_TIME > 0)
{
if (C_T(c,t) > C_T_M1(c,t))

if (C_T_(c,t)<=297. && C_T(c,t)>=287.)
{
source =(-0.0235*pow(temp,3.))+(20.246*pow(temp,2.))-(5816.7*pow(temp,1.))+557045; 
dS[eqn] =(-0.0705*pow(temp,2.))+(40.492*pow(temp,1.))-5816.7 ;
}
}
else if (C_T(c,t) < C_T_M1(c,t))
{
if (C_T_M1(c,t) <= 285.0 && C_T(c,t) >= 297.0)
{
source =(-0.0227*pow(temp,3.))+(19.483*pow(temp,2.))-(5568.7*pow(temp,1.))+530603;
dS[eqn] =(-0.0681*pow(temp,2.))-(38.966*pow(temp,1.))-5568.7;
}
}
}
return source;
}

when I compiling the code I reciving the below errors
..\..\src\test.c(36) : warning C4003: not enough actual parameters for macro 'C_T_'
..\..\src\test.c(36) : error C2059: syntax error : ')'
..\..\src\test.c(51) : error C2059: syntax error : 'return'
..\..\src\test.c(52) : error C2059: syntax error : '}'

any helps ?


All times are GMT -4. The time now is 16:34.