필터 지우기
필터 지우기

Fixed-bed adsorption - PDEPE?

조회 수: 4 (최근 30일)
Hasti
Hasti 2020년 10월 2일
댓글: Hasti 2020년 10월 6일
Dear support team!
I am trying so solve a convection dispersion equation with pdepe and I am only getting constant outlet concentration which is not correct. I am having problem figuring it out where I am wrong?
I think the equation should get solved by pdepe according to matlab (https://se.mathworks.com/help/matlab/ref/pdepe.html). But i am not sure if I am correct in defining the "c" parameter?
Deeply appreciate any help.
The equations are:
And here is the code:
function DiffusionConvectionReaction
% Solving advection-reaction-dispersion equation for a packed bed reactor with
% pdepe matlab function
clc
clear
close all
global u D C0 x t rho eps
% define the reactor parameters
L = 0.2; % reactor length (m)
Pe = 10; % Peclet number
u = 0.06; % average upflow velocity (m/s)
D = u*L/Pe; % axial dispersion (m2/s)
C0 = 1e-1; % initial concentration (kg/m3)
rho = 840; % density (kg/m3)
eps = 0.3; % porosity
% solution of a single pde
m = 0; % assuming slab symmetry (-)
x = linspace(0,L,10); % reactor's length
t = linspace(0,20,100); % operation time (s)
sol = pdepe(m,@pdefun,@icfun,@bcfun,x,t);
c = sol;
figure;
plot(t,c(:,end));
%-------------------------------------------------------------------------
% define the flux and source term
function [g,f,s] = pdefun(x,t,c,DcDx)
qmax = 4.3e-3;
b = 0.84e3;
g = 1+ rho*qmax*b/(eps*(1+b*c));
f = D*DcDx;
s = -u*DcDx;
end
%------------------------------------------------------------------------
% define initial condition
function c0 = icfun(x)
c0 = C0;
end
%-------------------------------------------------------------------------
% define boundary conditions
function [pl,ql,pr,qr] = bcfun(xl,cl,xr,cr,t)
pl = u*(C0-cl);
ql = 1;
pr = 0;
qr = 1/D;
end
end
  댓글 수: 2
Bill Greene
Bill Greene 2020년 10월 5일
Actually, your solution equals the inital value at all points for all time. This is expected from your equation and boundary conditions with a constant initial condition.
Hasti
Hasti 2020년 10월 6일
Thank you very much for your reply. Yes, If the IC is changed to zero, as given in the equations, then the outlet concentration is not constant and is increasing with time (and this is what I am expecting from the model).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by