Professional Documents
Culture Documents
16.3 Announcements
• Simulation project due November 7
Here, E0 (rN ) and E1 (rN ) refer to the two reference states, and the value of λ interpolates the
system potential energy function between that of E0 for λ = 0 and E1 for λ = 1. We can now write
the derivative of the Helmholtz free energy with respect to λ as follows:
1
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
∂F (λ) ∂
= −kB T ln Z(λ) (16.3)
∂λ ∂λ
kB T ∂Z(λ)
=− (16.4)
Z(λ) ∂λ
Z
kB T ∂
drN exp −βEλ (rN )
=− (16.5)
Z(λ) ∂λ
R N
dr ∂Eλ (rN )/∂λ exp −βEλ (rN )
= (16.6)
Z(λ)
N
∂Eλ (r )
= (16.7)
∂λ λ
This expression shows that we can relate the change in the free energy of the system with respect
to the coupling parameter to an ensemble average of that derivative sampled from an ensemble at a
particular value of λ, as indicated by the subscript in the angular brackets. We can then calculate
the complete free energy difference between system 0 and 1 by:
λ=1
∂Eλ (rN )
Z
F (λ = 1) − F (λ = 0) = dλ (16.8)
λ=0 ∂λ λ
This final integral is why the technique is called thermodynamic integration. In practice, this
integral is evaluated by choosing several discrete values of λ, sampling particle configurations ac-
cording to the potential energy function Eλ , and for each sampled configuration calculating the
energy using Eλ±dλ where dλ is some small interval. The derivative is approximated from a finite
difference between these three values and used to calculate the ensemble average. The integral is
then evaluated by quadrature. This approach does not necessarily require a linear coupling param-
eter, although in practice this is a simple method that is commonly used. It should be noted that
the coupling parameter approach, and the division of the thermodynamic integral into multiple
discrete values of λ, can also be used with free energy perturbation to improve convergence.
Given the similarities to free energy perturbation, thermodynamic integration is often used for
similar systems. It has been used extensively in calculating the phase behavior of self-assembled
mixtures, in part because thermodynamic integration can be used to calculate the free energy
between two phases that differ in their thermodynamic properties, such as temperature, via appro-
priate selection of a coupling parameter (as opposed to biasing their potential energies).
2
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
only scratching the surface of molecular simulations - other topics of interest include methods for
maintaining a constant pressure in simulation, methods for sampling systems in the grand canonical
ensemble, alternative free energy calculations that do not rely on predefined reaction coordinates,
etc. The Frenkel and Smit textbook does continue with several of these topics if you wish to pursue
them on your own.
3
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
W = f ∆x (16.9)
dW = f dx (16.10)
Z x2
W = f dx (16.11)
x1
In its most general form, the product of the force and displacement would be a vector product
between a force vector f~ and a vector displacement; we drop this notation for simplicity.
As in statistical mechanics, we will define the sign convention such that the work is positive
if work is done on the system by the environment. In general, for all work interactions, the work
4
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
done on a system by the environment is equal to the work done on the environment by the system;
this is a consequence of Newton’s 3rd law and reflects the conservation of energy.
Next, we will define an adiabatic work interaction as an interaction between two closed
systems that does not involve a transfer of heat to the environment. Since we have not yet formally
defined heat, we can define adiabatic work interactions in terms of an observable experiment -
namely, adiabatic work interactions can be performed by the rise and fall of weights in an external
gravitational field connected by a frictionless pulley, which we know to be a system described
entirely by the work due to gravity. Examples of adiabatic work interactions include compressing
a gas with a piston on a frictionless surface, which could be accomplished by raising or lowering a
weight attached to the piston, or resistively heating a liquid by doing electrical work, which could
be accomplished by tying a rope attached to a weight around a motor and using the motor to send
current through a resistor that is inserted in a fluid. In each case, the gas/liquid container is a
closed system on which work is done.
With these definitions, let us now consider the meaning of Postulate 3. The postulate states
that while it may not always be possible to go from state (1) to state (2) solely via adiabatic work
interactions - i.e., via an adiabatic process - it will always be possible to either go from state (1) to
(2) via an adiabatic process or from state (2) to (1) by an adiabatic process. For example, consider
a gas in state (1) specified by P1 , T1 and state (2) specified by P2 , T2 . Suppose that the gas is in a
closed system with a piston that controls the system volume. If the gas is expanded adiabatically,
the pressure drops from P1 → P2 and we would observe that the temperature changes (this is due
to the relationship between energy and temperature for an ideal gas) To obtain a temperature T2 ,
we could add an electric generator to the system that is powered by a weight; assuming frictionless
wires, this allows us to heat the system to temperature T2 with the piston fixed such that the
pressure is maintained at P2 . This is thus a multistep adiabatic process from state (1) to (2) since
the walls and each step is adiabatic. Moreover, the inverse process is not possible, since we cannot
cool the system adiabatically by returning heat to the electric generator.
5
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
Since an adiabatic process is possible between any two states, Postulate 3 then defines the
internal energy of the system, U , as a derived parameter (i.e. one that is not directly mea-
surable) equal to the work done during an adiabatic process, since the adiabatic work is only a
function of the end states:
U 2 − U 1 = W 1→2,adiabatic (16.12)
Technically, this expression defines the change in the total energy of the system, including
the kinetic energy associated with center-of-mass motion in a system, potential energy associated
with body forces (i.e. gravity), and the internal energy associated with molecular motions (i.e.
translational degrees of freedom, vibrations, rotations), intramolecular effects (electron spin), and
intermolecular interactions. We will ignore the first two effects and treat the total energy as the
internal energy due to usage of this nomenclature throughout our study of statistical mechanics.
So, in total, Postulate 3 defines the internal energy as a derived parameter that is a function of
the states of two stable equilibrium systems. We refer to such a parameter as a state function.
Note that only changes in energy are meaningful; we could assign an energy to each state, but only
the energy change will matter.
While Postulate 3 states that two states can be connected by an adiabatic process, in principle
we can define any process, adiabatic or non-adiabatic, between the two states and the change in
total energy will be unchanged (since it is uniquely defined as the work done along the adiabatic
path). This observation leads to our definition of heat: heat is the difference in the total energy
change during a particular process and the actual work performed. We can write this as:
δQ = (U 2 − U 1 ) − δW (16.13)
= W adiabatic − W non-adiabatic (16.14)
∆U = δQ + δW (16.15)
This relation is referred to as the first law of thermodynamics - the change in the energy
of a system is always the sum of the heat (which is positive if heat is added to the system) and
the work (which is positive if work is done on the system by the surroundings) during a process.
Here we use the symbol δ to indicate that the associated parameter is path-dependent; while
the energy change is a fixed function of the initial and final state, the amount of heat and work
transferred depends on the path between the two states. Note that we will use the phrase “transfer
heat” but this just means that energy is transferred via a heat interaction - there is no heat that is
intrinsic to a state that is transferred. For a system to undergo a heat interaction, there must be
at least one non-adiabatic or diathermal wall, but having a diathermal wall does not imply that a
system will necessarily undergo a heat interaction.
Postulate 4: If the sets of systems A, B and A, C each have no heat interaction when connected
across nonadiabatic walls, then there will be no heat interaction if systems B and C are also so
connected.
This postulate effectively defines the concept of thermal equilibrium - systems connected across
non-adiabatic walls that do not have a heat interaction are at thermal equilibrium, and thus any
two systems that are connected to a third system that all experience no heat flow must have the
same temperature (which we have not strictly defined; suffice to say it is the quantity that its
equivalent for systems for which there is no heat transfer). This postulate also then requires a
definition of the temperature as an intensive parameter that is equivalent for systems that undergo
no heat interaction.
6
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
Using this postulate, we can now understand the directionality of heat transfer. Assume we
have 3 systems, labeled A, B, C, with A connected to B and B connected to C as defined in the
postulate. We will assume that the temperature of A, TA , is greater than TB , and heat interactions
are defined such that QA→B > 0 and QB→C > 0. Since heat can flow from A → B and from
B → C, this also then implies that there is a heat interaction between A and C. We will show that
this requires TC < TB .
If TB equals TC , there is no heat interaction between B and C, which contradicts the system
description. If we were to allow the systems to interact such that QA→B = QB→C and TB is fixed,
then there would be a heat interaction between A and C; but if TC > TB we could choose TA = TC ,
in which case there would be no heat interaction. Thus, TC < TB < TA is established by the flow
of heat in this system.
We have now shown that heat transfers from a high temperature system to a low temperature
system. Moreover, we can state that an increase in energy increases the temperature of the system
- that is, dU/dT > 0. This is by convention, but also follows from Postulate 2. If we had a system
where heat transferred from a low-temperature system to a high-temperature system, and a decrease
in energy decreases the temperature of the system, then heat flow would continue indefinitely and
Postulate 2 could not be satisfied. This result will lead into the discussion of the Second Law of
Thermodynamics in the next lecture.
So, to summarize the implications of our postulates:
• Postulate 1: Thermodynamic systems are in stable equilibrium states that can be completely
characterized by two independent variables.
• Postulate 2: Systems evolve toward a single stable equilibrium state in response to a change
in the system (i.e. removal of restraints).
• Postulate 3: Any two equilibrium states are connected by at least one adiabatic process which
uniquely determines the change in energy between these two states.
• Postulate 4: Any two systems connected by diathermal walls that are in thermal equilibrium
with a third system are in thermal equilibrium with each other.
7
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
application of the First Law of the Thermodynamics to an open system that is able to exchange
energy and particles with the surroundings. First, we can recall the First Law for a closed system:
∆U = δQ + δW (16.16)
dU = dQ + dW (16.17)
The second line is the differential form of the first law for a closed system; note that we should
be careful to distinguish between the differential work and differential heat, both of which are
dependent on the exact process under study (for example, dQ = 0 for any adiabatic process), while
dU is dependent only on the two states connected by the process of interest. Recall that the First
Law emerged from the definition of Postulate 3, where we defined the change in energy between
two states as the work done along an adiabatic path.
Now let us consider an open system, such that some number of molecules can traverse the
walls of the system. The system is enclosed by a surface that we will call the σ-surface, which is
movable and diathermal so that there can be work and heat interactions. Part of the surface is
also permeable. In a time δt we will assume that a number of molecules δNin are pushed into the
system by an external piston, with an intensive energy of Uin associated with each molecule (i.e.
due to internal energy modes, such as translation or vibration). We will define the system as the
region bounded by the σ-surface and the number of molecules δNin added during this time interval.
The external pressure that forces the material into the system is Pin and the intensive volume per
molecule is Vin , which together means work equal to Pin Vin δNin is done on the system to add the
material to the volume bounded by the σ-surface. There can also be additional work and heat
interactions with the system during this time interval given by δW σ and δQσ . Since our definition
of the system includes a simple open system and the added material, the composite system is now
closed and we can apply the First Law:
Here, we define U 2 as the energy of the gas within the region bounded by the σ surface at
the end of the process, including the new gas that has been pumped in. U 1 is the energy of the
gas enclosed within the region bounded by the σ surface at the start of the process, while Uin δNin
is the energy of the incoming gas. This expression leads to the definition of a new quantity, the
enthalpy, as:
8
University of Wisconsin-Madison Lecture 16
CBE 710, Fall 2019 - Prof. R. C. Van Lehn October 29, 2019
Hin is the intensive enthalpy associated with the gas being pumped in. Note that the sign on
Pin Vin δNin is positive because we are adding energy to the system. This expression then effectively
says that the First Law for an open system is adjusted to account for the enthalpy change associ-
ated with the change in the components of the system. We can generalize this result to multiple
components that can simultaneously enter and leave the system and write it in differential form
(we will not derive this, but it is straightforward to do so):
X X
dU = dQ + dW + Hin dNin − Hout dNout (16.22)
in out
This is the generalized, differential form of the first law for a multicomponent open system.