# Moneil5 Week 7 Re-visited

Assignment Pages:

Personal Journal Entries:

Shared Journal Entries:

## Purpose

The purpose of this assignment is to re-visit the adapted nitrogen consumption system of differential equations and see if the model can be improved to better model the chemostat from the ter Schure et al. paper.

## Workflow

• Based on Dr. Fitzpatrick's notes and looking at the equations again I decided to remove the glucose consumption variable from my system of equations as it is redundant given the last term in the dc2/dt equation.
• Based on the above, this renders the m variable as also not needing to be used
• Rest of equation workflow handwritten in order to develop equations. can be found here
• Was in the middle of running the model and then the power conveniently went out
• Re-wrote MATLAB code based on changes made in do over:
```function dx = Week8Dynamics(t,x)
global q u1 u2 V1 K1 K2
dx = zeros(size(x));
dx(1) = (q*u1) - (q*x(1)) - ((x(3)*V1)*(x(1)/(x(1)+K1))*(x(2)/(x(2)+K2)));
dx(2) = (q*u2) - (q*x(1)) - ((x(3)*(((q*u2)-(q*x(2))+ (q*x(4)))*x(3)))*(x(1)/(x(1)+K1))*(x(2)/(x(2)+K2)));
dx(3) = ((x(3)*(((-q*u1)-(q*u2)+(q*x(4)))*x(3)))*(x(1)/(x(1)+K1))*(x(2)/(x(2)+K2)))- (q*x(3));
dx(4) = ((x(3)*x(4)*(((q*u2)-(q*x(2))+ (q*x(4)))*x(3)))*(x(1)/(x(1)+K1))*(x(2)/(x(2)+K2)))- (q*x(4));
end
```
• And re-wrote script to be:
``` global q u1 u2 V1 K1 K2
q = 0.15;
u1 =70;
u2 = 100;
V1 = 110;
K1 = 10;
K2 = 50;
tt = 0:0.1:10;
x0= [1,1,1,1];
[t,x] = ode45('Week8Dynamics',tt,x0);
plot(t,x)
xlabel('time')
ylabel('abundance')
title('Population, Nutrients, and Metabolic Products Over Time')
legend('Population','Ammonia','Glucose','Ethanol')
```

## Conclusions

The re-visited model doesn't seem to be producing a terribly different result from what my original model was producing, so if pursued further I would look more into the best way to model the R and V2 terms in terms of alcohol and yeast population. Overall I think I'm on a better track at least conceptually in terms of what the model was attempting to do in reducing the fermentation term to just being in terms of alcohol without the metabolic terms included.