필터 지우기
필터 지우기

Fixed Bed Adsorption Column Using Dimensionless Equations

조회 수: 4 (최근 30일)
tori lansing
tori lansing 2023년 11월 30일
댓글: Torsten 2023년 12월 4일
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.

채택된 답변

Torsten
Torsten 2023년 12월 1일
편집: Torsten 2023년 12월 1일
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".
  댓글 수: 7
Torsten
Torsten 2023년 12월 4일
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
Torsten 2023년 12월 4일
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));
end
plot(x,[y(:,1),y(:,500),y(:,1000)])

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Boundary Conditions에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by