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

parse error HELP¡¡¡

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2011, 19:56
Question parse error HELP¡¡¡
  #1
New Member
 
Daniel Rodríguez
Join Date: Aug 2011
Posts: 2
Rep Power: 0
danielf is on a distinguished road
Hi every one, I'm very new with UDF. I´m trying to do a heterogeneous rxn rate UDF, but when I interpret, I got the following error message:
Error: C:/DOCUME~1/ADMINI~1/temp/kinetic_gas.c.1.c:line 10: parse error.

This is my UDF

#include "udf.h"

/*constants*/

#define sec_index 1
#define A 6.8E8
#define Ea 155.6E6

DEFINE_HET_RXN_RATE(kinetic_gas, c, t, r, mw, yi, rr, rr_t)

{
THREAD **pt = THREAD_SUB_THREADS(t);
THREAD *tp = pt[0];
THREAD *ts = pt[1];

real T_sec = C_T(c,ts);
real V_t = C_VOLUME(c,t);
real V_sec = C_VOLUME(c,ts);
real den_sec = C_R(c,ts);

*rr = (V_sec/V_t) * (den_sec/mw[sec_index][0]) * A * exp(-Ea/UNIVERSAL_GAS_CONSTANT/T_sec);
}
-------------------------------------------------------
Can anyone help me?

Thanks.
danielf is offline   Reply With Quote

Old   August 26, 2011, 04:46
Default
  #2
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 23
Amir is on a distinguished road
Did you also check that as compiled one?
__________________
Amir

Last edited by Amir; August 27, 2011 at 08:08.
Amir is offline   Reply With Quote

Old   August 27, 2011, 02:49
Default
  #3
Member
 
fox000002's Avatar
 
Join Date: Apr 2009
Posts: 46
Rep Power: 17
fox000002 is on a distinguished road
THREAD ==> Thread
fox000002 is offline   Reply With Quote

Old   January 26, 2012, 16:21
Thumbs up Thanks a lot
  #4
New Member
 
Daniel Rodríguez
Join Date: Aug 2011
Posts: 2
Rep Power: 0
danielf is on a distinguished road
Many thanks for you help, it was really helpful for me¡¡¡
danielf is offline   Reply With Quote

Old   February 2, 2012, 10:52
Question
  #5
New Member
 
Kirill Sitdikov
Join Date: Feb 2012
Posts: 8
Rep Power: 14
ksitdikov is on a distinguished road
Quote:
Originally Posted by danielf View Post
Many thanks for you help, it was really helpful for me¡¡¡
Sorry, can you help me to?

=) I don't understand your answer or it not work.

"lcpp -I"D:\PROGRA~2\ANSYSI~1\v140\fluent\fluent14.0.0/src" -I"D:\PROGRA~2\ANSYSI~1\v140\fluent\fluent14.0.0/cortex/src" -I"D:\PROGRA~2\ANSYSI~1\v140\fluent\fluent14.0.0/client/src" -I"D:\PROGRA~2\ANSYSI~1\v140\fluent\fluent14.0.0/multiport/src" -I. -DUDFONFIG_H="<udfconfig.h>" "C:\fluent.inc\ntbin\ntx86\udf.c"
Error: C:\fluent.inc\ntbin\ntx86\udf.c: line 2: parse error."

This is my UDF:

#include "udf.h"
DEFINE_PROFILE(unsteady_pressure, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
if(t<=0.005598691909) F_PROFILE(f, thread, position) = 0;
else F_PROFILE(f, thread, position) = 43416802218475500.0*t*t*t*t*t*t-8526498997927940.0*t*t*t*t*t+646794364209152.0*t*t *t*t-23849388922560.0*t*t*t+426766277739.25*t*t-2818813480.39*t+6000000.0;
}
end_f_loop(f, thread)
}

Last edited by ksitdikov; February 2, 2012 at 11:33.
ksitdikov is offline   Reply With Quote

Old   February 2, 2012, 11:40
Default
  #6
New Member
 
Kirill Sitdikov
Join Date: Feb 2012
Posts: 8
Rep Power: 14
ksitdikov is on a distinguished road
Ok, I solve it! =)
My UDF contain invisible symbols. But in WORD i find it.
Good luck.
ksitdikov 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 in transient udf spring FLUENT 1 July 6, 2010 07:26
Parse Error Message While interpreting UDF in FLUENT dhimans Fluent UDF and Scheme Programming 1 July 10, 2009 07:29
PARSE ERROR Message when interpreting UDF in FLUENT dhimans FLUENT 0 May 24, 2009 12:40
Parse error Fernando FLUENT 2 January 21, 2006 13:55
UDF: Parse error line 3 CJ FLUENT 2 March 1, 2005 11:12


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