Review of thermodynamics principles#

What you will know

  • Thermodynamics is an exact phenomenological theory that describes changes in material systems in equilibrium. “Phenomenological” means that macroscopic phenomena are defined in terms of a few observable and measurable variables, without reference to microscopic details.

    • Extensive variables: are additive quantities such as energy, volume, and the number of moles—that completely define the thermodynamic space.

    • Intensive variables: are size independent quantities such as temperature, pressure and magneitc field. These are derived from extensive variables offering convenient description of system under constant external conditions.

  • The central goal of thermodynamics is calculating transformations in thermodynamic space by constructing quasi-static paths which obey the fundamental laws:

    • The first law expresses the conservation of energy.

    • The second law determines the direction of spontaneous processes. It implies that thermodynamic space is foliated into adiabatic surfaces of constant entropy.

Extensive vs Intensive variables#

  • Extensive variables: Depdent on System size These are fundamental variables that uniquely define the equilibrium states. Examples are V,N,E,S.

  • Intensive variables: Size Independent These are derived from the extensive ones and are considered as conjugate pairs. E.g VP, Nμ and ST, are conjugate pairs.

  • Intensive variables do not have the same fundamental status as extensive variables

    • Because they do not always uniquely describe the state of matter in equilibrium.

    • For example, a glass of water with and without an ice cube can be under 1 atm and 0 C, whereas energy and entropy volume values will differ.

Equilibrium and thermodynamic space#

../_images/adiabat.png

Fig. 12 A and B are equilibrium states. A quasistatic process connecting A and B is in the thermodynamic space (however, see the warning in the text). From A to B a process need not be quasistatic. Then, most such processes are outside the thermodynamic space (broken curve).#

  • Equilibrium refers to a state of matter which is unchanging. There are no macroscopic fluxes or flows of energy or matter.

  • The state of Equilibrium is defined relative to observation time! A glass of water on the table is in a state of equilibrium on the time scale of minutes but in a state of non-equilibrium over the scale of days because water evaporates, changing the thermodynamic state of the glass.

  • Euilibrium is represented as a point in the Thermodynamic space E(X1,X2,...) where Xi are extensive variables.

    • These coordinates have unique and well-defined values for each equilibrium state irrespective to how such state was created.

    • Intensive variables become ill-defined if the system is not in equilibrium (temperature, pressure, etc).

    • Functions like energy E are called state functions, and their changes are given by differences between initial or final state only ΔE=EfEi.

    • On the other hand one can have quantities such as work W or heat Q. These are path dependent characterizing the way energy is transferred to the system and not characterizing equilibrium states!

Fundamental equation of thermodynamics#

Fundmanetal Equation of Thermodynamics

E(X1,X2...)
  • E(X) as a function of in thermodynamics of all of the extensive variables X=X1,X2,... … describing the system.

  • Transformations between equilibrium states is the central task of thermodynamics. Knowing the fundamental equation, one can predict the equilibrium state B, which results from equilibrium state A through spontaneous transformation upon removal of a constraint. E.g computing ΔE=EBEA given expansion of a box.

  • Quasi-static path: a dense succession of equilibrium states that connects A with B in extensive variables is constructed to compute changes in thermodynamic variables between states A and B. The quasistatic process ensures the system does not deviate from the equilibrium state during transformation.

  • Reversible transformations can go forward or backward without any change in the environment. This necessitates the introduction of Entropy, which differentiates reversible from non-reversible changes.

  • The quasistatic path may or may not be reversible Just because the process is infinitely slow and locally in equilibrium does not make it reversible along the path of transofrmation. For instance, poking a small hole in a container and letting one molecule out very slowly does not make the process reversible.

First Law#

First Law of Thermodynamics

dE=δQ+δW
  • δQ and δW are inexact differentials. This means that work done to go from A to B will depend on a path from A to B

  • dE is an exact diffrential. This means the energy difference between states A and B is the same regardless of the path one takes.

Note on signs

  • By convention sign of work or heat is positive if energy is transfered to the system. Negative if it system loses energy. Hence think about signs from the perspective ofa system under study.

  • If engine does work against external pressure p then dW=pdV. You can see work is going to be negative for expanding volume dV>0 and positive for contracting dV<0

  • If system is absorbing heat from environment (heating up) δQ>0. If the system is refridgerating then δQ<0

Adiabatic Change dQ=0

