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

surface reaction UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2013, 02:47
Lightbulb surface reaction UDF
  #1
New Member
 
tjut-wx
Join Date: May 2009
Posts: 14
Rep Power: 16
jeniuswx is on a distinguished road
hey!i am modelling the surface reaction,the overal reaction equation:2O3 -> 3O2. and its reaction rate formular is: r = K*b*O3/(1+b*O3); my UDF code as follows:
#include "udf.h"
#define K 6.8586e-11
#define b 15296.9e3
DEFINE_SR_RATE(my_rate,f,t,r,mw,yi,rr)
{
Thread *t0 = t->t0;
cell_t c0 = F_C0(f,t);
real o3 = yi[0];
real rho_w = 1.0, T_w = 300.0;
T_w = F_T(f,t);
rho_w = C_R(c0,t0)*C_T(c0,t0)/T_w;
o3 *=rho_w/mw[0];
*rr = K*b*o3/(1+b*o3);
}

the problem is:after compile and hook the UDF,the calcucation results showed that the reaction rate on the defined surface was zero。is there anyone who can help me analyse where the problem is and how to solve it? thanks!
jeniuswx is offline   Reply With Quote

Old   January 7, 2014, 14:52
Unhappy
  #2
New Member
 
Sebastian
Join Date: Dec 2011
Posts: 5
Rep Power: 14
sebastian1430 is on a distinguished road
Good afternoon, excuse me, did you find a solution to your problem? I’m experiencing the same; I would appreciate greatly your help.
sebastian1430 is offline   Reply With Quote

Old   August 8, 2017, 12:06
Talking Hello ! Isn't it too late????
  #3
New Member
 
sang-joon
Join Date: Aug 2017
Posts: 1
Rep Power: 0
sjkim is on a distinguished road
Quote:
Originally Posted by jeniuswx View Post
hey!i am modelling the surface reaction,the overal reaction equation:2O3 -> 3O2. and its reaction rate formular is: r = K*b*O3/(1+b*O3); my UDF code as follows:
#include "udf.h"
#define K 6.8586e-11
#define b 15296.9e3
DEFINE_SR_RATE(my_rate,f,t,r,mw,yi,rr)
{
Thread *t0 = t->t0;
cell_t c0 = F_C0(f,t);
real o3 = yi[0];
real rho_w = 1.0, T_w = 300.0;
T_w = F_T(f,t);
rho_w = C_R(c0,t0)*C_T(c0,t0)/T_w;
o3 *=rho_w/mw[0];
*rr = K*b*o3/(1+b*o3);
}

the problem is:after compile and hook the UDF,the calcucation results showed that the reaction rate on the defined surface was zero。is there anyone who can help me analyse where the problem is and how to solve it? thanks!

I think that the problems may be in the definition of yi[] and mw[].
You must check the order of species in your mixture-template.
sjkim is offline   Reply With Quote

Reply


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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
question about udf for "particle surface reaction rate" lili Fluent UDF and Scheme Programming 0 January 9, 2013 03:37
udf for partical surface reaction blaid FLUENT 0 April 25, 2011 07:24
UDF for catalyst volumetric reaction, temperature overshoot though rate is small elmcmaster FLUENT 0 October 11, 2010 09:37
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


All times are GMT -4. The time now is 21:37.