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
.Intensive variables: Size Independent These are derived from the extensive ones and are considered as conjugate pairs. E.g
, and , 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.
Exercise: Extensivity of Energy
For volume, it may be straightforward to explain why it is extensive. But why is Energy an extensive quantity
for a system with N interacting particles?Does extensivity of energy always hold? think of two molecules, ten, thousands, Avogadro number?
Solution
The additivity of energy can hold if we assume pairwise interactions between particles with interacting potential decaying with distance faster than the
in 3D. Meaning that surface interactions become negligible. For instance, if we divide the glass of wat er into two parts, the total energy, to a good approximation, is a sum of two halves. But notice that if we have microscopic quantities, like handfuls of molecules, this is no longer true
Equilibrium and thermodynamic space#

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
where 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
are called state functions, and their changes are given by differences between initial or final state only .On the other hand one can have quantities such as work
or heat . 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
as a function of in thermodynamics of all of the extensive variables … 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
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
and are inexact differentials. This means that work done to go from A to B will depend on a path from A to BdE 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
then . You can see work is going to be negative for expanding volume and positive for contractingIf system is absorbing heat from environment (heating up)
. If the system is refridgerating then
Adiabatic Change
No work
Adiabatic Processes#

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:
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.

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.#

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
, which remains constant along each adiabatic surface and increases with energy across different adiabats.Since entropy is a monotonic increasing function of energy
, it follows that Planck’s formulation implies:
Second Law for Adiabatic Processes
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.
Here, we identify the prefactor as the temperature, which we will soon rediscover in statistical mechanics.
Since mechanical manipulation alone does not move the system between adiabats, this implies that entropy can only be reduced by cooling (
).
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.
The reservoir the entropy change is solely due to heat exchange
Second Law of Thermodynamics
Understanding the Signs#
Irreversibility and Entropy Production
The inequality
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
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
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
and this was adiabatic process soWhen you release the shit it will rapidly snap back. No heat was exchanged with environment at that instant so the process is adiabatic
and no work was done so , yet the process ir irreversible hence . Explain what happened.
Gibbs Relation#
The internal energy of a thermodynamic system can be expressed as a function of its extensive variables: entropy
, volume , and number of particles :
Taking the total differential of
, we obtain:
We identify the intensive variables conjugate to the extensive variables:
Temperature
Pressure
Chemical potential
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
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
Using the ideal gas relation
for monoatomic gas, derive an expression for entropy
Solution
and for monoatomic gas
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.
Using chain rule we get a liner relationship between extensive variables not involving any differentials:
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
Gibbs Duhem relation
Entropy Maximization Principle#
When we release a constraint in an adiabatic system the extensive coordinates
change. This spontaneous change must always lead to increase in entropyEntropy can increase until reaching its maximum possible value after which no further change is possible.
A change in system entropy
due to any change or pertrubation is therefore telling us thatIf
system spontaneously evolvesIf
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
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
Where the maximum is taken over all the partitions of
and (collection of any work coordinates) between the two systems as andThis implies with the aid of the extensivity
for any
. That is, S is a concave function (its graph is convex upward) of all the thermodynamic coordinates

