# How do the fundamental relation of thermodynamics and the 2nd law jive with each other?

I have never been able to figure out how these work together. The fundamental relation in terms of entropy is $$dS = \frac{1}{T}dU + \frac{P}{T}dV$$ And for an isolated system the second law gives $$dS\ge0$$ But for an isolated system $dU$ and $dV$ are both zero. It therefore seems that $dS$ must always equal zero for an isolated system? But this is of course nonsense.

Example. An isolated box is our system. In the box is an elevated platform and a ball sets on top of the platform. Eventually the ball rolls off the platform and comes to rest in a small recess in the bottom of the box. Clearly the entropy has increased in the box. However, from the external surroundings POV, the box has neither changed its volume nor transferred any heat to the surroundings; it's energy is therefore unchanged and its volume is unchanged. How can $dS\gt0$ with $dU=dV=0$?

The same question applies to the fundamental equation in terms of any of the thermodynamic potentials. The condition for a process to be spontaneous at constant $T$ and $P$ is that $\Delta G\lt0$, however, the fundamental equation is $$dG=-SdT+VdP$$How can $\Delta G=\int dG\lt0$ with $dP=dT=0$?

My only rationalization is that perhaps the fundamental relation only applies to a system that is already in internal equilibrium and concerns changes between two possible system macrostates that are already in internal equilibrium via external influence and does not apply to the change within a system on the approach to internal equilibrium? Is this correct?

• "An isolated box is our system." In your problem the box and ball are not isolated for they are influenced externally by the gravitational field. – hyportnex Apr 18 '18 at 18:23
• Suppose you have a adiabatic rigid compartment divided into two chambers with a partition, and a gas in each compartment having a different pressure and volume. This is your system. If you remove the partition, an irreversible process will occur, for which $\Delta U$ and $\Delta V$ are zero, but $\Delta S>0$. In the Eqn. dU=TdS-PdV, you are talking about the change between two closely neighboring thermodynamics states that differ from one another by a reversible path. – Chet Miller Apr 18 '18 at 18:55

The "fundamental relation" is only applicable to quasistatic processes, where the system is in some equilibrium state during the whole process. If that is so, then indeed entropy of a simple system (whose equilibrium state is determined by $U$ and $V$) does not change, if neither $U$ nor $V$ changes.

Entropy of an isolated system can increase only when some non-equilibrium process is taking place, such as sudden removal of a constraint (internal wall) or sudden chemical reaction is taking place. In such cases the fundamental relation is not applicable, the entropy may not even be defined during the process.

In the fundamental thermodynamic relation, you need to include all the macroscopic parameters and the associated generalized forces. The general relation is:

$$dU = T dS - \sum_{j}X_j dx_j + \sum_{r}\mu_r dN_r$$

where $X_j$ is the generalized force associated with external parameter $x_j$, and the $\mu_r$ are the chemical potentials associated with the particle numbers $N_r$. The pressure is the generalized force conjugate to the volume of the system. If you only include this term in the fundamental thermodynamic relation, then you are declaring that the system doesn't have any other external parameters that are needed to give an adequate macroscopic description of the system, which is false in case of ball inside the box.

If there is a ball inside the box, then it's position is a parameter that must be included. But then the next question is how to proceed when all the relevant parameters are included. While the thermodynamic variables in it refer to equilibrium conditions, the changes do not need to be the result of slow quasi-static changes during which internal equilibrium is maintained.

What matters is that the system was in equilibrium before the change and after the change of the parameters. Thermodynamic state variables will then have well defined values, the change from going from one to the other is therefore also well defined. So, whether or not the change happened due to a slow quasi-static process or a rapid non-equilibrium process, doesn't matter.

In case of changes in the Gibbs energy, exactly the same logic applies. Take e.g. mixing salt with water. You then need to include the particles numbers for the number of salt ions that are dissolved in water than the numbers for the numbers in the solid state. If you describe the system with only the temperature and the pressure, you are leaving out the relevant macroscopic parameter that describes the change in the system.