 I will give you an example of a manufacture of a compound called Azadiractin actually a bio pesticide I do not know if you know AID parry makes it it is been talked about you know this big controversy about neem a lot of these neem seeds have been powdered and used as fertilizer in this country but suddenly these companies come along and they want to in fact they patented and said here after used by farmers in India they pay this is one of the few battles that we actually won I think it was Dr. Michelle Kerr CSI our director general who spearheaded this attack and finally there is a class here that says the traditional wisdom cannot be patented and if patented you cannot chart the guys who had the traditional wisdom in the first place but we have a lot of such a cases but this is a bio pesticide taken out of neem seed actually long go there was a consultancy project that came but the way the industry develops this is simply by empirically doing it in the lab then scaling it up and so on but they do not do the fundamentals what I wanted to in fact they came to me I told them these are the fundamental measurements that are required so I will trace that I will give you an idea as to where we use our face equilibrium information what you do is actually you take your neem seeds this is a bio pesticide these the whole area of bio pesticide became important after they discovered in the US that the golden eagle eggs were breaking because of DDT content in the shell we are using DDT very widely as a pesticide it sort of went through the chain and finally somewhere along the I think the rabbit see at it and the golden eagle ate the rabbit so finally DDT persists so the level of DDT got so high that the shell of the egg broke very easily therefore the number of golden eagles decreased this is a study by an environmental group but finally they decided that these pesticides have more harmful effects than short term benefits so they were looking for bio pesticides one of the bio pesticide that is used that is recommended strongly is called asadiractin I have no idea about its structure and things like that but the way it is made what you do is to take neem seeds and you grind them this is some ball mill some mill of some kind comes under your unit mechanical operations I do not know if you still have a course you have a course called mechanical operations still you have a course you do size reduction particles ball mills and rod mills and things like that you do not have a description of that huh but you have it in the curriculum I forgotten whether you have it anyway this powder is taken typically what they do is the process could be batch or this thing you add water and you take out the extract the water dissolves a large number of components including asadiractin will describe the process and then in what you have is a liquid liquid extractor this is water this is ethyl acetate asadiractin is basically a non polar compound as a thumb rule non polar compounds are more soluble in organic solvents than in polar solvents like water so you take a liquid liquid extraction you have distribution of asadiractin let us say the component that I am interested in is a this is asadiractin so you have a in both faces a w and a e a ethyl acetate the asadiractin both this extract is taken out and then in some kind of a heater the ethyl acetate is evaporated out and the asadiractin is collected as you increase the temperature the salt the what you really do is you get you get to a point where the ethyl acetate evaporates and leaves behind more and more concentrated solution of asadiractin finally the asadiractin is separated out you broadly the process that they use water extraction use regardless of the fact that the solubility of asadiractin water is very low but water is about only 10,000 times cheaper than ethyl acetate so you can use 1000 times the amount of water and extract the compound first along with it will come some undesirable compounds then what you do is to choose a solvent in which the distribution coefficient that is the solubility of asadiractin in ethyl acetate divided by the solubility in water is very high so with a small amount of ethyl acetate you can get a large amount of asadiractin and one of the problems that ad parry had they developed the process in industry is just as capable of when there is a monetary drive they just as capable of getting a process through in fact they will develop a process faster than the university because university will keep asking fundamental questions one of the questions that you have is what is the distribution coefficient between these two what is the solubility in water because this at most can be a saturated solution so thermodynamic quantities of interest are what is solubility of asadiractin in water and of course how does it vary with temperature because it is variation of temperature will determine whether you are going to have a boiler that heats the water up brings the water at some temperature normally pressure affects the negligible in the condensed phase so normally its pressure is not as you can ask another question here about the ball mill also you can ask is there an optimal the merriest optimizations of the ball you can ask how many balls should you have inside it what should be the size in what should be the rotation speed and these are all very poorly understood so a lot of it is caused by empirical correlations in chemical engineering one of the things that is very still not well understood is simply mixing second is grinding the energy required broadly speaking the energy required is create voice for creation of surface area incidentally in thermodynamics courses we write du is equal to Tds-pdb you have to write plus sigma da where sigma is the surface energy per unit area so you have to add this term 99% of the application this is very small but if you are looking at something like a ball mill where energy is created this is negligible this is the significant part of it so per unit of area created if you have very small particle the surface area per unit volume increases dramatically therefore you have to pay more penalties but this kind of thing is envisaged already you should make this DE because you should include potential kinetic energies you should include other forces and their conjugate variables but this is a mechanical operation and then you have this extraction with water normally these are done counter current you know water goes in and comes out and that is the thing that is collected but this is one question the second question is what is the distribution coefficient for other directing between water and solvent the question is what is the best solvent and there are 100 considerations for the best solvent ideally if thermodynamics progresses to your point where you understand it fully you should be able to sit at a computer and choose the best solvent some extent you can do that now the data available is very extensive and you can do that to a large extent eventually it simply you will put ethyl acetate water as a direct you will you will not put ethyl acetate you will put put in water and other direction and say what should be the next other solvent for the next step and it will go through all these you hit the idiot box on the head you actually just move the mouse around and click best solvent so you do not even have to be very educated in fact as spent tech has a lot of these flow sheets everything is marked there so you click design distillation column and will design this you just have to need to know how to read the output but let me come back here as far as thermodynamics is contained you still have to supply this data or even in aspen tech there is a thermodynamics package which is where you need to so all I have to do is if I call this to this is water plus as a direct in this is component 1 this is component 2 so I said mu 2 solid is equal to mu 2 liquid this is mu 2 solid is mu 2 solid pure so this is I just leave this as pure solid this has to be written as mu 2 liquid as a direct in as a solid so you write this as mu 2 star then as I told you you do this whenever you do not you have a star that you cannot get away get rid of an equation thumb rule divide by T differentiate with respect to T so you get minus h 2 solid by T square is equal to h 2 bar star minus plus R partial of L and ? 2 x 2 with respect to T so you integrate this equation if you know this value or if you know that h 2 is solid sorry h 2 bar star will become infinity because you know you can go to infinite dilution so this is infinity you can go to infinite dilution because when you divide by T and differentiate with respect to T first of all you divide by T this term is independent of composition so the left hand side should also be independent of composition so you can go to the limit as composition goes to 0 so h 2 bar star is the same as h 2 bar infinity same as the partial molal enthalpy at infinite dilution this is a measurable quantity so you have you can have data for this by T square if you like R T square is partial ? 2 x 2 with respect to T even if you do not have this data you can treat this as a constant and fit the data you need an expression for ? 2 so log ? 2 in this case as a direct and self is a non-polar solute and the polarity of water does not affect it enough for you to worry about these theories you can write this as a x 1 square I will say example so you get log of a which is a constant it is a function of temperature and x 1 square then you have x this logarithm is a x 1 square then you have log x 2 so you can integrate this equation with some data on solubility that is you have to have measured solubility of azadiractin in water ad pari did not have this data actually we had to do some measurements to get this data this is trivial all you do is get some azadiractin put it in a beaker of water maintain that water at some temperature and wait for infinite time in a stir rate ideally you should wait infinite time normally you wait an hour and then it comes to reasonable equilibrium then you make a measurement you stir it but anyway having done this so you can get these constants and therefore you can get x 2 so you can get x 2 as a function of temperature from these equations and some data I have to give you a bit of data and see if I have the data in any case I cannot give you the industrial data because it is there but I will see if I will just take a look and see if there is data I will give it to I give you the data then you can fit you treat this as one constant the other constant is this is approximately constant because you are treating with water the temperature range that you are talking about is going to be something like 30 to 80 degrees centigrade not much wider in absolute terms the small range of temperature 300 to 350 degrees k so you are talking of a small range in temperature so you can treat this as constant this is one constant this is a constant B that is a constant a so you will fit two constants and you will be able to get expression for x 2 as a function of temperature from this equations so that you do and then you can ask later in an optimization program you have to work this also you have to have a heater here you have to supply some Q so this is at room temperature and this is some desired process temperature you have to ask what is an optimal value for TP normally what will happen is in any industry they will have a boiler they will have some waste heat so it is convenient to pipe that waste heat and do the heating anyway so that energy cost may not be for them it may not be an explicit cost in industry those are local variations if you have to set up a boiler it may not be worth it but anyway this is one part of it the other part of it is the distribution coefficient that again what you do is to ask what happens if there is water plus as a direct in this is component 1 this is component 2 this is ethyl acetate which is component 3 plus as a direct in which is component 2 in practice actually you will get some ethyl acetate here plus water here there is solubility of ethyl acetate in water and solubility of water in ethyl acetate so they were worried about recovery of ethyl acetate as well so you have now essentially equations like this mu 1 water is equal to mu 1 ethyl acetate this is the ethyl acetate layer this is the water layer 1 is for water mu 2 water layer is equal to mu 2 ethyl acetate layer and mu 3 water is equal to mu 3 ethyl acetate layer there are two layers and you are asking for equilibrium between the two I think one is water you will find that these solutions are sufficiently dilute so you must remember that this is these two are solvents this in the water layer actually in both layers I can say ethyl acetate in this case in both layers water and ethyl acetate are solvents and as a direct in is solute this is solute as far as we are concerned this is a solvent or a solute depending on the phase in which it is at temperature and pressure of the extraction so at this temperature and pressure that they are using these two are liquids water and ethyl acetate are liquids so you can use the solvent models for them so in both phases here you will simply write mu 1 liquid pure plus RTLN gamma 1 X 1 W W means W phase this will be equal to mu 1 liquid pure so for solvents this mu 1 liquid pure will cancel on both sides because this is the chemical potential of pure water at temperature and pressure of solution at temperature of the at temperature pressure solution that is the same here so this animal will simply cancel and all you have is gamma 1 X 1 is equal to gamma 1 X 1 water phase is equal to ethyl acetate phase notice the water phase will have it will be predominantly more than 90% it will be water so your X 1 W is likely to be almost 0.9 or higher so it is because gamma 1 is much higher in the ethyl acetate phase that you are able to get this kind of a distribution then if you look at this mu 2 W again this is 2 is what 2 is solute so you have a small problem here you have to write mu 2 star in the water phase plus because remember when you refer to mu 2 the solvent counts the medium in which it is there when you have a star here gamma 2 X 2 mu 2 star ethyl acetate phase plus RTLM gamma 2 X 2 is gamma 2 X 2 in the water phase this is gamma 2 X 2 in the ethyl acetate phase this will be exactly like that for the last one which is again a solvent this can be rewritten very simply what you really have in the liquid liquid extraction system is some amount of water they told you plus as a direct in plus ethyl acetate this is the water phase this is the ethyl acetate phase this again has same it has like water plus as a direct in plus ethyl acetate but if you are doing a batch process for example it is simply the amount of you can vary the amount of water in the amount of ethyl acetate so that is another control variable you have so you have to worry about the amount of water you have phase you have per unit of ethyl acetate phase you have because what you will get is an input to the system that essentially has input and then you take two outputs the water layer and the you separate these two is done by gravity all you have is you have to be careful not to disturb the interface and pull out the water phase the ethyl acetate phase but this in so what you do is a mass balance of as a direct in that comes in equal to the z direct in that leaves in the two phases so you will have three mass balance equations for water ethyl acetate and as a directed you have to combine them with these three and then solve you can vary the amount of ratio of ethyl acetate to water that you take in the beginning the extent of the phases that is a control variable you can therefore control these but you have to solve these three equations call this one two and this is three together with there is a mass balance the mass balance equations you can write them down there is a mass coming in and a mass to sing leaving you are assuming that you are giving enough time in the system for equilibration to occur again if you mix this system well and allow it to settle it usually comes to equilibrium very quickly so these are near equilibrium processes many of these process they come under I think now will be taught under mass transfer one the other course is about processes in which you do not reach equilibrium in the in the first set of processes thermodynamics is very important because the equilibrium calculation is what tells you how much will be what will be the composition these are these two will be in equilibrium this is what comes from your previous extraction it is water with azadiractin in it because it is actually the actual process is complicated by the fact that not part from azadiractin you have many other solutes neem seed does not oblige you with just azadiractin usually has about 12 13 components so you have to write all the components and the balances and solve these equations together you have to worry about whether those components affect the activity coefficients so you will have a multi component expression already you have three components so you write write a multi component expression so in actual practice I would not give you the in an undergraduate course one does not give you the details but I think one assignment I will include a three component system so that you do one calculation to get a feel the calculations too complicated for you to do in an exam or a thing the whole thing is not about the exam knowing how to do the calculation so basically this is the only equation you have to worry about really so you look at log ? 2 x 2 in the water phase by ? 2 x 2 in the ethyl acetate phase this is log ? 2 x 2 in the water phase – log ? 2 that is equal to µ 2 ? ethyl acetate – µ 2 star in the water phase by RT what you are really interested in is x 2 W by x 2 E this is the distribution coefficient n of azadiractin in the water phase by azadiractin in the ethyl acetate phase x 2 ethyl acetate is much higher than the solubility in ethyl acetate is much higher so you actually expect n in this case the way it is written it will much less than one so actually in a sense using water first to do the extraction is a waste but there are two advantages of using water one is it is inexpensive so you can use a lot of it to extract the azadiractin second is it tends to take out the other non-polar compounds in smaller quantity if you use ethyl acetate the bulk of the seed neem seed when ground consists of in organic matter all of it will be extracted into ethyl acetate if you use it directly then you will have to separate the components in the ethyl acetate layer this way azadiractin comes out more dominant it so happens that azadiractin solubility in water is low but it is higher than the solubility of the other organic components in the neem seed. So it is an advantage to use water first so what you do again here is to differentiate and if you differentiate you will get partial of log I leave this ? 2w by ? 2e into n into 1 by n is it x 2w now into n with respect to t is equal to this is h 2 bar infinity in the water phase – h 2 bar infinity in the ethyl acetate phase by RT squared h 2 bar infinity in the ethyl acetate phase if I differentiate this I told you these things are independent of composition therefore I can replace h 2 bar star by h 2 bar infinity and again h 2 bar infinity now if I subtract this solid enthalpy of azadiractin h 2 solid from both I will essentially get ? h for ? h 2 you like in the water phase – ? h 2 in the ethyl acetate phase by RT squared that is add and subtract h 2 solid pure if I write small h 2 it is pure solid this is essentially the heat of solution of water this is the heat of solution I mean heat of solution of azadiractin in water the other one is ziractin this data is available and usually this is a constant so you can treat this is a constant µ 2 is not constant that is why you cannot do this stunt here the ? h is more constant than the chemical potential so you do this and once you have this data you have to integrate this normally the solutions in water and ethyl acetate are both sufficiently dilute for you to treat ? 2 in this case in these two they would not be the ratio will not be one the ratio will be constant so ? 2 w by ? 2 e very often in the process is treated as a constant so you get one more constant in the fitting or if you differentiate this log ? 2 w by ? 2 e you can neglect that so effectively I will say approximately this is what is used for correlating data you get ? log n by ? t that is ? 2 w by ? 2 e is not one the advantage of having ethyl acetate is that it is the activity coefficient ethyl acetate is much lower so you get higher solubility but this ratio is independent of temperature approximately independent of I will say ? 2 n w by ? 2 e is independent of t in the range that you are talking about therefore you get ? log n by ? log t this will be some constant is we will get is equal to a by t square take this along with the R then you get log n is equal to – a by t plus b so you do two experiments in the at two different temperatures you can get both your constant A and B you have to measure this distribution you have to do this you keep this in the lab and measure the concentrations both in the actual process I told you this could be 90% of it of this vessel could be filled with water 10% will be the ethyl acetate phase or you can vary this and you can ask what is an optimum so essentially this is where thermodynamics is involved in a process in this process you will simply ask what is the right temperature to use what temperature should I use so that I get an advantages distribution coefficient you solve all these all this can be solved directly on a computer when doing it by hand is a pain but you can do it straight on at the best way to do it as far as industries concerned is to use a spreadsheet.