close all global mixmax ks alfa yxs yps kp % parâmetros cinéticos empregados nos modelos mixmax=0.38; ks=0.05; alfa=0.3; kp=40; % fatores de conversão empregados nos modelos yxs=0.50; yps=0.35; % Condições iniciais das variáveis dependentes x0=1.5; s0=180; p0=0; % intervalo da variável independente, tempo tspan=[0,50]; c0=[x0;s0;p0]; [t,c]=ode45('fbatelada',tspan,c0); % Como a minha saída é a matriz xcn, preciso identificar as colunas x=c(:,1); s=c(:,2); p=c(:,3); c(length(c),1); produto=c(length(c),3); tempo = t(length(t)); Prod=produto/tempo; % montando os gráficos %plot(t,x,t,s,t,p) %title('X,S,P(g/L)'); subplot(2,2,1) plot(t,x) subplot(2,2,2) plot(t,s) subplot(2,2,3) plot(t,p) % Visualização o grafíco da simulação % Grafico(t,ca1,t,cb1) %figure %plot(t,ca2,'b',t,cb2,'r-','linewidth',2); grid %title('RESULTADO CSTR COM 200 LITROS - REATOR 1'); %xlabel('TEMPO (H)'); %ylabel('CONCENTRAÇÃO(mol)'); %legend('Reagente A','Reagente B')