dE=dW

No work

dE=dQ

Adiabatic Processes#

../_images/plank.png

Planck’s Formulation of the Second Law

  • For any adiabatic process in which all work coordinates return to their initial values (i.e., a cyclic process), the energy of a thermally isolated system cannot decrease:

    ΔE0
  • Intuitively, this means that when performing pure mechanical work on a system, we can only impart energy to it due to friction or dissipation. Conversely, it is impossible to “steal” energy from a closed system purely through mechanical work without any accompanying environmental change.

  • Consequently, not all paths in thermodynamic space are accessible; one cannot always transition freely from state A to state B. This suggests the existence of a fundamental constraint—possibly a new variable—that dictates when transitions are allowed and when they are not.

../_images/Adiabats.png

Fig. 13 Let Q be a state on a vertical line L (along which we can move with heat exchange alone) that can be reached from state P adiabatically and quasistatically. If state A can be reached by an adiabatic process from P, then adiabatically we can go from Q to A via P, violating Planck’s principle. Thus, the shaded portion is inaccessible from P adiabatically. If state B can be reached by an adiabatic and quasistatic process from P, then adiabatically we can go from B to Q via P, violating Planck’s principle, again. Thus, Q is unique: there is only one point on L that can be reached from P adiabatically and quasistatically.#

../_images/NO1.png

Fig. 14 If two adiabats cross or touch, then we can make a cycle that can be traced in any direction, because PQ and P’Q can be traced in either directions, so Planck’s principle is violated.#

  • This restriction implies that adiabatic surfaces (or lines) cannot intersect. If they did, one could design a cyclic mechanical process that decreases the system’s energy, violating the second law. Moreover, an intersection would imply that the same thermodynamic coordinates correspond to two different forces (energy derivatives), which is physically inconsistent.

    • Therefore, thermodynamic space is foliated by non-intersecting adiabats.

    • This structure naturally leads to the definition of an extensive variable, Entropy S(E), which remains constant along each adiabatic surface and increases with energy across different adiabats.

    • Since entropy is a monotonic increasing function of energy S(E), it follows that Planck’s formulation implies:

Second Law for Adiabatic Processes

ΔS0
  • However, as we shall see the entropy-based Second Law is more general, as it applies to both adiabatic and non-adiabatic transformations.

Reversible Heat Exchange#

  • Moving from one adiabat to another requires heat input or removal.

  • This structure underlies entropy-based formulations of the Second Law, as entropy remains constant or increases in an adiabatic process.

dS=S(E+dE)S(E)=dSdEdE=dQT
  • Here, we identify the prefactor as the temperature, which we will soon rediscover in statistical mechanics.

T=(dSdE)1,
  • Since mechanical manipulation alone does not move the system between adiabats, this implies that entropy can only be reduced by cooling (dQ<0).

Second Law#

  • For general non-adiabatic case of system in contact with an infinitely large reservoir (heat bath) it is the entropy of the combined system+reservoir that must increase.

dS+dSr0
  • The reservoir the entropy change is solely due to heat exchange Qr=Q

dSr=δQrT=δQT

Second Law of Thermodynamics

dSδQT

Understanding the Signs#

  • Irreversibility and Entropy Production

    • The inequality dS>δQT captures entropy increase due to internal irreversibilities, such as:

    • Friction, viscosity, turbulence** in fluids. Non-equilibrium chemical reactions. Unrestrained (free) expansion

  • Reversible Heat Transfer

    • The equality dS=δQT holds when:

      • The system remains in thermal equilibrium with surroundings.

      • Heat exchange occurs infinitesimally slowly (e.g., between objects with an infinitesimal temperature difference).

  • Equilibrium Condition:

    • Entropy is maximized dS=0 and no spontaneous changes occur:

Exercise: Bending an elastic sheet

  • Consider and elastic sheet that you do some work and bend slowly and to a good approximations reversibly hence ΔS=0 and this was adiabatic process so Q=0

  • When you release the shit it will rapidly snap back. No heat was exchanged with environment at that instant so the process is adiabatic Q=0 and no work was done so W=0, yet the process ir irreversible hence ΔS>0. Explain what happened.

Gibbs Relation#

  • The internal energy of a thermodynamic system can be expressed as a function of its extensive variables: entropy S, volume V, and number of particles N:

E=E(S,V,N).
  • Taking the total differential of E, we obtain:

