CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Parse Error for Surface Reaction UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 6, 2013, 10:30
Default Parse Error for Surface Reaction UDF
  #1
New Member
 
Clarissa Gravelle
Join Date: Mar 2013
Posts: 1
Rep Power: 0
cgravell is on a distinguished road
I am having a few issues with my UDF for a surface reaction below. I am new to writting UDFs and using Fluent so the help is very much appreciated.

#include "udf.h"

#define K1 42.8236
#define K2 41831

#define CH2O 0
#define CO2 1
#define H2O 2
#define NUM_SPECIES 3

#define CH2O_EXP 1.0
#define CO2_EXP 0.0
#define H2O_EXP 0.0

real reaction_rate(cell_t c, Thread *cthread,real mw[],real yi[])
{
real concenCH2O = C_R(c,cthread)*yi[CH2O]/mw[CH2O]*K1/(1+K2);
}
DEFINE_SR_RATE(decomp_rate,f,fthread,r,mw,yi,rr)
{
*rr = reaction_rate(F_C0(f,fthread),THREAD_T0(fthread)mw ,yi);
}


This is the error message I am getting when I try to interpret the UDF:

cpp -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/src" -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v140\fluent\fluent14.0.0/multiport/src" -I. -DUDF
ONFIG_H="<udfconfig.h>" "C:\Program Files\ANSYS Inc\v140\fluent\ntbin\win64\SR.c"
Error: C:\Program Files\ANSYS Inc\v140\fluent\ntbin\win64\SR.c: line 17: parse error.
udf limitation: decomp_rate: prototypes must appear outside the function body.
mw definition shadows previous definition
yi definition shadows previous definition
Error: C:\Program Files\ANSYS Inc\v140\fluent\ntbin\win64\SR.c: line 21: parse error.
cgravell is offline   Reply With Quote

Reply

Tags
parse error, surface reaction, udf

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
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
Segmentation fault in running alternateSteadyReactingFoam,why? NewKid OpenFOAM 18 January 20, 2011 17:55
parse error in transient udf spring FLUENT 1 July 6, 2010 06:26
UDF changing the rate exponent of a reaction Stefan H Fluent UDF and Scheme Programming 0 September 16, 2009 13:20
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


All times are GMT -4. The time now is 20:42.