% File to simulate the CSTR from Srinivasan, Biegler, Bonvin 2008
% Johannes Jäschke

% Reaction 
% A+B -> C
% 2C  -> D


% kinetic parameters              
% parameters             
par.totTime     = 1000;
par.timesteps   = 100;
par.k1	    = 0.4;
par.k2          = 0.014;
par.DeltaH1     = -70;
par.DeltaH2     = -50;
par.c_ain       = 2;
par.c_bin       =  1.5;
par.Fmax        =  22;
par.qmax        =  1.0e3;
par.rho         =  1;
par.TinA        =  350;
par.TinB        =  350;
par.cp          =  4; 
% inputs (MV)
par.u.Fa0         =  8.295131822082459;
par.u.Fb0         =  13.704868177917541;
par.u.q0          =  9.285602438852694e2;
par.u.Fout0       =  22;
par.u.Fouts       =  22;
% volume control parameters:
par.KcV         =  -1; %-1.8e3,
par.tauiV       =  0.1;%2.22e-3,
par.Vs          =   500;
% temperature control parameters:
%tau1T = 14h, tetaT=0.05h, tauc=tetaT=0.05h k = 1.06957/(-71.43976)=-0.014972 
par.KcT         =  -9350.788;
par.tauiT       =   0.4;
par.Ts          =   350;
% outflow control parameters:
% (not yet tuned)
par.KcFout      =   9350.788;
par.tauiFout    =   0.4;
par.Fouts       =   22;
% invariant control parameters:
% (not yet tuned)
par.KcC1          =-1000.0e3;
par.tauiC1        = 0.4;
par.C1s           = 0.0;
par.scaleC1       = 1;
