Professional Documents
Culture Documents
[tm,Cm]=ode15s('phbm',[0,tmax],[R0,S0,P0]);
plot(tm,Cm(:,1),'r-',tm,Cm(:,2),'b-',tm,Cm(:,3),'g-',tm,Cm(:,1)+Cm(:,3),'c-')
xlabel('time (h)'); ylabel('Concentrations (g/L)');
title('R=X-P(red);S=NH4(blue);P=PHB(green);X=biomass(cyan)')
%end
-----------------------------------------------------------------------------
function dy=phbm(t,C)
% subrutina derivate model cinetic simulare sinteza celulara a (PHB)
% (c) G. Maria, 2003
%
kont=0;
for i=1:max(size(C))
if C(i)<0 C(i)=0.0001; kont=1; end;
end
R=C(1); S=C(2); P=C(3);
if kont==1
% disp('*** Warning : constraint violation ...')
else;end;
rR=mium1*S*R/(KS1+S) + mium2*R/(1+(KS2/S)^n);
rS=-YSR*rR;
rP1=YPR*rR;
rP2=-k1*P*KI/(KI+S) + k2*R*KI/(KI+S);