% Compute nonequilibrium response of flow through packed column % Theory on pg. 753-755 of BSL % Dependent variable is the normalized concentration. % Independent variables are dimensionless distance and time clear all figure(1) clf reset figure(2) clf reset global t tarray=logspace(-2,3,500); c=zeros(size(t)); tzc=[]; nz=input('Number of dimensionless column lengths = '); for n=1:nz z=input('z = '); zarray(n)=z; for i=1:length(tarray) t=tarray(i); c(i)=1-quadl(@noneqfun,0,z); end figure(1) semilogx(tarray./z,c) hold on axis([0.1 10 0 1]) xlabel('Dimensionless Time/Distance') ylabel('Normalized Concentration') title(['Z = ',num2str(zarray)]) figure(2) loglog(tarray,c) hold on axis([0.1 1000 .01 1]) xlabel('Dimensionless Time') ylabel('Normalized Concentration') title(['Z = ',num2str(zarray)]) tz=tarray./z; tzc=[tzc tz' c']; end save noneq_data tzc