|
[Sponsors] |
July 4, 2013, 19:37 |
udf for multiple reaction
|
#1 |
New Member
Ali Hosseini
Join Date: Jun 2013
Location: Edmonton
Posts: 3
Rep Power: 13 |
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: /************************************************** ******** rate.c 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); *rr_t=*rate; } else if (!strcmp(r->name, "reaction-2")) { *rate= K2*(s0)*(s2)/p/p*exp(-5000/temp); *rr_t=*rate; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
surface reaction UDF | taekyu8 | Fluent UDF and Scheme Programming | 1 | June 16, 2013 04: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 10:37 |
UDF changing the rate exponent of a reaction | Stefan H | Fluent UDF and Scheme Programming | 0 | September 16, 2009 14:20 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 01:07 |