Project Help Notebook by Keith Stroyan

Help NoteBook Copyright 2007 by Keith Stroyan - All rights reserved.
Modify this Notebook to prepare your project report.

Project 49: Beer, Coke, & Vitamin C

by A. Student and B. Pupil

with technical help from Da LabMonitor and Help Notebook

My Project Introduction

Write this last.  Begin with the basic question and state your main finding clearly, but with few technical details.  You might even modify the title of this section to make it more interesting.

Molar Concentration and Reaction Rates

read the print project and put your derivation here

The Full Dynamics

Enzyme Kinetics with Mathematica

Full Dynamics

Clear[a,b,h,k,r,z,s,c,p,t,H,K];
equns={p'[t]==r c[t],c'[t]==k (b-c[t]) (a-p[t]-c[t])-(h+r) c[t]};
Print[TableForm[equns]];
z[t_]=b-c[t];
s[t_]=a-p[t]-c[t];
r=50.`;
k=300.`;
h=900.`;
z0=1.`;
s0=100.`;
p0=0.`;
c0=0.`;
initialConds={c[0]==c0,p[0]==p0};
a=s0+c0+p0;
b=z0+c0;
Print["Particular case:"];
ivProb=Flatten[{initialConds,equns}];
Print[TableForm[ivProb]];
tFinal=10;
fullDynSoln=NDSolve[ivProb,{p[t],c[t]},{t,0,tFinal}];
Plot[Evaluate[s[t]/.fullDynSoln],{t,0,tFinal},PlotStyle->{Blue},PlotRange->All,AxesLabel->{"t","s"},PlotLabel->StringForm["s[t] with full dynamics"]]
Plot[Evaluate[c[t]/.fullDynSoln],{t,0,tFinal},PlotStyle->{Red},AxesLabel->{"t","c"},PlotRange->All]
Plot[Evaluate[p[t]/.fullDynSoln],{t,0,tFinal},PlotStyle->{Green},AxesLabel->{"t","p"},PlotRange->All]

Briggs-Haldane

Clear[a,b,h,k,r,z,s,c,p,t,H,K];
equn=s'[t]==-((r b s[t])/(H+s[t]));
Print[equn];
p[t_]=s0+p0-s[t];
    r=50.;
    k=300.0;
    h = 900.0; 
H=((h+r)/k);
z0=1.`;
s0=100.`;
p0=0.`;
c0=0.`;
b=z0+c0;
initialS=s[0]==s0;
tFinal=10;
Print["Particular case:"];
ivProb={initialS,equn};
Print[TableForm[ivProb]];

bhDynSoln=NDSolve[ivProb,{s[t]},{t,0,tFinal}];
Plot[Evaluate[s[t]/.bhDynSoln],{t,0,tFinal},PlotStyle->{Blue},PlotRange->All,AxesLabel->{"t","s"},PlotLabel->StringForm["s[t] with Briggs-Haldane Approximation"]]

Michaelis-Menten

Beer

Clear[a,b,h,k,r,z,s,c,p,t,H,K,p0,c0,s0];
    equn=s'[t] == -r b s[t]/(K+s[t]);
    Print[equn]; 
    p[t_] =s0+p0 - s[t];
    r=50.;
    k=300.0;
    h = 900.0; 
    K = h/k;
    z0=0.0002; 
    s0=100.;
    p0 = 0.0; 
    c0 = 0.0;
    b = z0+c0; 
    r b;
initialS = {s[0]==s0};
    ivProb={initialS,equn}; 
    tFinal = 4*60*60;
Print["Particular case:"];
ivProb={initialS,equn};
Print[TableForm[ivProb]];

    mmSoln = NDSolve[ivProb,{s[t]},{t,0,tFinal}]; 
    Plot[{s0-r b t,Evaluate[s[t]/.mmSoln]},{t,0,tFinal},PlotRange->{0,100},PlotStyle->{{AbsoluteThickness[3],Green},{Blue}},AxesLabel->{"t-sec","s"},Ticks->{3600{1,2,3,4},{20,40,60,80,100}},PlotLabel->StringForm["Sobering Up for 4 Hours"]]

(Subscript[CO, 2])

Clear[a,b,h,k,r,z,s,c,p,t,H,K,p0,c0,s0]; 
    equn=s'[t] == -r b s[t]/(K+s[t]); 
    Print[equn];
    p[t_] =s0+p0 - s[t]; 
    r=10^6.;
    k=300.0; 
    h = 3600.0; 
    K = h/k;
z0=0.001;
    s0=2.0;
    p0 = 0.0;
    c0 = 1.35;
    b = z0;
    r b;
initialS = s[0]==s0;
    ivProb={initialS,equn};
    tFinal =0.1;
    Print["Particular case:"]; 
Print[TableForm[ivProb]];

    mmSoln = NDSolve[ivProb,{s[t]},{t,0,tFinal}]; 
    Plot[{s0 Exp[-r b t/K],Evaluate[s[t]/.mmSoln]},{t,0,tFinal},PlotRange->{0,2},PlotStyle->{{AbsoluteThickness[3],Brown},{Blue}},AxesLabel->{"t","s"},Ticks->{{0.05,0.1},{0.5,1.0,1.5,2}},PlotLabel->StringForm["Blood CO2"]]