The Grand Canonical Ensemble

Chapter 22 extends our model to allow particle exchange alongside energy flow, diving into the grand canonical ensemble where both energy and particle number can fluctuate.

Now in Chapter 22, we’re extending the concept.

We’re going to extend the model we’ve been playing with up until now.

The model we’ve been playing with so far basically was

Like this, with everything kept as-is,

only energy could flow in or out of the system.

But now, what we’re going to think about is

allowing particle inflow and outflow too.

For example, a situation like this

2H_2 and O_2 are going to chemically bond (or might not)

and if this makes the bond E rise, then energy is generated, which means we can view it as having raised the surrounding’s energy.

(Conversely, when a bond is broken, you could say the surrounding’s energy was used to break that bond, right??? This is totally in the realm of chemistry.)

Okay okay okay okay so let me just sort out one term and move on.

Up till now we’ve been

looking at a situation like this, thinking

“Oh come on, what statistical analysis are you going to do with just one!!!!”

“Let’s just say we have infinitely many things like that”

………..

…………………

We need at least this many so that we can take measurements on each one, and then take the average over those measurements and discuss internal energy, entropy, Helmholtz, Gibbs, etc.!!!!!

So taking some system we want to know about and copy-pasting it infinitely many times

that is what we call an ensemble.

And then we do statistical estimation on the ensemble.

But the ensemble above doesn’t allow particle inflow/outflow, only energy inflow/outflow.

This kind of ensemble is called the Canonical ensemble!!!!

But the extension of the model we’re doing now allows energy inflow/outflow… plus particle inflow/outflow too.

Which means we copy-paste systems like these infinitely many times

and do statistical estimation on them.

……………………………………………………………

This kind of ensemble is now called the Grand Canonical ensemble.

And from now on, to distinguish the energies when particle inflow/outflow is allowed from the ones pulled out in Canonical, I’ll use a subscript G.

So now, allowing particle inflow/outflow!!!!!

Let’s get started.

So, as we extend the model,

the very first task we have to do is modify our first law of thermodynamics (law of conservation of energy), which was dU = TdS - pdV.

We also have to include information about the newly added variable, “particles flowing in and out.”

First, let’s think about it simply like this.

To a system that was like this,

if O_2 enters, the internal energy of the system changes.

(I’m deliberately not saying clearly whether it goes up or down.)

And also, if one more O_2 enters, the energy will change by the same amount it just changed.

And if yet another O_2 enters, the energy will change by the same amount it just changed.

Why does it change?!?!?!

Because any O_2 that entered is assumed to react without fail, and when it reacts, it’s either breaking existing chemical bonds~ or making new bonds~

and so it’ll either use energy from the surroundings or release energy to the surroundings.

The point I want to make is that the internal energy changes due to chemical causes.

Okay okay okay okay

Every time we added one, the energy kept changing by the same amount, right?

That is, the change in internal energy is proportional to the number of particles that flowed in/out.

That is, in dU = TdS - pdV, if all the other existing variables are fixed

the thing causing the change in dU is dN (the change in the number of particles in the system)

Therefore

equation

And now I think it’ll be fine logically to say that what μ means is the “chemical potential.”

Also, in a situation where V and S are constant (dS=0, dV=0),

since dU = μdN,

let’s note too that this dU is the “changing of chemical Energy.”

(※Caution※ So, calling it chemical potential and explaining it that way might give you some kind of chemistry-ish conceptual impression, but if you go that way, things get harder. So let’s think of it like this:

“Chemical Potential → the amount of energy that changes due to a particle entering”

When a particle enters, the energy of the entire system might change due to a chemical reaction,

but not only that — the energy of the entire system might change due to the kinetic energy of the particle that entered?????

Keep this in mind and Keep going!!!~)

You should be convinced of the modification to the first law of thermodynamics.

But, the thing we’ve been do~~ing all along….

Like, earlier

equation

we were able to define internal energy via the partition function like this.

Can we do that here too??!?!!

Well, I’m sure we can.

Just, Z is the partition function for a system where only energy flows in/out,

and since we’re now allowing particles to flow in/out too, we’d have to define the partition function differently,

and the partition function for a system that allows particle inflow/outflow is……….

I’ll do that later.

First,

we’ve seen the first law of thermodynamics,

so I think this time we should head toward the second law of thermodynamics.

First, the equation we built

equation

let me rewrite this

as an equation for entropy.

equation

Now here’s the thing

looking at the equation above, you can say “Aha! So S, as a state function, is a function defined by three independent variables, U_G, V, N!!!!”

