# Thermodynamics questions

1. Apr 5, 2012

### Matterwave

Hello, I'm pretty horrible at thermodynamics (one of my weak subjects I'll admit) so sorry if my questions are real basic.

My main question is "How do we know or find out the 'proper' variables to use?". For example, we are usually given E=E(S,V,N) so that dE=TdS-pdV+μdN. How do we know/find out that S, V and N are the "proper" variables to use, and not, for example, T, V, and N?

I am told that, if I am given E=E(T,V,N), then I don't have "the whole picture" (in that there will be some state variables or state functions I can't deduce from this), but I can't see why this is.

I know that if we wanted to use T, V and N as our proper variables, we would instead use the Helmholtz free energy F=E-TS, but I've only ever seen this derived after already using dE=TdS-pdV+μdN.

Another question. S, the entropy, is a state function. But I am also given that dS=dQ/T. Integrating in a cycle dQ/T=0 only if the process is reversible. On the other hand, it is required that for any state function W, the integral of dW in a cycle (going from an initial state to the same initial state) must result in 0 because the state function must depend only on endpoints, and not the path. So, what am I getting wrong or what am I missing?

Thanks.

2. Apr 6, 2012

### haruspex

But you cannot get back to the exact same initial state - that's what the law says.
If that doesn't resolve it for you, try spelling out the sequence in more detail.
(Can't help with the first bit, in part at least because I don't know what all those variables are.)

3. Apr 6, 2012

### Matterwave

Sorry, E=energy, S=entropy, T=temperature, P=pressure, N=particle number, V=volume, and μ = Chemical potential.

4. Apr 6, 2012

### fluidistic

I think N is the number of moles.
I just started my thermodynamics course so your questions interest me a lot. To tell you the truth I feel quite confused about the many variables, which one should I use for the energy representation and which one should I use for the entropy representation.

5. Apr 6, 2012

### Matterwave

N is number of particles or molecules in what I wrote. Mostly, people use n or $\nu$ for number of moles. It doesn't make much of a difference as you can just readjust the units on μ.

6. Apr 7, 2012

### Matterwave

Hmmm, surely someone can answer this question @_@

7. Apr 7, 2012

### Philip Wood

For your first question, for simplicity assume N is fixed, that is we have a closed system. The First and Second Laws lead to
$$dU = TdS - pdV.$$
S and V are the natural (proper) variables for U. Note their appearance in the differentials.
Now clearly, $T = {\partial U}{\partial S} , p = -{\partial U}{\partial V}.$

So if we know U as a function of S and V we can evaluate these partial derivatives and hence have p and T, and other useful stuff.

I don't suppose this is the whole story.

8. Apr 7, 2012

### nonequilibrium

Yes this is often taught rather unclear. First of all, your equality dS=dQ/T is not true, it's only true in case the infinitesimal change is reversible. More generally, it's $\mathrm d S \geq \frac{\mathrm d Q}{T}$. This solves your problem: integrating this around a closed loop simply gives $0 \geq \oint \frac{\mathrm d Q}{T}$ where the RHS is zero if and only if the process is irreversible.