Fig. 15 Entropy is a concave function of extensive variables.#
Energy Minimization Principle
Entropy maximimization principle states that at equilibrium values of thermodynamic coordinates
entropy is maximized so any deviation in coordinates leads to smaller entropy:
Given that entropy is an increasing function of energy we can boost the energy to
in the second term to get an equality
This implies that under the constant entropy condition, if an extra constraint to fix
is removed the system goes from higher to lower .Thus we have Energy Minimization Principle: internal energy is minimized under a constant entropy condition, the system must be in equilibrium.
Thermodynamic stability and Heat Capacity#
The entropy function
must be concave to ensure stability.Mathematically, for equilibrium stability, the second derivative of entropy must satisfy:
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:
Since heat capacity at constant volume is:
we obtain the stability condition:
Implication: A positive heat capacity (
) ensures local thermodynamic stability.
Spontaneous Change and Partitioning of Extensive Variables#

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,
and , exchanging energy. Since the total energy is conserved we can write down total energy and entropy as:At equilibrium, entropy is maximized by varying in this case the only free extensive coordinate
, which determines energy partitioning:We once again come to appreciate that derivative of entropy with respect to energy is related to temperature:
We obtain the equilibrium condition showing that temperature imbalance drives energy distirbution until we reach equal temperatures throughout the system.
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
Pressure drives volume partitioning
Chemical potential drives particle partitioning
Example: find final energy partitioning
The fundamental equations for two systems
The total energy is
The volume and mole number of system
are and mol respectively.The volume and mole number for system
are and mol respectively.
Plot the total entropy
as function of energy distribution between two systemsIf we enable heat flow between systems A and B a new equilibrium state would be established. What would
and be like in this new equilibrium state?
Solution
we know
Plugging in
If we enable heat flow we have to seek maximum of
which will give us value of energy that is partitioned between system A and B
Appendix#
Entropy and Efficiency of Heat Engines
Consider a heat engine that absorbs heat
from a hot reservoir, performs work , and rejects heat to a cold reservoir.The total energy of the system (engine + reservoirs) is conserved. Using the first law of thermodynamics, we express this as:
Since the engine does work on the surroundings, it loses energy, meaning
is considered and negative from the system’s perspective. To express work as a positive quantity:
The efficiency of the engine, defined as the fraction of input heat converted into useful work, is:
The second law of thermodynamics states that total entropy must increase or remain constant:
Since entropy is a state function, we write:
This inequality shows that an irreversible engine dissipates more heat to the cold reservoir, leading to lower work output.
Substituting this result into the efficiency expression:
yields the fundamental upper bound on efficiency:
This result represents the Carnot efficiency, which is the maximum possible efficiency for any heat engine operating between two reservoirs at temperatures
and .
Practical symmary of thermodynamic principles
1.Thermodynamic variables are either extensive or intensive. The total amount of an extensive quantity of a compound system is the sum of the extensive quantities of the subsystems (additivity)
There is a state called an equilibrium state. which is described in terms of extensive thermodynamic coordinates (
, , ), where is the internal energy and are coordinates in thermodynamic space.The conservation of energy:
where the variables appear in intensive-extenisve “conjugate pairs” likeThe thermodynamic space is foliated into
(hyper) surfaces. For adiabatic process with work only, never happens; to reduce entropy we definitely need cooling.A reverisble heat transfer increases entropy of system by
amount.Thermodynamics calculations proceed by defining a quasistatic process for which Gibbs relation holds:
often it is convenient to write
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
Problem 2: Expansion of gas into the vacuum#
As a general case of gas expanding into the vacuum, use the Gibbs relation for
to show that this would show that free adiabatic expansion is accompanied by entropy increase and is hence and irreversible process.Now consider a gas in container energy described by the following equation
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
at a temperature . The gas then expands adiabatically into a vacuum to occupy a total volume . What is the final temperature of the gas?
Problem 3 Entropy of mixing two gases#
Using the expression for an ideal gas
Hints
The system overall is thermally insulated and pressure and temperatures are constant; hence, numbers and volumes are proportional
so you can express entropy change entirely in terms of molar numbers or their fractionsYou need to first calculate the entropy change due to gas A expanding from volume
to volume and the same for gas B. the total entropy change will be the sum of these two changes.
Problem 4: Entropy of heating#
1 kg of water (specific heat = 4.2 kJ/(kg·K)) at
is in contact with a heat bath, and eventually reaches . What is the entropy change of the water? What is the increase of the entropy of this water plus the heat bath?Imagine now that the water at
is in contact with a heat bath. Then, after reaching thermal equilibrium, the water is subsequently put in contact with a heat bath until it reaches the final temperature . 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)Show that in the two-step heating process, whatever the first heat bath temperature T is between
and , the total change of entropy of the water plus heat baths is less than the case of (1)