dE=(ES)V,NdS+(EV)S,NdV+(EN)S,VdN.
  • We identify the intensive variables conjugate to the extensive variables:

  • Temperature T

    T=(ES)V,N
  • Pressure P

    P=(EV)S,N
  • Chemical potential μ

    μ=(EN)S,V

The first law of thermodynamics can then be written in its fundamental formm Texpressing how changes in entropy, volume, and particle number contribute to changes in energy.

Gibbs Relation

dE=TdSPdV+μdN.

Example: Fundamental equation of ideal gas

Consider an ideal gas in a container that is in a state of equilibrium and is therefore described by E(S,N,V) or S(E,N,V) fundamental equation.

  • Using the ideal gas relation PV=NkBT for monoatomic gas, derive an expression for entropy

Solution
dS=1TdE+PTdV
  • E=32NkBT and PV=NkBT for monoatomic gas

dS=3NkB2EdE+NkBVdV
S(E,V,N)=32NkBlogEN+NklogVN+const

Exercise: doubling of Volume

Consider the sudden Doubling of the volume of one mol of an ideal gas in a container.

  • Using information theoretical view of entropy, compute how much entropy of the system changes as a result of sudden doubling.

  • Using the expression for entropy, derive how much entropy of the system changes as a result of sudden doubling.

  • Is the adiabatic expansion of gas due to volume doubling reversible or irreversible?

  • Think about quasistatic path for this process

Gibbs Duhem relation#

  • The extensivity property implies linear scaling with respect to extensive variables. In other words, extensive variables are additive quantities.

E(λS,λV,λN)=λE(S,V,N)
  • Using chain rule we get a liner relationship between extensive variables not involving any differentials:

E(S,V,N)=E(λS,λV,λN)λ=(EλS)V,NS+(EλV)S,NV+(EλN)S,VN
  • When we take the derivative of E and compare with Gibbs relation we end up with equation where independent variables are now intensive ones

Euler Relation

E=TSPV+μN

Gibbs Duhem relation

SdTVdP+Ndμ=0

Entropy Maximization Principle#

  • When we release a constraint in an adiabatic system the extensive coordinates Xi change. This spontaneous change must always lead to increase in entropy ΔS0

  • Entropy can increase until reaching its maximum possible value after which no further change is possible.

  • A change in system entropy δS due to any change or pertrubation is therefore telling us that

    • If δS>0 system spontaneously evolves

    • If δS<0 system is thermodynamically stable (any change from maximum leads to decrease of entropy)

  • Therefore the second law gives us a variational principle in terms of entropy to find stable equilibrium states for an adiabatic systems.

Entropy Maximization Principle

  • The state of equilibrium is found via entropy maximization over variable constraints X=X1,X2,...

maxXS(E,X)X1eq,X2eq,...

Thermodynamic Stability and Concavity of Entropy#

  • Let us join two systems made of the same substances to make a single system. The entropy maximization principle tells us that the entropy of the resultant compound system is given by

S(E,X)=max[S(E1,X1)+S(E2,X2)]
  • Where the maximum is taken over all the partitions of E and X (collection of any work coordinates) between the two systems as E=E1+E2 and X=X1+X2

  • This implies with the aid of the extensivity S(αE,αX)=αS(E,X)

S(αE+(1α)E,αV+(1α)V)αS(E,V)+(1α)S(E,V)
  • for any α[0,1]. That is, S is a concave function (its graph is convex upward) of all the thermodynamic coordinates

../_images/concave_convex.png

Fig. 15 Entropy is a concave function of extensive variables.#

Thermodynamic stability and Heat Capacity#

  • The entropy function S(E,V,N) must be concave to ensure stability.

  • Mathematically, for equilibrium stability, the second derivative of entropy must satisfy:

(2SE2)V,N0
  • This inequality shows that equilibrium state is stable against any thermal fluctuations that deviate from equilibrium.

  • Taking second derivative of entropy and making use of the following equality:

1T=SE
(2SE2)V=1T2(TE)V.
  • Since heat capacity at constant volume is:

CV=(ET)V,
  • we obtain the stability condition:

CV=T2(2SE2)V>0
  • Implication: A positive heat capacity (CV>0) ensures local thermodynamic stability.

Spontaneous Change and Partitioning of Extensive Variables#

../_images/part1.png

Fig. 16 What way the system will parition energy, volume particles when the constraint separating flow of these variables is removed?#

  • A spontaneous process occurs when a system undergoes a transformation that maximizes entropy. In thermodynamic equilibrium, extensive variables (such as energy, volume, and particle number) partition between subsystems in a way that maximizes the total entropy.

  • Consider two subsystems, I and II, exchanging energy. Since the total energy is conserved we can write down total energy and entropy as:

    E=EI+EII
    Stot(E)=SI(EI)+SII(EEI)
  • At equilibrium, entropy is maximized by varying in this case the only free extensive coordinate EI, which determines energy partitioning:

    δStot(E)=SIEIδEISIIEIIδEI=0
    SIEI=SIIEII
  • We once again come to appreciate that derivative of entropy with respect to energy is related to temperature:

    1T=SE
    • We obtain the equilibrium condition showing that temperature imbalance drives energy distirbution until we reach equal temperatures throughout the system.

    TI=TII
  • In general system spontaneously evolves toward equilibrium by redistributing energy, volume, and particles:

In equilibrium intensive vairables are equal throughout the system

  • Temperature drives energy partitioning

TI=TII
  • Pressure drives volume partitioning

PI=PII
  • Chemical potential drives particle partitioning

μI=μII

Appendix#

Problems#

Problem 1 Fundamental equations#

The following ten equations are purported to be fundamental equations for various thermodynamic systems. Five, however, are inconsistent with the basic postulates of a fundamental equation and are thus unphysical. For each, plot the relationship between S and U and identify the unacceptable five. v0, θ, and R are all positive constants and, in the case of fractional exponents, the real positive root is to be implied.

  1.  S=(R2v0θ)1/3(NVU)1/3

  2. S=(Rθ2)1/3(NUV)2/3

  3. S=(Rθ)1/2(NU+RθV2v02)1/2

  4. S=(R2θv03)V3NU

  5. S=(R3v0θ2)1/5(N2U2V)

  6. S=NRln(UVN2Rθv0)

  7. S=(NRUθ)1/2exp(V22N2v02)

  8. S=(NRUθ)1/2exp(UVNRθv0)

  9. U=(NRθVv0)(1+SNR)exp(S/NR)

  10. U=(v0θR)S2Vexp(S/NR)

Problem 2: Expansion of gas into the vacuum#

  1. As a general case of gas expanding into the vacuum, use the Gibbs relation for E to show that (SV)E>0 this would show that free adiabatic expansion is accompanied by entropy increase and is hence and irreversible process.

  2. Now consider a gas in container energy described by the following equation E=3/2NkTN2V/a

    • Plot E as a function of V for a few temperatures.

    • Suppose that a gas expands adiabatically into a vacuum. How will the energy and entropy of the system change, and what is the work done by the gas?

    • Initially, the gas occupies a volume V1 at a temperature T1. The gas then expands adiabatically into a vacuum to occupy a total volume V2. What is the final temperature T2 of the gas?

Problem 3 Entropy of mixing two gases#

Using the expression for an ideal gas S=NkBlogVN, calculate the entropy change resulting after removing a divider separating NA molecules of gas A occupying Volume VA from NB molecules of gas B occupying volume VB.

Hints

  • The system overall is thermally insulated and pressure and temperatures are constant; hence, numbers and volumes are proportional NAVA so you can express entropy change entirely in terms of molar numbers or their fractions xA=NA/(NA+NB)

  • You need to first calculate the entropy change due to gas A expanding from volume VA to volume V=VA+VB and the same for gas B. the total entropy change will be the sum of these two changes.

Problem 4: Entropy of heating#

  1. 1 kg of water (specific heat = 4.2 kJ/(kg·K)) at 0oC is in contact with a 50oC heat bath, and eventually reaches 50oC. What is the entropy change of the water? What is the increase of the entropy of this water plus the heat bath?

  2. Imagine now that the water at 0oC is in contact with a 25oC heat bath. Then, after reaching thermal equilibrium, the water is subsequently put in contact with a 50oC heat bath until it reaches the final temperature 50oC. What is the increase of the entropy of the water after it has been put in contact with two heat baths? Compare the answer to the case of (1)

  3. Show that in the two-step heating process, whatever the first heat bath temperature T is between 0oC and 50oC, the total change of entropy of the water plus heat baths is less than the case of (1)