|
[Sponsors] |
December 21, 2009, 08:26 |
surface reaction rate with udf
|
#1 |
New Member
Gerhard Selle
Join Date: Aug 2009
Posts: 6
Rep Power: 17 |
hello everybody
i'm facing a problem getting the surface reaction rate after my simulations. i wrote an udf for the reaction rate, but fluent is not able to compute the reaction rate. the output says zero everytime. do anyone of you know how to get the surface reaction rate, so i can plot it? thanks for your help |
|
December 21, 2009, 19:24 |
Surface Reaction Rate
|
#2 |
Member
Krishna
Join Date: Oct 2009
Posts: 34
Rep Power: 17 |
Please post the UDF that you have written.
Thanks |
|
December 22, 2009, 00:14 |
|
#3 |
New Member
Gerhard Selle
Join Date: Aug 2009
Posts: 6
Rep Power: 17 |
oh this is the udf:
#include "udf.h" #define R 83140000 #define p 1013250 #define pi 3.14159 DEFINE_SR_RATE(my_rate,f,t,r,mw,yi,rr) { Thread *t0 = t -> t0; cell_t c0=F_C0(f,t); real c3h8 = yi[0]; real o2 = yi[1]; real co2 = yi[2]; real h2o = yi[3]; real n2 = yi[4]; real rho_w = 1.0, sd = 2.49e-9, T_w; real o_s,o_vac; real xc3h8 = 1.0, xo2 = 1.0; real tn,Tg,Ea3, Ea4, Ea5; real rA3, rA4, rA5,rk3, rk4, rk5; real ro,rate; T_w = F_T(f,t); rho_w = C_R(c0,t0)*C_T(c0,t0)/T_w; c3h8 *= rho_w/mw[0]; o2 *= rho_w/mw[1]; co2 *= rho_w/mw[2]; h2o *= rho_w/mw[3]; n2 *= rho_w/mw[4]; /* Mole fraction of CH4 and O2 */ xc3h8 = c3h8/(c3h8+o2+co2 +h2o+n2); xo2 = o2/(c3h8+o2+co2 +h2o+n2); Tg = C_T(c0,t0); tn = T_w/300; /* Activation energies */ Ea3 = 0.0; Ea4 = 0.126*tn*tn*tn*tn - 1.849*tn*tn*tn + 9.124*tn*tn - 13.253*tn + 23.903; Ea5 = 4.0; //7.3 + 1.9*tn; Ea3 *= 4184e7; Ea4 *= 4184e7; Ea5 *= 4184e7; rA3 = (0.0542)*pow(tn,0.766); rA4 = (8.41e12)*pow(tn,-0.796); rA5 = (0.06)*pow(tn,0.154); rk3 = (rA3/(sd*sd))*sqrt(R*T_w/(2*pi*mw[1]))*(p/(R*T_w)); rk4 = (rA4/sd)*exp(-Ea4/(R*T_w)); rk5 = (rA5/(sd*sd))*sqrt(R*T_w/(2*pi*mw[0]))*(p/(R*T_w))*exp(-Ea5/(R*T_w)); ro = sqrt(rk3*xo2/rk4); o_s = ro/(1+ro); o_vac = 1-o_s; rate = rk5*xc3h8*(sd*sd)*pow(o_vac,2); if (STREQ(r->name, "reaction-1")) *rr = rate*pow(10,1)*1.7; // mol/cm2s --> kgmol/m2s * effectiveness /* else if (STREQ(r->name, "reaction-2")) *rr = -2*rate; else if (STREQ(r->name, "reaction-3")) *rr = rate; else if (STREQ(r->name, "reaction-4")) *rr = 2*rate; */ } |
|
December 26, 2009, 10:34 |
|
#4 |
New Member
Gerhard Selle
Join Date: Aug 2009
Posts: 6
Rep Power: 17 |
does nobody has a solution or suggestions?
the udf is correct, but i can't display the surface reaction rate, although fluent is calculating it. |
|
January 29, 2010, 13:53 |
use "User Defined Memory"
|
#5 |
New Member
Mi Hyun Kim
Join Date: Mar 2009
Posts: 1
Rep Power: 0 |
It doesn't work to display the surface reaction rate in Contours panel under Reactions directly.
You can save the reaction rate in "User Defined Memory", then you can see the reaction rate in Contours panel under -> Contours of ->User Defined Memory -> User Memory #. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help, UDF and define the surface reaction | shuailin | FLUENT | 1 | October 23, 2022 11:07 |
Referencing a Surface Monitor or Surface Integral in a UDF | lanterbw | Fluent UDF and Scheme Programming | 4 | January 28, 2013 16:31 |
problem about porous media and surface reaction | Jeff Lee | FLUENT | 3 | November 24, 2011 14:46 |
again on udf surface reaction | jason | FLUENT | 0 | November 7, 2003 11:45 |
User Defined Reaction Rate | John McKelliget | FLUENT | 1 | December 17, 1999 11:44 |