Canonical ensemble and Force on the Walls of a box

In summary: A= 4 \pi \int p^2 e^{-\beta \frac{p^2}{2m}} dp = 2 (2m\pi / \beta)^{3/2}$$... should be more appropriate for a system in equilibrium with a heat bath, but what would be the criterion to decide this?Your're right, I should probably address the problem with my results as well so that you get a better understanding of what I did.In summary, you solved for the position ##q## using the following equation: $$ q = \frac{1}{h^3} \int e^{-\beta \frac{p^2
  • #1
Jacques_Leen
11
0
Homework Statement
Consider a system made of an ideal gas (N particles) in a box ##L^2 (z_2 - z_1)##. The gas is affected by a gravitational potential directed along ##- \hat z##, and finds itself at equilibrium with a Heath Bath at T. Find:
1 The partition function for the gas
2 The mean energy and Helmoltz function A
3 The position of the center of mass of the gas
4 The force applied on the bottom and top part of the box containing the gas
Relevant Equations
$$Z = \frac{1}{h^{3N}} \int exp(-\beta \mathcal{H}) dp dq$$
$$\langle E \rangle = - \frac{ \partial (\ln(Z)) }{\partial \beta},$$
$$ A = -k_{B}T \ln(Z)$$
Hi everyone,
this is my first message after presentation so please be merciful if the notation is somewhat messy. Here's my attempt at a solution:
As for points 1) and 2) I used the definition of partition function
$$Z = \frac{1}{h^{3N}} \int e^{-\beta \mathcal{H}} d^3p d^3q$$
and the fact that
$$\langle E \rangle = - \frac{ \partial (\ln(Z)) }{\partial \beta},$$
$$ A = -k_{B}T \ln(Z)$$

As for point 3) I have exploited the fact that ## \langle E \rangle = \mathcal{H} ## and solved for the position ##q##.

I now need to address 4) and my first thought would have been to find the pressure ##P## and to divide it by the surface of the box which I know to be ##L^2##. Beeing an ideal gas ##P## should be ##\frac{ \partial E }{\partial V}##. My issue here beeing that I cannot derive by the volume because it does not appear in the solution I found for the ##\langle E \rangle##. I am wrapping my head around this problem and I really don't know how to proceed.
 
Physics news on Phys.org
  • #2
Welcome to PF!

Jacques_Leen said:
Hi everyone,
this is my first message after presentation so please be merciful if the notation is somewhat messy.
Your notation looks very good.

As for point 3) I have exploited the fact that ## \langle E \rangle = \mathcal{H} ## and solved for the position ##q##.
I don't follow this. The left side of this equation, ##\langle E \rangle##, is the thermodynamic energy of the system which is often denoted as ##U##. The right side, ##\mathcal{H} ##, is the Hamiltonian which is a function of the positions and momenta of all of the molecules. When you say that you solved this for ##q##, which particular ##q## did you choose? It might help if you show some of your work here.

I now need to address 4) and my first thought would have been to find the pressure ##P## and to divide it by the surface of the box which I know to be ##L^2##. Beeing an ideal gas ##P## should be ##\frac{ \partial E }{\partial V}##. My issue here beeing that I cannot derive by the volume because it does not appear in the solution I found for the ##\langle E \rangle##. I am wrapping my head around this problem and I really don't know how to proceed.
From thermodynamics, you have expressions for pressure such as ##P = - \frac{\partial E}{\partial V}|_{S, N}## and also ##P = - \frac{\partial A}{\partial V}|_{T, N}##. See here or here for a review (but note ##A## is denoted ##F## in these links). Which of these might be more appropriate for a system in equilibrium with a heat bath?
 
Last edited:
  • #3
your're right I should probably address the problem with my results as well so that you get a better understanding of what I did.

