 I am telling you that the we have first representation of reactions species j equals 1 to n let us say i equals 1 to r this nu ij is called stoichiometric matrix we said the significance of nu ij is that dn ij which is change in moles of j due to progress of reaction i as the reaction progress as the change is or that okay we will just keep this as and d lambda j will be the progress variable and d lambda i if you like for reaction i then we have that dn ij by d lambda i no by for each reaction i the change in the number of moles of j is proportional to its stoichiometric number by convention the stoichiometric coefficients are positive these are remember these are positive for products in negative if we look at equilibrium I have a box in which many reactions take place if there is face equilibrium I will consider the homogeneous reaction and say equilibrium of homogeneous reactions actually it does not have to be homogeneous it can be heterogeneous but equilibrium thermodynamic equilibrium means face equilibrium and reaction equilibrium so I can pretend that face equilibrium first occurred and all the reactions occur in one phase so formulation would really be the same then I need dg less than or equal to 0 at equilibrium at constant Tn so at equilibrium actually you have dg is equal to 0 is the criterion of equilibrium but dg is equal to minus stt plus vdp plus sum over mu i dn i now this is 0 this is 0 so you get sum over i mu i dn i is equal to 0 make this j actually it makes no difference but dn j is the total change the number of moles of j this is equal to sum over i dn i j remember we defined dn i j is change in moles of j due to progressive reaction i if I sum over all the reactions I get the total change in moles of j but dn i j is equal to nu i j times d lambda i so if you call this we call this equation 1 this is not a mathematical equation this one is only a representation this is 2 this is 3 and finally 4 substitute this back you get sum over j of mu j nu i j into i is where they get to from sum over i this is our species you made this j oh I am sorry d this is correct dn i j is simply there is no sum over i there is no sum over j wondering what happened dn i j is simply nu i j times d lambda i so nu i j times d lambda i and then there is a sum over i this is over all species this is over all reactions like j equals 1 i equals 1 to r now this quantity this is sum over i d lambda sum over j this is dg this is a criterion of equilibrium now if all the if our reactions are independent then thermodynamics demands that dg should be 0 regardless of the progress of any one reaction then these quantities are linearly independent and you know from linear algebra that a certain number of quantities certain quantities a set of quantities is linearly independent and the sum of a coefficient times this quantity will be equal to 0 only if each of the coefficients is 0 so this implies sum over j equals 1 to n of nu i j mu j should be equal to 0 for all i so this is the final criterion of equilibrium 5 it is important that the reactions be independent then the progress of each reaction is independent this summation sum over j sum over i I am just switching the sums and first summing over j and then summing over i as long as the left hand side is finite mu j nu i j will come there yeah first you have to do this summation then you have to do this that is all when I finish this summation I will have a function of i that multiplied by d lambda i but the argument next step says that d lambda i are independent you these linear you must have done vector algebra you have ci vi is equal to 0 if ci vi is equal to 0 and the set vi are independent are linearly independent this implies ci is equal to 0 for all i this is your usual vector decomposition also you decompose a vector in three dimensions into three components the vector is 0 if and only if every each of the components is 0 it is the same way so you get this result that if the reactions are independent if our reactions are independent each has a progress variable that is independent of others thermodynamics demands that the coefficient should be 0 because if it was not 0 then I choose to progress that reaction for which it is not 0 and dg so if dg changes then the original situation could not have been at equilibrium so if the system is at equilibrium then this is true now remember the representation of the reaction was nu ij a j is equal to 0 this is representation this is not an algebraic equation but if you have this representation then the equilibrium criterion is simply obtained by replacing a j by the chemical potential of j and of course in this case as I said nu ij is also is equal to 0 for all j not participating in reaction i in systems in large systems with many reactions these matrices this nu ij matrix is often called as parse matrix because you may have 22 components each of the reactions may involve only 2 or 3 so most of the nu ij's will be 0 and in large number of computational techniques you deal with parse matrices you need special techniques when computationally sparse matrices are difficult to deal with so this is the criterion equilibrium but this is also equal to remember that this is this is defined as ?g for any reaction i is defined as sum over j equals 1 nu ij nu j this is for reaction i the free energy change is exactly this this is because you write for example let us say you are burning carbon let us say you get half O2 you get CO and write another reaction CO plus half O2 you can use CO2 so in this nomenclature we just rewrite this as CO minus C minus half O2 is equal to 0 and you write CO2 minus CO minus half O2 is equal to 0 so this could be component 1 this could be component 2 this is 3 and this is 4 so the number of species at equilibrium is 4 and you write the coefficient matrix nu ij is the same as for component 1 in the first reaction it is minus 1 for component 2 it is minus half for component 3 it is plus 1 for component 4 it is 0 for the second reaction component 1 is absent component 2 is oxygen which is minus half for component 3 which is CO it is minus 1 for component 4 CO2 so these are linear algebraic equations the number of independent equations is simply the rank of this matrix so in this case the rank of this matrix rank of nu ij is equal to number of independent reactions in this case it is 2 clearly the rank is of course the largest square matrix whose determinant is non-zero you could have written C plus O2 equal to CO2 but that would not have been an independent reaction because you can produce it by combination of the other two so this ?g for example for this reaction ?g would be let me write the change in free energy let us write down the moles let us say at equilibrium I will write these out equal to CO and CO plus half let us say I start with one mole of carbon and one mole of oxygen is initially this is what I will write here initial carbon is carbon suppose I should write it separately species initial in moles at equilibrium you have carbon oxygen carbon monoxide and carbon dioxide initial moles 1 1 0 0 this is arbitrary you can start with any at equilibrium if this is 1 minus x 1 minus x 2 let us say at equilibrium let x 1 x 1 be equal to moles CO produce in reaction 1 and x 2 is equal to moles CO2 produce in reaction 2 so oxygen is consumed in both its mine 1 minus x 1 by 2 minus x 2 by 2 carbon monoxide x 1 is produced minus x 2 then carbon dioxide is x 2 I have chosen a bad example because I have chosen a heterogeneous system carbon started with 1 minus x 1 that is all x 2 sorry thanks only only in the first reaction 1 minus x 1 is the value at equilibrium. So I have criteria of equilibrium I have first reaction which is I call this component 1 this is 1 this is 2 this is 3 and this is 4 okay for the first reaction I have carbon monoxide for carbon monoxide the coefficient is 1 in the first reaction so µ of carbon dioxide minus µ of carbon minus half the chemical potential of oxygen is equal to 0 the second reaction it is µ 4 minus these are numbers sorry µ carbon is 2 is it now carbon is 1 and oxygen is 2 this is µ 4 minus µ 3 minus half µ 2 is equal to 0 where does it gives you an equation go or is it still around you cannot get rid of equations and you do not like them take a guess is it still around or have we lost it it is around right what the gives you an equation still demands is whether there is reaction or not sort of relentless you all µ and µ 2 µ 3 etc have to satisfy the gives you an equation. So basically all of these will have to be functions of composition such that the gives you an equation is satisfied now suppose in this particular case I happen to have a solid and a gas phase so this is carbon here I have CO2 CO and oxygen right so I have two phases so I have to write down the models in this phase I have to write the Gibbs regime equation for components 2 3 and 4 component 1 is pure solid. So I have first of all µ 1 is equal to µ 1 pure I could write an equation for it in terms of µ 1 pure being in equilibrium with its vapor phase µ 1 solid is equal to µ 1 vapor and I could include µ 1 here but I will write it as it is I will tell you why the others µ i is equal to µ i all of the others are in the gas phase so you will get µ i 0 plus RT ln P yi times Vi now i equals to 3 and 4 in the reaction equilibrium context all you do is separate things the things that depend on composition and other things that depend on temperature and pressure then if possible you separate out also the pressure dependence here µ i 0 is a function only of temperature µ 1 pure is a function of temperature and pressure but you know the condensed phase the pressure dependence of the chemical potential is very weak so this is approximately equal to µ 1 pure at T and P equal to 1 means it is independent of pressure that is the only important point that is effectively function of temperature alone I am going to write this I am interested in the composition at I may be burning coal and all I want to make sure is for example there is no carbon monoxide because I want the fellow is burning the coal to survive let us say I want carbon monoxide below a certain level or I will set it equal to 0 at equilibrium so I am asking I want to solve these equilibrium equations for the compositions at equilibrium and I can put constraints on it as a designer so if I am writing these out RT ln P yi contains the composition dependence I will separate that out and get log of P 3 y 3 P 3 µ 1 is effectively independent of this thing I will take the µs to the other side µ 0 the functions of temperature to the other side µ 1 will all automatically come to the side half µ 2 0 minus or I will take the ratio P 2 y 2 P 2 or half this is your first equation all these components are gas phases so I will get log of P 4 y 4 and P 4 divided by P 3 y 3 P 3 or there is no P 4 sorry no P 3 here is just P equal to these things will come to that side will become µ 3 0 plus half µ 2 0 µ 4 0 because this quantity is called delta G we denote this delta G 0 for reaction 1 I put approximately because µ 1 is not µ 1 0 µ 1 is chemical potential of component 1 as a solid at the temperature and pressure of the system it is also the same at pressure equal to 1 but it is not in the gas phase so the superscript 0 does not apply to that but delta G 1 0 by convention is simply the standard free energy change of the reaction with each of the components in its standard state so carbon will be in the solid state the others will be in the gaseous state in this quantity the only thing that matters is that this quantity is not a function of pressure it is a function of temperature low effectively a function of temperature low now for this particular system there is a coupling the mole fractions depend on both the reactions so let me write down the mole fractions as far as gas phase is concerned this is not in the gas phase this is solid all these three are in the gas phase the mole fractions are determined only by these components so total moles in the gas phase at equilibrium is 1 plus x 1 by 2 and counting only gas phase moles incidentally there is a convention is delta G 0 you often put a prime there to indicate that one of the components is not in the gas phase nevertheless delta G is the function of temperature the prime is often left out these days the original convention was to indicate it you do put a prime on this ratio I will tell you in a minute so I can write down the mole fractions here the mole fractions are simply 1 minus x 1 by 2 minus x 2 by 2 divided by 1 plus x 1 by 2 minus these are being added x 2 minus x 2 by 2 is also there okay thanks and so on you write this as number of moles by total number of moles so I have this p y 3 y 3 is actually n 3 by mt n 3 by mt and this is n t is this total moles at equilibrium and each of these is ni so let me take this ratio I have p power half and I will combine these things I will write p power half I have y 3 which is n 3 by n total this is n 2 by n total to the power half I have n 2 to the power half times p 3 I will pull out the n t power half here incidentally that whole thing is actually fugacity of component 3 by fugacity of component 2 power half it is also equal to p power half by n t power half into all this various forms of it so also equal to p power half into y 3 by y 2 power half into p 3 by p 2 power half this is equal to on the right hand side exponential of minus delta g 1 0 by RT the second reaction is f 4 by f 3 f 2 power half this is equal to 1 by p power half number of moles is n t power half will go to the numerator into if you like n 4 by n 3 n 2 power half it is also equal to n t by p power half by y 3 by 2 power half this is equal to exponential of it is a lot of ways of writing the same equation because this ratio is a function of temperature alone so at a given temperature this is a constant this is given a name kf is the equilibrium constant in terms of fugacities ratio of this this is equal to equilibrium constant for reaction to gain return in terms of fugacity notice exactly product over I each of these actually becomes product over j of fj to the power no ij in reaction one I must put a prime here to indicate that this only involves gaseous components so if you take the first reaction c o and o 2 are involved f 3 to the power 1 times f 2 to the power minus half so that comes with the denominator so this is a very compact notation this is your kf prime so there should be a prime here to indicate that I do not include non-gaseous components in calculation this is valid even here so this is kfi the second case you do not have a solid component you directly have which formulation you use actually basically you need to solve for at equilibrium you are solving for x 1 x 2 the variables at equilibrium are x 1 x 2 pressure and temperature and you have two equations to solve for I get a certain value for x 1 – x 2 I could change the temperature so that x 1 – x 2 is 0 for example I may demand it is very difficult to ask in any reaction that x 1 – x 2 be exactly 0 but you can ask that it should be less than 10 to the power – 10 some number predetermined number then you can find the conditions under which this is true for example if I fix the temperature then the right hand side is completely fixed in practice what you do is carry out this reaction may be possible to carry out the reaction at one convenient pressure so you carry it out at some low pressure where the gas phase behaves ideally so all the fees are 0 for example because this ratio it is the form of the ratio this is f3 by f2 to the power half and there should be a power half here right n3 by n2 power half so this is called kn for example and this is called kfi and this is called ky to add to the fun you can take the p inside and call it kp you can define k is simply this symbol k sub i would should simply be k sub i of any donkey would be simply donkey to the power no ij for that that is all it is simply a symbolism the thing is depending on the kind of data you have available you can solve for different quantities fact reaction equilibrium is very neat you could have in fact had instead of k prime you could have used k itself except that you would then add to this reaction set carbon solid this is solid you will write to carbon gas and here you would have saturation pressure this mu 1 solid pure would be equal to mu 1 gas pure is equal to actually mu 1 gas would not be pure because once you have the gaseous phase carbon is going to be in combination with all of those so this will be mu 1 0 plus RT ln p y 1 p 1 but this y 1 would be so small that effectively if the other components do not affect it you would have mu 1 gas would have been mu 1 gas pure which would have been mu 1 0 plus RT ln p 1 saturation times p 1 saturation so this will be almost effectively p 1 saturation times p 1 saturation but the point is the whole treatment of reaction equilibrium depends on the fact that mu 1 0 is a function only of temperature but mu 1 0 plus RT ln p 1 saturation is also a function only of temperature the number does not matter because what you do here you have to get an experimental value for delta g 1 0 somehow you can get that from others experiments or by combining others experiments that is you can add and subtract reaction so that you get your desired reaction but this must come from measurements of these quantities for example if it comes from this reaction you have to measure y 3 y 2 and p at a sufficiently low pressure where p 3 p 2 or 1 if you do that then you get the quantity at one pressure it is not a function of pressure so you can use it at any other pressure the entire treatment of equilibrium again thermodynamics will always duck the issue of calculating mu 1 0 you do not know that number but you know what it is you know it is the chemical potential of pure 1 in the gas phase at temperature Tn pressure equal to 1 so if you can extract a number for that or number for a combination of mu 0's you do not need the individual mu 0's you can get a count get the value of combination if you do that then you can get it from the tables and use the fact that this is a function of temperature alone the whole idea is to separate everything into a function of temperature in fact I would always start with this formulation the nu ij you can never go wrong in the action equilibria if you start with this formulation and then throw in the models for the chemical potential depending on the phase in which they exist anything is you got used to doing this and this is already lot of algebra has been done for you so you can go ahead actually carried out I have done this for a multi component system I could have started off with one but you have already seen reaction equilibria very often you could have for example you could have a catalytic reaction in this case the different issue but you could have a more complicated reaction where you have a catalyst involved and very often the catalyst gets poison because its surface is occupied by coke by the carbon particles therefore it becomes ineffective then you can demand that the carbon deposition should be below a certain limit so you can have a set of reactions in which one of the constraints you throw in additionally is simply a design constraint so the constraints are the equilibrium equation thermodynamics imposes on you the equilibrium criteria for every independent reaction that you write then you may have a temperature constraint simply because the container you may be doing carrying out reaction here in the refineries for example one of the problems in the refineries is catalytic conversion one of the largest economic drivers of the whole thing depending on the market you may want to sell more diesel or you may want to sell more lubricating oil so you may in the distillation column itself you may have a whole separation so what you do is if you want more diesel you take this lubricating oil you will get the heavy components and you crack it in a catalytic cracker that is you heat it and decompose the higher molecular weight compounds into lower molecular weight compounds ultimately the diesel is only a lower molecular weight and you feed this back to the distillation column it comes out in the diesel stream in fact one of the big problems that they have is how do you get more diesel out of the system that is how do you get more naphtha how do you get more gasoline the other problem the present refineries as is the removal of sulphur how do you desulfurize because the oil we get is crude oil which contains a high sulphur component now if you do these cracking operations the catalyst is very effective initially but the carbon deposition makes the catalyst ineffective so you can ask under these conditions you can ask how can I make the carbon 0 equilibrium so I can ask that x1 should be equal to 1 this is a trivial problem it does not make sense here but if I write down a more complex system I can simply ask when does when should the carbon deposition on the catalyst be very small so the whole set of reaction equilibrium problem many of them are from denby that I have given you will go through some of these we will just ask various questions for example why does the you know basically the ores in an organic chemistry all the ores occur as a sulphides or oxides first question you can ask is why do they occur as sulphides or oxides you will find if you do a delta g calculation that is the lowest free energy form then you have to you can the other questions are when you roast zinc sulphide why do you get zinc oxide at what time what temperature do you get zinc oxide or if you use calcium limestone you get calcium oxide but is calcium oxide stable can you store it you will find after a while become calcium carbonate because even at the low 10 to the power minus 2 carbon dioxide in the atmosphere the equilibrium contains a significant amount of calcium carbonate you can calculate the equilibrium quantities of calcium carbonate calcium oxide so I think that is all the real interest the theory part of it is trivial but doing the calculations is has to do with the kind of data that you have.