CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF for specific heat - error (http://www.cfd-online.com/Forums/fluent-udf/124790-udf-specific-heat-error.html)

tarui23 October 13, 2013 06:30

UDF for specific heat - error
 
Hi everyone,
I have got a probelm with a UDF describing the specific heat of species. When I compile the udf it gives some error.

The udf is shown below.

#include "udf.h"
DEFINE_SPECIFIC_HEAT(ar_spec,T,Tref,h,yi)
{
real cp1,cp2,cp;
if (T<765)
{
cp1=0.95*T+436.65;
cp2=T+10;
}
else
{
cp1=5*T+436;
cp2=50*T+10;
}
cp=C_YI(cell,thread,0)*cp1+C_YI(cell,thread,1)*cp2 ;
*h=cp*(T-Tref);
return cp;
}

Any help would be great.
Thanks.


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