Fine, but let me tell you more, since although my above explanation might solve your particular problem, it doesn't really increase your understanding. Or better yet: the fact you were confused implies you're not getting the picture behind it (which isn't your fault).

So $\mathrm dS$ is the entropy increase in the system (i.e. not in the whole universe), and if $\mathrm d Q_{env}$ is the heat going into the environment, then the entropy increase of the environment (at temperature T) is $\frac{\mathrm d Q_{env}}{T}$ (this can be proven from first principles, i.e. from equilibrium statistical mechanics). The second law of thermodynamics says that the total entropy increase must always be positive, so for our infinitesimal change we get $0 \leq \mathrm d S_{system} + \mathrm d S_{environment} = \mathrm d S + \frac{\mathrm d Q_{env}}{T}$ (*) and if $\mathrm d Q$ is the heat going inside the system, then of course $\mathrm d Q = - \mathrm d Q_{environment}$. Combining these last two expressions, we get $0 \leq \mathrm d S - \frac{dQ}{T}$, or in other words:

$\boxed{ \mathrm d S \geq \frac{dQ}{T} }$

(*) note that if our $\leq$ becomes an equality, it is a reversible process (indeed: $0 = \mathrm d S_{universe}$), giving you $\boxed{ \mathrm d S = \frac{dQ}{T} }$

9. Apr 7, 2012

### Matterwave

Ok, that's clear, thanks.

In this case, then, when we write dE=TdS+pdV, we should be writing technically dE≤TdS+pdV with equality holding for reversible processes?

10. Apr 7, 2012

### Matterwave

Hmmm, so E=E(S,V,N) comes naturally from the first law of thermo, then? I guess I can buy that.

But why does my book say that if I don't use the "proper" variables, then I don't have "the whole picture"? The book I'm refering to is David Goodstein's States of Matter page 13: "...If, on the other hand, we know the energy as a function, say of T and V, we generally do not have all the necessary information."

Why is that?

11. Apr 7, 2012

### nonequilibrium

(small note, I think you mean TdS-pdV instead of TdS+pdV)

Nope, that equality is always an equality. But your error is an understandable one. I think your error originates from you thinking that -pdV = dW (where dW is the infinitesimal work). This is, however, incorrect. Just like TdS = dQ is only correct for irreversible changes, the same is true for -pdV = dW. In general TdS≥dQ and -pdV≤dW (and hence at least it's possible that dE = TdS - pdV = dQ + dW)

But now you're probably wondering: how can we derive this? I.e. how can we derive that dE = TdS - pdV for irreversible processes (proving it for reversible processes is trivial, since then dQ = TdS and dW = -pdV, so it follows from dE = dQ + dW)? The argument is simple yet subtle (and very beautiful). So say the system has gone from A to B via path gamma (and we regard an infinitesimal change here). Now, this process might be irreversible; we're not specifying. However, regard a different path, called delta, also from A to B, but this path is reversible (by definition). For this path dE = TdS - pdV. Now since E is a state variable, dE is the same for both path gamma and delta; actually the same can be said about S and V, hence dE, dS and dV are the same for both path gamma and delta, and since we presume that T and p are constant, we get that dE, TdS and -pdV are the same for both paths. But since we know that dE = TdS - pdV for path delta, it must also be true for path gamma. Hence the relation is always true, even if path gamma is irreversible :)

12. Apr 7, 2012

### Matterwave

So, then would this mean that irreversible processes necessarily have work which is not pdV work? Like, work due to stirring or something?

I think my fundamental lack of understanding is my understanding of the word "irreversible". As far as I know, the definition I was given was simply that it is a process which you can't reverse...which at least sounds cyclic to me.

I understand quasi-static changes(every point in the change is at equilibrium), but irreversible/reversible gives me some problems.

Maybe if there was a chart somewhere that mapped all these kinds of changes out (like a venn diagram?). That might help me.

13. Apr 7, 2012

### Ken G

I think he meant pdV > dW, not < dW. The classic example is when you release a gas into a larger box-- no work is done, but pdV is positive.

14. Apr 7, 2012

### Matterwave

Well, he has -pdV<dW which is the same thing......?

15. Apr 8, 2012

### VortexLattice

The simple answer is "whatever is easiest to solve the problem with". Different ensembles specify different variables to use. The one most people start with is the Microcanonical ensemble, where E,V,N are specified. This means that those three variables specify the macrostate of a system. You can then figure out other variables like S and T from things like S = k*ln(# of microstates) and 1/T = dS/dE.

However, in real life you'll often not know E (imagine trying to figure out exactly how much energy a volume of gas has). Much easier to know is T. When you know T,V,N, that's called the Canonical ensemble. From there, you can often figure out E.

The there are others, the Grand Canonical ensemble and the Gibbs Canonical ensemble. In the thermodynamic limit (a bazillion particles), they're all actually the same -- but typically you'll only practically be able to solve the problem at hand with one. So you basically figure out what the problem you're trying to solve gives you, and then use the corresponding ensemble.

16. Apr 8, 2012

### Philip Wood

The best thing I can do is to give an example. In fact it's based on an exercise given in Thermal Physics by P C Reidi.

For an ideal monatomic gas, we can arrange the Sackur Tetrode entropy equation to give

$$U = aNk \left ( \frac{N}{V} \right )^\frac{3}{2} exp \left (\frac{2S}{3Nk} \right )$$
in which a is a constant. Show that the equation of state, the principal specific heats, and the fundamental equation in the form $F = F(T, V)$ may all be derived from this equation.

Now try and derive the same things starting from

$$U = \frac{3}{2} NkT.$$

Last edited: Apr 8, 2012
17. Apr 8, 2012

### nonequilibrium

An easy example to show that in an irreversible process -pdV < dW:

Take box of gas with one of the walls a piston. If you very slowly push the piston inward, the gas stays in quasi-equilibrium, and the process is reversible (by simply pulling the piston outward, slowly).
However, now imagine you smash the piston inward, then the gas is very perturbed and the pressure you feel pushing back on you as you push the piston is larger than in the reversible case, since you're not giving the system the time to redistribute the molecules which collect at the edge of the piston (as you push it hard). Hence you're exerting more work on the system than in the equilibrium case (in the equilibrium case it's equal to -pdV, note that this is positive since dV < 0), or in symbols: -pdV < dW.

That definition is not cyclic. That's the meaning of the word "irreversible", is it not? But what is more interesting is the characterization in terms of entropy, which is how you should see it: an infinitesimal process is reversible if $\mathrm d S_\textrm{universe} = 0$ and irreversible if $\mathrm d S_\textrm{universe}> 0$.

That's it, but maybe I'll say a little bit more (to prove that for an irreversible process -pdV > dW): in case of the latter (i.e. $\mathrm d S_\textrm{universe}> 0$), as explained in a previous post of mine, one has that $\mathrm d S > \frac{\mathrm d Q}{T}$ (where dS is the change of entropy of the system, and dQ is the heat going into the system, from the environment), hence $T \mathrm d S > \mathrm d Q$. On the other hand, since (as proven in an earlier post of mine) dE = TdS - pdV and also by conservation of energy dE = dQ + dW, we get that TdS - pdV = dQ + dW or rewritten TdS - Q = dW + pdV.
Now as I've just argued TdS > Q, so that the left-hand side is positive, and so dW + pdV > 0, proving that dW > -pdV.

EDIT:
Indeed, at least if you realize Ken G and I are using different conventions. My dW is the work done ONTO the system, while Ken G defines dW as the work done BY the system. These are conventions, and different books use different conventions. If your book says dE = dQ + dW, then they're using "my" convention. If it says dE = dQ - dW, then they using Ken G's.
To show Ken G and I agree on the inequality: when I write -pdV < dW, according to Ken G's definition this is -pdV < -dW, or in other words pdV > dW, as he wrote in his post.

Last edited: Apr 8, 2012
18. Apr 8, 2012

### nonequilibrium

I don't think this solves the OP's question, but it comes close, so let me try and fix it.

The microcanonical ensemble is indeed given by the variables E, V and N. Statistical mechanics shows us that microcanonical ensembles are characterized by their entropy S. Hence statistical mechanics show us that S(E,V,N) is the natural function. Now S = S(E,V,N) is an equation and can be solved for E, hence one can just as well use E(S,V,N).

But what if the system is not given by E, V and N, but by T, V and N? Then it is known as the canonical ensemble, and again statistical mechanics also shows us that the canonical ensemble is characterized by a variable called Z (called the canonical partition function, but it's not important that you understand what this is, just accept that there is such a variable Z). Hence statistical mechanics shows us that Z(T,V,N) is the natural function. Now one also has that $F = -k_b T \log Z$, hence one can just as well says that F(T,V,N) is the natural function.

This "shows" that given S,V,N, the natural variable is E; and given T,V,N, the natural variable is F. I hope this helps?

19. Apr 8, 2012

### Ken G

Good point, your post needed no correction. I do tend to think in terms of work done by the system, but a more standard convention is work done on the system.

20. Apr 8, 2012

### Matterwave

Ok, thanks for the help guys =]