Course-wide Conventions & Notation
Overview and Learning Objectives¶
If you heat a gas in a sealed rigid container versus a piston open to the atmosphere, the temperature changes will differ—even for the same amount of heat. Why? The answer lies in how constraints (constant vs. constant ) redirect energy between heat and work. This section develops a systematic workflow for applying the First Law under different process constraints, then illustrates it with common ideal-gas cases and a microscopic interpretation.
We begin by clarifying the definitions of quasi-static, reversible, and irreversible processes. We then outline a step-by-step method for using the First Law under different constraints, derive results for isochoric, isothermal, and adiabatic ideal-gas processes, and end with a microscopic interpretation that connects probability distributions of microstates with heat and work.
Learning objectives:
Differentiate quasi-static, reversible, and irreversible processes and explain why reversibility is an idealization.
Explain why reversible expansion produces the maximum work for a given volume change (and reversible compression requires the minimum work).
Rewrite the First Law in terms of chosen independent variables and apply constraints (isothermal, isochoric, isobaric, adiabatic).
Integrate work and heat for common ideal-gas processes and relate results to state-variable changes.
Interpret microscopic changes in and as heat and work contributions to .
Core Ideas and Derivations¶
Thermodynamic Processes¶
- Quasi-static process
- A process carried out infinitesimally slowly so that the system remains nearly in equilibrium at all times. Each intermediate state is well-defined thermodynamically.
- Reversible process
- An idealized process that is (1) quasi-static and (2) free of dissipative effects, meaning it can be reversed with no net change to the system or surroundings.
- Irreversible process
- Any process that violates one or more of the conditions for reversibility (e.g., too rapid, frictional, or dissipative).
- Dissipative effects
- Processes that convert ordered energy into disordered (thermal) energy in a way that cannot be undone spontaneously. Common examples include friction, viscous drag, turbulence, electrical resistance, and heat flow across a finite temperature difference.
How to Apply the First Law of Thermodynamics¶
The First Law states (Section 3.1, Eq. (5)):
where is the change in internal energy, is the heat added to the system, and is the work done on the system. To make this law useful for specific processes, follow the five-step workflow below.
Workflow overview: (1) Choose independent variables → (2) Rewrite the First Law → (3) Apply constraints → (4) Define the system/EOS → (5) Integrate. Click each step for details.
Step 1. Choose Two Independent Variables
For a single-component, single-phase system, specifying two independent variables (plus the amount of substance) completely determines the thermodynamic state.
Convenience: Which variables are easiest to control with your experimental setup?
Necessity: Which variables can you reliably measure or keep constant?
Curiosity: Which variables are most relevant to the phenomenon you wish to explore?
Common choices include for gases in rigid containers and for processes open to the atmosphere.
Step 2. Rewrite the First Law in Terms of Your Chosen Variables
Start from . For -only work, , so
Now expand as a total differential in your chosen variables. For example, with and :
which gives
Note that this expression for has three contributions: the response of to temperature, the response of to volume, and the work term. This is not just the total differential of —the work term matters.
Step 3. Apply Constraints
Constant state variables:
Isobaric (), Isochoric (), Isothermal ().
Adiabatic:
If the boundary is thermally insulating, .
“Adiabatic” means no heat transfer, but the system may still perform or receive work.
Applying a constraint eliminates one or more terms from your Step 2 expression, often making the resulting differential equation separable and integrable.
Step 4. Define the System (Equation of State)
Specify an equation of state if known (e.g., for an ideal gas, or the van der Waals EOS from Section 1.4).
Use the equation of state to evaluate partial derivatives—e.g., for an ideal gas—that appear in your expression for .
This step is where the physics of the system enters: different substances yield different results for the same constraint.
Step 5. Integrate the First Law
Integrate the differential relationships to link total heat () or work () to finite changes in state variables.
For reversible processes, the integration path in state space is well-defined.
For irreversible processes, compute from state variables (it’s path-independent) and use the First Law to relate and .
Applying the Workflow: and as Independent Variables¶
For many systems—especially gases—choosing and as independent variables simplifies calculations. Let us walk through the five-step workflow for a monatomic ideal gas.
Step 1–2: First Law in Terms of and ¶
Starting from
we rewrite as a total differential in and :
Substituting:
Step 4: Ideal-Gas Simplification¶
For an ideal gas, depends only on (there are no intermolecular interactions to make depend on ), so . For a monatomic ideal gas specifically,
Equation (7) then simplifies to
Step 3: Process Constraints¶
Applying these constraints to Equation (9):
Table 1:Processes for an Ideal Gas ( and as Independents)
Constraint | Condition | Resulting |
|---|---|---|
Isochoric | ||
Isothermal | ||
Adiabatic |
Step 5: Integrations Under Specific Constraints¶
Isochoric ()
With no volume change, there is no work (). All energy enters as heat:
Since , we also have .
Isothermal ()
For an ideal gas, (because depends only on ). The system absorbs heat to offset the work it does:
And .
Adiabatic ()
Setting in Equation (9):
Separating variables:
Integrating both sides:
Dividing through by :
Exponentiating:
which, combined with , also gives . We will use these relations when we compare isothermal and adiabatic processes below.
Comparing Isothermal and Adiabatic Expansions¶
How does the path affect the work? The – diagram below compares a reversible isothermal expansion with a reversible adiabatic expansion from the same initial state. The shaded areas represent for each process.
Source
import numpy as np
import matplotlib.pyplot as plt
# Parameters
n = 1.0 # mol
R = 8.314 # J/(mol K)
T1 = 300 # K
V1 = 5.0e-3 # m^3 (5 L)
V2 = 20.0e-3 # m^3 (20 L)
gamma = 5/3 # monatomic ideal gas
P1 = n * R * T1 / V1 # initial pressure
# Volume array
V = np.linspace(V1, V2, 500)
V_L = V * 1e3 # convert to liters for plotting
# Isothermal: P = nRT/V
P_iso = n * R * T1 / V
# Adiabatic: P V^gamma = P1 V1^gamma => P = P1 (V1/V)^gamma
P_adi = P1 * (V1 / V)**gamma
# Convert pressures to bar for plotting
P_iso_bar = P_iso / 1e5
P_adi_bar = P_adi / 1e5
P1_bar = P1 / 1e5
fig, ax = plt.subplots(figsize=(6, 4))
# Shaded areas
ax.fill_between(V_L, 0, P_iso_bar, alpha=0.15, color='C0', label=r'$|w_{\mathrm{iso}}|$')
ax.fill_between(V_L, 0, P_adi_bar, alpha=0.15, color='C3', label=r'$|w_{\mathrm{adi}}|$')
# Curves
ax.plot(V_L, P_iso_bar, 'C0-', lw=2.5, label=f'Isothermal ($T = {T1}$ K)')
ax.plot(V_L, P_adi_bar, 'C3-', lw=2.5, label=f'Adiabatic ($\\gamma = 5/3$)')
# Initial state marker
ax.plot(V1 * 1e3, P1_bar, 'ko', ms=7, zorder=5)
ax.annotate(' initial state', xy=(V1 * 1e3, P1_bar), fontsize=10, va='center')
# Compute numerical work values for annotation
w_iso = -n * R * T1 * np.log(V2 / V1) # J
w_adi = (P1 * V1**gamma / (1 - gamma)) * (V2**(1 - gamma) - V1**(1 - gamma)) # J
ax.set_xlabel('Volume (L)', fontsize=11)
ax.set_ylabel('Pressure (bar)', fontsize=11)
ax.set_xlim(4, 22)
ax.set_ylim(0, P1_bar * 1.15)
ax.legend(loc='upper right', fontsize=10, framealpha=0.9)
ax.set_title('Isothermal vs. Adiabatic Expansion from the Same Initial State', fontsize=11)
# Add work annotations
ax.text(14, 1.8, f'$w_{{\\mathrm{{iso}}}} = {w_iso/1e3:.2f}$ kJ', fontsize=10, color='C0',
bbox=dict(boxstyle='round,pad=0.3', fc='white', ec='C0', alpha=0.8))
ax.text(14, 0.8, f'$w_{{\\mathrm{{adi}}}} = {w_adi/1e3:.2f}$ kJ', fontsize=10, color='C3',
bbox=dict(boxstyle='round,pad=0.3', fc='white', ec='C3', alpha=0.8))
plt.tight_layout()
plt.show()
plt.close(fig)
Comparison of reversible isothermal and adiabatic expansions of one mole of a monatomic ideal gas from to . The isothermal curve lies above the adiabatic curve at every point, so the area under it is larger: isothermal expansion does more work on the surroundings.
Why the difference? During isothermal expansion, heat flows into the gas to maintain a constant temperature, keeping the pressure higher. During adiabatic expansion (), the gas cools as it does work (Eq. (16)), so the pressure drops more steeply. The isothermal path therefore pushes against a higher pressure at every volume increment, producing more work.
Microscopic Interpretation of the First Law¶
As developed in Section 2.1, macroscopic thermodynamic properties are ensemble averages over microstates. This perspective gives a powerful physical picture of heat and work at the molecular level.
From a statistical mechanics perspective, the internal energy is
where is the probability of occupying the -th microstate with energy , and is the total number of accessible microstates. The total differential can be written as
For a closed system (constant ) with only work, the microstate energies depend on volume. Noting that
we identify pressure as
Hence,
Comparing term by term with , we identify:
The figure below illustrates these two mechanisms. Reading left to right: the initial state, the result of adding heat (probabilities shift; energy levels unchanged), and the result of doing work via compression (energy levels shift; probabilities unchanged).
Source
import numpy as np
import matplotlib.pyplot as plt
N_microstates = 5
E_microstates = np.array([0, 1, 2, 3, 4])
P_microstates = np.array([0.5, 0.3, 0.1, 0.05, 0.05])
P_microstates /= P_microstates.sum()
fig, axs = plt.subplots(1, 3, figsize=(13, 4.5), constrained_layout=True, sharex=True)
# --- Panel 0 (left): Initial state ---
axs[0].set_title('Initial State', fontsize=11, fontweight='bold')
for i in range(N_microstates):
axs[0].plot([0, 1], [E_microstates[i], E_microstates[i]], color='C0', alpha=0.5, lw=1.5)
axs[0].fill_betweenx(
[E_microstates[i], E_microstates[i] + 0.15], 0, P_microstates[i],
color='C1', alpha=0.5
)
axs[0].text(
P_microstates[i] + 0.02, E_microstates[i] + 0.07,
f'$p_{i+1}={P_microstates[i]:.2f}$', fontsize=9, ha='left'
)
axs[0].set_xlabel('Probability')
axs[0].set_ylabel('Energy')
axs[0].set_xlim(0, 0.75)
axs[0].set_ylim(-0.5, 9)
# --- Panel 1 (middle): After heating ---
axs[1].set_title('After Heating ($\\delta q > 0$)\n$\\{p_i\\}$ change; $\\{E_i\\}$ fixed',
fontsize=11, fontweight='bold')
P_heated = np.array([0.35, 0.25, 0.18, 0.12, 0.10])
P_heated /= P_heated.sum()
for i in range(N_microstates):
axs[1].plot([0, 1], [E_microstates[i], E_microstates[i]], color='C0', alpha=0.5, lw=1.5)
axs[1].fill_betweenx(
[E_microstates[i], E_microstates[i] + 0.15], 0, P_heated[i],
color='C3', alpha=0.5
)
axs[1].text(
P_heated[i] + 0.02, E_microstates[i] + 0.07,
f'$p_{i+1}={P_heated[i]:.2f}$', fontsize=9, ha='left'
)
axs[1].set_xlabel('Probability')
axs[1].set_xlim(0, 0.75)
axs[1].set_ylim(-0.5, 9)
# --- Panel 2 (right): After compression ---
axs[2].set_title('After Compression ($\\delta w > 0$)\n$\\{E_i\\}$ change; $\\{p_i\\}$ fixed',
fontsize=11, fontweight='bold')
E_compressed = np.array([0, 2, 4, 6, 8])
for i in range(N_microstates):
axs[2].plot([0, 1], [E_compressed[i], E_compressed[i]], color='C0', alpha=0.5, lw=1.5)
axs[2].fill_betweenx(
[E_compressed[i], E_compressed[i] + 0.15], 0, P_microstates[i],
color='C4', alpha=0.5
)
axs[2].text(
P_microstates[i] + 0.02, E_compressed[i] + 0.07,
f'$p_{i+1}={P_microstates[i]:.2f}$', fontsize=9, ha='left'
)
axs[2].set_xlabel('Probability')
axs[2].set_xlim(0, 0.75)
axs[2].set_ylim(-0.5, 9)
plt.show()
plt.close(fig)
Schematic of microstate energies (vertical axis) and occupation probabilities (horizontal bars). Left: initial state. Middle: after heating—the energy levels are unchanged, but the distribution shifts toward higher-energy states (). Right: after compression—the probabilities are unchanged, but every energy level shifts upward ().
Worked Example¶
Isothermal reversible expansion of an ideal gas¶
One mole of an ideal gas expands reversibly and isothermally at from to . Compute , , and .
Assumptions. Ideal gas, reversible process, isothermal; for an ideal gas .
Work
For a reversible process, at every step:
With , , , and :
Internal energy
Heat from the First Law
Result. , , and . The gas does work on the surroundings, and an equal amount of heat flows in from the thermal reservoir to maintain the temperature.
Concept Checks¶
Why is reversibility useful even when real processes are irreversible?
What distinguishes an isothermal process from an adiabatic process in terms of energy transfer mechanisms?
For an ideal gas, why does ?
In the microscopic expression , which term corresponds to heat and which to work (under the stated conditions)?
An isothermal expansion and an adiabatic expansion start from the same initial state and end at the same final volume. Which produces more work? Which produces a larger temperature change?
Key Takeaways¶
Reversible processes serve as idealized benchmarks: reversible expansion maximizes work output; reversible compression minimizes work input.
Choosing independent variables and constraints turns the First Law into solvable differential relations.
Ideal-gas isothermal expansion has and .
Adiabatic constraints set and force to change when work is done; the relation governs the temperature–volume coupling.
On a – diagram, work equals the area under the curve. Different paths between the same endpoints yield different areas—a visual proof that work is path-dependent.
Microscopically, heat changes the probability distribution over fixed energy levels, while work shifts the energy levels themselves.