>> In this example, we have a heterogenous reaction, namely a solid reacting with a gas
to form another gas and we want the equilibrium composition at 1.0-bar and 25°C.
We start out with 10 mols of carbon and 5 mols of hydrogen.
So first thing we need to do is calculate the equilibrium constant, which we calculate
from Delta G of reaction and so Delta G reaction of standard conditions is just a Delta G
of formation of the product heptane minus Delta G of formation of the 2 reactants.
Now because hydrogen and carbon are elements, the Delta G of formation are 0
and so this just becomes a value we can look up in a table since we're
at 25°C, this is 8.2 kilojoules per mol.
So now let me rewrite the equation and then we'll look at the extent of reaction
to indicate how many mols we'd have at equilibrium.
So we start with 10 mols of carbon, 5 mols of hydrogen,
0 mols of normal heptane, so this is the start mols.
And then at equilibrium, we'll use this Greek symbol for extent of reaction,
so this is mols now at equilibrium.
Now in the equilibrium calculation, we are going to need to use mol fractions
to calculate partial pressures at these conditions, we're going to assume ideal gases.
And so the mol fraction means we have to calculate the total number of mols, so the total
and keep in mind the total gas phase mols
because the solid doesn't affect this gas phase composition,
so 5 minus 8 for hydrogen plus heptane so the 5 minus 7 times the extent
of reaction, that's a total number of mols.
So now what we want to calculate is the mol fractions in the gas phase.
So, of course, carbon we don't calculate.
This is 5 minus the extent total number of mols and likewise here.
So now were set out to substitute into the equilibrium expression.
The equilibrium expression it's [inaudible].
We're looking at ideal gases, so that becomes the [inaudible] divided
by 1.0-bar becomes the partial pressure of the heptane, [inaudible] ideal gas.
The activity of carbon over the activity of pure carbon is 1 and then the partial pressure
of hydrogen and the partial pressure of hydrogen is raised to the 8th power.
And so partial pressures are mol fractions times the total pressure [inaudible] the one we won't
have to carry through.
Mol fractions of hydrogen to the 8th power times the pressure to the 8th power.
Keep in mind the pressure has to be units of bar because that's our standard state [inaudible].
And so then I can simplify this slightly.
So now I can substitute in these 2 mol fractions and the pressure is 1.0-bar
which makes the calculation easier.
So let me pause and substitute in the mol fractions.
Let me also substitute in equilibrium constants [inaudible] equilibrium constants going
to be the exponential of minus the [inaudible] energy change for reaction, standard conditions
over RT and now I substitute in the mol fractions on the right side.
So I've rearranged, simplified and this of course is the pressure of 1 raised
to the 7th power, which is of course still 1.
Now I can substitute in values for Delta G that we calculated and the temperature,
absolute temperature on the left side.
And then I have [inaudible] equations which I have to solve,
so let me calculate the equilibrium constant.
So I converted Delta G to joules from kilojoules and absolute temperature of 25°C,
[inaudible] equilibrium constant so this equilibrium constant is equal
to the right side of the equation here.
So this is a non-linear equation, what I'm going to do to solve it,
I'm actually going to use a PolyMath program.
And to solve it in PolyMath, essentially what I do is, give myself a little more room here,
I say I have a function that we want to equal 0.
And so I'm going to rearrange the equation slightly [inaudible] denominator
to the other side and then move the terms that were
on the right side, the numerator, to the left side.
So I have an equation now that's equal to 0 and this is how PolyMath would solve it.
When I substitute in the PolyMath, it gives a value for the extent of reaction,
0.1201 [inaudible] 0.12 and this [inaudible] what we're doing.
So this means we can calculate now the mol fractions by just substituting back
into the values and we calculate the number of mols of carbon.
So for carbon, number of mols 10 minus 7 times the extent of reaction and this is 9.61 mols
of carbon are present in equilibrium.
Main reason for doing this calculation is to check that we didn't use up all of the carbon.
For example, if we had started with a 1/2 a mol of carbon, we couldn't get the equilibrium
to satisfy this equilibrium expression would've reacted all of the carbon.
So that's just a check on the system.
The mol fractions, if we substitute in, and again I'll pause and write down
and calculate the mol fractions in the gas phase.
So seeing the amount of reaction's pretty small, small equilibrium constant
and the mol fractions have to add to 1 but I did a check also,
verified that indeed the calculation for the mol fraction by substituting extent of reaction
for hydrogen gives the same number.
The only other check I'm going to make here is to look up the saturation pressure for hexane
at 25°C because this calculation assumes that all of the hexane stays in the gas.
And so the saturation pressure 0.061 bar and the pressure of hexane that we calculated
in equilibrium is the mol fraction of hexane times the total pressure of 1.0-bar
so that's then, the partial pressure's less than saturation pressure,
we don't have any liquid condensing.