% step5.m
% compute the state of the reactor in physical variables 

disp(' compute the state of the reactor in physical variables ' )

beta
Ubar=Xbar(2)-(1-Xbar(2)+alpha*Xbar(1)*arrhen(Xbar(2)))/beta
cbar=Xbar(1)*cf
TbarKelvin=Xbar(2)*Tf
Tbar=Xbar(2)*Tf-273
TKbarKelvin=Ubar*Tf
TKbar=Ubar*Tf-273
deltatemp=Tbar-TKbar
areakrit=0.898*rho*cp*vol/(kappa*tau) 
area=beta*rho*cp*vol/(kappa*tau) 
coolingpower=kappa*area*deltatemp

disp(' Comparison with the results in the book: ')
aarea=1.5 
bbeta=aarea*kappa*tau/(rho*cp*vol)
