 In today's session I would like to discuss the calculation of maximum work that can be obtained from a device. In particular we will discuss the following problem have an undersea portable device consisting of two tanks connected by a reversible engine. The nature of the engine thermodynamics is contemptuous of just I need two tanks and an engine in between compressed air from tank 1 initially at 10 bar expands through the engine into tank 2 which has air initially at 1 bar in the apparatus is to operate 100 meters below sea level it means that about a pressure of 10 bar. So the idea of releasing the compressed air into the water does not arise because the pressure is very high. Assume that air is a perfect gas and the hold up in the engine is negligible some numbers are given for the volume of tank 1 and tank 2 and you are asked to calculate the maximum work that can be obtained from the system. Here is a picture of the situation I have tank 1 and tank 2 the volumes are given 0.1 meter cube 0.5 meter cube and then air flows from 1 to 2 doing work WS shaft work the initial pressures are given you can calculate the final pressure we will do that now and the maximum work that you can obtain to the system. There are two reasons why I want to do this problem one is to show you how the calculation is done secondly to show you that depending on the definition of the system the calculation of the work can be somewhat complicated or very simple. So it is important in thermodynamics always to choose your system and in general to choose the system to be as large as possible without leaving out the detail that you are looking for. Now in this case for example we will start off with this analysis first to calculate the final pressure you realize the gas initially in one condition in tank 1 another condition in tank 2 and since it is under water and it is assumed that the whole process is isothermal and temperature is given as 5 degree C. So in the isothermal process first we can calculate the final condition notice that the two tanks together is a closed system. So you can take n0 the total number of moles n1 plus n2 n1 and tank 1 n2 and tank 2 to be a constant the sum and since you are told it is an ideal gas you have PV is equal to nRT. So PF times V1 plus V2 should be equal to P10 V1 plus P20 V2 the left hand side is essentially equal to n0 RT the right hand side is also equal to n0 RT. So we know P10 P20 we know V1 and V2 so you can calculate PF so it comes to 1.75 bar so it is 10 bar in tank 1.1 bar in tank 2 in the initial stage finally both tank 1 and 2 are at 1.75 bar. We will calculate the number of moles before we actually tackle the actual problem of calculating work n10 is the number of moles initially in tank 1 it is clearly given by P10 V1 by RT. So you can put in all the numbers here and 10 to the power 5 is to convert is the conversion for bars and you get essentially 43 gram moles in n10 n20 is 2.15 gram moles. So the total is 45.15 at the end of the process the number of moles in tank 1 is 7.525 it is decreased from 43 to 7.525 number of moles in tank 2 has increased from 2.15 to 3.625 there are two ways of calculating work under isothermal operation. First thing is I take consider the open system consisting of the contents of the valve you told that the contents of the not the valve actually I should have said contents of the engine sorry. So if you have the contents of the engine as the system and the system has negligible hold up which means the total moles flowing through in this case it is actually 37.625 minus 2.5 roughly 35 gram moles flowing through is much larger than the amount contained in the engine. So I write du is equal to ?q – ?ws plus g in dm in – g out dm out this is for an isothermal system done this in class. So the first term here is 0 this is negligible hold up so it is negligible hold up therefore that 0 then we are discussing ?ws and g in – g out g in dm in is the free energy coming in g out dm out is the free energy going out. So under isothermal conditions we have already seen this because ?q is simply Tds is less than or equal to Tds and we have split that into Sns out for the system that have gone into the terms containing g in and g out done this in class in the remaining term there is the entropy change of the contents of the engine this also is 0 for the same reason again negligible hold up then you have this ?ws in fact this is at the reversible states so this gives you the maximum work and the maximum work is given by dn to be working in moles instead of mass into ?g ?g being g out – g in but you know that dg is equal to – sdt plus Vdp is since the temperature is constant sdt term is 0 you have Vdp so the integral of Vdp from inlet conditions to outlet conditions that is it goes from 1 to 2 so this gives you dn2 into RT log of P2 by P1 for an ideal gas V is RT by P so if you integrate this this is the differential amount of work done when a small amount of moles dn2 are transferred from tank 1 to tank 2 now P2 and P1 vary with the moles transferred and since P is equal to nRT by V ?ws max by RT it is convenient to divide by RT make a dimension list is equal to log of P2 by P1 P2 is proportional to n2 by V2 so you get n2 by V2 and then n2 by n1 into V1 by V2 this is a logarithm of this dn2 I have now substituted for n1 it is n0 – n2 n1 plus n2 is always equal to n0 n0 is a constant so you get this expression log of V1 by V2 is 0.2 times n2 by n0 – n2 dn2 so you can integrate this still get the differential amount of work done when dn2 moles are transferred from tank 1 to tank 2 so you have – ln5 log n2 should be integrated – log of n0 – n2 should be integrated you can carry out this integration and you get WS max by RT is equal to – log 5 the first term into n2 plus log n2 dn2 will give you n2 log n2 – 1 and then n0 – n2 dn2 will give you n0 – n2 log of n0 – n2 – 1 so you get this expression for the work done plus a constant with constant of integration but you are applying this between n2 and between n2 0 and n2 f initially n2 is n2 0 finally n2 is n2 f and if you substitute these values in here you get WS max by RT is – 68.8 it is dimensionless number so you just have to substitute this number at n2 f and subtract the value at n2 0 and the C will cancel out so this is the final result that you get so what you have done is you discussed an open system you have discussed the differential amount of work done when a small differential quantity of gas is transferred from one tank to the other and then integrated it as the process proceeds into changes continuously we have taken that into account. So this is the work calculation now you can do this another way you can consider a closed system contains of both tanks then you know from thermodynamics that the maximum work that can be done by the system is simply the change in the Helmholtz free energy the other case it was the Gibbs free energy here it is the Helmholtz free energy now if you go from the initial state to the final state notice that n1 0 moles and n1 0 and n2 0 are the number of moles initially in the tank this n1 0 moles goes from an initial state of where its Helmholtz free energy is a10 to a final state where its Helmholtz free energy is af is a specific Helmholtz free energy this is per mole multiplied by the number of moles whereas n2 0 goes from a20 to af for example the n1 0 moles in tank 1 go from 10 bar to 1.75 bar that is an expansion this will do work for you here n2 0 moles are compressed from the initial condition of 0.1 bar to 1.75 bar. So if you try to calculate a the change in a is again minus SDT plus PDV in the SDT will go to 0 because the temperature is constant so PDV is RT DLNV for an ideal gas so Wmax by RT is simply the integral of this which will give you Wmax by RT then comes to integral of DLNV and if you are calculating n1 0 times the integral of DLNV which gives you Ln of V1f by V1 0 plus n2 0 times Ln of V2f by V2 0 there is a minus sign here which I have carried over and then since V1 is constant V1f by V1 0 is the same as n1f by n1 0 to the power minus 1. So the minus sign can be removed you get n1 0 log of n1 f by n1 0 plus n2 0 log of n2 f by n2 0 so this gives you minus 74.95 which represents the work done by the system in the compressed here expanding from n1 0 at 10 bar to 1.75 bar n2 0 being compressed requires work of 6.15 so the net work quad is minus 68.8 now this is Wmax what we calculated earlier was Ws max but the two come out to be the same reason for that is the difference between W and Ws max Wmax and Ws max is in fact flow work. Now flow work in is simply P in V in Tm in and flow workout is P out V out Dm out because the hold up is negligible you know that Dm in is equal to Dm out and P in V in is equal to P out V out is equal to RT because it is isothermal operation flow in is exactly equal to flow out or rather work done by flowing in and work done by flowing out by the fluid flowing out are both equal therefore W must be equal to Ws which is indeed the result you get but notice that this calculation using the closed system concept is much faster is much simpler than the calculation using the open system in this case the problem is fairly simple the two do not matter but in many cases by choosing the system correctly it is possible in fact to simplify the problem considerably so the thumb rule in these cases is as far as possible choose a system that is as large as you can identify without laws of detail that is the thumb rule in thermodynamics then you get the simplest formulation today we will discuss a thermodynamic analysis of the process for the manufacture of solid carbon dioxide or dry ice as it called I want to illustrate the use of the pH chart we have already discussed the chart in theory it will this problem solving session will illustrate how the pH chart makes life very easy to do such an analysis basically carbon dioxide is manufactured solid carbon dioxide is manufactured by mixing make up carbon dioxide with recycled carbon dioxide and the resulting carbon dioxide gas save 1 kg enters a compressor this compression is done adiabatically compression is so fast it is effectively adiabatic you need to compress it to very high pressure 6400 kPa this is done in three stages because in every stage the temperature ice can then can otherwise get too high therefore what you do is compress it in stages and the thumb rule is usually to use equal compression ratios so if you are compressing from 100 kPa to 6400 kPa you are talking of a factor of 64 so to the power one third is 4 so you will go from 100 to 400 400 to 1600 and 1600 to 6400 at the end of each compression you will cool it back to roughly 25 degrees or whatever whatever is the convenient temperature and then you isobarically condense it to a saturated liquid this liquid is then throttled down to 100 pha kPa where solid and vapor are in equilibrium the solid is removed as the product and the vapor is recycled so it is fairly straightforward process and so the process flow sheet is shown here you have makeup carbon dioxide and this makeup carbon dioxide is at 100 kPa and 30 degrees centigrade the recycle is also at 100 kPa and this recycle is saturated vapor corresponding to the corresponding to the throttling operation post throttling operation so at 100 kPa this is saturated vapor so this recycle I will just show you on the chart what the temperature is this these two are mixed and you have one kg of carbon dioxide let us say entering the compressor this is compressed to 400 kPa and from 400 kPa this is cooled to whatever temperature that is appropriate I will show you on the chart again and then compressed again to 1600 kPa so this is 400 kPa to 1600 this compressed one is cooled again and then it is compressed once more here the pressure is 6400 this compressed carbon dioxide is now cooled to liquid carbon dioxide at 6400 kPa this liquid is now throttled and it goes into a separation drum where you have the product which is dry ice or snow as it is called and here you have saturated vapor the pressure in this chamber is 100 kPa so the process is clear this there are three compression steps each of these is treated as if it was isentropic in actual practice it is adiabatic not quite reversible therefore you will have to make a correction for it we would not discuss that correction today but basically we will treat this as an adiabatic reversible process so you have isentropic compression and you can follow this the steps on this diagram on the pH chart and pH chart gives you all the data required for you to do the calculations that are required now what are the calculations that are required the calculation the required are you have to calculate the dry ice produced per kg of g entering the snow chamber per kg of the liquid carbon dioxide entering the chamber through the throttling ball should say through the throttling ball right the coolant is available at 20 degrees with a difference of 5 degrees in temperature between the coolant at inlet and the hot stream at outlet this is specified so you can expect after cooling at the end of the heat exchange process the temperature to be 25 degrees now you trace the process on the pH chart you are asked to calculate the work done per kg of dry ice produced I think tracing this on the chart pH chart will be somewhat instructive this is the pH chart that I have here is downloaded from the web it is you can get this chart for carbon dioxide carbon dioxide has a solid vapor region a sublimation region this is here at the bottom you have solid solid and on this side you have the vapor a little higher above 500 kPa the transition happens between liquid and vapor the process let us say we start with 1 kg at the point a is actually a mix of two things what we have is a compression isentropic compression I follow the line of constant entropy up to 400 kPa then you cool down to see which happens to be at 25 degrees because your coolant is available at 20 and you have to maintain a 5 degree difference between the cool stream leaving the heat exchanger and the coolant entry so 25 degrees is all that you can cool to so the point B is 400 PSI after isentropic compression it is identified by entropy at a equal to entropy at B so you move along the isentropic line remember that every point on this chart is completely identified by specifying two properties so we start here a is known I will come back to how you get the position of a exactly but from a to B is isentropic compression then cooling to see C is at the pressure is 400 and there is a temperature change it goes down to 25 and then you have another isentropic compression to D now the temperature is the pressure is 1600 kPa and the temperature is whatever you read on the chart in this case for example this temperature is like 120 degrees you can imagine if you keep going the temperature could rise very high so at this point you cool it again to 25 degrees this is isobaric cooling just a heat exchanger and we neglect the pressure drop so the pressure is effectively 1600 and the temperature is 25 at the point E then you do an isentropic compression again to 6400 and then cool it all the way to G the temperature at G happens with 25 degrees centigrade in fact the cooling the coolant in this case really determines the pressure up to which you go in order to then throttle and obtain the product in this case the saturation temperature at the point G where the pressure is 6400 PSIA and sorry 6400 kPa kilo Pascal's is exactly 25 degrees now here there is a phase transition you keep cooling it till all of it becomes a liquid so the point G essentially if you start with 1 kg at A of gas at point G you have 1 kg of liquid at 6400 kPa then you do a throttling operation it comes right down the throttling operation is an isentropic operation as you have seen in theory so it will come right down you go down to the pressure of 100 kPa but at 100 kPa carbon dioxide is a mixture of solid and vapor in the amount of vapor in the amount of liquid is determined by the position in this case H between the saturated solid which is at P and the saturated vapor which is at R in this diagram. So what I will do is step by step take you through the calculations the convenient way to start is start at G because the stream is identified it is the saturated liquid at 6400 so if you start with G and then do the throttling then you can locate the position R and you know what the make up carbon dioxide state is so you can mix these two and obtain the position A and then complete the diagram. So you start with stream G which is saturated liquid at 6400 kPa from G I go to H what I need to know is the enthalpy there this is isentropic you can read H of G which is equal to H of H on the diagram in the diagram it is about minus 40 kg per kg I have not been very careful in reading these numbers you can do a more accurate job but I want to illustrate how this calculation is done. So you go from G to H at 100 kPa this is an H is at 100 kPa and the enthalpy is minus 40 this stream H splits into a product ice and saturated vapor and all this is isobaric so you equate the enthalpies before and after mixing you have minus 40 is equal to the enthalpy of the solid is minus 420 times x is the fraction of the solid and 120 is happens to be the enthalpy of the saturated gas at R. So if you combine this you can calculate x from this equation the x value that you get this 0.31 kg dry ice per kg of carbon dioxide entering the compressor our basis is 1 kg entering the compressor that means for every kg entering 0.31 of snow is formed dry ice is formed in 0.69 is recycled so the recycled you can see on this chart you can see where the recycle is and where the product is you can see that the product enthalpy which I read out for you is minus 420 the enthalpy of the saturated vapor at 100 kPa is 120 and H is at minus 40 so you come to the conclusion that the fraction of solid produced is 0.31. So that completes our analysis of just the throttling operation throttling operation and the separation into product and recycled vapor the next step the make up carbon dioxide at 30 degrees you given this the make up has to be equal to the amount of dry ice removed so 0.31 kg at 100 kPa 30 degrees I read the enthalpy on the chart it is 220 is mixed with recycle the recycle is 0.69 kg at 100 kPa and enthalpy of 120 the temperature happens to be minus 80 degrees that you can read on the chart now if you mix these two you get an enthalpy at a of 151 kJ per kg it is an average it is an average of 220 and 120 in the ratio of 0.31 to 0.69 so 0.31 times 220 plus 0.69 times 120 will give you 151 this locates point a point a is at 100 kPa that we know and 151 kJ per kg so that locates point a on the chart once you know point a you follow the isentropic line the entropy is constant I do not have to read the value but if you do you will find it is fairly close to 4.6 it is just a little over 4.6 so you follow that line up to 400 kPa and you get the point B the point B you move left you move isobarically along the horizontal line towards 25 degrees which is the point C so you have here at each point I read of data that I need seen a is compressed isentropically to 400 kPa the final enthalpy at the point B is 230 you know that the enthalpy at the point A is 151 so the difference between these two is 79 kJ which is what which is the cooling I am sorry which is the compression work this is the compression work once you have got the compression work at the point B then stream B is cooled it is cooled to the point C where the enthalpy is 210 so from 210 230 to 210 this is has a cooling cooling load of 20 kJ per kg stream C is then compressed isentropically again on this chart you go along the isentropic line in this case the entropy is 4.6 you go up to 1600 which is point D now if you read the enthalpy at D you get the enthalpy at D is 300 and you already know that the enthalpy at C is 210 so between these two you know that the compression work is 90 kJ per kg so you got one first stage compression work second stage compression work then again from 300 it is cooled down to the point E here cooling load cooling equal to 100 kJ per kg so you go from the point D to point E and if you read the difference in the enthalpies it gives you the cooling load remember for isentropic compression the work done is simply ?H from point E again you compressed point F this is the third stage of compression so ETF is 200 to 285 so again I can write compression work is equal to 85 kJ per kg and finally from F to G there is a huge cooling this heat exchanger is a very big heat exchanger and the cooling load is 285 minus minus 40 which is 325 kJ per kg remember the condensation occurs at exactly 25 degrees so you just need a lot more coolant to bring it down to the point G instead of stopping it the vapor so this gives you the set of calculations that you need for answering all the questions and the questions are simply let me recall the questions for you first question is calculate dry ice produced per kg of G entering the snow chamber we have already calculated that we showed you that the dry ice produced is 0.31 this is a so the answer to A is 0.31 kg of dry ice produced per kg entering the compression the second question is what is the compression work compression work for producing 0.31 kg of dry ice is simply the compression work in the three stages which we already showed you it is HB-HA plus HD-HC plus HF-HE and this whole thing is simply equal to 79 plus 90 plus 85 which we showed you on in individual steps giving you 254 kg so the work done per kg of dry ice is simply 254 by 0.31 or 809 kJ so this is the work you have to put in in order to produce 1 kg of dry ice so this actually completes the problem but the second part of the problem is trace the process on the pH chart we have already done that let me go over it again you have make up carbon dioxide you have recycle carbon dioxide the recycle can be located very easily to know the amount of recycle you have to do the calculation starting from G you do the throttling operation you know the enthalpy at G because it saturated liquid at 6400 kPa so the enthalpy there is minus 40 it splits into vapor and dry ice and how it splits can be done by an enthalpy balance so this gives you the amount of dry ice produced per kg say of liquid at G or per kg entering the compressors so this gives you a split of 0.31 kg per kg entering the compressor this 0.31 is the recycle with an enthalpy of 120 kJ per kilogram it is mixed with the make up which is at 30 degree C you can locate it on the graph and then you mix them the 2.69 of make up will give you an enthalpy of 151 locate that on the chart go isentropically to B B to C is a very small heat exchanger then C to D C is located by the temperature 25 degrees and the pressure 400 from there again isentropic compression from D to E you have to go isobarically back to 25 degrees so this is the cooling required then E to F is again a compression so in each stage is certain amount of work done work is approximately equals not exactly equal but you have to add these three to get the total work from F you do an isobaric condensation again you do a cooling followed by condensation this is throttled so you can see how easy it is on the chart now let me just illustrate here what would happen if the compressor was not isentropic but not reversible okay compression is effectively adiabatic what would happen then is for example third stage if you take the third stage let us look at the third stage compression as an example you have the enthalpy at E and the enthalpy at F are known you have already read those values the enthalpy at E we have seen is 200 and the enthalpy at F is 285 so we concluded that the work was equal to remember this is minimum work 85 kJ per kg now if you are given that the efficiency of the compressor actual compressors of the compression is say 85% this is given a typical values for compressor efficiencies then the actual work is actually 85 by 0.85 or its 100 kJ per kg then enthalpy at F prime the actual at the end of compression the enthalpy is now remember that the work done is always equal to ?H in an adiabatic process so HF prime is actually 200 HE plus 100 which is 300 kJ per kg so on this diagram for example you have to locate HF prime at 300 this is F this is F prime 300 and the actual compression line will is on the right on this side is ideal compression this side is actual so your work will increase by that amount so correspondingly if all the compressors have an efficiency of 0.85 the total work that we calculated earlier the sum of the three terms that we calculated we got 819 kJ so correspondingly the total work in isentropic case is 819 kJ per kg of dry ice now actual work is equal to 819 divided by 0.85 you can calculate this and 20 be approximately 940 so you can see that with the chart available knowing the efficiencies you can actually get the actual work done therefore you can get the work required in order to produce 1 kg of dry ice so if you do have the pH chart it makes calculations much easier if you were to do the calculations with an equation of state you can get equally good numbers provided you have a good equation of state for carbon dioxide but the pH chart makes life that much easier so this is simply to illustrate you the use of the laws as we derived them the first law actually in effect both the laws because remember while I am using only enthalpy balances we are locating the points through an identification of the compression as an isentropic process that means we need the entropy as a property of state which is what the second law defines for you so effectively this illustrates for you how calculations can be done with the pH chart on any process.