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

backwards surface reaction

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 14, 2003, 11:23
Default backwards surface reaction
  #1
Andrew Garrard
Guest
 
Posts: n/a
Is it possible to model a reversible surface reaction, for example A <-> B? The option is enabled in fluent5 but disabled in fluent6, which leads me to believe that it was not working in fluent5. I have tried creating two wall reactions, i.e. A -> B and B -> A at the same wall using UDF:

DEFINE_SR_RATE { if (!strcmp(r->name, "reaction-1")) { printf ("Reaction 1 being executed"); *rr = 500;} /* or any other value */ if (!strcmp(r->name, "reaction-2")) { printf ("Reaction 2 being executed"); *rr = 500;} /* or any other value */ }

When run, the value for reaction-1 can be used to vary the species concentration whereas the value in reaction-2 has no effect. Also the message that reaction is being executed does not appear.

Any help would be gratefully received.
  Reply With Quote

Old   May 15, 2003, 07:50
Default Re: backwards surface reaction
  #2
cg
Guest
 
Posts: n/a
It seems that the UDF is never beign called with "reaction-2". Try to put this...

Message("%s\n",r->name); at the top of the UDF to see the reaction name.
  Reply With Quote

Old   May 15, 2003, 08:14
Default Re: backwards surface reaction
  #3
Andrew Garrard
Guest
 
Posts: n/a
Thanks for the help, I am trying that right now. I also through a face =%d in the massage so I could see what face number it was accessing. For each iteration it prints reaction-1 for all the faces on all of the iterations, so is it not recognisng the second reaction I explicity specified in the Fluent GUI? Also here is another question about the reaction model that may be a way around the problem: The rate of creation/destruction of species is given by: R = k [conc] when you set *rr in the SR_RATE UDF are you setting k or k[conc]? I assumed it was k but in the UDF manual section 4.3.16 there was this example:

DEFINE_SR_RATE(my_rate, f, t, r, mw, yi, rr) { Thread *t0=t->t0; cell_t c0=F_C0(f,t); real sih4 = yi[0]; /* mass fraction of sih4 at the wall */ real si2h6 = yi[1]; real sih2 = yi[2]; real h2 = yi[3]; real ar = yi[4]; /* mass fraction of ar at the wall */

real rho_w = 1.0, site_rho = 1.0e-6, T_w = 300.0;

real si_s = yi[6]; /* site fraction of si_s*/ real sih_s = yi[7]; /* site fraction of sih_s*/

T_w = F_T(f,t); rho_w = C_R(c0,t0)*C_T(c0,t0)/T_w;

sih4 *= rho_w/mw[0]; /* converting of mass fractions to molar concentrations */ si2h6 *= rho_w/mw[1]; sih2 *= rho_w/mw[2]; h2 *= rho_w/mw[3]; ar *= rho_w/mw[4];

si_s *= site_rho; /* converting of site fractions to site concentrations */ sih_s *= site_rho;

if (STREQ(r->name, "reaction-1"))

*rr = 100.0*sih4; else if (STREQ(r->name, "reaction-2"))

*rr = 0.1*sih_s; else if (STREQ(r->name, "reaction-3"))

*rr = 100*si2h6*si_s; else if (STREQ(r->name, "reaction-4"))

*rr = 1.0e10*sih2;

}

where the concentrations are put in explicity. Any advise on this matter would be apprciated.
  Reply With Quote

Reply

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
Problem with Gmsh nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 18 April 22, 2015 08:43
surface reaction, porous media Ali FLUENT 1 November 21, 2014 04:34
Segmentation fault in running alternateSteadyReactingFoam,why? NewKid OpenFOAM 18 January 20, 2011 17:55
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


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