In this screencast I am going to calculate the bubble temperature for a binary mixture
using Raoult's Law.
So we're given liquid composition and pressure.
Equations for how the saturation pressure changes with temperature from Antoine's equations.
We want the bubble temperature.
We also want the composition of the vapor phase.
This is ideal liquid solution.
We're going to do the solution numerically even though we perhaps could do this analytically
but the idea is when we look at a more complicate system of non-ideal solutions we use the same
approach so we might as well just get used to doing it numerically.
The equations we have of course we have these two equations for saturation temperature.
And then we have Raoult's Law which says the mole fraction for the liquid phase times the
saturation pressure is the mole fraction in the gas phase times the total pressure.
This is the same thing as saying that the fugacities are equal.
And we likewise have the same type for component 2.
So this is the third equation.
The fourth equation, well we should list our unknowns so we know how many equations we
need to solve this problem.
One of the unknowns is the saturation pressure of component 1.
Another is the saturation pressure of component two.
Y1, Y2, and of course temperature.
So we have five unknowns, we need 5 equations.
The final equation is Y1 plus Y2 must add to one.
Five equations, five unknowns, non-linear equations because of these equations.
We're going to use a non-linear equation solver in POLYMATH to determine the bubble temperature
and composition.
We could certainly use other types of methods to solve these equations, POLYMATH is particularly
simple to use and it will be demonstrated in other screencasts.
So if I do that, what I'm going to show you is the POLYMATH output.
So first let me show you the output on the right side.
Here are the mole fractions of the vapor phase, and here's the saturation temperature - that's
what we wanted to solve for.
This temperature is in degrees Centigrade.
So essentially 80 degrees Centigrade is the bubble temperature of the problem.
On the left part is the POLYMATH program, and the way POLYMATH works is I rearrange
all of the equations so zero is on one side of the equation.
For example, I write this equation number five is one minus Y1 minus Y2 equals zero.
And then in POLYMATH, I write this as a function of one of my variables, it doesn't matter
which one.
I happened to pick temperature.
I could have picked Y1, Y2.
All that matters is I identified in POLYMATH what are the variables I am going to change
and then I make an initial guess.
I make an initial guess of temperature.
Certainly the closer we are to the exact value the easier it is, the more likely the iteration
is going to work.
And so I have written each of these equations by doing the same rearrangement and then picking
arbitrarily one of the variables to put in parenthesis saying the function on the left
side.
And what POLYMATH is doing is making each of these functions as close to zero as possible.
Here it shows the final values, ten to the minus twelve, ten to the minus fifteen, so
quite close to zero.
I've entered the five equations, then I entered also the explicit equations, the information
I was given.
This runs essentially instantaneously in POLYMATH.
So we've determined now our bubble temperature and the composition of our vapor phase.
If we have a more complicated equation where the liquid is non-ideal, we would have additional
equations int the POLYMATH program but the concept would be identical.