Let's start from the beginning:
1) ##\mathcal{H} = \sum_{i=1}^{N} \frac{p_i ^2}{2m} + mg q_i## hence I get for the partition function (for a single particle):
$$ Z= \frac{1}{ h^3} \int e^{-\beta \frac{p^2}{2m} + mg q} d^3p d^3q $$
which then can be solved in the form of two integrals:
$$ A= \int e^{-\beta \frac{p^2}{2m}} d^3p $$
$$B=\int e^{-\beta mg q} d^3q $$
As for ##B## it should result in
$$ B = -\frac{L^2}{mg \beta} ( e^ {-\beta mg z_2} - e^{-\beta mg z_1} ) $$
whereas ##A## requires the Gauss Integral:
$$ A= 4 \pi \int p^2 e^{-\beta \frac{p^2}{2m}} dp = 2 (2m\pi / \beta)^{3/2}$$
Now combining ##A \text{ and } B## and considering the factorization for the ##Z_N## i get:
$$Z_N = \frac{1}{N!} (\frac{2L^2 mg}{\beta h^3})^N (2m\pi / \beta)^{3N/2} ( e^ {-\beta mg z_2} - e^{-\beta mg z_1} )^N $$

2) I now address the problem of finding ## \langle E \rangle## and ##A## (I use stirling's semplification for ##N!##):
$$ A = - k_b T \ln(Z_N) = $$
$$= 1/\beta( N \ln(N) - N - N \ln(\frac{2L^2 mg}{\beta h^3}(e^ {-\beta mg z_2} - e^{-\beta mg z_1})) - 3N/2 \ln(2m\pi / \beta) ) = $$
$$ =N/ \beta(\ln(N) - \ln(\frac{2L^2 mg}{\beta h^3}(e^ {-\beta mg z_2} - e^{-\beta mg z_1}))- 3N/2 (\ln(2m\pi / \beta) -1)$$

while for ## \langle E \rangle##:
$$\langle E \rangle= - \frac{\partial \ln(Z_N)}{\partial \beta} =$$
$$ = \frac{5NT}{2 \beta} - \frac{Ngm}{e^ {-\beta mg z_2} - e^{-\beta mg z_1}} (z_2e^ {-\beta mg z_2} - z_1 e^{-\beta mg z_1})$$

As for your first question, my line of reasoning was the following (and in this case indeed the notation I used was sloppy): ## \langle E \rangle## is the average Energy for the system, hence the average Energy for a single particle can be derived dividing by N. This should be equal to the ##\mathcal{H}## of the single particle, and from there I can resolve for ##q## finding the average position of a particle which should be the position of the center of mass. Am I missing something here?Now for what concerns 4):it is true that deriving the ##A## with respect to ##V## yields the Pressure in a Thermal Bath at T const. But still I don't get ho to derive with respect to the Volume if there is no V in the results I obtain for ##A##. I hope this time around my problem is stated in a better fashion, and thanks for your help!
 
  • #4
Jacques_Leen said:
$$ Z= \frac{1}{ h^3} \int e^{-\beta \frac{p^2}{2m} + mg q} d^3p d^3q $$
ok. There's a missing N! which you put in later. Also, there needs to be parentheses in the exponent.

which then can be solved in the form of two integrals:
$$ A= \int e^{-\beta \frac{p^2}{2m}} d^3p $$
$$B=\int e^{-\beta mg q} d^3q $$
As for ##B## it should result in
$$ B = -\frac{L^2}{mg \beta} ( e^ {-\beta mg z_2} - e^{-\beta mg z_1} ) $$
ok

whereas ##A## requires the Gauss Integral:
$$ A= 4 \pi \int p^2 e^{-\beta \frac{p^2}{2m}} dp = 2 (2m\pi / \beta)^{3/2}$$
This is off by a factor of 2. Did you integrate from 0 to ##\infty## or ##-\infty## to ##\infty##?

Now combining ##A \text{ and } B## and considering the factorization for the ##Z_N## i get:
$$Z_N = \frac{1}{N!} (\frac{2L^2 mg}{\beta h^3})^N (2m\pi / \beta)^{3N/2} ( e^ {-\beta mg z_2} - e^{-\beta mg z_1} )^N $$
Did you get the ##mg## in the right place in the factor after the 1/N!? Did you include the overall negative sign for the B integral?

There are typos in some of your other work. For example in the first term of your expression for <E> you have ##\frac{5NT}{2\beta}##,which is not correct dimensionally. So, check over your work and try to correct these mistakes. Otherwise, you are on the right track.

The pressure at the top of the box is related to the work done by the gas if the top of the box (at ##z_2##) is allowed to undergo a small vertical displacement ##dz_2##. The corresponding change in volume is ##dV = L^2 dz_2##. So ##P_{\rm top}## is given by ##\large - \frac{\partial A}{\partial V} = -\frac{1}{L^2} \frac{\partial A}{\partial z_2} ##
 
Last edited:
  • #5
TSny said:
The pressure at the top of the box is related to the work done by the gas if the top of the box (at ##z_2##) is allowed to undergo a small vertical displacement ##dz_2##. The corresponding change in volume is ##dV = L^2 dz_2##. So ##P_{\rm top}## is given by ##\large - \frac{\partial A}{\partial V} = -\frac{1}{L^2} \frac{\partial A}{\partial z_2} ##

First of all thanks again for the helpful insights in the subject matter. As you mentioned the typos in the writing are due to silly mistakes (e.g. the dimensional problem with energy was simply cause by the fact that on my homework I had everything written in terms of ##k_B T## whereas this post was using ##\beta##)

when you said I am on the right track (thanks btw :) ) do you mean that my reasoning for the evaluation of the position of the center of mass is sound as well?

Thanks a lot again, Probably starting tomorrow there will be more questions coming, I got a stat mech test on tuesday and while the professor provided us with former exercises there is no solution attached to them. The result beeing that I am not aware of wether I am doing anything wrong.
 
  • #6
Jacques_Leen said:
when you said I am on the right track (thanks btw :) ) do you mean that my reasoning for the evaluation of the position of the center of mass is sound as well?

Jacques_Leen said:
## \langle E \rangle## is the average Energy for the system, hence the average Energy for a single particle can be derived dividing by N. This should be equal to the ##\mathcal{H}## of the single particle, and from there I can resolve for ##q## finding the average position of a particle which should be the position of the center of mass. Am I missing something here?
I'm not sure I follow this, but maybe you have the right idea. The probability ##p(z)## of finding a particle at height ##z## is proportional to the Boltzmann factor ##e^{-\beta mgz}##.

So, ##p(z) = A e^{-\beta mgz}## and you should be able to find the normalization constant ##A##. Then you can use this probability function to determine the vertical location of the CM of the gas.
 
  • #7
TSny said:
I'm not sure I follow this, but maybe you have the right idea. The probability ##p(z)## of finding a particle at height ##z## is proportional to the Boltzmann factor ##e^{-\beta mgz}##.

So, ##p(z) = A e^{-\beta mgz}## and you should be able to find the normalization constant ##A##. Then you can use this probability function to determine the vertical location of the CM of the gas.

in this case ## A=Z_N ^{-1}e^{-\beta \frac{\langle p \rangle ^2}{2m}}## (##Z_N ## is the partition function for the canonical ensemble, the momentum is on average ). I can now find the maximum through:

$$ \frac{dp}{dz} = 0 \text{ and solving for z.}$$
 
  • #8
Jacques_Leen said:
in this case ## A=Z_N ^{-1}e^{-\beta \frac{\langle p \rangle ^2}{2m}}## (##Z_N ## is the partition function for the canonical ensemble, the momentum is on average ).

I should have been more careful in my wording before.
##p(z) = A e^{-\beta mgz}## is the probability distribution function. That is, the probability of finding a particular molecule between ##z## and ##z+dz## is ##p(z)dz##. The probability of finding the molecule between ##z_1## and ##z_2## must be 1 since you know the molecule is somewhere in the box. So, ##\int_{z_1}^{z_2} p(z)dz = 1##. Use this to find ##A##.

I can now find the maximum through:

$$ \frac{dp}{dz} = 0 \text{ and solving for z.}$$
##p(z)## is a maximum at the bottom of the box, ##z = z_1##. But, the center of mass is not located where ##p(z)## is a maximum. As you stated earlier, the center of mass is at the average value of ##z##:

##z_{\rm cm} = \int_{z_1}^{z_2} zp(z)dz##

This can be justified by going back to the definition of the location of the CM:

##z_{\rm cm} = \frac{1}{M} \int_{z_1}^{z_2} zdM##,

where ##M## is the total mass of the gas in the box. ##dM## is the mass of gas in a thin slice between ##z## and ##z+dz##. The number of molecules in this slice is ##Np(z)dz##, where ##N## is the total number of molecules. So, ##dM = mNp(z)dz##, where ##m## is the mass of a molecule. Note ##M = mN##.
 
  • #9
This is hopefully wrapping it up :)

I computed the values both for ##z_{CM}## and for ##F(z_2)##.
As for the CM I have done the following (thanks to TSny's adivce):
$$p(z) = Ke^{-\beta m g z} \text{ and } \int_{z_1}^{z_2}p(z)dz =1.$$

substituting ##p## in the integral I obtain:
$$\int_{z_1}^{z_2}Ke^{-\beta m g z}dz =1 \text{ hence } K = \frac{\beta m g}{e^{-\beta m g z_1} - e^{-\beta m g z_2}}$$
Now the average position ##z_{CM}## is obtained via evaluation of the first moment of the variable ##z##, which is the integral
$$ K \int_{z_1}^{z_2} z e^{-\beta m g z}dz$$
this can be integrated by parts and should yield
$$ K (-e^{-z} (1+z))_{z= z_1}^{z=z_2}$$
which is the position of the center of mass of the system.

The F applied on the bottom or top surface (or bottom, the reasoning is the very same) can be found with the formulas stated above deriving Helmoltz Free Energy in terms of ##z_2##. The result should be
$$F =N \frac{mg e^{-\beta m g z_2}}{e^{-\beta m g z_1} - e^{-\beta m g z_2}}$$
 
  • #10
That all looks good. Note that the difference between ##F_{\rm bottom}## and ##F_{\rm top}## is just ##Nmg##, as expected.
 

1. What is the canonical ensemble?

The canonical ensemble is a statistical mechanical model used to describe the behavior of a system in thermal equilibrium with a heat bath at a constant temperature. It considers the probability distribution of different microstates of a system at a fixed temperature.

2. How is the canonical ensemble related to thermodynamics?

The canonical ensemble is closely related to thermodynamics as it allows for the calculation of thermodynamic quantities, such as the average energy and entropy, of a system in thermal equilibrium at a constant temperature.

3. What is the significance of the force on the walls of a box in the canonical ensemble?

The force on the walls of a box in the canonical ensemble is a result of the interactions between the particles within the box and the walls. It plays a crucial role in determining the equilibrium properties of the system, such as pressure and volume.

4. How does the force on the walls of a box change with temperature in the canonical ensemble?

In the canonical ensemble, the force on the walls of a box increases with temperature due to the increased thermal energy of the particles within the box. This leads to an increase in pressure and volume of the system.

5. Can the canonical ensemble be applied to all types of systems?

No, the canonical ensemble is only applicable to systems that are in thermal equilibrium with a heat bath at a constant temperature. It is commonly used to describe ideal gases and other systems with a large number of particles.

Similar threads

  • Advanced Physics Homework Help
Replies
10
Views
589
Replies
4
Views
1K
Replies
3
Views
1K
  • Quantum Physics
Replies
9
Views
799
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
2
Views
831
Replies
1
Views
792
  • Advanced Physics Homework Help
Replies
3
Views
916
Replies
1
Views
594
Replies
27
Views
2K
Back
Top