Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function conc=conc(C) %(C es un vector que contiene [V, CA, CB])
- F1=2.5; %m3/s
- A=1; %m2
- F2=0.5*(C(1)/A); %m3/
- CA1=1.5; %mol/m3
- CB1=1; %mol/m3
- conc(1)=F1-F2;
- conc(2)=(F1*CA1-F2*C(2)-C(2)*(F1-F2))/C(1);
- conc(3)=(F1*CB1-F2*C(3)-C(3)*(F1-F2))/C(1);
- endfunction
- t=0:0.25:10;
- res=lsode("conc",[1.5,2.5,0],t);
- subplot(1,3,1)
- plot(t,res(:,1))
- xlabel("t, s","fontsize",15)
- ylabel("V, m^3","fontsize",15)
- subplot(1,3,2)
- plot(t,res(:,2))
- xlabel("t, s","fontsize",15)
- ylabel("C_A, mol/m^3","fontsize",15)
- subplot(1,3,3)
- plot(t,res(:,3))
- xlabel("t, s","fontsize",15)
- ylabel("C_B, mol/m^3","fontsize",15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement