Page 332 - Thermodynamics of Biochemical Reactions
P. 332
332 Mathematica Solutions to Problems
The standard Gibbs energies of formation in kJ mol-'are used to construct Ink.
{O, 183.665, 458.779, 442.159, 632.065)
The initial composition matrix is given by
noa=C0,.01,.01,.01,0};
(0, 0.01, 0.01, 0.01, 0)
The amounts of the species at equilibrium (in the order used above) are given by
[
equcalcc [as-,lnk-,no-l :=Module {l,x,b,ac,m,n,e,k},
(* aseconservation matrix
Ink=-(l/RT)(Gibbs energy of formation vector at T)
nozinitial composition vector *)
(*setup*)
(m,n}=Dimensions [as1 ;
b=as . no;
ac=as;
(*Initialize*)
l=LinearSolve[ as.Transpose[asl,-as.(lnk+Log[nl) I;
( *Solve*
Do[ e=b-ac. (x=EA (lnk+l.as) );
If [ (lOA-lO)>Max[ Abs [el I, Break[] I ;
l=l+LinearSolve[ac.Transpose[as*Table~x,~m~~~,e~,
Ck,10011;
If [ k=lOO,Return[llAlgorithm Failed"] 1 ;
Return [XI
I
equcalcc Caa, lnka,noal
-7
11.70726 10 , 0.00354638, 0.00999983, 0.00354655,
0.00645362)
TableFonn[ {egucalcc [aa, lnka,noa] },TableHeadings->{ {"c/M"), ("H",11Mg",11H2P04-","HP042-
I*, "MgHP04 ID 1 1 I
H Mg H2 PO4 - HP042- MgHP04
-7
c/M 1.70726 10 0.00354638 0.00999983 0.00354655 0.00645362
This problem can also be solved using the stoichiometric number matrix for the two reactions and equcalcrx
H~ po0 - = H+ + HPO~ 2- K1= 6.05499* IO"-8
MgHP04- = Mg2+ + HP04'- Kz= 1.9489*10"-3
The transformed stoichiometric number matrix is given by
TableFornlE tnual
1 0 - 1 1 0
0 1 0 1-1