Fixed Bed Adsorption Column Using Dimensionless Equations

12 views (last 30 days)
My group and I are trying to write a code for fixed bed adsorption with dimensionless equations and Damkohler's number. I attached an image of the equations we're trying to use and variables. We have a general idea and some code written down of what the variables are meaning but would like some help on where to go with the ODE/PDE code as we're not familiar with them. Any help, guidance, or advice would be greatly appreciated. Thank you very much in advance.

Accepted Answer

Torsten on 1 Dec 2023
Edited: Torsten on 1 Dec 2023
The usual procedure is to define a grid
0 = X(1) < X(2) < ... < X(n) = 1
approximate the spatial derivative dA/dX in grid point i by
dA(i)/dx ~ (A(i)-A(i-1))/(X(i)-X(i-1)),
keep the time derivatives in their continuous form,
write the PDE system as a system of 2*n ordinary differential equations
A(1) = A_in
dA(i)/dt = - (A(i)-A(i-1))/(X(i)-X(i-1)) - q0/A_in * s(q(i),A(i)) 2<=i<=n
dq(i)/dt = s(q(i),A(i)) 1<=i<=n
and use ode15s to solve the system.
If you need further details, look up "method-of-lines".
Torsten on 4 Dec 2023
To get a foundation in MATLAB programming, I suggest the MATLAB Onramp course to learn about MATLAB basics in an online course free of costs:
Torsten on 4 Dec 2023
Here is a short code with the explicit method for the problem:
dy/dt + a*dy/dx = 0
a > 0
0 <= x <= 1
y(x,t=0) = 0 for all x
y(x=0,t) = 1 for all t
It's already very similar to yours.
a = 0.1;
tstart = 0.0;
tend = 2.0;
nt = 1000;
xstart = 0.0;
xend = 1.0;
nx = 1000;
x = linspace(xstart,xend,nx).';
dx = x(2)-x(1);
t = linspace(tstart,tend,nt);
dt = t(2)-t(1);
y = zeros(nx,nt);
y(:,1) = 0.0;
y(1,:) = 1.0;
for it = 2:nt
y(2:nx,it) = y(2:nx,it-1) - dt * a * (y(2:nx,it-1)-y(1:nx-1,it-1))./(x(2:nx)-x(1:nx-1));

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!