CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

udf for multiple reaction

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

LinkBack Thread Tools Display Modes
Old   July 4, 2013, 18:37
Default udf for multiple reaction
New Member
Ali Hosseini
Join Date: Jun 2013
Location: Edmonton
Posts: 3
Rep Power: 6
alihosseini63 is on a distinguished road
Hello all

I want to write udf for multiple reactions in FLUENT and I'm doing that based on the udf manual of ANSYS, but when I want to interpret the udf I face error.
when I want to interpret the udf, it says that "line 23: structure reference not implemented"
Can you please guide me to find what's wrong in my udf.
my udf is as below:

/************************************************** ********
UDF for calculation the reaction rtaes in gasifier
************************************************** *********/

#include "udf.h"

#define K1 3300
#define K2 4500

DEFINE_VR_RATE(user_rate,c,t,r,mole_weight,species _mf,rate,rr_t)

real s1=species_mf[1];
real s2=species_mf[2];
real s0=species_mf[0];
real s4=species_mf[4];
real mw1=mole_weight[1];
real mw2=mole_weight[2];
real temp= C_T(c,t);
real p=C_P(c,t);

if (!strcmp(r->name, "reaction-1"))

*rate= K1*(s1)*(s2)/p/p*exp(-5000/temp);


else if (!strcmp(r->name, "reaction-2"))
*rate= K2*(s0)*(s2)/p/p*exp(-5000/temp);

alihosseini63 is offline   Reply With Quote


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
surface reaction UDF taekyu8 Fluent UDF and Scheme Programming 1 June 16, 2013 03:23
Segmentation fault in running alternateSteadyReactingFoam,why? NewKid OpenFOAM 18 January 20, 2011 17:55
UDF for catalyst volumetric reaction, temperature overshoot though rate is small elmcmaster FLUENT 0 October 11, 2010 09:37
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 16:16.