CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

syntax error when compiling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2017, 14:04
Default syntax error when compiling
  #1
Member
 
NGP
Join Date: Mar 2016
Posts: 33
Rep Power: 10
ngonbadipoor@yahoo.com is on a distinguished road
Hi
In my udf for heat capacity , after building , I receive syntax error of:



..\..\src\k.c(45) : error C2061: syntax error : identifier 'my_user_cp'
..\..\src\k.c(45) : error C2059: syntax error : ';'
..\..\src\k3.c(45) : error C2059: syntax error : 'type'




the udf is:


real DEFINE_SPECIFIC_HEAT(my_user_cp,T,Tref,h,yi)
{
real cp,rho_w,cp_w,cp_np,rho_nf;
rho_w=(330.12+5.92*T-1.63*pow(10,-2)*pow(T,2)+1.33*pow(10,-5)*pow(T,3));
rho_nf=(1-fi)*rho_w+(fi*rho_np);
cp_w=pow(10,-3)*(10.01-5.14*pow(10,-2)*T+1.49*pow(10,-4)*pow(T,2)-1.43*pow(10,-7)*pow(T,3));
cp=((1-fi)*rho_w*cp_w+fi*rho_np*cp_np)/rho_nf;
return cp;
}
ngonbadipoor@yahoo.com is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF syntax error Ratel Fluent UDF and Scheme Programming 4 May 23, 2015 06:15
what is syntax error : missing ')' before ';' aleisia Fluent UDF and Scheme Programming 8 March 10, 2015 16:42
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
UDF compiling problem vagaikwa Fluent UDF and Scheme Programming 6 March 15, 2013 09:33
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24


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