%%Run and Plot for Temperature Controll

%init
close all
global coldata dyndata
%change Feed
feedname='';
feedfactor=0.7;
feedcomp_a=1/3;
feedcomp_b=1/3;
feedcomp=[feedcomp_a feedcomp_b 1-feedcomp_a-feedcomp_b];
%load nominal vlues
load Nominal_95
dyndata.x_nom=x_nom;
dyndata.u_nom=u_nom;
dyndata.u_nom(6)=u_nom(6)*feedfactor;
dyndata.u_nom(7:8)=[feedcomp_a; feedcomp_b];

%single run
au=1;
UU=[];
i=0;
options = odeset('MaxStep',10);
%,'RelTol ',1e-10,'AbsTol',1e-13
tend=5000
[t,x]=ode15s(@cola_lv_nonideal1_TempCtrl,[0 tend],[zeros(NI,1);dyndata.x_nom],options);

%print end concentration
end_comp

%reset dyndata
dyndata.u_nom(6)=u_nom(6);
dyndata.u_nom(7:8)=[1/3; 1/3];

%plot
%Plot_Profiles
plot_TempProfile
find_Controll_Para
plot_XvsStages
plotxU
%plotVBB
find_max_DeltaT