In this screencast we'll use Excel to help us solve a vapor-liquid equilibrium problem
that is modeled using Raoult's law. So our problem is that we have a vapor that is 65
mol % benzene and 35 mol % toluene, that is in equilibrium with a liquid mixture of the
same two species. The absolute pressure of the system is 150 mm Hg, and we want to estimate
the composition of the liquid and the system temperature. So I would recommend trying to
do this on your own before continuing to watch the screencast. So let's draw a quick schematic
showing the system. So here's my little schematic that shows our system, our vapor our liquid
in equilibrium, and the information that we know about the system. So we say the vapor-liquid
equilibrium is modeled using Raoult's laws, so let's quickly write out those expressions.
Now for benzene, we say that the mol fraction of benzene in the vapor phase, y(B), times
the total pressure is equal to the mol fraction of benzene in the liquid phase times the saturation
pressure, which is a function of temperature. Now I write out the same thing for toluene,
and I can either write it as y(T), or 1-y(B). So I am going to write it as y(T) for now,
since I'll show you how we're going to solve this later. This x(T), and the saturation
pressure of toluene at some temperature. So remember the goal here is to solve for the
liquid composition as well as the temperature, so really we see that we have two equations,
four unknowns, even though the mol fractions in the liquid phase are tied together, as
the sum of them must equal one, but we still don't know what the temperature is so we can't
solve these equations. So we need to write out the relationships for the saturation pressure
as a function of temperature, and for this we use Antoine's equation. Now Antoine's equation
shows a relationship for the saturation pressure, P(sat), or P*, keep things consistant we'll
say P*, and the relationship between temperature and the saturation pressure was as follows.
We have 10^(A-B/(T+C)), and it's important to note that P* is in mm Hg, and that T is
in degrees Celsius, so the coefficients A, B, and C are species dependent, and that's
something that you can look up in a thermodynamic table, or possibly in the back of textbooks.
So for benzene and toluene I grab them out of a thermodynamic table and I get the following
values. So since we're going to use Excel I've taken the numbers directly out of the
tables, and you see this temperature box, basically tells us that for the range of temperatures
shown for that species those coefficients work to estimate the vapor pressure. Beyond
that temperature interval those coefficients may be different, and you may have to look
in another table. If you can't find them then you're using them kind of at your own risk.
So now you see we have four equations, two Raoult's law equations and we have two Antoine's
equations to solve for the saturation pressure. So since we don't know a temperature the way
we would go about this is an iterative approach, we would guess a temperature, we would then
solve for both saturation pressures using Antoine's equation, and then solve for the
mol fraction x(B) and x(T), and these must add up to 1. Now if they don't add up to 1
we would choose a new temperature and go through the process again. So by hand this
could be a pain, so let's use a computer solver approach to do this for us, and I am going
to use Microsoft Excel. So this is how I've set up my spread sheet, by no way is this
the only way to solve this problem. I've set up our species, we don't know our liquid mol
fractions, we do know our vapor mol fractions given to us in the problem, we have 65 mol
% of benzene, so 0.65 and 0.35, or 35 mol % toluene. I've typed in the Antoine's coefficients
for A, B, and C for each species. We know we need to set up the equation for P*, that's
a function of temperature, so we'll do that here in a second. For the system we don't
know the temperature, we do know the pressure, it's 150 mm Hg, and I like writing out my
units next to the values just so I recall. So now we can set up our equations, so let's
first set up P*. Now recall that Antoine's equation has the following form, so I am going
to type this into our equation for those cells, so =10^(A-B/(C+T)). Now you know this isn't
going to work because I haven't defined A, B, or C, but at least I can see that my equation
is set up, so now let's choose the appropriate values. So for A we're using this, for B we're
using that, for C we're using this, and I am going to keep T as is, and we're going
to get a name. Let's refer this temperature, whatever it may be, as T, so I'll go up to
the name cell and call it T. So now we have a temperature of zero, so we do get a saturation
pressure that doesn't make any sense, let's put in a temperature initially of 50 degrees.
So, we can copy this down for toluene. So now I have my saturation pressure cells calculated,
we now can solve for liquid x(i). Now recall Raoul'ts law in terms of x(i) is the following.
So if we want to write it in terms of x(i), this is just y(i) P over P(sat) or P*. So
we're going to plug this equation over into our liquid mol fraction cells. So equals our
vapor fraction times our total pressure, divided by our saturation pressure. So now we can
drag this down, but since I referred to our pressure we need to make sure that's the same
cell, and it's not, so you can either add your $ to that cell to lock it, or I can just
make sure I drag it back to the appropriate one. And so now we have our liquid x(i)s.
Well this should sum to 1. So =SUM(B2:B3), it is not equal to one, so this obviously
means the temperature we guessed is not the correct temperature. So this is how we can
use solver. If I go to "Data", and then "What If Analysis", we do "Goal Seek", now what we
want to do is set cell B4 equal to a value of 1 by changing the temperature, and when
I hit OK it iterates for us and finds a solution, so now our mol fractions add up to 1, and
our system temperature is roughly, using significant figures, we'll say it's 48.2, or even 48 degrees
Celsius, so as you can see setting this up in Microsoft Excel was much easier, and you
can even use this template for other species and keep all your equations in place just
changing our your known information, as well as your Antoine coefficients for you species
of interest. Hopefully this gives you an idea of solving a vapor-liquid equilibrium problem
using Raolt's law, and when you need to iterate to solve for certain variables how we can
do that using a solver such as that in Microsoft Excel.