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

syntax error while interpreting the UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 13, 2013, 06: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, 06:21
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 315
Rep Power: 12
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, 11:09
Default
  #3
Member
 
Yash Ganatra
Join Date: Mar 2013
Posts: 67
Rep Power: 4
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
Parse Error:- Interpreting UDF on remote terminal moataz.che FLUENT 0 May 13, 2009 13:35
syntax error when interpreting UDF Erik FLUENT 3 September 27, 2006 07: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 14:26.