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

Parse error in UDF, URGENT HELP NEEDED!!!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2009, 07:24
Question Parse error in UDF, URGENT HELP NEEDED!!!
  #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 10, 2009, 20:14
Default
  #2
Member
 
Shane
Join Date: Oct 2009
Posts: 52
Rep Power: 17
sircorp is on a distinguished road
Well

NO PROBLEM WITH YOUR CODE AT ALL.

"Include" is proper english word. You got a TYPO ERROR, Change very first word to "include".

Sircorp
sircorp is offline   Reply With Quote

Old   December 12, 2009, 04:16
Default Hw to link Fluent and MATLAB and exchange data?
  #3
New Member
 
Tom
Join Date: Dec 2009
Posts: 2
Rep Power: 0
z701531118 is on a distinguished road
1. My aim is to use Matlab as a "master" program and fluent as a "slave", analyzing flow in Fluent and do multiobjective optimization in MATLAB.

2. How can I convert *.jun to *.bat in order to import data into MATALB.

3. I want to implement gene algorithm on MATLAB to tune the value of flow rate and rpm in Fluent.
z701531118 is offline   Reply With Quote

Reply

Tags
fluent, help me, parse error, udf


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 07:43
parse error with interpreting UDF ivanbuz Fluent UDF and Scheme Programming 2 August 13, 2009 19:29
UDF parse error at profile function line Wiggy Fluent UDF and Scheme Programming 1 July 27, 2009 16:59
Parse Error Message While interpreting UDF in FLUENT dhimans Fluent UDF and Scheme Programming 1 July 10, 2009 07:29
UDF parse error on line 1 ..... (Unusual) Amit Maha FLUENT 4 June 30, 2006 13:15


All times are GMT -4. The time now is 14:37.