UDF for sorption of CO2
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 |
All times are GMT -4. The time now is 15:18. |