And then, viewing S purely mathematically as a three-variable function S(U_G, V, N),

if we express the change dS as a partial differential equation,

equation

we can write it like this, right?!

And if we compare this equation with our original equation

equation

and match them up,

equation

we can write it like this!!!!!

These equations are needed relations when deriving the Grand partition function,

so even though it’s a hassle, I derived them.

Those things above…

I derived those relations without much thought, but let me check that they’re physically valid and then move on.

I’ll confirm that the existing second law of thermodynamics,

namely that dS ≥ 0 holds.

Let’s say two systems each have V and N fixed and can only exchange heat.

(This is using the grand canonical equation in the canonical case… it’ll obviously hold… but let’s follow the logic anyway.)

S is definitely a function of U,V,N, but since V and N are fixed,

it will only be affected by changes in U,

so expressing dS as a partial differential equation, system 1’s change in S is

equation

system 2’s change in S is

equation

Total is

equation

But since the law of conservation of energy must clearly hold,

equation

equation

equation

since we had this,

equation

The red is positive, positive (temperature can’t be negative, absolute temperature K).

equation

This has to hold, so let’s go through it step by step!

equation

If this, that is if T_2 is the higher temperature,

then for the inequality to hold, dU_1 > 0 is required.

Oho, so if system2’s temperature is higher, system1 has to receive energy?!?!?!

And if it’s the opposite situation, for the inequality to hold dU_1 < 0,

so system1 has to lose energy?!?!?!

Aha~~~

Energy (heat) flows from higher temperature to lower temperature!!!!

It comes down to Kelvin’s expression of the second law of thermodynamics!!!!!

(The reason all of this is obvious is that we said dN=0, so it’s the same as playing with the equation dU=TdS-pdV.

That is, the message I want to get across is that the grand canonical is the more general expression?!?!!!! Something like that.)

Now let’s say N changes.

Instead, let’s say U and V are fixed on both sides.

And let’s say it’s a situation where they can only exchange particles with each other.

S is definitely defined as S(U,V,N) with these three variables,

but since we said U,V are constant, the entropy value will only be affected by changes in N.

Therefore

equation

and

equation

Let’s go straight to the total

equation

Here, energy conservation is already baked into our assumptions so it doesn’t work as a constraint,

so let’s use particle-number conservation as the constraint.

equation

Therefore,

equation

equation

so,

equation

And for the law of entropy increase to hold,

equation

this has to hold.

Alright, and here let’s look at the state of thermal equilibrium.

(Don’t worry, many chemistry experiments are done in thermal equilibrium, right?)

equation

If this inequality has to hold,

then if μ_2 is bigger than μ_1, dN_1 is positive,

that is, particles flow from system2 to system1,

and if it’s the situation where it’s bigger than μ_2, dN_1 is negative,

that is, it means particles flow from system1 to system2.

That is!

We can see that particles flow from the side with higher chemical potential to the side with lower chemical potential.

(Later, when we sort out that the chemical potential is the Gibbs function per particle,

equation

and then apply the Gibbs function minimization principle, the statement above can hit home more.)

Just like how heat flows from high to low temperature, this is a summary of how particles flow according to chemical potential, so it seems important.

From here on, we’re going to sort out F and G.

Once we sort out F and G, the summary above fully hits home.

It won’t be too late to shout make sense! at that point.

In the Grand Canonical ensemble,

equation

and

equation

let me sort these out.

When we don’t allow particle inflow/outflow, F was defined as F = U-TS.

equation

how should we handle this?!?!?!?!

Well….

equation

that’s how it’d go.

(The Helmholtz function F means the free energy or potential in a situation where T,V are constant, so this is valid.)

Then

equation

is

equation

(Right now I’m not defining the function itself, I’m defining the ‘change’ of the function.

Don’t get this mixed up.)

Likewise, for the Gibbs function, when particle inflow/outflow isn’t allowed

equation

it was this.

Then

equation

for this

equation

it would be this

so its change is

equation

Again! Again! Again! Again! Again! Again! Again! Again! Again! Again! Again!

I’ll employ the technique I’ve been using.

equation

and

equation

let’s think of these purely mathematically as three-variable functions

and express each function’s change as a partial differential equation!!!!!

equation

So, everything else aside,

what we need to squeeze out is

equation

this!!!!

This isn’t being used super importantly right now.

But this relation will be used later T_T T_T T_T (sigh… this is why thermodynamics is hard,,,,)

So anyway

I just scribbled it out mathematically so the meaning might not hit home, but it’s just this.


Originally written in Korean on my Naver blog (2016-05). Translated to English for gdpark.blog.