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

Problem with interpreting UDF

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2009, 06:51
Unhappy Problem with interpreting UDF
  #1
New Member
 
Huw Woodward
Join Date: Dec 2009
Posts: 2
Rep Power: 0
Boris Kloser is on a distinguished road
Hi, I am trying to write a UDF to define a temperature gradient along a boundary. When I try to interpret my UDF a message appears saying "line 7: parse error." which is the DEFINE_PROFILE(temperature_profile,t,i) line of my UDF shown below. I am relatively new to UDFs and can't see what is wrong with it. Can anybody help? Thank you.

#inlcude "udf.h"
#define TMAX 400.0
#define TATM 300.0
#define A 0.00001
DEFINE_PROFILE(temperature_profile,t,i)
{
face_t f;
real x[ND_ND];
real r, k ,h;

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
k = x[0];
h = x[1];
r = sqrt(k*k+h*h);
F_PROFILE(f,t,i) = (TMAX-TATM)*(exp(-(A/3)*r*r))+TATM;
}
end_f_loop(f,t)
}
Boris Kloser is offline   Reply With Quote

Old   December 29, 2009, 23:48
Default
  #2
jsm
Senior Member
 
JSM
Join Date: Mar 2009
Location: India
Posts: 192
Rep Power: 20
jsm is on a distinguished road
Quote:
Originally Posted by Boris Kloser View Post
Hi, I am trying to write a UDF to define a temperature gradient along a boundary. When I try to interpret my UDF a message appears saying "line 7: parse error." which is the DEFINE_PROFILE(temperature_profile,t,i) line of my UDF shown below. I am relatively new to UDFs and can't see what is wrong with it. Can anybody help? Thank you.

#inlcude "udf.h"
#define TMAX 400.0
#define TATM 300.0
#define A 0.00001
DEFINE_PROFILE(temperature_profile,t,i)
{
face_t f;
real x[ND_ND];
real r, k ,h;

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
k = x[0];
h = x[1];
r = sqrt(k*k+h*h);
F_PROFILE(f,t,i) = (TMAX-TATM)*(exp(-(A/3)*r*r))+TATM;
}
end_f_loop(f,t)
}
Hi,

This is typing mistake. Change #inlcude "udf.h" to #include "udf.h"

That all.
__________________
With regards,
JSM
jsm is offline   Reply With Quote

Reply

Tags
boundary condition, help me, interpret, parse error, udf

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 06:43
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 2 February 25, 2009 00:43
UDF PROBLEM anant FLUENT 2 January 17, 2007 00:15
I have problem of UDF with turbulent premx source. Z FLUENT 0 February 16, 2005 03:34
UDF problem chiseung FLUENT 4 January 10, 2002 09:58


All times are GMT -4. The time now is 13:26.