For example, you are designing a system to pump some fluid up a hill. You want to make sure that the fluid is in a liquid state, not a two-phase or a vapor state because that would make it much more difficult to pump. Consider a fluid of independent components and coexisting phases. It is sufficient to specify a quantity for each component and the temperature and pressure in each phase. This gives us variables, one of which is extensive and of which are intensive, for each phase.
Thermal equilibrium requires that is the same in each phase.
Mechanical equilibrium requires that is the same in each phase. Chemical equilibrium means that the chemical potential of each component must have the same value in each phase. Let's subtract out the extensive variable for each phase, say , so that there are a total of variables to specify. The laws of thermodynamics. Each of the three laws of thermodynamics give rise to a certain function.