[MUSIC] Right behind me you can see the exhaust from the chimney from the boiler that is generating heat for these buildings that are around us. As an engineer, one might ask many questions about this boiler. How do we go about designing this boiler? What is the temperature at which this boiler should operate at? What should be the temperature of the exhaust coming out? What should be the working substance, should we change it? Now these are some of the questions that can be answered through the laws of classical thermodynamics. In the video we will learn about classical thermodynamics. By the end of this module, you should be able to state and use the first two laws of thermodynamics. And develop thermodynamic driving forces that arise from the second law of thermodynamics. And slowly start developing the concept of thermodynamic ensembles. The laws of classical thermodynamics allows us to understand the interplay between heat and work in large scale devices. There are three main laws of thermodynamics. The first law of thermodynamics, also known as the conservation of energy principle, provides the basis for studying the relationships between the various forms of energy and energy interactions. The law states that all though energy can assume many forms, the total quantity of energy is constant, that is, when energy disappears in one form, it simultaneously appears in another form. Now, the energy of the system is measured by its internal energy, U. And it's defined as the sum of the kinetic and potential energies of all the molecules present in a macroscopic material. Now note that the internal energy is an extensive quantity. Meaning that the internal energy depends linearly on the size of the system. That is if you double the size of the system, the internal energy doubles. Now, this is an important distinction for thermodynamic quantities that is being extensive or intensive. Now, according to the first law of thermodynamics, any change in the internal energy occurs due to the addition of heat, Q, and work, W. And this is given by the following relation. Now the difference in the notation for the change in the total energy, dU, from the addition of heat, del Q and del W for work, lies in the fact that the internal energy is a state variable while heat and work are path variables. Now, what does this mean? This means that it does not matter how you go from state A to to state B for a state variable like the internal energy. However, for quantities that are path-dependent, they actually depend on the actual process from which you go from State A to State B. The first law tells us how the energy is distributed. The second law starts with an impossibility statement. The second law of thermodynamics says that it's impossible for any self acting process or machine to produce a net flow of heat from a region of low temperature to high temperature. In other words, the law states that an isolated system always proceeds from an ordered state to a more disordered state or else, it undergoes no change at all. The level of order in a system is measured by a quantity known as the entropy. And according to the second law of thermodynamics, the entropy of the universe tends to a maximum. Mathematically this can be stated as. Now in this equation the sub scripts U, V and N indicate that the internal energy, volume and the number of particles are held constant. Now any thermodynamic system can be defined according to their extensive variables, that is variables that vary linearly with the system size. For example, we could define the internal energy to be a function of the extensive variables S, V and N. Now, N itself can consist of many particles N1, N2, etc., up to Nr where r is the number of chemical species in the system. Now, we can write, the internal energy, U, as a function of S, V, and N. Now differential changes, in the extensive variables, leads to a differential change in the internal energy, such that it's given by. Now, in the partial derivatives in this expression, are intensive variables. That is variables that do not depend on the system size. Now from this, the temperature of the system can be defined as the change in internal energy when you change the entropy holding the volume and the number of particles constant. Now the pressure emerges as the change in internal energy when you change the volume holding the entropy and the number of particles constant. Now the chemical potential of component I is defined as the change in the internal energy when you change the number of particles of component I holding entropy, volume, and the number of all of the particles other than component I constant. Now, based on these definitions, the change in internal energy can be written as. Now, the internal energy, remember, is a state variable. Therefore, we can choose any part to find a differential change. The states that any change in the internal energy of the system Is the result of a quasi static heat flux given by the TdS term. Mechanical work given by the pdV term. And chemical work given by the mu dN term. Now equivalently, we could have chosen entropy of internal energy as our defining variable. Then entropy simply will be a function of U, V, and N. Now we can expand the entropy in an analogous way. Now this equation is a very useful way to visualize the second law of thermodynamics. Now let's consider a closed, isolated system which cannot exchange heat, work, or particles with its surroundings. Now, we initially prepared the system such that a part of the system, subsystem 1, has parameter values, internal energy U1, volume V1, and number of particles N1. And analogously for the subsystem 2. Now making the statement that the entropy is additive, that is the entropy of subsystem 1 and the entropy of subsystem 2 add up to give the total entropy, S. Now the way in which we've constructed the system, given it's a closed and isolated system, any loss or gain in the internal energy of subsystem 1 is compensated by corresponding gain or loss in the internal energy of subsystem 2 now similarly for the volume and the number of particles. Using this, we can simply the expression for the entropy in the following way. Now, according to the second law of thermodynamics, any spontaneous process requires that the entropy change is non-negative, reaching the maximum value at equilibrium. With this, we can divide the condition for equilibrium. At equilibrium, dS is equal to 0. For arbitrary changes dU1, dV1, and dN1. Now, this demands that thermal equilibrium occurs when the temperature of subsystem T1 is equal to the temperature of subsystem T2. Now, mechanical equilibrium demands that the pressure of subsystem 1 is equal to the pressure of subsystem 2. Now, chemical equilibrium, and that is no reaction, occurs when the chemical potential mu 1 is equal to the chemical potential mu 2. Now, remember that although thermal and mechanical equilibrium implies spatial homogeneity of the temperature and the pressure that is the temperature and the pressure is same everywhere. The condition of spacial homogeneity of the chemical potential should not be interpreted as a homogenous concentration or density of species i. That is for instance, you could have a condition where you have a vapor and a liquid equilibrium inside a box. Now let's consider the case where the pressure and the chemical potentials are equal and the partition is rigid and impermeable. Now in this case, let's assume that the temperature of the subsystem 1 is less than the temperature of subsystem 2. The second law condition is only met if the change in internal energy of subsystem 1 is greater than 0. Now this immediately says that heat spontaneously flows from regions of hot temperature to cold temperature. Now let's consider a different case where temperatures and chemical potentials are equal and the partition between the subsystem is now moveable, but still impermeable. Now in this case, let's assume that the pressure of subsystem 1 is greater than the pressure of subsystem 2. The second law condition is only met if the change in volume of one is greater than 0. Now this tells us that inhomogeneities in pressure leads to spontaneous expansion of high pressure regions into low pressure regions. Now let's consider our final case where the temperatures and the pressures are equal. Now let's assume that the chemical potential of the subsystem 1 is greater than the potential of subsystem 2. Now the second law condition is only met now if the change in number of particles of subsystem 1 is less than 0. Now this says, that matter flows from regions of high chemical potential to low chemical potential.