Calculates quantities in Section 7.1

Remove["Global`*"]

First write down the chemical potential from (6.93) with (6.83)

vQ=(h/Sqrt[2 Pi m k T])^3;
μ=- k T Log[V Zint /(N vQ)];

Use the ideal gas law to replace V/N

repV={V->N k T/P};

For Zint use Zrot from (6.33)

repZint=Zint->k T/(2 ϵ);

Do everying in SI, so keep the value of the electron charge handy

eVal=1.6 10^(-19);

Now write down the values of things (See Page 259). Note that the book gives a value for the CO rotational energy constant as 0.00024 eV on page 235, and 0.00018 eV for O2 in Problem 6.24

repVals={
k->1.381 10^(-23),
T->310,
h->6.626 10^(-34)};

PO2=0.2  101325;
PCO=PO2/100;

mO2=5.31 10^(-26);
mCO=4.65 10^(-26);

ϵRotO2=0.00018 eVal;
ϵRotCO=0.00024 eVal;

ϵO2=-0.7;
ϵCO=-0.85;

Get the value of the chemical potential for oxygen in eV

μO2=(μ/.repV/.repZint/.P->PO2/.m->mO2/.repVals/.ϵ->ϵRotO2)/eVal

Calculate the oxygen-only grand partition function and occupation probability

energydiff=-(ϵO2-μO2)

GibbsFactorO2=Exp[-(ϵO2-μO2)/(k T/eVal)]/.repVals

probO2=GibbsFactorO2/(1+GibbsFactorO2)

Now do the same calculation but include CO. Note from (6.31) the internal partition function is twice as large. Also, as in the book’s example, the partial pressure for CO is 100 times smaller than for O2.

repZintCO=Zint->k T/( ϵ);
μCO=(μ/.repV/.repZintCO/.P->PCO/.m->mCO/.repVals/.ϵ->ϵRotCO)/eVal

GibbsFactorCO=Exp[-(ϵCO-μCO)/(k T/eVal)]/.repVals

probCO=GibbsFactorO2/(1+GibbsFactorO2+GibbsFactorCO)