cobra - j xdot(1,:)=kv*x(2)*x(3)-ksv*x(1)*x(4);

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% "cobra" % m-file to solve base case cobra problem % % x(1)=fsv % x(2)=fs % x(3)=Cv % x(4)=Ca % x(5)=fsa % x(6)=Cp % xdot(1)=dfsv/dt, xdot(2)=fs/dt, etc. % function xdot=cobra(t,x) f kv=2e8; ksv=6e8; ka=2e8; kia=1; Cso=5e-9; ksa=6e8; kp=1.2e9; kov=0; koa=0.3; kop=0.3; g=ksa*x(5)*x(3)+ksv*x(1)*x(4); h=-kp*x(3)*x(4)-kov*x(3); m=kp*x(3)*x(4)-kop*x(6); j=-Cso*ksv*x(4)-kp*x(3)*x(4)-koa*x(4);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: j xdot(1,:)=kv*x(2)*x(3)-ksv*x(1)*x(4); xdot(2,:)=-kv*x(2)*x(3)-ka*x(2)*x(4)+kia*x(5)+g; xdot(3,:)=Cso*(-kv*x(2)*x(3)-ksa*x(5)*x(3))+h; xdot(4,:)=Cso*(-ka*x(2)*x(4)+kia*x(5))+j; xdot(5,:)=ka*x(2)*x(4)-kia*x(5)-ksa*x(5)*x(3); xdot(6,:)=Cso*(ksv*x(1)*x(4)+ksa*x(5)*x(3))+m;...
View Full Document

This note was uploaded on 09/02/2011 for the course CHEM 102 taught by Professor Kmn during the Spring '11 term at Babson College.

Ask a homework question - tutors are online