 we just discovered the two laws are simply two statements us are functions of state with that you make you have all the classical derivations in essentially all of mechanical engineering all of heat work conversion devices all the results can be derived by just making this statement the natural corollary is and if you are an inquisitive student is there a third law is there another property that is a function of state so far nobody has found out anything except by adding subtractive now you can do u-ts you can do u plus p v-ts you can play games you already know some functions of state that is these are known to be functions of state composition r functions of state this is mole fraction I will say the set of composition r functions of state these this is known by observation okay by observation these are known to be functions of state by observation you know that q and w are not functions of state essentially the two laws said these are the only observable properties and it said well q and w are not functions of state I can find two functions of state that are related to q and w one was simply delta q-delta w which is du or u equal to q-w for a closed system in the other which is much more subtle was this this entropy the second law is probably the greatest discovery of the 19th century so basically the concept here as far as entropy is concerned entropy is a very profound concept and what you have is apart from these functions of state you have other functions of state that keep occurring again and again as far as chemical engineering is concerned or chemical engineering and chemistry if you like we have another additional functions the other functions of state that they have found are only combinations you have u-ts which is called a you have u plus pv which is called enthalpy and then h-ts which is called the Gibbs free energy you can generate any number of them you know if you are perverse you can put t power half here that is also a function of state any function of a function of state is a function of state so you can combine any of number of these and produce these and only you will be interested in them I mean if sufficient number of people get interested gets a name so this is Helmholtz free energy turns out this is very important I will show you that very quickly why this is of great importance similarly enthalpy is very important in some cases the free energy Gibbs free energy very important some case specifically I will tell you what results we are going to show when you are looking at equilibrium I am going to show at depending on the variables that I have it called constant if you are looking at systems with constant t and v constant constant volume I will show that equilibrium is attained when a is a minimum therefore a is important keeps coming again and again I am going to derive this result I am going to show you that whenever t and p are held constant pressure and temperature which is what happens in flow processes in the chemical industry equilibrium is attained when g is a minimum therefore a and g are very important actually you could use u and h you can show that u is a minimum when v and entropy are held constant but you do not have an entropy meter so there is no way you can stick a meter and say this process has entropy constant you can talk about adiabatic process it is not the same thing as an isentropic process similarly you can use enthalpy if it is s and p that are held constant so we will show these results but the useful results are those in which the constraints are meaningful p and v being constant very meaningful for closed systems t and p being constant are very meaningful for open systems the other result that you will get is that in an isothermal system the maximum work you can get out of a closed system is the change in the Helmholtz free energy that is a great interest what is the maximum work you can get out of a system or what is the minimum work you can get away with it is not a student phenomena alone even the most profound scientists are looking for what is the minimum work they can get away with but they are asking much more deeper question than just questions of laziness but actually it is not a bad idea to do the minimum work and get maximum results but you have to do it you have to integrate it over a 50 year period now if you are looking at very short term gains then you play the penalty later that is all delta g again is the maximum work you can get out of a system actually minus delta there will be sign changes but the change in the Gibbs free energy is the maximum work you can get out of an isothermal flow system so these are the only important results in thermodynamics almost all results are derived out of this but you are dealing with multi component systems and composition dependence is where there is ambiguity in thermodynamics so we will get started and discuss you and s as functions of state and discuss the differential relations and you can do calculus only with functions of state you cannot write calculate equations of calculus with q and w because they are not functions of state so the first point is u is a function of s and v these are natural variables or let me start off first the first law tells you du is equal to delta q minus I am going to deal with closed systems and then depending on the system that you are dealing with which is PVT so called PVT systems which is what you deal with very often delta w is equal to minus p dv now delta w is equal to p dv sorry and leave it I will come back to the sign convention p dv is the work done by the system delta w is p dv so this becomes and delta q is equal to Tds for a reversible system and come back to this because delta q by T was defined as ds so you get this result du is equal to du is equal to Tds minus p dv this is actually the combined form of the two laws the second law itself the laws can be stated very simply while I said u and s are functions of state the laws are simply stated like this you say u is a function of state that is all and then you say s is equal to maximum now I should rewrite u s sorry I should say u of the of an isolated system is equal to constant and s for an isolated system always increases these are actually the statement of the two laws as far as we are concerned going a bit back and forth but partly because you know the some of these results this is one way of stating it as far as calculus is concerned as far as equilibrium systems are concerned all you need to know is that u and s are functions of state to derive maximum minima you have to make the statements in terms of the laws itself and once you have said this let me rewrite this in a slightly different fashion this is all right and I have to rewrite this suppose I have a system then I have surroundings and I have an exchange of heat between the system and the surroundings now if the heat is coming into the system the surrounding temperature has to be higher than the system temperature so let me say T surroundings greater than T system then delta Q is greater than 0 everything all the signs refer to the system of interest not to the surroundings so when I say delta Q greater than 0 that means the system absorbs heat the convention I use is that if heat is absorbed it is positive if work is done by the system it is positive the new books have an opposite convention work done on the system is taken as positive but in terms of these variables so mine would be delta W is equal to PDV according to the new IU pack conventions not really new it is more than 20 years old but lots of books use either convention the convention is that anything that increases the energy of a system is positive so work is done by the system it loses energy so work done on the system is considered positive so you will find a minus sign here but those that have a minus sign here will have a plus sign here so in terms of measurable variables the equations will be the same you just use any convention you want but be consistent and I am not going to Q by asking you is it by your own you will let you can figure that out by common sense so if this is true if delta Q is the delta Q by T T system will be just defined as T delta Q by T is the energy absorbed by the system and if I take the surroundings delta Q surroundings by T surroundings is greater than or equal to 0 because I surrounding plus system constitute an isolated system the law is valid only for an isolated system this delta Q surroundings is equal to minus delta Q as far as surroundings is concerned the heat it that it receives is the heat lost by the system so and DQ by T delta Q by T is defined as DS talking about differential change in differential quantity of heat being transferred therefore I do not have to worry about whether the actual process is reversible or reversible so I have DS minus delta Q by T surroundings is greater than equal to 0 or you get T surroundings times DS is greater than equal to 0 you have to find the smallest value of T surroundings for which it is valid for you to generalize the result the smallest value of T surroundings for heat absorbed by a system would be equal to T itself right this the most general cases T DS is greater than equal to 0 if T DS is greater than or equal to 0 then T surroundings DS is automatically greater than sorry T DS greater than delta Q not 0 so the real law for closed systems for all kinds of processes this is equal to this is less than or equal to T DS minus delta W this is the combined form of the two laws in since your first quantity of interest is work you rewrite this and ask what is delta W less than or equal to T DS minus DQ so delta W itself at constant S suppose I held S constant in a process delta W has to be less than or equal to DQ minus DQ so the maximum value of delta W can only be equal to minus DQ so absolutely trivial result but if I know a system goes from state 1 to state 2 and I know the difference in the internal energy minus of that is the maximum work I can get out of the system at constant entropy but this is not the most useful way of writing it you rewrite this as you write T DS minus D of U minus TS sorry T DS minus STD sorry I will rewrite this this way this gives you D U minus T DS I will put a minus sign here this gives you minus D U plus T DS and then I have plus S DT so I will subtract minus S DT and because this animal U minus TS is going to appear again and again I will write this as minus D A minus S DT so I have this profound conclusion delta W at constant temperature maximum value is minus D A and since most processes occur at under isothermal conditions in the sense that you may have a closed system you start at room temperature you may heat cool do whatever finally you come back to room temperature so if I take the whole process the change maximum work I can get out of the system is minus the change in Helmholtz free energy therefore it is of great interest to know how the Helmholtz free energy varies with the state of the system. So this is of open systems the derivation is not as simple but let me state it in any case there are two more results that you can easily see I can write D of U plus PV minus D of PV so instead of this I can rewrite this equation I can rewrite this equation in terms of H enthalpy I can also rewrite it in terms of Gibbs free energy which is H minus TS but it is not useful in closed systems in closed systems these are the two useful results I am now going to look at open systems in an open system I have something coming in and something going out again thermodynamics only however complex this may be all I need is one box and one line in one line out so if I have a system that exchanges heat again and also exchanges work with the surroundings you do not I mean you do not quite realize how liberated you are you do not have to draw one more arrow because all exchanges with the surroundings can only be in terms of heat or work that is where Joule liberated you you did not have to look for one more way of exchanging energy we have mass coming in and mass going out what I do in this case very simple I think I will draw a more complicated picture means two lines what I have marked here is the amount of mass suppose I am considering a system between T and T plus delta T this is time I am going to consider an open system between T and T plus delta T the open system actually consists of the following my open system is simply contents of box the box could be a whole factory could be anything this is my system I have a system into which mass comes in mass goes out now I consider this open system between time T and T plus delta T and right time here this is DU I what I want to do is to calculate I want to calculate DU I know DU close system is equal to delta Q minus delta W and I write C here it is close system this I already know I want to relate this close system DU to the open system it is very easy for a close system I just have to concentrate on the same mass elements so at time T I take everything that is in the box plus the mass that would have come in and then at time T plus delta T this is already come in but some mass has gone out so I take the contents of the box plus the mass that went out so my close system is the following which is why in den B for instance it does not bother to deal with open systems in great detail because you can always derive results for open systems in terms of close systems so I am going to define a close system a close system does not exchange mass of the surroundings I need a close system only between T and T plus delta T some small interval of time this is equal to mass in box plus mass that would have entered between T and T plus delta mass in box at T this is also equal to mass in box at T plus delta T plus mass that left between T and T plus delta T so what DU what is DU close system is equal to you close system at T plus delta T minus you close system at T this delta T will treat as eventually I am going to get differential difference change in time DT if you like what is this equal to you close system at T plus delta T is you of the open system at T plus delta T for open system is my system of interest so I do not put any subscript plus mass that left what is the mass that left it is the rate at which mass is leaving into delta T or DT into you this is small you is the specific internal energy of the mass that is leaving which means it is the internal energy per unit mass m dot is the rate times DT is the total mass that left at multiplied by internal energy per unit mass minus this is the first part what is you close system at time T it is this is you for the open system at time T that is the internal energy total internal energy of the contents of the box at time T plus this may be different m dot in may be different from m dot out it is not necessarily a steady system that I am talking about right now you have the same interval of time DT times you in so this is you T plus delta T minus you of T is DU plus you have this is equal to delta Q minus delta W I also have the second law which tells me that TDS for a closed system is greater than or equal to delta Q means realize that the second law really tells you that T reservoir right or surroundings times DS for a closed system we replace T reservoir by T when we wrote the law as a limiting case if I have an open system I must allow for the fact that the temperature here can be different from the temperature here I may be talking of a heat exchanger where the typically the fluid comes in at one temperature goes out at another temperature so every time I have to take the reservoir temperature as the temperature relating to the stream the point at which I am doing this calculation in open system so if I rewrite this for example DS for the closed system would be exactly like before DS for the open system plus m dot out S out minus m dot in SN times DT if I am writing the second law I have to multiply this by T reservoir so I get T reservoir times DS plus m dot out S out minus m dot in actually this is not a I have written it in a suppose I basically written it wrongly because I mean I am not written wrong but T reservoir can be different for each of the streams T reservoir does not mean one temperature for example if I had a heat exchanger the surroundings would be if I had a shell normal two tube heat exchanger I have one tube inside one tube outside if it is counter current the temperature exchange would happen from two streams at different temperatures so T reservoir for the system could be the temperature of the system but this could be T out this could be Tn that is this could be the temperature at the outlet this could be the temperature at the inlet so I should actually write TR for every term here so in the limiting case which is what you are looking at you will get T DS plus T out m dot out S out minus Tn for an open system so the combined form of the law for would be du plus I will write m dot into dt will be dm so I will write a simply as dm out S out u out minus dm in Sn this whole thing is du for the closed system is less than or equal to Tds is this one here Tds plus dm out into T out S out minus dm in to Tn Sn this whole thing is Tds for a closed system minus delta w and one last step to do if you have an open system there has to be work done on the system by something in the surroundings that pushes the fluid in that is compulsory similarly there is work done by the system in pushing the fluid out so that is called flow work and flow work is a compulsory part it is not useful work that you get out of the system so it is convenient to redefine delta w in terms of network plus flow work so for example we define this as delta w is equal to delta w S is usually used for shaft work in mechanical engineering it could be a turbine with a fluid flowing in fluid flowing out and the turbine blades rotating sometimes written as you useful work all these are same delta w S plus flow work and flow work is easily calculated flow work is simply the work at the work done by the system would be pressure at the outlet be at the outlet this is specific volume times dm out dm out times v out is the total volume of the fluid that is pushed out it is pushed out at a pressure p out so the work done is p into dv minus of course work done on the system p in v in dm this is a definition okay so it is not delta w S is not a conceptually new quantity it is simply a useful quantity that is defined by subtracting from the total work done by the system the work done due to flow network done due to flow very often these two are equal so in most chemical engineering systems it does not make a difference shaft work and total work will be the same but sometimes occasionally those two terms can be very important so what we do is instead of this delta w I write the delta w S plus v out v out dm out minus p in so this is your law for open systems it can be written a little more elegantly we will do that in a minute actually I think I will stop here let you ask questions in it we will I will start from this and show you that at steady state basically in any process in chemical industry you are only interested in what happens at steady state because if you are even if you are working a mechanical turbine you are not going to operate it for half a second two seconds one going to work it at steady state and ask what happens what how much work you can extract from it at steady state the mass going in will be equal to the mass going out dm out and dm in will both be equal and nothing will change in the box you can have a turbine into which fluid is coming in with a certain kinetic energy leaving with another kinetic energy but it will always the change you will always be the same so du will be 0 ds will be 0 and you will ask questions about you can either you can ask questions about delta w s you will say how much shaft work can I get out of the system under steady state conditions per unit mass flowing through the system so we will answer that question the only concepts so far are simply the introduction of you and s and two laws those are asserted and they are only uncontradicted human experience so far open systems we wrote the laws down we said du is going to complete one small statement at steady state du is equal to 0 ds is equal to 0 so you can rewrite this as delta w s is less than or equal to it said constant T delta w s is less than or equal to constant T this T reservoir becomes T n equals to T so u plus p v minus T s is G so you will get minus of delta G and this becomes dm just call it dm or we write this as w s dot by m dot so the maximum work that you can get per unit flow of mass through the system is equal to the change in the Gibbs free energy with a minus sign this is also the minimum work you have to put in so if I had the nice thing about thermodynamics is it can it is very nice for the student but it is absolutely irritating for the industrials because here is a guy who has a huge plant that separates air and nitrogen oxygen and all that and you go and tell him oh you this is your process here nitrogen oxygen and you say the work done in the whole process is actually a factory he has got all kinds of things coming in going out this comes in at 25 degrees 1 atmosphere this each of these is at 25 degrees 1 atmosphere and you say W s max that you have to put in is minus delta G means G x 1 times G 1 for nitrogen plus X 2 G 2 for oxygen minus that for air so if you know G for air as a function of composition you are through with the calculation and you can get a model you can write down models can write the answer in two minutes you can ignore the fact that he has high temperatures low temperatures inside if you are doing air liquefaction for example you will go down to liquid nitrogen and lower temperatures and all that is ignored because this is T this is room temperature this is room temperature that is all that counts as far as thermodynamics is concerned you get completely contemptuous of what he is doing inside you say that is detail I would not come into your factory here is an envelope where does the air come in and where does this come in that is all you have to ask. So the whole thing is trivial now what I want to do now is I just want to point out here you can tersely argue that even in non isothermal systems it is delta G in isothermal systems it reversible process it will come out to delta H but delta H can be derived that W s dot by m dot maximum in an adiabatic system is delta H can be derived without any concept of reversibility or reverse we will go ahead with calculations for various systems the purpose of the entire course will be to calculate thermodynamic properties the rest of it is practically downstream. So purpose is the purpose of the course is simply to calculate changes in internal energy in Helmholtz free energy in enthalpy and G this is work calculations maxima and minima and work you have to calculate changes in UA because a closed system under isentropic conditions under adiabatic conditions the maximum work you can get this delta U the maximum work you can get out of a system is delta A actually the minus sign minus delta U minus delta A in a flow system the maximum work you can get in adiabatic system maximum actually the work you can get in adiabatic system is delta H minus delta H and minus delta G for an isothermal flow system. So if I can calculate changes in UA H and G there is no difficulty at all for pure systems it is trivial what is difficult is for mixtures so we will set aside pure substances or systems with constant composition discuss two cases and then mixtures in all these cases we list what are called measurable quantities measurable quantities as far as we are concerned would be PV temperature you can put in brackets absolute temperature and then what is measurable these are not properties measurable quantities I have written these are properties I can also measure Q the heat but that leads to a measurement of enthalpy for example if I have I have DU for a closed system is delta Q minus delta W and if delta W is of the NPVT systems delta Q minus PDV so DH is delta Q minus VDP plus VDP DH is simply DU plus D of PV so I add PDV and VDP I will get this so if I make measurements at constant pressure I can measure changes in H by measuring Q therefore H becomes measurable this is in constant pressure systems H or changes in H I will write it as delta H really interested in changes in enthalpy and along with that it becomes independent of the path under certain conditions when pressure is constant it becomes a functional state you can differentiate it with respect to T and get derivative properties which we call the specific heats CP is an example CV is another measurable quantity C sigma which is along a saturation line that is measurable so all these are measurable quantities and the rule in thermodynamics is when you derive any expression if I want you to get DU or DA or DH or incidentally S is not a direct interest here but you change find U and S then you can calculate these directly the thumb rule is that on the right hand side if you get measurable quantities stop otherwise you can keep going around in circles and come back to the first part of it. So our purpose will be to get calculate changes in terms of measurable properties and measurable quantities are these and all their derivatives are considered measurable so the change in volume with respect to temperature at constant pressure is a measurable quantity the expansion volume expansion coefficient is in measurable quantity similarly the change in volume with pressure is a measurable quantity and so all derivatives are considered measurable although if you ask a PVT guy who is actually making these measurements it is pure hell making accurate measurements at low pressures for example of pure hell because the volume change is negligible and to measure it accurately becomes very very difficult what we will do is we will look at only these changes we look at when you can express it in terms of PVT. So the basic equation we will deal with we will deal with close systems here if you are looking at systems of constant composition you need to look at only close systems so for I will start with DU is equal to TDS-PDV for PVT systems we will be looking primarily at PVT systems strictly speaking in thermodynamics you should write DE which is the total energy but in thermodynamics you do not worry about changes in potential and kinetic energies of the system as a whole you are not worried about moving the box up and down whereas in fluid mechanics DU will be negligible we will be only looking at potential energy changes and kinetic energy changes of the macroscopic system so that is the only difference otherwise the equations are the same. So I will be looking at this so I have to express DS and this is where S is a function of if you want T and you do have to choose your variables T and P or S is a function of T and B you can choose either simply a matter of what information you need in order to calculate these changes normally it is convenient to choose H as a function of T and P and U as a function of T and V actually U is said to be a natural function of S and V the way the equation occurs here. So Gibbs's equation of state will simply be U as a function of S and V for thermodynamic theoretical arguments are much more convenient but in practice you can measure T P or V so you have to express everything in terms of T V and T P between these two if you use volume you have to integrate from infinite volume so it is much harder for pressure you integrate from zero pressure so it is easier to do T P but your equations of state the empirical equations that connect P V T are all explicit in P I mean explicit in V P is a function of volume that is how you express it not volume as a function of P so even if you take the Van der Waals equation you have to solve a cubic equation to get the volumes whereas pressure is given explicitly so the more convenient variable in terms of expressions the current variables are T and V but the convenient variable for integrations are T and P so you can choose either of them what we will do is write down the equations for pure component systems in the case of pure component systems I do not mind if I mean does not matter if I write capital H or small H I can write it per unit mass much more convenient right per unit mass so we will derive the expressions for DH and DS is a certain arbitraness in their calculation but that arbitraness does not matter because you are going to find differences in entropy and differences in enthalpy so I will derive that those expressions next class.