% LEP 14-2: Rapid Liquid Phase Reaction on the surface of a catalyst
%

U=0.1;
CAB=1000;   
CAS=0;
DAB=1e-10;
nuu=5e-7;
dp=linspace(1e-5,1e-1,200);
Pi=3.14;
Sc=nuu/DAB;
for i=1:200
Re(i)=dp(i)*U/nuu;
Sh(i)=2+0.6*(Re(i).^0.5)*(Sc^(1/3));
kc(i)=Sh(i)*DAB./dp(i);
WA(i)=kc(i)*(CAB-CAS);
mA(i)=Pi*(dp(i).^2).*WA(i);
end
tiledlayout(2,2)
set (gcf,'Position',[0,0.1,700,400])
nexttile
plot(dp,WA(1:200),'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('W_A (mol/m^2.s)')
axis([1e-5 1e-1 1e-3 1e-2])
title('Molar flux profile')
grid on
nexttile
plot(dp,mA(1:200),'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('m_A (mol/s)')
set(gca,'ytick',linspace(0,1e-4,5))
axis([1e-5 1e-1 0 1e-4])
title('Molar flow profile')
grid on
nexttile
plot(dp,kc(1:200),'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('k_c (m/s)')
axis([1e-5 1e-1 0 1e-4])
title('k_c')
grid on


%