% LEP 14-1: Mass transfer of Oxygen to a burning carbon particle
%

U=0;
CAinf=8.58;
Ccloud=200;
dH=-93.5;
DAB=0.0001;
rhoc=2226000;
nuu=5e-7;
dp=linspace(1e-5,1e-4,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)*(CAinf);
mA(i)=Pi*(dp(i).^2)*WA(i);
mp(i)=rhoc*(Pi/6)*(dp(i)).^3;
np(i)=Ccloud/mp(i);
Qgd(i)=np(i).*mA(i)*(-dH);
end
tiledlayout(2,2)
set (gcf,'Position',[0,0.1,700,400])
nexttile
plot(dp,WA,'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('W_A (mol/m^2.s)')
axis([1e-5 1e-4 0 200])
title('Molar flux profile')
grid on
nexttile
plot(dp,mA,'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('m_A (mol/s)')
set(gca,'ytick',linspace(0,1e-6,5))
axis([1e-5 1e-4 0 1e-6])
title('Molar flow profile')
grid on
nexttile
plot(dp,np,'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('n_p (particles/m^3)')
axis([1e-5 1e-4 0 1e10])
title('Particle concentration')
set(gca,'ytick',linspace(0,1e10,5))
grid on
nexttile
plot(dp,Qgd,'LineWidth',2)
xlabel('Pellet dia (m)')
ylabel('Q_{gd} (kJ/m^3.s)')
axis([1e-5 1e-4 0 1e6])
title('Heat generation profile')
set(gca,'ytick',linspace(0,1e6,5))
grid on

%