|
[Sponsors] |
January 21, 2014, 11:34 |
UDF for sorption of CO2
|
#1 |
New Member
Join Date: Nov 2013
Posts: 6
Rep Power: 13 |
Please can someone with knowledge of UDF sorption look at this code that I created for the sorption of CO2 with the rate equation as follows
r = -kCCO2es . eqn is K2CO3 + CO2 + H2O = KHCO3, a reversible reaction. code: /*adsorption model for gidaspow (r = -kCO2e) */ #include "udf.h" #define index_CO2_secondary 1 /* CO2 species index in secondary phase */ #define index_CO2_primary 0 /* CO2 species index in primary phase */ #define prim_index 0 /* primary phase index */ #define sec_index 1 /* secondary phase index */ real k = 1.95; /* rate constant */ static int INDEX_PHASE_CO2 = 0, INDEX_SPECIES_CO2 = 0, INDEX_PHASE_K2CO3 = 0, INDEX_SPECIES_K2CO3 = 0, INDEX_PHASE_AIR = 0, INDEX_SPECIES_AIR = 0, INDEX_PHASE_H20 = 0, INDEX_SPECIES_H20 = 0, INDEX_PHASE_KHCO3 = 0, INDEX_SPECIES_KHCO3 = 0; DEFINE_HET_RXN_RATE(sorption_rate,c,t,hr,mw,yi,rr, rr_t) { Thread **pt = THREAD_SUB_THREADS(t); Thread *tp = pt[0]; /* gas phase */ Thread *ts = pt[1]; /* solid phase */ real concentration_CO2_prim_index = C_YI(c,tp,INDEX_SPECIES_CO2)*C_R(c,pt[0])/mw[INDEX_PHASE_CO2][INDEX_SPECIES_CO2]; //real concentration_CO2_sec_index = C_YI(c,ts,INDEX_SPECIES_CO2)*C_R(c,pt[1])/mw[INDEX_PHASE_CO2][INDEX_SPECIES_CO2]; *rr = k*concentration_CO2_prim_index*C_VOF(c,ts); } Issue is my temperature in the reactor is not increasing as the reaction is exothermic. Thanks |
|
Tags |
adsorption, cfd, kinetics |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |