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

surface reaction rate with udf

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

Like Tree1Likes
  • 1 Post By yellow-stuff

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2009, 07:26
Default surface reaction rate with udf
  #1
New Member
 
Gerhard Selle
Join Date: Aug 2009
Posts: 6
Rep Power: 16
yellow-stuff is on a distinguished road
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
yellow-stuff is offline   Reply With Quote

Old   December 21, 2009, 18:24
Default Surface Reaction Rate
  #2
Member
 
Krishna
Join Date: Oct 2009
Posts: 34
Rep Power: 16
t.krishnamohan is on a distinguished road
Please post the UDF that you have written.
Thanks
t.krishnamohan is offline   Reply With Quote

Old   December 21, 2009, 23:14
Default
  #3
New Member
 
Gerhard Selle
Join Date: Aug 2009
Posts: 6
Rep Power: 16
yellow-stuff is on a distinguished road
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; */
}
weilin likes this.
yellow-stuff is offline   Reply With Quote

Old   December 26, 2009, 09:34
Default
  #4
New Member
 
Gerhard Selle
Join Date: Aug 2009
Posts: 6
Rep Power: 16
yellow-stuff is on a distinguished road
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.
yellow-stuff is offline   Reply With Quote

Old   January 29, 2010, 12:53
Default use "User Defined Memory"
  #5
New Member
 
Mi Hyun Kim
Join Date: Mar 2009
Posts: 1
Rep Power: 0
gkmih is on a distinguished road
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 #.
gkmih is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, UDF and define the surface reaction shuailin FLUENT 1 October 23, 2022 10:07
Referencing a Surface Monitor or Surface Integral in a UDF lanterbw Fluent UDF and Scheme Programming 4 January 28, 2013 15:31
problem about porous media and surface reaction Jeff Lee FLUENT 3 November 24, 2011 13:46
again on udf surface reaction jason FLUENT 0 November 7, 2003 10:45
User Defined Reaction Rate John McKelliget FLUENT 1 December 17, 1999 10:44


All times are GMT -4. The time now is 13:59.