(******************************************************************* This file was generated automatically by the Mathematica front end. It contains Initialization cells from a Notebook file, which typically will have the same name as this file except ending in ".nb" instead of ".m". This file is intended to be loaded into the Mathematica kernel using the package loading commands Get or Needs. Doing so is equivalent to using the Evaluate Initialization Cells menu command in the front end. DO NOT EDIT THIS FILE. This entire file is regenerated automatically each time the parent Notebook file is saved in the Mathematica front end. Any changes you make to this file will be overwritten. ***********************************************************************) calcappeqconst:= Module[{pK1M,pK2M,pK1MO2,pK2MO2,k,pM, pMO2},(*This program derives the function of temperature and pH that \ yields the apparent equilibrium constant for the dissociation of molecular \ oxygen from HavMO2. Energies are in joules per mole.*) pK1M=7.85-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2M=5.46-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK1MO2=6.67-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2MO2=6.04-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); k=10^-5*Exp[((60.7*10^3)/8.3145)*(1/293.15-1/t)]; pM=(1+10^(-pH+pK1M)+10^(-2*pH+pK1M+pK2M)); pMO2=(1+10^(-pH+pK1MO2)+10^(-2*pH+pK1MO2+pK2MO2)); k*pM/pMO2] appk=calcappeqconst*10^5; logappk=Log[10,calcappeqconst]; trge=-8.3145*t*Log[calcappeqconst]; chgNH=(-1/Log[10])*D[Log[calcappeqconst],pH]; trenthal=-t^2*D[(-8.3145*Log[calcappeqconst]),t]; trentro=-D[-8.3145*t*Log[calcappeqconst],t]; reactionprops293={appk,logappk,trge,chgNH,trenthal, trentro}/.t\[Rule]293.15/.pH\[Rule]{5,6,7,8,9}; reactionprops313={appk,logappk,trge,chgNH,trenthal, trentro}/.t\[Rule]313.15/.pH\[Rule]{5,6,7,8,9}; calcstdfrtrGe:= Module[{pK1M,pK2M,pK1MO2,pK2MO2,k,pM,pMO2, kprimeO2},(*This program derives the function of temperature, pH, and concentration of molecular oxygen that yields the standard further \ transformed Gibbs energy of formation of HavMO2av. Energies are in joules per mole.*) pK1M=7.85-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2M=5.46-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK1MO2=6.67-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2MO2=6.04-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); k=10^-5*Exp[(60.7*10^3/8.3145)*(1/293.15-1/t)]; pM=(1+10^(-pH+pK1M)+10^(-2*pH+pK1M+pK2M)); pMO2=(1+10^(-pH+pK1MO2)+10^(-2*pH+pK1MO2+pK2MO2)); kprimeO2=k*pM/pMO2; -8.3145*t*Log[pM]-8.3145*t*Log[1+co2/kprimeO2]] calcstdfrtrGe293= calcstdfrtrGe/.t\[Rule]293.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.\ 001,.01}/.pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; calcstdfrtrGe313= calcstdfrtrGe/.t\[Rule]313.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.\ 001,.01}/.pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; nO2=-(co2/(8.3145*t))*D[calcstdfrtrGe,co2] taboxycols293= nO2/.t\[Rule]293.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.001,.01}/.\ pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; taboxycols313= nO2/.t\[Rule]313.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.001,.01}/.\ pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; frtrGbyint=-8.3145*t*Integrate[1/(1+x),x]/.x\[Rule]co2/calcappeqconst calcnegRTlnPM:= Module[{pK1M,pK2M,pM},(*This program derives the function of temperature, pH, and concentration of molecular oxygen that yields - RTlnPM. Energies are in joules per mole.*) pK1M=7.85-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2M=5.46-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pM=(1+10^(-pH+pK1M)+10^(-2*pH+pK1M+pK2M)); -8.3145*t*Log[pM]] nH=(1/(8.3145*t*Log[10]))*D[calcstdfrtrGe,pH] nH293=nH/.t\[Rule]293.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.001,.01}/.\ pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; nH313=nH/.t\[Rule]313.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.001,.01}/.\ pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; frtrenthalpy=-(t^2)*D[(calcstdfrtrGe/t),t] frtrenthalpy293= frtrenthalpy/.t\[Rule]293.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.\ 001,.01}/.pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; frtrenthalpy313= frtrenthalpy/.t\[Rule]313.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.\ 001,.01}/.pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; frtrentropy=-D[calcstdfrtrGe,t] frtrentropy293= frtrentropy/.t\[Rule]293.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.\ 001,.01}/.pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; frtrentropy313= frtrentropy/.t\[Rule]313.15/.co2\[Rule]{.0000001,.000001,.00001,.0001,.\ 001,.01}/.pH\[Rule]{5,5.5,6,6.5,7,7.5,8,8.5,9}; calcchemrxprops:= Module[{k,pK1M,pK2M,pK1MO2,pK2MO2,line1rx,line2rx,line3rx,line4rx, line5rx},(*This program calculates the functions for calculating K and \ four pKs and the reaction Gibbs energy, stndard reaction enthalpy, and standard reaction entropy at a specified temperature. The energies are in joules per mole, and the entropies are in joules per K per mole.*) k=10^-5*Exp[((60.7*10^3)/8.3145)*(1/293.15-1/t)]; pK1M=7.85-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2M=5.46-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK1MO2=6.67-(37.7*10^3/(8.3145*Log[10]))*(1/293.15-1/t); pK2MO2=6.04-(-6.3*10^3/(8.3145*Log[10]))*(1/293.15-1/t); line1rx={k,-8.3145*.29815*Log[k],-t^2* D[-8.3145*Log[k],t]/1000,-D[-8.3145*t*Log[k],t]}; line2rx={pK1M, 8.3145*.29815*Log[10]*pK1M,-t^2* D[8.3145*Log[10]*pK1M,t]/1000,-D[8.3145*t*Log[10]*pK1M,t]}; line3rx={pK2M, 8.3145*.29815*Log[10]*pK2M,-t^2* D[8.3145*Log[10]*pK2M,t]/1000,-D[8.3145*t*Log[10]*pK2M,t]}; line4rx={pK1MO2, 8.3145*.29815*Log[10]*pK1MO2,-t^2* D[8.3145*Log[10]*pK1MO2,t]/1000,-D[8.3145*t*Log[10]*pK1MO2,t]}; line5rx={pK2MO2, 8.3145*.29815*Log[10]*pK2MO2,-t^2* D[8.3145*Log[10]*pK2MO2,t]/1000,-D[8.3145*t*Log[10]*pK2MO2,t]}; {line1rx,line2rx,line3rx,line4rx,line5rx}]