|
[Sponsors] |
December 14, 2011, 10:18 |
UDF for VR Rate calculation
|
#1 |
New Member
|
Hello All,
I am fairly new to using UDF along with Fluent. I am trying to model reduction of CO2 with coal or Carbon. The reation rate is defined using Langmuir-Henselwood formulation and I am trying to do that with the UDF because most of the Species Transport models use the Arrhenius rate equation. My question is, how do I use concentrations of the species' as my variable in the code. Here is the code I have so far (fairly simple and premature): #include "udf.h" #define K 1000 #define K2 0.508 #define Mtot 84. DEFINE_VR_RATE(lang_hens_reac_rate,c,t,r,mole_weig ht,species_mf,rate,rr_t, yi) { real s1 = species_mf[0]; real s2 = specief_mf[1]; real mw1 = mole_weight[0]; real mw2 = mole_weight[1]; if (FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous) *rate = K2*mw1/(1+K*(mw1+mw2)); else *rate = 0.; *rr_t = *rate; } However, all the mw variables need to be concentrations. Please help me as soon as possible as I am running out of ideas and options I found this piece of code that people are using to obtain concentration: ci = yi[dindex][sp_id]*C_R(c,t_reactant)/mw[dindex][sp_id]; ci = MAX(ci,SMALL_S); But i have no idea what all those arguements and variables and syntax are. Please help The basic equation for calculating the reaction rate is: rate = K2*[species 2]/(1+K*([species1]+[species2])) where K and K2 are constants given and the objects in the square brackets are obviously concentrations that I need.
__________________
Adi. Last edited by ADI; December 14, 2011 at 10:47. Reason: More info found after further research. |
|
May 20, 2014, 09:19 |
|
#2 |
New Member
Kostis Chatzi
Join Date: Apr 2014
Location: Greece
Posts: 20
Rep Power: 12 |
hi, i am experiencing a rather similar issue, have you found any luck with yours?
|
|
May 28, 2014, 00:11 |
|
#3 |
New Member
Jackson Sim
Join Date: Apr 2014
Posts: 7
Rep Power: 12 |
I am also dealing with reaction rate equation in my CFD.
This is just an extract out from my UDF for concentration calculation: #define mw_0 18.; /* mass fraction of species based on species index on fluent panel */ real H2O; H2O = C_YI(c,tp,0); /* H2) is the first species in my list thus id is 0 */ real density; /* rho is total density */ rho = C_R(c,t); /* concentration of individual species */ /* mass fraction x density / molecular weight */ real conc_H2O; conc_H2O = H2O * rho / mw_0; Hope this helps |
|
June 23, 2014, 18:31 |
|
#4 |
New Member
Kostis Chatzi
Join Date: Apr 2014
Location: Greece
Posts: 20
Rep Power: 12 |
thanks for your response
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for transient mass flow rate inlet | mdzubairmanipal@gmail.com | Fluent UDF and Scheme Programming | 0 | February 22, 2011 03:51 |
UDF for catalyst volumetric reaction, temperature overshoot though rate is small | elmcmaster | FLUENT | 0 | October 11, 2010 10:37 |
Stain Rate UDF | esinticik | FLUENT | 0 | September 10, 2009 15:04 |
calculation average pressure in a plane with UDF | Vitalij | FLUENT | 1 | April 10, 2007 04:39 |
UDF about reaction rate | Julien | FLUENT | 0 | June 30, 2005 13:23 |