Professional Documents
Culture Documents
Beer Fermentation Model System of Odes: Function
Beer Fermentation Model System of Odes: Function
1
1
1
1
2
2
2
2
E_KG = -68600;
E_KM = -14400;
E_KN = -19900;
% Arrhenius ACTIVATION ENERGY for K'i for sugar i where i is Glucose
% and Maltose respectively converted from Kcal/mol to cal/mol
Eprm_KG = 10200;
Eprm_KM = 26300;
% Arrhenius FREQUENCY FACTOR for Ki for sugar i where i is Glucose,
% Maltose, and Maltotriose respectively in mol/m^3
K_G0 = exp(-121.3);
K_M0 = exp(-19.5);
K_N0 = exp(-26.79);
% Arrhenius FREQUENCY FACTOR for K'i for sugar i where i is Glucose
% and Maltose respectively in mol/m^3
Kprm_G0 = exp(23.33);
Kprm_M0 = exp(55.61);
dMassdt_0 = [X(1)*MU_X(X(2),X(3),X(4),X(5),X(1));
(1/(density*Cp))*(X(1)*(dH_FG*MU_1(X(2),X(3))+dH_FM*MU_2(X(2),X(3),X(4))+dH_FN*MU_3(X(2),X(3),X(4),X(
-X(1)*MU_1(X(2),X(3));
-X(1)*MU_2(X(2),X(3),X(4));
-X(1)*MU_3(X(2),X(3),X(4),X(5))];
% logic to keep G positive
if X(3) <= 0
dMassdt_0(3,1) = 0;
X(3) = 0;
end
% output argument
dMassdt = dMassdt_0;