Here, we're interested in calculating the entropy change
when you mix two ideal gases.
An important constraint is we're doing this
at constant pressure and constant temperature.
So the situation we're looking at is,
we start with two gases for example,
in separate containers,
separated say, by a diaphragm here.
So gas A,
gas B,
nA is number of moles of A,
pressure one, temperature one, important
the same pressure, same temperature.
And the idea is,
if we were to break that diaphragm,
and so we end up with one container,
and we have A and B together.
So we'd like to know the entropy change
and the way we're going to do that,
is to treat each of the gases separately.
So, elsewhere we've derived an equation.
I'm just going to write it down here
for entropy change for an ideal gas.
So this entropy change due to temperature change,
and then due to a pressure change,
P2 is the final, P1 is the initial.
Of course, for our situation,
this term is zero,
so we're only looking at the change due to pressure.
But if we treat each gas independently,
then we start out at pressure P1,
and end up with a final pressure that's lower,
and this is the reason the entropy increases,
we've lowered the pressure of each of the gases.
So let's look at the entropy change of A,
delta S is per mole,
so minus R log
initial pressure P1,
our final pressure is the mole fraction of A times P1,
final partial pressure, so that the entropy change for A
is just minus R log the mole fraction of A,
well, the completely equivalent term for B.
Entropy change of B.
Just a reminder,
this is per mole
of B, in that case
and the first term, per mole of A.
So then the total entropy change
for the system we're looking at,
this is total, meaning not per mole,
but for the system we have.
So we have two terms,
we have the number of moles of A
then R log mole fraction of A
and the number of moles of B,
and we call this the entropy change of mixing.
We're gonna divide by the number of moles,
so entropy change per mole of our final mixture.
So I'm gonna divide nA by the total number of moles.
All right, I'll divide the right side,
and then likewise, nB.
Well, I can simplify this.
This is the mole fraction of A
and this is the mole fraction of B,
entropy change of mixing per mole.
I can be arranged slightly,
minus R[yA logyA]
plus yB
logyB,
we're using natural log of course.
So entropy change in mixing for a binary mixture in general,
then delta S of mixing
would be minus R, the summation of mole fractions.
So we could have three or four or five components
if we're mixing at constant total pressure.
Here's the entropy change of mixing.
So mixing, and this of course, is only good for ideal gases,
constant temperature.
Temperatures should not change with mixed ideal gases
because there's no interaction, but constant pressure,
meaning the initial pressure of the gases
and final total pressure is the same.