 This is CO2H2 this is called a reformer the petroleum industry is full of such reactors actually they have they keep rearranging the molecules they want carbon monoxide you cannot safer to store carbon dioxide mix it with hydrogen get some carbon monoxide here what you have here is carbon monoxide CO2 hydrogen H2O and carbon okay the reactions given CO2 plus H2 giving you CO plus H2O and then CO plus H2O giving you C plus H2O these cases the KP values are given at 1000 degrees so not much work for you in fact log KP values log to the base 10 KP is given for the first reaction this is minus 0.2 the second one is minus 0.5 and two more reactions are given this is given as 0.7 this ratio is given 1 is to 1 the problem in such reactions this is typical of reactions where a solid carbon is formed need not be carbon there are many complicated reactions in organic chemistry where you have something that is formed in the solid phase usually that ends up poisoning the catalyst so it is generally called coke when they say coke does not mean carbon necessarily it means any organic solid substance it is formed during a reaction that ruins a catalyst and the that ruins the catalytic activity so the idea is to prescribe how much of this can be formed I mean sometimes there is a tolerance so they will say you are permitted exactly 20 in this problem it says if exactly 25% of the carbon coming in as carbon dioxide made deposit on the catalyst at what pressure should the reactor operate that is the question temperature is usually fixed this is more like its considerations process considerations probably the particular process has carbon dioxide and hydrogen available at 1000 degrees so it is no point cooling it and then heating it for faster kinetics and so on so they operate at 1000 degrees but they want to know essentially if this should be 0.25 that is 25% of carbon entering as CO2 that is specified the question is what is the pressure range of pressures it says actually should be less than so four possible reactions are given in all these cases the reactions are listed without reference to how many independent reactions you have so the first step is to find out the number of independent reactions and for number of independent reactions you have to write down the stoichiometric matrix you can do that or you can do this by a simple rule for which in fact I think I told you the rule number of independent reactions be interesting to see if you can come up with an exception this rule is only a heuristic rule it is right 99.9% of the time if you can come up with a set of reactions for which it is wrong I would be very interested the rigorous proof is simply this you take this stoichiometric matrix in this case and take its rank that is the number of independent reactions that is simply the theory it is from linear algebra so you can work that out but the simpler thing is to take the number of species at equilibrium in this case 5 minus number of elements required to produce them in this case it is 5 species at equilibrium minus 3 elements which is carbon hydrogen and oxygen so with those 3 you can produce all of them therefore the number of independent reactions is 2 actually more rigorously it is the rank of the stoichiometric matrix the trouble about finding the rank of a matrix is you have to take all by 3 by 3 is and show that all the determinants are 0 by the time the quiz time will be over so it takes you all of 50 minutes to find out if to ensure that the rank is not 3 but in any case you have two reactions so you can choose any two reactions normally the way to choose this is like this you have to ask for pressure choose one reaction which is unaffected by pressure and one reaction in which the carbon you know there is a specification on carbon so make sure you choose one reaction in which carbon is produced that is a convenient way in this case it will be reactions 1 and 2 because here the number of moles does not change therefore it is unaffected by the total pressure in the total number of moles and this one produces carbon so you can just you can choose any two actually it does not matter which ones you choose the final result will be the same but for your computational purposes much easier to do it this way otherwise you will solve simultaneous equations for the pressure let us look at equations 1 and 2 the first reaction is that Kp we use Kp and then go to Kf if necessary we will assume Kf is approximately equal to Kp we can verify if the pressure is high you can go and correct it next time correct for Kp p is large that will be the second iteration so we will take Kp1 and it is equal to so total pressure by number of moles the power ?u1 we will label all these species call this component 1 hydrogen will be 2 this can be 3 this can be 4 and this is 5 so let me write out the this is simply n3 n4 by n1 n2 this is equal to exponential of whatever is given – 0.2 if you look at reaction 2 in the same rule should rate Kp prime reaction 2 involves a solid so you leave out the solid means specifying the so it will be n4 by n2 n3 this is equal to exponential of – 0.5 actually it is not even exponentials 10 to the power – 0.2 and given as log to the base 10 we will work out the moles at equilibrium it is always good to do a degree of freedom calculation to begin with number of degrees of freedom is simply the number of components minus the number of phases plus 2 minus the number of independent reactions so you get 3 degrees of freedom right this is components this is number phases so one solid phase carbon is present this plus 2 is by Gibbs and this is number of independent reactions 3 degrees of freedom the temperature has been fixed 2 degrees of freedom left what are the 2 degrees of freedom and I want you to find the pressure so you must tell me the independent ones that I am fixing that is a special constraint I have to put it in correct that is a constraint so it will determine so let us say you lost 1 degree of freedom by that specification if you say carbon deposition should be 0.25 for one more what else there is one more degree of freedom let us do the problem and come back to it because there is it is a bit tricky but it is nice to know the degrees of freedom before you do a problem but let us discuss it here first of all I have carbon monoxide in the output let us assume that X1 moles of let us say carbon dioxide or hydrogen let us take hydrogen X1 moles of hydrogen are converted in reaction 1 and X2 moles of reaction are moles of hydrogen are converted in reaction 2 right each reaction has one independent progress variable the progress variable is the same as the number change in the number of moles of one of the species normally it is taken for a product species maybe I will say H2O so we will say H2O conversion H2O formation is same as this but the minus same so if X1 moles of water is not in the input so this is X1 plus X2 at the outlet then if you look at carbon monoxide this is produced in reaction 1 X1 will be produced X2 will be consumed if you look at carbon dioxide it is consumed here it is not produced at all so it is 1 minus X1 1 enters and X1 is consumed look at hydrogen it is consumed in both reactions so it is 1 minus X1 minus X2 carbon is produced only in reaction 2 then for reaction 1 delta nu 1 is 0 delta nu 2 prime the prime comes in because the solid stoichiometric coefficient of the solid does not count so it is 1 minus 1 minus 1 so it is minus 1 so I should have written when I say prime here I mean prime here also so the first equation this is 0 so I do not have to worry about this I have to count the total moles total moles in gas phase so you should make sure that you do not count the carbon this is solid so total moles is 2 and X1 minus X1 minus X1 plus X1 so X1 does not appear minus X2 minus X2 plus X2 minus X2 only this part counts so I have n3 this is in the correct order now carbon monoxide is 3 CO2 is 1 H2 is 2 is 4 so I have n3 which is X1 minus X2 into n4 is X1 plus X2 my n1 is 1 minus X1 2 is 1 minus X1 minus X2 is 10 to the power minus 0.2 this one will be 1 by p 2 minus X2 the total number of moles because delta nu2 is minus 1 it will be nt by p into n4 which is X1 plus X2 divided by n2 n3 1 minus X1 minus X2 n3 is X1 minus so I have X1 X2 and p have two equations but three unknowns however so you need one constraint at least that constraint has been given to you first question is if the carbon deposited is 0.25 what is permitted you assume and then ask when will it be less so if X2 is given as 0.25 so given it is straight forward to solve you can solve the first equation for X1 and then solve the second equation for p can you do this so that we get some numbers for discussion X2 is 0.25 so you are talking about X1 minus 0.25 into X1 plus 0.25 so it is X1 squared minus 0.0625 divided by 1 minus X1 will remain it is only a quadratic this is 0.75 minus X1 is equal to 10 to the power minus 0.2 just a quadratic so you will get two roots tell me both roots in case one is negative we will of course drop it talking about X1 squared into 1 minus 10 to the power minus 0.2 then X1 comes from here this is minus 1 minus 0.75 minus 1.75 into 10 to the power minus 0.2 into X1 then the constant is 0.75 into 10 to the power minus 2 come to this side so it is minus 0.0625 plus 0.75 into 10 to the power minus 2 minus 0.2 what do you get for X1 are there two roots 0.425 that is only one calculator so you are the final boss hoping somebody else would have one we will come back to degrees of freedom so what do you get for p for X2 equal to 0.25 you have X1 is equal to 0.425 the p you can do p is simply 10 to the power 0.5 into 2 minus X2 which is 1.75 X1 plus X2 is 675 divided by 0.325 into X1 minus X2 is 0.155 and 75 sorry about 18 about 60 actually there is a competitor here I did not got some more much 60 about 65 okay notice p will come out in atmospheres because of the convention your mu 0 was by definition the chemical potential at the temperature T and 1 atmospheres now how will you decide what range of pressures to operate at what I want 0.25 or less of carbon this is the calculation for exactly 25% of the carbon being deposited if I wanted less this reaction should proceed less what happens to this reaction as you increase the pressure this reaction is unaffected by pressure you are looking at one reaction affected by pressure if the pressure increases what happens either you are comfortable let's certainly as principle simply says things will happen in such a way as to prevent what is already happening which is applicable to governments which is applicable to IIT something is happening well things will happen so as to prevent it so here if you what happens if you increase the pressure that what happens when the see number of moles decreases right therefore the pressure will decrease so a decrease in pressure will oppose it an increase in pressure will favor this reaction correct so if p is greater than 65 so first of all number of moles of carbon is x2 notice x2 increases as p increases therefore range of pressure is simply range of pressure is 0 to 65 say that again because we try that out you are saying this is one the other possibilities you are saying I want x1 greater than 0 right that's all all the carbon actually assumed okay x1 should be greater than x2 so you put x1 equal to x2 and calculate the pressure here so when x1 equal to x2 and this is this side is 0 what is the conclusion you started the this has to be 10 to the power minus 0.2 so x1 minus x2 can't be 0 only a fraction of the carbon monoxide that is produced here can anyway be consumed here maybe 99.9999% so this problem does not arise in this case as long as the pressure is less you will get what happened to the degrees of freedom number of degrees of freedom as we calculated it was 3 I fixed the temperature I should have I should have the freedom to fix I fixed the carbon deposition so two variables were fixed what I am to the third degree of freedom but no by degrees of freedom I mean three variables that I can fix independently right then the system becomes invariant I didn't fix it is this a constraint no tell me no is this is this a constraint on the degrees of freedom is this also an input constraint actually it is but it is not always this the point is this hydrogen and oxygen are in the ratio one is to one and they remain in the gas phase there is a constraint that in the gas phase hydrogen to oxygen ratio should be one whereas the minute I produce carbon for carbon there is no such constraint because part of it can be in the solid phase and part of it can be in the gas phase so all elements that remain in a single phase are constrained by input ratios the ratios of elements that remain in a single phase are constrained by the input ratio not elements like carbon in this case as soon as you have carbon deposition thermodynamics will not tell you the extent it will only tell you both phases exist it will tell you what fraction do not tell you what fraction should be in the solid phase what fraction should be in the gas phase you are right but you are right only to the extent that you are talking about the ratio of oxygen to hydrogen so in reaction systems there is another degree of freedom that is lost leave this here discuss degrees of freedom here I think I will write it out degrees of the number of components minus minus 2 minus actually number of independent reactions minus 1 this is for special constraints they are always there in this case x y x 2 equal to 0.25 minus again another special constraint I suppose I should write minus 2 for special constraints one of them is this the other is ratio of hydrogen to oxygen in gas phase the carbon in the gas phase is not so constrained although I sent only one atom of carbon for every mole of oxygen part of it can deposit in the solid phase so I have no constraint in the gas phase you see it does not matter how the compounds rearrange themselves they are all in the gas phase and in the gas gas phase oxygen and hydrogen ratio is restricted to one oxygen may be in CO in CO2 or H2O it can be in three different places but the same oxygen is redistributed same hydrogen is redistributed because the ratio is constrained to be one so I could use one is to a and ask if there is an optimal value of a if I want to readjust this in this particular problem 0 to 65 is a very convenient thing I mean thermodynamics permits you a whole range of pressures and including low pressures I will probably operate at one atmosphere 0 I will have to worry about what leaks in more than one I have to worry about what leaks out I will just operate at one atmosphere and be done with it but if I was using this incidentally as a process for producing carbon I mean this carbon may be activated carbon depending on its structure depending on the way I get it depending on the surface area I get may be very useful so I may actually use it then I may say rather than X2 constraint it as X2 equal to 0.25 or less say at least 25% must be carbon freely depends on your local interest if I do that then I will have to go to 65 atmospheres you think by changing this I can change that pressure suppose I use one a one is to a and keep one of them as always one because it is only the ratio that matters it is possible right if I send in more carbon I am likely to get more carbon in the input then I likely to get more so you can keep this is one is to a and what should a be you may turn out to be 0.2 or something may be an optimal value obviously you will have one degree of freedom so you can choose a and do this redo this calculation it is a lot of routine things but you have to do the analysis clearly and then submit it for calculations in fact the biggest problem as I told you once in the present chemical industries that they have online control for many of these things so online control the operator sitting there will have to control the input in such a way that he gets the desired output and the whole calculation in a chemical industry this online control problem is mainly troubled by delay that is you measure the product if it is not of the desirable quantity you send the difference as input for controlling and that measurement comes too late so if it comes after one day your batch is spoiled that days production is spoiled so what they do is act quickly so they have a model of the process so they run all the disturbances in the input through the model in the model predicts what is going to happen and on that basis of that prediction that is used in a feedback loop in that model prediction the hardest part of it is the thermodynamic package because you have to go and calculate thermodynamic properties and come back and that takes a long time the thermodynamic package itself see typically here two equations this is two if you have 14 simultaneous equations you can run into all kinds of trouble solving them because they are non-linear equations you often have to give guess values and start them off I mean because it is a quadratic you would solve it directly up to cubic under certain conditions you can solve directly otherwise you are going to guess iterate you will do a Newton's option on it and this can go here where depending on your guess and in thermodynamics it is very very sensitive because if your x goes negative then all those equations are meaningless and therefore you will get it will complain it will say you are trying to take the square root of a negative number and all kinds of complaints and so what you need is a whole package that will do this incidentally there is a thumb rule that you should know in all numerical calculations generally true in engineering but I may as well tell you it is particularly true in thermodynamic packages if you are solving for some variable x as a root of an equation if you are doing a Newton's option search what is Newton what is the option is it forgotten RAPH is it the flow is not famous somehow you got tagged Newton so you start off with a guess value what it does Newton Raphson does this then it converges hopefully so after this is iterations on the in the x axis so you guess this is the beginning value x10 then this is x11 this is x12 and so on the thumb rule about Newton Raphson is that it predicts the correct direction of change but it often over predicts the change so what you do is take x10 you find a delta x and add it you will get x1 prime so this value is often negative this is 0 you often go oscillating on either side but thermodynamics will not permit you to get negative mole fractions first of all there will be a log x1 sub air so it will say log of a negative number and throw you out so the thumb rule in these things is to say x1 n is x1 n-1 the previous value plus delta x predicted from Newton Raphson right delta x1 Newton Raphson or any other technique that you have if you are using Picard's iteration you will still get a delta x so the thumb rule here is multiplied by a moderating factor beta is a factor usually beta has chosen if you do not want to do a detailed analysis beta has chosen as 0.1 in chemical engineering this is just experience on a large numbers what it says is the new x1 prime will not go here it will take the direction of change proposed by Newton Raphson but take only one-tenth value so the second value will be here so it will hopefully go like this you will not oscillate violently it is very important for practical computations anyway this is another problem that I want to discuss I do not know if I discuss this problem of limestone decomposition I do not know if you see it these days as long since I travel by train when you travel by train do you see these skills that have you seen these or have you maybe you would not recognize them have you seen devices like this from the train and with some smoke coming out of it these are actually what you have is a grating here and there is an opening here and what they do is add CaCO3 calcium carbonate in actually they add calcium carbonate from the top they add some coal it should write it in this way you actually watched it there is a place for cleaning things up but what they do is add CaCO3 and coal carbon then what comes out here either they add carbon here or sometimes they just burn it burn fuel usually could be charcoal or it could be actually they would not do this carbon is too expensive so in this could be even firewood and firewood is a bit tricky because you cannot get the temperatures required very often so you what you have here is CO2 coming out the reaction is simply CaCO3 giving you CaO plus CO2 this is solid this is solid this is gas so very conveniently for you Kp prime is equal to it is simply partial pressure of CO2 right this is total pressure into why CO2 in the atmosphere partial mole fraction of carbon dioxide is typically 10 to the power minus 2 10 to the power minus 3 so if this is equal to of course exponential of minus delta G0 by RT this part is the mole and delta G0 is a function this is a function of temperature alone so what you do is calculate the temperature at which this total partial pressure of carbon dioxide is 1 atmosphere then you are absolutely safe there is no way if the whole atmosphere may if the whole atmosphere was CO2 you will be dead anyway so you cannot have any interest in the proceedings so you sort of calculate this to be 1 atmosphere and ask when is what is the temperature at which this typically delta G0 is given you can calculate this is known to be 500 degrees in fact most of the people in the at least the older people in the villages will tell you they would not tell you 500 degrees they will show you a stow which is burning with firewood and say and the Naram Arana means color that the from the color of the flame they can tell you what the temperature is so they will tell you this color comes there then the temperatures 500 degrees and the temperature 500 degrees they know that they are getting calcium oxide here they would not even bother to test they will just pull it out and use it give you the time stone CaCO3 give you for this is standard formation data in calories per gram or not here delta G0 and delta H0 are given is delta H0 298 this is also 298 this is minus 269.78 this is calories per gram more sorry this is not 260 269 780 this is minus 144 400 no got the numbers all around this is for CaCO3 it is 269 288 450 yeah that correct for CaO it is minus 144 400 and minus 151 900 then for CaO2 this is minus 94 260 and minus 94 052 but let us ignore delta CP for now so you have to go through this of course D delta H0 by DT is delta CP0 if I have taken this as 0 then delta H0 is constant and then you have B of delta G0 by T by DT is minus delta H0 by T square so your delta G0 by RT is equal to delta G0 298 by 298 plus delta H0 by R it is better to keep the RN simply if you integrate you get just 1 by T so it is 1 by T minus 1 by 298 so if you want one atmosphere for this partial pressure of carbon dioxide you simply set this equal to 0 right this is equal to 0 for PCO2 equal to one atmosphere actually these are not delta G0 values I apologize this is a GF and HF for the pure compounds you have to calculate delta G0 for this reaction so in do this calculation you can show it is about 500 degrees centigrade so in each of these reactions you do not have to play it so safe you can even have partial pressure equal to 0.5 and do the calculations are 0.1 you are not really worried about carbon dioxide except that you do not want carbon dioxide to sit here and ruin your game if all the carbon dioxide sits here you will have partial pressure one atmosphere locally so it will spoil your reaction you must have flow as long as there is flow there is no problem this is hot so this will rise you must have enough vents here for the air to go through and overcome the pressure drop this what happens is this becomes a packed bed this is solids packed up to here lots of pellets and so you have to overcome this pressure drop and the gas will have to go out so the buoyancy will have to be sufficient to take care of the pressure drop for flow and very often they will do something very clever they will throw in a few stones and you wonder why the fellow is doing that it is actually to produce as the limestone decomposes it forms CAO and if you have some stones the CAO is smaller so it will pack very tight after a while to prevent that you put this diluent which is simply stones sensible thing is to put these stones that are available right there and just throw them in actually the guy is doing a very clever job of keeping the porosity of the bed at a proper value that is if you have all same size particles your porosity will decrease if you have if you all same size particles you will have a reasonable porosity if you have particles of different size they will pack in tighter over a period of time so the idea is to have a base of stones that are of a reasonable size that provide the porosity and then the others will