function derivs = PFRAcetone(v,y,FAF,CAF,TF,Fa,Ta0,U,A)
global R
lnk0 = 42.529;
k0 = exp(lnk0);  % 1/hr
E = 284522; % kJ/kgmol
FA = y(1);
H = y(2);
Ha = y(3);
FK = FAF - FA;
FM = FAF - FA;
FT = FA + FK + FM;
T = findT(H,TF,FA,FK,FM);
CA = FA/FT*CAF*TF/T;  % kgmol/m3
rA = k0*exp(-E/R/T)*CA ;
Ta = findTa(Ha,Ta0,Fa);
derivs(1) = -rA;
derivs(2) = U*A*(Ta-T);
derivs(3) = - U*A*(T-Ta);
derivs = derivs';
