function dF=reactor(z,F) dF=zeros(2,1); CA0=9.32; % initial concentration of pollutant (micromol/L) CA0=CA0*(1e-6*1000); % (mol/m3) MW=28; % molecular weight (kg/kmol) for water MWA=236; % molecular weight (kg/kmol) for Carbamazepine ro=999; %density of water (kg/m3) FF=5; % initial flow rate (mL/min) FF=FF*(1e-6/60); % (m3/sec) Ft=FF*ro/MW*1000; % initial molar flow rate (mol/sec) FA0=FF*CA0; %initial molar flow rate of pollutant (mol/sec) FA=F(1); % Carbamazepine molar flow rate (mol/s) T=F(2); %temp(k) yA=FA/FA0; % mole fraction of carbamazepine (-) CA= yA*CA0; % carbamazepine concentration (mol/m3) % ------ physical properties -------- mio=1.305e-3; % viscosity of water at 10C (pa.s) ro=999; % density of water at 10C (kg/m^3) cp=4191; % heat capacity of water at 10C (J/kg.K) k=0.5786; % thernal conductivity of water at 10C (W/m.K) Dm=0.75e-9; % Diffusion Coefficient of Carbamazepine in water at 10C (m^2/s) %--------- Geometrical Model ---------- a=540e-6; % pore size (m) porosity=0.94; % void fraction (-) Ds=a*((4*(1-porosity))/(3*pi)).^0.5; % strut diameter (m) Sv=4/Ds*(1-porosity); % external surface area per unit volume of bed (m^2/m^3) % --------------- mass transfer and heat transfer coefficient -------------------- D=0.02; % reactor (tube) diameter (m) % FF=100; % flow rate (ml/min) % FF=FF*(1e-6/60); % flow rate (m^3/s) A=pi*D^2/4; % cross section area (m^2) u=FF/A; % velocity (m^2/s) % % % Re=(ro*u*Ds)/mio; % Reynold number (-) % Sc=mio/(ro*Dm); % Schmidt number (-) % Pr=(cp*mio)/k; % Prandtl number (-) % % Sh= 1.1*(Re.^0.43)*(Sc.^0.333); % Sherwood number (-) % Nu= 0.9*(Re.^0.42)*(Pr.^0.333); % Nusselt number (-) % % K=Sh*Dm/Ds; % mass transfer coefficient (m/s) % h=Nu*k/Ds; % heat transfer coefficient (W/m^2.K) %----------- reaction rate & kinetics ------------ %Rob=1e-3/(A*D) % bed density (kg/m3) k=3.1e-2/60; % reaction rate constant (1/s) r1=k*CA; % rate (mol/m3s) % ------------- ODEs ------------- dF(1)=(A*(-r1)); dF(2)=0;