 A piston-cylinder system contains 2 kg of nitrogen and 8 kg of carbon dioxide at 100 kPa in 27°C. Assuming ideal gas properties determine the partial pressure of both components at both the beginning and end of the process, and the amount of work required to compress this mixture isothermally to 500 kPa. So Part A is asking us to determine the partial pressure of both components at the beginning and at the end. I'm defining the beginning of the process as state 1, the end of the process as state 2, so I want to determine 4 partial pressures. The partial pressure of the nitrogen at 1 and 2, and the partial pressure of the carbon dioxide at 1 and 2. I know because I have ideal gases, and because I'm modeling this using Dalton's Law, that I can write the molar fraction as being the proportion of partial pressure of the substance to the pressure of the mixture. That means the partial pressure is going to be the molar fraction of that substance multiplied by the mixture pressure. And since the molar fraction is going to be the same for both substances at state 1 and state 2, I just have to determine what the molar fraction is, and then multiply each molar fraction by 100 kPa to get the answers for state 1, and then multiply that by 500 kPa to get the answers for state 2. To determine the molar fraction, I will build a table. So the mass of the mixture is just going to be the sum of the masses of the individual species, which is going to be 2 plus 8, which is 10 kg. And then the molar fraction for each species will be the mass of that species divided by the mass of the mixture, 2 divided by 10 is going to be 0.2, 8 divided by 10 is going to be 0.8. The molar mass is for both substances I can look up. Nitrogen is going to be 28.01, and that's kilograms per kilomole. And then CO2 is 44.01. And then I take the mass divided by the molar mass to come up with the number of moles, which is going to be in kilomoles. So 2 divided by 28.01 is going to be a number that my calculator will tell us. 0.0714, 8 divided by 44.01 is 0.18177. When I sum those together, I get the number of moles of the mixture, which is going to be 0.253. And then we take the number of moles of each species divided by the number of moles of the mixture to come up with the molar fraction. So I take 0.07143 divided by 0.25318 and I get 28.2%. So then the remainder, whatever, 71.8% must be the nitrogen, 71.79. So I will write 0.718. Now that we have the molar fraction, and we know that the molar fraction also represents the proportion of partial pressure of the species to the mixture pressure, I can say for state one, the partial pressure of the nitrogen, the partial pressure of the CO2 are going to be 100 kilopascals multiplied by 0.282. So that would be 28.2 kilopascals and 71.8 kilopascals respectively. Then for state two, I follow the same procedure except I multiply by 500 kilopascals. I don't trust my mental math for that, so calculator if you would be so kind. We get 141 kilopascals, what, 359? Hey, look at that, 359. So the partial pressure of the nitrogen is 28.2 kilopascals at the beginning of the process and 141 kilopascals at the end. The partial pressure of the carbon dioxide is 71.8 kilopascals at the beginning and 359 kilopascals at the end. Again, that partial pressure is an imaginary pressure that we can use to help us model the behavior of the gases. We are treating them as being a partial pressure but occupying the entire volume. For part B, we are analyzing a work term because this is really thermal one again except with mixtures. And specifically, this is a boundary work term. So I'm going to be using the boundary work of an isothermal process, which we derived in thermal one, and we get mass times gas constant of the mixture times temperature times the natural log of V2 over V1. Note that that V2 is the volume of the mixture but because we're using Dalton's law, that's also the volume of each of the individual species. Also note that because this is an ideal gas, instead of writing MRT, I can write PV. So I could write pressure one times volume one or I could write pressure two times volume two, depending on what's most convenient in the circumstances in front of me. Since I know the temperature and pressure and the mass, it's probably going to be most convenient for me to determine the specific gas constant and use MRT itself. Also note, I have a couple of different ways I can approach this. I could figure out the work required to compress the nitrogen, the work required to compress the carbon dioxide, and then add those works together. Or I could figure out the work required to compress the entire mixture all at once. And just for character building, let's try both methods. So let's figure out the work required to compress just the nitrogen first, and then the work required to compress the carbon dioxide, and then we will analyze the entire mixture. So the mass of the nitrogen is 8 kilograms, excuse me, 2 kilograms. So the mass of the nitrogen is 2 kilograms. The specific gas constant for nitrogen is going to be the universal gas constant, 8.3 on 4 kilojoules per kilo mole kelvin, divided by the molar mass of nitrogen, which we know is 28.01. I could also use the number of moles instead of the mass and the specific gas constant, in which case I would use the number of moles and the universal gas constant. The temperature of the nitrogen is the same as the temperature of the mixture, which at state 1 and state 2 is 27 degrees Celsius. So this will give us a quantity in kilojoules per kilogram, and the kilograms cancel, so just kilojoules overall. Then I multiply by the natural log of V2 over V1. Well, V2 over V1 is not particularly helpful because I don't know the volumes. So it might be more convenient to try to write this in terms of pressures. So if I go back to my ideal gas law, pressure times volume is equal to mass times gas constant times temperature. I could say the volume of N2 is equal to the mass of N2 times the specific gas constant for N2 times the temperature of N2 divided by the pressure of N2, in which case the proportion of volume of N2 at state 2 is going to be the mass at state 2, the specific gas constant at state 2, the temperature at state 2 divided by the partial pressure of the nitrogen at state 2. And I could say that the volume of N2 at state 1 is going to be the mass of N2 at state 1 times the specific gas constant of N2 at state 1, times the temperature of the nitrogen at state 1 divided by the partial pressure of the nitrogen at state 1. In that case, my mass is going to cancel because it's the same at state 1 and state 2. The specific gas constant will cancel because it's the same at state 1 and state 2, and the temperature will cancel because it's the same at state 1 and state 2, which means that I'm going to be left with the partial pressure of the nitrogen at state 1 divided by the partial pressure of the nitrogen at state 2. Also note the proportion of partial pressure at 1 and 2 is going to be the same as the proportion of the mixture at state 1 and 2. I know that because the partial pressures are just the molar fraction which is constant times the pressure at the mixtures so the molar fraction would cancel in the numerator and the denominator I also know that because the volume proportion is going to be the same for n2 as it is for CO2 as it is for the mixture because I'm modeling this using Dalton's law and each of the species is assumed to take up the entire volume. So instead of writing the volume of the n2 I could just write the volume of the mixture at which point this would just be the proportion of the properties of the mixture which would still cancel down to pressure at state 1 divided by the pressure at state 2. So whatever the case I'm going to be taking 1 5th whether that's 100 divided by 500 or 28.2 divided by 141. So 2 times 8.314 times 27 plus 273.15 divided by 28.01 times the natural log of 1 5th. Calculator that is a times not a divide. Come on. And that's negative 286.774. Good question. Does it make sense that it's a negative number? If you said yes it does because it's a compression process therefore a work in but we always define as a body work as a work output therefore a negative work output is equal to a positive work in then you were exactly right. Now I can repeat this process for the CO2 and for the same reasons as before this is still just the natural log of 1 5th. So calculator all you have to do is swap the two with an 8 and the 28.01 with a 44.01 and we get negative 730. So in this compression process it takes 286 kilojoules of energy to compress just the nitrogen and it takes 730 kilojoules to compress just the carbon dioxide. So when I add those two quantities together I get the total work required which is negative 1016.84 kilojoules. Since that's a negative work output I will write that as a positive work input 1016.84 kilojoules. So that's what you would get if you analyzed each of the substances individually. Now let's try the mixture. For the mixture I'm just going to be using the same equation except I'm going to use the mass the mixture times the specific gas constant of the mixture times the temperature the mixture times the natural log of the volume proportion of the mixture which is still just 1 5th. I know the mass of the mixture is 10 I know the temperature is the same so I have to go determine the specific gas constant for the mixture or alternatively. To be consistent I could write that as the universal gas constant divided by the molar mass of the mixture in which case I have to determine the molar mass of the mixture but I can do that pretty easily because I happen to know the mass of the mixture and the number of moles the mixture already. So I don't even have to try to worry about figuring out the equation in terms of other properties I can just go back to what it actually means. The mass of the mixture divided by the number of moles the mixture which is going to be 10 kilograms divided by 0.253. So 10 divided by 0.253. Let's see if I've got that up here somewhere. There it is. 39 and a half and that would be kilograms per kilomole. So down here I can write 39 and a half 4976 kilograms per kilomole. Kilomoles cancel, kilograms cancel. Again it's because it's the same kilograms. It's kilograms of mixture. Kilograms of mixture here. Kilograms of CO2, kilograms of CO2. Kilograms of N2, kilograms of N2 and so on. That distinction is important. And then Kelvin cancels Kelvin leaving me with kilojoules. So this time for all the potatoes 10 times 8.314 times 27 plus 273.15 and then we divide by 39.4976 and we multiply by the natural log of one fifth. And we get negative 1016 which means that our work output is negative 1016 which means that our work input is positive 1016. So regardless of the method we choose whether we choose to analyze the entire mixture all at once or if we break it into individual components and analyze the individual components separately we end up with the same result. So this was a boundary work calculation which in terms of thermal one again except with mixtures is relatively simple but the logic still applies when we consider bigger broader analysis. We can set up an energy balance on the individual species individually or we can set up an energy balance on the entire thing all at once. We can set up a mass balance on the individual substances individually or a mass balance on the entire mixture all at once which is more useful depends on the circumstances what you're trying to get to and what you have to work with.