
clear all
close all
%clc

Fag_nom=18; %portata costante del 
            %liquido di raffreddamento [l/h]

% CONDIZIONI INIZIALI
Cx0=1; %biomass concentration [g/l]
Cp0=13; %Product/ethanol concentration [g/l]
Cs0=27; %Substrate concentration [g/l]
Co20=2.5; %Oxygen concentration [mg/l]
Tr0=26; %Reactor temperature [°C]
Tag0=29; %Cooling agent temperature [°C]
tstart = tic;

tic;
%tstart = tic;
sim('Bioreattore')
%telapsed = toc(tstart);
toc

%%

figure(1)
plot(Cx),grid
title('Cx(t)')

figure(2)
plot(Cp),grid
title('Cp(t)')

figure(3)
plot(Cs),grid
title('Cs(t)')

figure(4)
plot(Co2),grid
title('Co2(t)')

figure(5)
plot(Tr),grid
title('Tr(t)')

figure(6)
plot(Tag),grid
title('Tag(t)')

figure(7)
subplot(3,2,1)
plot(Cx),grid
title('Cx(t)')
subplot(3,2,2)
plot(Cp),grid
title('Cp(t)')
subplot(3,2,3)
plot(Cs),grid
title('Cs(t)')
subplot(3,2,4)
plot(Co2),grid
title('Co2(t)')
subplot(3,2,5)
plot(Tr),grid
title('Tr(t)')
subplot(3,2,6)
plot(Tag),grid
title('Tag(t)')


