|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 54
Rep Power: 6 ![]() |
ello Every one,
I am trying to model reaction C+0.5O2->CO E= 1.36E06 J/Kmol, A = 1.3E6 with reaction order n =0.68. Above reaction, i am trying to employ in Eulerian-Granular multiphase model. The basic idea of the model is primary phase oxygen reacts with secondary phase Carbon (fluid species). To introduce this reaction i need to write UDF and hook to the solver with define>Phases>interaction panel. I have very little experience with writing UDF's. I realized that i need to use "DEFINE_HET_RXN_RATE" macro, any one have experience with mentioned macro?? i have found following UDF (from population balance model manual), but i am not sure wheather this UDF will be useful for my purpose. And if it is useful, how do i introduce "reaction order" term into udf?? |
|
|
|
|
|
|
|
|
#2 |
|
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 54
Rep Power: 6 ![]() |
/* this is the UDF i found out from */
/* Population Balance Module Manual */ #include "udf.h" static const real A = 1.36E06; static const real E = 1.30E08; DEFINE_HET_RXN_RATE(reac1,c,t,hr,mw,yi,rr,rr_t) { Domain **domain_reactant = hr->domain_reactant; real *stoich_reactant = hr->stoich_reactant; int *reactant = hr->reactant; int i; int sp_id; int dindex; Thread *t_reactant; real ci; real T = 1200; *rr = 0; for (i=0;i<hr->n_reactants;i++) { sp_id = reactant[i]; if(sp_id == -1)sp_id = 0; dindex = DOMAIN_INDEX(domain_reactant[i]); t_reactant = THREAD_SUB_THREAD(t,dindex); /* get concentration */ ci = yi[dindex][sp_id]*C_R(c,t_reactant)/mw[dindex][sp_id]; ci = MAX(ci,SMALL_S); *rr += stoich_reactant[i] * log(ci); } *rr += log(A + SMALL_S) - E/(UNIVERSAL_GAS_CONSTANT * T); *rr = MAX(*rr, -40); *rr = MIN(*rr, 40); *rr = exp(*rr); } |
|
|
|
|
|
![]() |
| Tags |
| eulergranular multiphase |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Difference of multicomponent and multiphase homogenous flows | Luk_Fiz | CFX | 11 | April 4, 2013 05:29 |
| multiphase model, water in air? | bugra | Main CFD Forum | 10 | January 2, 2010 13:09 |
| multiphase multicomponent physics | ckleanth | CFX | 3 | June 4, 2009 20:15 |
| Species Transport with Multiphase flow in FBR | venkat | FLUENT | 1 | July 23, 2008 23:53 |
| Multiphase flow modeling | Paul | CFX | 2 | August 11, 2003 09:41 |