Linear Driving Force Model for Gas Adsorption in Fixed Bed
Afficher commentaires plus anciens
Dear Community
I am currently trying to solve a system of ODE containing energy balance equation during gas adsorption in a fixed bed. I am atatching my initial script herewith. There are four equstions. Eq, 1 to Eq. 3 respectively are energy balance for water passing though the bed (i.e., taking away adsorption heat), adsorption heat generation in the bed and heat transferred to the gas domain from bed during the adsoption. In Eq. 2 there is a heat generation term H_ads which should be multiplied with differential amount of gas adsorbed at each timestep (dX_ads/dt). Eq. 4 represents in Linear Driving Force Model as: dX_ads/dt = K_LDF*(X_eq-X_ads), where X_eq and K_LDF are constant.
so, basically, say at time step t=2 sec, H_ads should be multiplied by the differential value of dX_ads/dt at time step t=1sec, and X_ads in eq. 4 should be updated to the cumulative value of X_ads for all previous time steps. Currently, I am unable to program eq, 2 and eq. 4 in that way in my mode. If someone can help me to overcome this difficulty, I shall remain grateful.
I have attached the matlab file herewith too.
Shamim, UTokyo
clear all
close all
clc
% Constants_water
hw= 800;
A_tube=0.091985;
rho_water=1000;
Cpw=4182.0;
Mw=85.086;
C_w_num= (hw*A_tube)/(Mw*Cpw);
display (C_w_num)
%---------------------------
% Constants_gas
hgas= 4.11;
A_fin=0.6018;
rho_gas=1.98;
Cpgas=37.35;
Mgas=0.0072864;
C_gas_num= (hgas*A_fin)/(Mgas*Cpgas);
display (C_gas_num)
%---------------------------
% Constants_bed
Cpmof=658.9;
Mmof=0.15;
C_bedA_num=(hgas*A_fin)/(Mmof*Cpmof);
C_bedB_num=(hw*A_tube)/(Mmof*Cpmof);
display (C_bedA_num)
display (C_bedB_num)
%---------------------------------------------
% Adsorption parameters
H_ads_num= 150; % J/mol
K_LDF_num= 6.3211E-3; % s-1
MOF_num=0.15;
X_eq_num= 30; % mol/kg
%C_ads_num=K_LDF*Mmof;
% Equations
syms T_w(t) T_bed(t) T_gas(t) X_ads(t) C_w C_gas C_bedA C_bedB X_eq H_ads K_LDF MOF
display (syms)
eq1 = diff(T_w,t) == (C_w*(T_bed - T_w)); % water
eq2 = diff(T_bed,t) == ((C_bedA*(T_gas - T_bed))+ (C_bedB*(T_w-T_bed)))+ H_ads*MOF*X_ads; %bed
eq3 = diff(T_gas,t) == (C_gas*(T_bed - T_gas)); %gas
eq4 = diff(X_ads,t)== (K_LDF*(X_eq-X_ads)); %LDF
eqns = [eq1 eq2 eq3 eq4];
[V, vars] = odeToVectorField(eqns);
%Note----------------------------------------------------------------------------
% In eq4, i get the cumulative value of X_ads which is multiplied with
% H_ads in eq.2. I need the differential value of X_ads at each time step
% to be multiplied with H_ads in eq.2.
%--------------------------------------------------------------------------------------------------------------------
%time step
ti=0; tf=300; tspan = [ti tf];
%Initial values
Tw_initial =20;
Tbed_initial =20;
Tgas_initial=20;
X_ads_initial=2.5;
yInit = [Tw_initial Tbed_initial Tgas_initial X_ads_initial];
%Solve ODE45
Fun = matlabFunction(V, 'vars' ,{'t','Y', 'C_w', 'C_gas', 'C_bedA', 'C_bedB', 'X_eq', 'H_ads', 'K_LDF', 'MOF' })
ODE = @(t,Y)Fun(t,Y, C_w_num, C_gas_num, C_bedA_num, C_bedB_num, X_eq_num, H_ads_num, K_LDF_num, MOF_num)
[t,res] = ode45(ODE,tspan,yInit);
% plot results
subplot(2,2,1);
plot(t, res(:,1))
xlabel('time')
ylabel('T-water')
subplot(2,2,2);
plot(t, res(:,2))
xlabel('time')
ylabel('T-bed')
subplot(2,2,3);
plot(t, res(:,3))
xlabel('time')
ylabel('T-gas')
subplot(2,2,4);
plot(t, res(:,4))
xlabel('time')
ylabel('Adsorbed Amount')
4 commentaires
Torsten
le 23 Sep 2023
Please include the equations you try to solve in a mathematical notation.
JUBAIR AHMED SHAMIM
le 24 Sep 2023
Xeq must depend on the concentration of the adsorptive. And you don't have a balance equation for the adsorptive. In my opinion, your model as written is at least strongly incomplete.
% In eq4, i get the cumulative value of X_ads which is multiplied with
% H_ads in eq.2. I need the differential value of X_ads at each time step
% to be multiplied with H_ads in eq.2.
Just insert the differential ; it is K_LDF*(X_eq-X_ads).
JUBAIR AHMED SHAMIM
le 24 Sep 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Thermodynamics and Heat Transfer dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



