|
[Sponsors] |
Having problems modeling Adsorption using UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 20, 2015, 04:42 |
Having problems modeling Adsorption using UDF
|
#1 |
New Member
Jules Katharina
Join Date: Apr 2015
Posts: 3
Rep Power: 11 |
Hi everyone,
sorry for the long post, I'm trying to describe my problem in detail. I'm modeling an adsorption process of NaCl and KCl on solid particles. I'm using an UDF to calculate the surface reaction rate. Also, I am using site species to model the amount of adsorbed material on the solid. The nonreacting flow works fine, but when I try to model the reacting flow, the result looks not at all as expected, there is no material adsorbed. The reactions I used are: NaCl + Solid_s --> NaCl_s KCl + Solid_s --> KCl_s So I have a few questions related to my simulation: First, about the site species concept. Is it correct to use site species to model the adsorbed material? Additionally, I interpreted the site density as some sort of "active surface", as a parameter of my solid material. But I didn't find any information in the users guide to confirm that, so does anybody know if this is correct? I attached the UDF I've written below. Thank you very much for your help, any advices will be very much appreciated! cheers! #include "udf.h" //* species index *// /* 0 NaCl 1 KCl 2 N2 3 NaCl_s 4 KCl_s */ //*Reactions*// /* 1 NaCl -> NaCl_s 2 KCl -> KCl_s */ /* Calculation of reaction rate */ DEFINE_SR_RATE(LDFrate,f,t,r,mw,yi,rr) { cell_t c0=F_C0(f,t); Thread *t0=t->t0; real x0NaCl, x0KCl; real C0NaCl, C0KCl; real q0NaCl, q0KCl; real rho_kaolin = 1800; real qmaxNaCl = 0.07*rho_kaolin , qmaxKCl = 0.07*1.7*rho_kaolin; real KLaNaCl = 44000 , KLaKCl = 44000/1.7; real KNaCl, KKCl; real ki = 0.00001*3600; /* double nacl = yi[0]; double kcl = yi[1]; double n2 = yi[2]; */ double nacl_s = yi[3]; double kcl_s = yi[4]; /* site fraction of kcl_s at surface */ real xNaCl = C_YI(c0, t0, 0); real xKCl = C_YI(c0, t0, 1); real CNaCl, CKCl; //* Calculation of parts for the model *// /* Steigung der linearisierten Langmuir Isotherme für NaCl (KNaCl)*/ x0NaCl = 0.000232; C0NaCl = (x0NaCl*101325*mw[0])/(UNIVERSAL_GAS_CONSTANT*1073.15); q0NaCl = (KLaNaCl*qmaxNaCl*C0NaCl)/(1+KLaNaCl*C0NaCl); /* Langmuir Isotherm */ KNaCl = q0NaCl/C0NaCl; /* Steigung der linearisierten Langmuir Isotherme für KCl (KKCl)*/ x0KCl = 5.25e-05; C0KCl = (x0KCl*101325*mw[1])/(UNIVERSAL_GAS_CONSTANT*1073.15); /* Eingangskonz KCl in kg/m3 */ q0KCl = (KLaKCl*qmaxKCl*C0KCl)/(1+KLaKCl*C0KCl); /*Langmuir Isotherme */ KKCl = q0KCl/C0KCl; //* actual concentraion in Gasphase of NaCl/KCl *// CNaCl = (xNaCl*C_P(c0, t0)*mw[0])/(UNIVERSAL_GAS_CONSTANT*1073.15); CKCl = (xKCl*C_P(c0, t0)*mw[1])/(UNIVERSAL_GAS_CONSTANT*1073.15); //* already adsorbed concentration of NaCl_s/KCl_s at particle *// nacl_s *= rho_kaolin; kcl_s *= rho_kaolin; //*reaction rate *// if (STREQ(r->name, "nacl_adsorption")) { C_UDMI(c0, t0, 0) = C_P(c0, t0); *rr=ki*(KNaCl*CNaCl-nacl_s); } else if(STREQ(r->name, "kcl_adsorption")) { *rr=ki*(KKCl*CKCl-kcl_s); } C_UDMI(c0, t0, 1) = CNaCl; C_UDMI(c0, t0, 2) = CKCl; C_UDMI(c0, t0, 3) = nacl_s; C_UDMI(c0, t0, 4) = kcl_s; C_UDMI(c0, t0, 5) = C_YI(c0, t0, 0); C_UDMI(c0, t0, 6) = C_YI(c0, t0, 1); C_UDMI(c0, t0, 7) = C_YI(c0, t0, 2); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Cavitation problems: Error: chip-exec: function "mass_source_init::libudf" not fo | Walderdbeere | Fluent UDF and Scheme Programming | 2 | June 9, 2014 07:37 |
UDF problems with porous flow | Nicolastheterminator | Fluent UDF and Scheme Programming | 0 | April 8, 2014 09:12 |
Modeling adsorption in packed beds | Julia | FLUENT | 3 | May 13, 2013 03:39 |
Problems with the UDF in Fluent | Mathew | FLUENT | 1 | February 26, 2008 19:15 |
Some problems about UDF in fluent5.4 | Mark | FLUENT | 2 | August 14, 2001 08:03 |