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 while interpreting the UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2013, 07:00
Angry syntax error while interpreting the UDF
  #1
New Member
 
rohit chothave
Join Date: Jun 2013
Posts: 2
Rep Power: 0
rohit chothave is on a distinguished road
Hi all.
I am trying to interpret this UDF for density, given below, in ansys 12, linux OS. I am getting syntax error. Can anybody tell me what is the error. Or what is correct program
/************************************************** *******************
UDF for specifying a temperature-dependent density property
************************************************** ********************/
#include "udf.h"

DEFINE_PROPERTY(rho, cell, thread )

{
real rho1;
real t = C_T(cell, thread);

rho1 = 17.836 + 4444.25 * exp(-t/93.77);


return rho1;
}

/************************************************** *******************
UDF for specifying a temperature-dependent specific heat property
************************************************** ********************/
#include "udf.h"

DEFINE_SPECIFIC_HEAT(specificheat,T,Tref,h,yi)

{
real sp1;

sp1 = 2533.8 + ((5.7266 * pow(9,10)) * (exp(-T/37.137)));

*h = sp1 * (T-Tref);


return sp1;
}
rohit chothave is offline   Reply With Quote

Old   July 13, 2013, 07:21
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
It is not a real syntax error except that
Code:
DEFINE_SPECIFIC_HEAT
is used by compiled udf only.
blackmask is offline   Reply With Quote

Old   July 13, 2013, 12:09
Default
  #3
Member
 
Yash Ganatra
Join Date: Mar 2013
Posts: 67
Rep Power: 13
yashganatra is on a distinguished road
Just use #include "udf.h" once at the top. Refer to other threads in UDF section.

Yash
yashganatra 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
Parse Error:- Interpreting UDF on remote terminal moataz.che FLUENT 1 March 7, 2017 15:13
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
syntax error when interpreting UDF Erik FLUENT 3 September 27, 2006 08:52
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


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