function cdot = ex43(t, c)
% 
% this file defines the differential equation set (4.3.1) - (4.3.8), 
% C=c(1), T=c(2).
%
%  K = 0.0;
 K = 1.0;
Tss = 30 + 273.15;  % unit: degree K
C2 = 0.1068;     % units: ma/degreeK
C3 = 17.55;      % unit: ma

Gmin = 4;        % unit: ma
Gmax = 20;

C1 = 62.5;             % units: (B.t.u./hr.sq.ft.degreeF)/(lb/min)^(1/3)
C1 = C1*252;           % units: (cal/hr.sq.ft.degreeF)/(lb/min)^(1/3)
C1 = C1*1.8;           % units: (cal/hr.sq.ft.degreeK)/(lb/min)^(1/3)

Tin = 10 + 273.15;        % units: degreeK
A = 3.18;              % units: sq.ft.
Cpcoolant = 1.0;       % units: cal/degreeK.g.

V = 16.2;              % units: liters
k0 = 5.04*10^10;       % units: min^(-1)
E = 9310;              % units: degreeK
F0 = 0.5;              % units: liters/min
C0 = 11.5;             % units: g.moles/liter

H = 22.6*1000;         % cal/mol
rho = 1108.1;          % g/liter
Cp = 0.865;            % cal/degreeK.g.
T0 = 26.8 + 273.15;    % degreeK

G = -K*(c(2,:)-Tss)*C2 + C3; 	% units: ma
Cprime = 100*(G-Gmin)/(Gmax-Gmin);	% units: none
if Cprime < 20
    Qc = 22;
elseif Cprime > 85.56
    Qc = .01;
else
    Qc = -0.00511651*(Cprime-20)^2 + 22; 	% units: lb/min
end
%end

U = C1*Qc^(1./3.);		% units: cal/hr.sq.ft.degreeK
TA = c(2,:) - (c(2,:)-Tin)/(1+U*A/(2*Qc*Cpcoolant*60*453.59));
				% 60 is the conversion factor from hr.
				% to min; 453.59 is that from lb. to 
				% gram.

cdot(1,:) = (-V*k0*exp(-E/c(2,:))*c(1,:) - F0*(c(1,:)-C0))/V;
cdot(2,:) = (H*V*k0*exp(-E/c(2,:))*c(1,:)...
            - U*A*(c(2,:)-TA)/60 - rho*F0*Cp*(c(2,:)-T0))/(rho*V*Cp);
