function y=exc12(t,u)

Cl_0 = 1e3;    %inflöde av klor molekyl/(cm^3 s)

% rate constants
k1 = 3e-12;     %1/s
k2 = 1.2e-33;   %cm6/mol.2 1/s
k3 = 5.5e-4;    %1/s
k4 = 6.9e-16;   %cm3/mol. 1/s
k5 = 1.2e-11;
k6 = 3.8e-11;

% reaction rates
r1 = k1*u(1); 
r2 = k2*u(2)*u(1)*u(3);
r3 = k3*u(4);
r4 = k4*u(2)*u(4);
r5 = k5*u(5)*u(4);
r6 = k6*u(6)*u(2);

y=zeros(size(u));

y(1) = -r1-r2+r3+2*r4+r5+r6; %02
y(2) = 2*r1-r2+r3-r4-r6;     %O
y(3) = 0;                    %M
y(4) = r2-r3-r4-r5;          %O3
y(5) = -r5 + Cl_0;          %Cl
y(6) = r5-r6;                %ClO

%legend('O_2','O','M','O_3','Cl','ClO')