 We talk about population balance modeling today. The background to population balance modeling is that we have in our process industry where we have to deal with particulates. Good example is petroleum industry. Some of you have seen the cat cracking is probably the most interesting example of solids moving between two environments. You have a catalytic reactor. The catalyst gets deactivated. It is moved to a regenerator where it is regenerated by burning off the coke and the solids are returned to the cat cracker by pneumatic conveying. So, our interest is to understand what happens to the particle, how the catalyst activity is distributed over the particles. So, means we need to now look at some detail about what is happening inside the equipment. So, that is the motivation for looking at population balance modeling. Of course, the applications are much wider. You can look at in economic system, in ecology and so on. But, we will by enlarge concentrate on chemical engineering kind of applications. To do this, we will look at our material balance. Something we are all very familiar material balance on a CSTR. Something that we have learnt for a very long time. So, I mean state this once again. So, the material balance for a CSTR, we have written for a very long time. I have written it once again. Input, output generation accumulation. So, when you go from our basic statements that we have done for a long time to population balance modeling, we try and understand what is meant by S naught, what is meant by S, what is meant by R. And I have said this before and I say it once again. Whatever measurements we do, the measurements are based on some sampling. Sampling means what? You take large number of samples and you do an average. Sampling refers to an average. So, once again here, we say that these samples S naught, S and R are basically averages. Moment we say it is an average, if I say what is the average age of this class, then I should know how the age of the class is distributed. And therefore, I can find the average of the class. So, any average refers to existence of what is called as a distribution of the property of interest. If the property of interest is S, then we should talk about distribution of this property. I can say this distribution of this property is F naught, the distribution of this property here is F 1. What is the property of interest? The property of interest is S. In this case, it is concentration. If it is a stirred tank, where a chemical reaction is taking place, we say it is concentration. Now, if you go to a forest and if you want to say what is the age distribution of animals, then clearly S refers to age. It could be any other property with some interest. Therefore, we say S naught is essentially a first moment of the distribution. So, average is the first moment of the distribution, something that we have learnt for a long time. So, S naught refers to first moment of the distribution of that property F naught at the inlet. Similarly, S I say is the first moment of the distribution F 1. I will put S here and R is first moment R bar, sorry, this S bar F 1 of S d S. We agree with this. So, all these are averages with respect to the distribution that exist. We recognize that F 1 is the same as F 1 in the equipment. That is the meaning of a stirred tank. If I call this as equation 1, now I can put this representation into equation 1. Therefore, equation 1 looks like this integral S F naught of S d S integral V naught S F 1 of S d S. Then we have integral R F 1 of S d S times V equal to del by del t of V integral, what is S bar is here. S is not enough space here. So, is it all right? So, this is the we all agree with this. Now, what I want to do now is this term, let me say this once again this term inside the this term here. I want to integrate by parts. So, I will multiply this by 1. So, first function and this is the second function. So, we integrate this by parts. So, I will quickly write down what it is then we will. So, let me write the result and then we will look at it once again integral S naught F naught S d S V naught integral S F 1 S d S second term. Then I write the differentiation by integration parts R V F S d S. So, integral S del by del S integral R F d S equal to on the right hand side del by del t with in brackets V integral S F 1 d S. So, this is the first function. So, this have I got it right please tell me have got all the items properly done first function first function into integral of the second it is V is missing. Thank you. So, we can write this as V naught let me just write this just to sort of draw your attention to minus V naught S F 1 d S. I am deleting this term which I will explain to you shortly why I am doing this integral S del by del S of R F 1 d S equal to del by del t integral S F 1 d S. I tend to forget the V frequently I hope the V is here also and put it here. So, what I am saying is that this let me write this will come back to in a minute is it. Now, what we are saying is that this equation if I call this as equation 3 call this as 2 2 is actually the first moment of 3 do we agree. So, what we are saying is that what we have been writing for a long time or material balance equation 3 it looks like a more fundamental statement of the material balance that we have been writing for a long time. Now, the advantage of looking at 3 as a way of representing material balance is that now it gives us an insight into what happens inside the process. So, it tells us how the distribution of property affects whatever is the process we are trying to understand. So, this is the most important point that it comes as a more fundamental statement of material balance having said this having said this anything that we write has to be proved through experiments correct we need to validate whatever we say material balance we have validated for a long time conservation of mass is known for a long time conservation of energy is known for a long time. But, that this represents a description of material balance we have not proved yet. So, as we go along perhaps in the next few lectures we will try to see how this way of trying to understand reality how we describe reality that we know. So, if we describes every reality that we know there is reason to believe that this is probably an equally acceptable representation of material balance something that we have to see as you go along. Now, when we look at literature the literature writes population balance in a slightly different way what they do is this I mean if you look at any of the literature they will look at a material balance this is s this is d s they will write convective flows gain in convective flows out what is input output generation accumulation like what we have written let us do that once again let us see how our friends who write this equal to accumulation. So, our input how do you represent input to a distribution if flow is v naught if f is the distribution of interest then we say it is v naught time f naught of s d s. So, this is the convective flow into the element of interest this is alright. Now, similarly what is the output output is v naught times f 1 of s d s this is the convective flow outside the interval this is an important point how do we represent convective flows into a distribution if v naught is the flow v naught f naught d s is input v 1 v naught f naught f 1 d s is the output. Now, generations they would represent like this if I say w is the sometimes I write w sometimes write v. So, it is meaning is the same this is minus. So, they would write equal to accumulation is this alright what we are saying whenever we write material balance in the way our friends in population they would write like this. So, we take in the limit as d s tends to 0 this becomes v naught f naught minus v naught f 1 this becomes d by d s or del by del s f 1 r 1 w del by del t I should say w here w f 1 the meaning of w and v w is often used because we talking about catalyst sometimes v is used sometimes w is used. So, both have the same kind of meaning. So, when we want to write our material balance using the same kind of approach that people do in population balance you can do this way or you can do it the way I have shown you earlier both ways are equivalent. Now, suppose for example, we have a forest in which animals are born and animals can also die. On other words in this forest environment there can be birth and there can be death. How do you take into account birth and death? Birth means what? Birth means it takes place at a that means it is called 0 age. Birth means it is 0 age correct that means the property belongs to s equal to 0. If a property belongs to s equal to 0 we represented by a delta function you would have learn this in control theory it is not new to you correct. Now, if there is death death will be some function of s times d s I have to put a d s here I forgot to put a d s here. Therefore, this equation will have plus delta of s minus 0 minus of d of s. So, this will how the population balance will look like if there is birth and death this is with all of us. So, we talked about convective flow convective flow out a reaction that brings about a change in the property plus there can be birth. If it is a catalytic reactor if there is birth of catalyst activity it could be it may not be or death that means activity get degenerated for some reason I am sorry absolutely correct is it. So, the statement of a population balance is input output reactive generation this birth death. Now, with this background we want to solve a problem. So, let us take one problem of commercial interest the problem of commercial interest is what happens in the cat cracking. So, reactor regenerator system of the cat cracking industry, but it can be any other industry. So, I am just looking at cat cracking as an example, but there could be many others. So, what is the problem we want to solve we want to understand this is reactor 1, this is reactor 2 and material is flowing between the 2. So, in the reactor we expect that our catalyst is undergoing some kind of deactivation. In the reactor we expect our catalyst undergoes some kind of deactivation normally due to coking in cat cracking it is all due to coking. So, in the regenerator in the regenerator what we do is that we restore the activity we restore the activity. How is it done in the process they actually have hot gas going up and then they burn off the coke it is burnt and then it continuously it is restored and then brought back into the. So, this is what it is coming in as going out I can put this as v naught showing that this whole process is operating at steady state. So, we are now not looking at the dynamics we can look at dynamics as well for the moment we are looking at steady state. Now, we want to write the material balance at steady state what do we say our material balance. Let us write the material balance just for the sake of completeness it is I will call this as f 2 I will call this as f 1. So, the distribution of catalytic activity that is coming out of the regenerators f 2 going out of the reactor f 1 is it at steady state yes or no. So, let me simplify this by taking the limits it becomes v naught f 2 minus v naught f 1 minus d by d s I will write d by d s times w I will put w 1 because w 1 f 1 r 1 equal to 0 I will divide throughout by v naught it becomes f 2 minus of f 1 minus d by d s of f 1 r 1 t 1 bar equal to 0 is it alright. Now, this is for reactor we can do the same thing for the regenerator. So, this is the reactor this is the regenerator. So, we do not write this again, but I will simply write it is d by d s of f 2 r 2 t 2 bar equal to 0 this is regenerator is it ok good. Now, I ask you now that if we can solve this differential equation it should be able to tell us how the two reactors interact with each other. Therefore, it should be able to tell us how we should run this process to get what we want. So, all answers that are required from the point of view of running this cat cracking should come out of solving this differential equation correct. So, let us see how to solve this and see what kind of results it gives us ok. Let me see what I have done to solve I will call this 1 and 2 what I do is that add 1 and 2. Let us add 1 and 2 ok. So, what do we get d by d s of f 1 r 1 t 1 bar plus f 2 r 2 t 2 bar equal to 0 yes or no ok. Now, I want to integrate this let me integrate this f 1 r 1 t 1 bar plus f 2 r 2 t 2 bar equal to some constant of integration correct yes or no how do I generate some conditions on f 1 and f 2. So, that I can determine this constant of integration ok what do we do let us look at equation 1. What is it that we know suppose I integrate equation 1 between what are the limits of s s is let us say catalyst activity it will be go from 0 to 1 correct. So, if I integrate equation 1 between 0 and 1 what is integral f 2 d f 2 d s by definition all distributions will integrate to 1 correct integral is 1. So, let us integrate equation 1 and see what it tells us integrate. So, I will call this as equation 3 for the moment integrate equation 1 we get 1 minus 1 minus f 1 r 1 t 1 bar correct then what is it between 0 and 1 equal to 0 is it all right yes or no integrating equation 1. So, integral f 2 d f 2 d s is 1 integral f 1 d s is 1 and minus f 1 r 1 t 1 bar between 0 and 1 is it ok. So, it gives us f 1 r 1 t 1 bar at 0 at 1 minus f 1 r 1 t 1 bar at 1 at 0 equal to 0 ok. What do we know about f 1 r 1 t 1 bar and f 1 r 1 at 0 and 1 at r 1 at 0 at 0 ok. Now, what is this function f 1 is it a bounded function at 0 now we will not write a differential equation on an unbounded function. So, we will assume for the moment that f 1 is a bounded function therefore, f 1 r 1 t 1 bar is 0 because r 1 is 0 is this clear what we saying r 1 is 0 at s equal to 0 yes or no since f 1 we are writing a differential equation on f 1 if it is unbounded we would not have written. So, for the moment let us assume that f 1 is a bounded function we do not know we should come back and find out whether it is correct or wrong assuming that f 1 is a bounded function therefore, f 1 r 1 t 1 bar is 0 therefore, this gives us the result is f 1 r 1 t 1 bar at 0 is 0 f 1 r 1 t 1 bar at 1 is 0 is it alright do we agree. Now, we can do the same thing with equation 2 repeat let us repeat what we have done with equation 2. So, integrate equation 2 is it alright. So, we go through the same process so it becomes 1 minus 1 minus 1 minus f 2 r 2 t 2 bar 0 to 1 equal to 0 therefore, f 2 r 2 t 2 bar at 1 minus f 2 r 2 t 2 bar at 0 is 0. Now, r 2 if you look at the function r 2 you find that as s equal to 1 r 2 goes to 0 at s equal to 1 r 2 goes to 0 therefore, we will have f 2 r 2 t 2 bar at 1 is 0 therefore, f 2 r 2 t 2 bar at 0 is also 0 do we agree with this. So, this is I will also call this as 4 4 b and 4 a. So, we have now to find the constant of integration in equation 3 what is the constant of equation integration equation 3 what is the value of the constant of integration at 0 s n o the constant of integration in view of what we have done so far is 0. So, let me substitute this. So, we get from equation 3 from equation 3 f 1 r 1 t 1 bar sorry plus f 2 r 2 t 2 bar equal to 0 therefore, f 2 equal to f 1 r 1 t 1 bar divided by r 2 t 2 bar with a minus sign is it all right. Now, things are much easier our equation 1 which describes reactor this is our equation 1. So, if you just recall here our equation 1 is this now we have got f 2 in terms of f 1 we already got f 2 therefore, we can substitute for f 2 in equation 1 and then solve this problem. Let us substitute f 2. So, substituting f 2 from from where. So, let me put some equation numbers here. So, that I am substituting in equation 1 therefore, minus f 1 r 1 t 1 bar by r 2 t 2 bar I am just substituting in equation minus of f 1 minus d by d s of f 1 r 1 t 1 bar equal to 0. So, this is our equation 1 becomes. So, equation 1 becomes this. So, let me simplify it a little further let me see what I have done and I simplify it a little further it looks like this d by d s of f 1 r 1 t 1 bar equal to minus f 1 r 1 t 1 bar within brackets 1 by r 1 t 1 bar plus 1 by r 2 t 2 bar. So, this is how our equation looks like if I ask you what is the solution to this equation what will be the solution to this equation we can integrate this directly f 1 r 1 t 1 bar f 1 r 1 t 1 bar. So, it should be possible to integrate the answer that means, we have solution to the problem correct. Now, there is a constant of integration here which also will have to be determined. So, to do this we will take an example. Now, we take an example because it is take one example just to illustrate how the answers look like. Let us say I have taken 1 by k 1 t 1 bar as 2 and 1 divided by k 2 t 2 bar equal to 3 is what I just solve this problem for the case of 1 by in the nomenclature in literature this is called as alpha this is called as beta. So, solve this problem to illustrate I have taken alpha as 2 and beta as 3. So, that you know we get nice numbers let us now integrate this. So, I want to integrate this. So, what is the integral of may be I can write it here itself. So, integral is f 1 r 1 t 1 bar divided by I have taken constant of integration as q l n equal to integral with a minus sign 1 by k 1 s t 1 bar with a minus sign plus 1 by k 2. Please make sure I do not make any mistakes integral I have done and d s I have got it right please tell me minus I have taken the minus sign here this minus sign is here r 1 I put as minus k 1 s t 1 bar r 2 I put it as k 2 1 minus of s looks all right does it look all right can you help me integrate this. So, I will write the integral here at now I will write the integral in the next page I am writing the integral l n f 1 r 1 t 1 bar by q equal to l n alpha s plus beta l n 1 minus of s is this correct integral I am just writing this I am just writing this integral write it here itself. So, I am just integrating here l n f 1 r 1 t 1 bar divided by q equal to alpha l n s plus beta l n 1 minus of s is it correct is it ok it is ok with everybody. So, this becomes f 1 r 1 t 1 bar divided by q is l n of this is l n here. So, this l n here s to the power of alpha 1 minus of s to the power of beta therefore, f 1 r 1 t 1 bar divided by q is s to the power of alpha 1 minus of s to the power of beta. So, this is our solution. So, let us just go back and then look at our original problem. So, we started with this that there are the reactor there is a regenerator and the reaction is the deactivation is given by a first order function and the regeneration is also given by a first order function they transfer between them at a certain known mass flow. So, that steady state is maintained and that gives us this kind of relationship that the function f 1 is related to alpha and beta in this form. And what is alpha and beta alpha is 1 by k 1 t 1 bar beta is 1 by k 2 t 2 bar. So, k 1 and k 2 are rate functions determined by some chemical kinetics t 1 bar and t 2 bar are operating variables how we operate the process. So, this k 1 k 1 t r alpha and beta essentially tells you how the process will be run by you. So, if you know alpha and beta you know how to run the process. So, you can make appropriate choices of alpha and beta and appropriately run the plant to the extent you want to achieve. So, essentially it gives you a handle on how to run the plant. So, that is the important thing which means you are able to tell how alpha and beta determine the distributions of f 1 and f 2. So, if you want to operate the plant in your own way it will tell you what is f 1 and f 2. Let us just quickly put alpha equal to 2 and beta equal to 3 and see what kind of numbers did you get. So, f 1 r 1 t 1 bar divided by q equal to s to the power of alpha 1 minus s to the power of beta alpha equal to 2 and beta equal to 3. Now, I want to find out what is q we still do not know what is q correct how do you find q how I have found q I will just see. So, what I do is I let me put f 1 this will be what f 1 equal to q alpha s to the power of 1 minus s to the power is it correct with the minus sign is it all right. I have just substituted for r 1 t 1 bar this is r 1 is what k 1 s. So, this becomes 1 by alpha I have just put all that together what is f 2 what is f 2 minus of q beta times s to the power of alpha 1 minus of s to the power of beta minus 1 is it what is f 1 and f 2 alpha minus 1 you are right my friend. Now, suppose I want to find out q what will I do you simply say integral f 1 d s is 1. So, moment that will define. So, if you do integral f 1 d s is 1. So, integral f 1 d s equal to 1 0 to 1. So, that is equal to what minus of q alpha integral s to the power of alpha is 2 s to the power beta is 3 0 to 1. So, this will should give us the value of q s or no. So, let us integrate now and find the value of q. So, 1 equal to minus of q and then alpha is 2 let me integrate s times 1 minus of 3 s plus 3 s squared minus of s cube d s correct. This I have to integrate 0 to 1 all right. So, I have done it properly I hope let us go through this integration quickly. So, I will get 1 equal to minus of q times 2 within brackets. So, it is s squared by 2 minus of 3 s cube by 3 plus 3 s to the power of 4 by 4 minus of s to the power of 5 by 5 is it all right. I am just integrating it have. So, I will get minus of twice q 0 to 1 this is 1 by 2 and this is what 1 plus 3 by 4 minus of 1 by 4 minus of 1 by 4 minus of 5 0 to 1. So, it is minus of 2 q. So, I take 20 common denominators 10 minus of 20 plus 15 minus 4 is it correct. So, what is q equal to minus 10. So, now we will be able to write our answers fully where is what is q 1 f 1 and f 2. I have to written some here it is here it is. So, value of f 1 is what f 1 equal to q is minus 10 10 alpha is 2 s to the power of 2 minus 1 1 minus of s to the power of 3 f 2 is 10 3 s to the power of 2 1 minus of s to the power of 2. So, that becomes f 1 is 20 s times 1 minus of s cubed and f 2 is 30 s squared into 1 minus of s whole square is this clear. So, to just looking back at what we have done is that there is a first order problem in which reaction deactivates a catalyst by a first order process. And the regeneration also is a first order process k 1 and k 2 constants which describe the process kinetics. And then when you go through the population balance it tells you what is the function f 1 and what is the function f 2. Now, if I ask you what is the mean value of f 1 what is the mean value of f 2 how will you find out. So, mean value of s 1 is integral s f 1 d s and mean value of s 2 is integral s f 2 d s you have this is s this is s this is s see the mean value of a property is the first moment of the distribution our property is what catalytic activity. And the distribution of the activity is given by f 1 in the reactor f 2 in the regenerator. Therefore, the mean value of catalytic activity in the reactor is s times f 1 d s mean value in the regenerator is s times f 2 d s is that all right. So, let us quickly do this and get a feel for what this number is s 1 20 times s square 1 minus of s cube integral d s this is 30 integral s cube 1 minus of s whole square d s. So, you can do this integration yourself it is not a very big thing I have done this and then what I get is that mean value here is 0.33 mean value here is 0.5 you can do this is no point in spending time on this. Now, what we are saying is that reactor operates at 0.3 regenerator operates at 0.5 and what is the driving force 0.5 to 0.3. Now, you can operate at 0.1 and 0.9 see the choice what is the choice in which you will operate will be determined by what you think is appropriate for your economics whatever the economics may be this is an example which says that it operates in 0.5 and 0.33 various choices depend upon the choice of alpha and beta catalytic activity. In this case in the cracker the property of interest is activity of the catalyst how much coke is present on the catalyst more the coke less is the activity. So, to what extend you will regenerate. So, that you have a highly active catalyst in the reactor because the cost of regeneration and the you know the benefit of having a higher activity is what you have to balance in your process. Now, I deleted this term r times v times f 1 s correct I said that you know it is I mean our friends in population balance do not write it, but if you look now you can now you know what is f 1. Now, you do this look at this value r times f 1 times s between 0 and 1 does it go to 0 what is the value of f 1 at s equal to 0 for the function that we have what about the other end f 2 s equal to 1 also 0. So, you find that this actually disappears at both ends do you recognize this we deleted this term I said we will come back and tell you why we are deleting this term our friends in population balance understood this that is why they deleted it, but it is not. So, obvious it is not so obvious therefore, I have done this to show you that this term actually disappears. So, every example that we do we should ask this question and if it does not disappear which means you have not understood the process fully I mean you have to understand a little bit more then you will realize that it actually disappears. So, there would be instances where it does not obvious. Let us take one more example an example for which all of you know the answer R T D of a C S T R. So, we want to apply population balance to understand what is the R T D of a C S T R we know the answers, but still we want to apply this. So, what is our system is this. So, what is going in fluid elements some fluid elements as the fluids coming in and fluids going out we want to find out what is our property S what is this property S what is the meaning that we attach to this property S time of residence in the equipment what is our population balance. Let me write population balance we will not derive it this time because we have done this before why are you putting equal to 0 on the right hand side because our process is running at steady state. We want to find out the residence time distribution of our fluid elements when the process is running at steady state. Now, what meaning do we attach to this F naught what is F naught F naught is the time of residence of fluid elements at the inlet in the equipment. On other words how much time fluid elements at the inlet has spent in your equipment what is the answer 0 or in other words the age of every one of you is the same which means the age of every element which is entering is the same what is that age 0. Therefore, F naught is a delta function at 0 what is F naught F naught by definition by this is a delta function at 0 is this clear to all of you because no element has entered the equipment correct. Therefore, every element has a time of residence in the equipment which is 0 this is fine. Now, this equation I will call this equation 1 I want to solve this equation correct for solving this equation there are two things that we should know one how do we solve a problem in which there is an unbounded function. There is an unbounded function F naught is an unbounded function correct and our understanding of equation theory of differential equations will tell us that whenever there is an unbounded function you must get rid of that term that is the way to solve the problem you must get rid of that term then only you can solve the problem correct that is one. And is that what is this R 1 what is this term R what is R yes yes which means what we have a property s we have a property s and we want to know the time rate of change of this property or d by d t of this term d by d t of s itself refers to t in this case time of residence. So, we are actually looking at where s is s itself is t. So, we are looking at d by d t of t itself or it is equal to 1 is this clear what we are saying is the property of interest is s what is that property time rate of change in the equipment time rate of change in the equipment let me s refers to the property t therefore, d by d t of t is 1. So, from the point of view of trying to determine the time of residence in the equipment the function R in the population balance is R is 1 is this clear R is 1. Therefore, in this equation 1 we said that we should knock out this term. So, what our friends in mathematics tell us is that get rid of this term solve the homogeneous problem first solve the homogeneous problem first. What is the solution to this homogeneous problem R is 1 we have f 1 minus of d by d s of f 1 t 1 bar equal to 0 correct. So, what is the solution to the homogeneous problem what is the solution shall write the solution area. So, f 1 is d I will write like this d f 1 d s equal to minus of f 1 divided by t 1 bar therefore, solution is f l n of f 1 l n f 1 by q equal to e to the power of minus s by t 1 bar. So, this is the solution f 1 equal to q times e raised to the power of minus of s by t bar this is the solution to the homogeneous problem. Now, what our friends tell us is that since you have knocked out this term f naught what you should do is to generate a boundary condition at t equal to 0 at s equal to 0 in this case. So, we must generate a boundary condition at s equal to 0. So, that we can determine the value of q on other words we must learn to write our material balance at s tending to 0. So, s tending we must write our material balance as limit as h tends to 0 is this clear what we want to determine to determine the where are we anyway to determine the constant of integration we should here at I wrote it here. So, to determine the constant of integration you will find you will have to generate a boundary condition s tending to 0. So, let us try to do this help me you have s minus of d s and s we want to write our material balance between s minus of s d s and s inputs and outputs yes or no. So, input minus of output plus generation equal to 0 accumulation. So, let us write all the convective flows and then generations what is the convective flow f naught. So, we have v naught f naught of s d s input and then v naught I just let me write this down and then we come back to in a minute input output plus generation v times f 1 s minus d s r 1 s minus of d s input this is at s minus d s then we have v times f 1 of s r 1 of s equal to 0 is it all right convective flow convective flow convective flow convective flow and then this is because of we are assuming we are postulating r 1 is 1 it is a reaction term in this case the rate function takes the value of 1 is it clear. Now, we want to take the limit as s tends to 0 d s tends to 0 is it all right this is the basic approach clear to you whenever you have an unbounded function you must get rid of that unbounded function that is the first process. Then try and look for a way of generating the boundary condition by writing the appropriate balances in this case material balance. Now, limit as s tends to 0 d s tends to 0 f s d s sorry I have written d s already sorry f s d s. So, what happens to this term d s tends to 0 this goes off s or no s or no. Now, what happens to this term is that any material that belongs to s less than 0 there is no material which belongs to s less than 0. So, s minus d s must disappear now this term what is this term this is v naught delta of s d s where delta function f naught is a delta function correct f naught is a delta function. So, we know that the delta function this is actually equal to 1 by definition by definition delta function it is it is infinity and then it is 0 everywhere. Therefore, the integral is 1 is that clear what we are saying this first term is 1 why is it 1 because delta function is 0 everywhere it is infinity at s equal to 0 and the area is 1 that is that is the definition. Therefore, first term becomes 1 then this term disappears minus of f 1 0 r 1 to this f v naught. So, that we get f 1 at 0 equal to 1 by t bar is it ok what we have done we have simply generated a boundary condition at s equal to 0 is this clear because in population balance you will find this approach you will use again and again this is this is the most important point in population balance how to generate an appropriate boundary condition to solve your problem is something that you have to do again and again. Therefore, it is good to understand what I have been written and why some terms have been knocked out let me go through this again input what is this v naught f naught of s d s what does it mean this means what is the convective input to this interval from this term that means what is the convective input that is entering this this interval the convective input is always v naught and f naught of s d s similarly convective output the generation term comes from generation at s minus of s which contributes to s generation of s at s which goes out. So, it is the difference which contributes to the interval in population balance the generation terms are always written like this for which you already given a proof you have done that already. So, what is generated at s minus of s minus what is this is the difference will contribute to the interval. Now, when you look at each term we find the some terms do not contribute at all for example, here as limit s tends to 0 s minus d s it cannot contribute to because s minus s does not exist because s less than 0 has no meaning. Therefore, we relate to this term is that clear. So, and the first term is v naught this is not there and it comes to f 1 of 0 equal to 1 by t bar r 1 r 1 is 1 we proved that d by d t for the case of residence time we said r 1 is 1 correct. So, this r 1 becomes 1 because this is equal to 1 is that clear which one this one because this one v naught of f 1 as d s d s is 0. See f c this term what is the second term v naught f 1 s d s d s goes to 0. No, but this is delta function this is clear it is a good point is meaning. See the first term v naught f naught of s d s why is it is 1 it is because f naught of s d s is f naught is a delta function. Therefore, that integral is 1 while the second term f 1 is a continuous function f 1 is a continuous function therefore, f 1 d s is 0 because d s tends to 0 is that clear. So, this is the most important part of population balance is to be able to write this material balance and knock out terms that are appropriately not relevant to your process. Now, let us look at our homogenous solution our homogenous solution says f 1 equal to q times e to the power of minus of s by t bar where f 1 0 we say it is 1 by t bar. So, f 1 0 is 1 by t bar. So, what is q so q equal to 1 by t bar and therefore, f 1 equal to 1 by t bar e to the power of minus of s by t bar. And what is s s is residence time s by definition is residence time s is the property of our interest and that property is residence time. So, let us just go through the whole thing once again what we have said what we have said is that we have we want to find out what is the RTD of a stirred tank. We said fluid elements that is entering the equipment these are material that is not entered the equipment. Therefore, all of them belong to the same property that they have not entered the equipment therefore, s equal to 0. All the elements at f naught belong to s equal to 0 because they belong to s equal to 0 it is described mathematically by a delta function at s equal to 0. The second thing we said is that we wrote the population balance. And we said that this function r what is this function r this function r refers to time rate of change of property of interest time rate of change of property of interest. That means, property of interest is s in this case time rate time. Therefore, s equal to t is the meaning that we must attach to this r therefore, the time rate of change is d by d t of s where s equal to t therefore, r is 1 and that is how. So, the interesting point that I would like to draw your attention is that population balance is really about understanding the physics. And try and capture from your reality what is the function that we would use to describe that reality moment you do that this technique becomes very powerful. That means, you must understand the physics of the problem then the if you do not understand then you do not know what meaning to attach to this function r. Let us go further let us take one more example which is it is little bit more involved. It is little bit more involved, but I think we should spend some time on that the example now I take is the example here is the case of external diffusion control gas solid non-catalytic reaction. This is the example I am taking what is the example the example is you have an equipment into which in which this particular reaction is taking place where it is external diffusion control. We have done this in our class we have said that in such cases the extent of reaction of the particle is given by this we have done this. That means, if you take a single particle and expose it to an environment of constant gas composition it will react as per this form we have done this in class is no point doing it again. Now, if I say now that what is d by d t of x b what will you say d by d t of x b is 1 upon is it all right 1 upon tau f yes or no is it fine with all of us which mean that this rate function r seen in this context is with a minus sign there is no it is not minus plus sign only 1 by tau f. Now, let us take this one example second example let us say we look at r t d of a stirred tank t bar e to the power of minus t by t bar. Now, let us say this looks like this it looks like this and say this is suppose I say this is tau f this is e function what is this area what is this area we can calculate correct area is simply have to integrate e function between tau f to infinity. So, let me do that tau f to infinity e t d t what will it be I call this k you can easily shown this becomes equal to e to the power of minus of tau f by t bar it is no point wasting time. What we said now if you look at the e function for a stirred tank and we look at the fraction that belongs to time of residence greater than tau f that becomes equal to e to the power of minus tau f by t bar this comes from simple integration is nothing to waste time. Now, I ask you in a process which is governed by this r t d function e t what is the fraction of material which belongs to greater than tau f you will say it is given by e to the power of minus tau f by t bar which means what this material which spends time greater than t f is completely consumed completely reacted yes or no because it is spending time greater than tau f. So, a material which is completely reacted suppose I say I call it white it is a white particle why is it white it is completely reacted it is a white part some people say it is completely reacted it is a black particle it does not matter what it is it is a particle whose property is described by a delta function you understand it is a property described by a delta function because the value is either 0 or 1 it is everybody having the same age you know that kind of on other words whenever you have a chemical reaction where the rate function is 0 order 1 by tau f it is 0 order. Then the problem is that in a stirred tank there is a certain fraction of material which is completely black or completely white whichever way you want to look at it. That means that fraction of material to describe in population balance terms it is a delta function. Therefore, whenever you have a property whose functionality is a delta function which is it is an unbounded function in population balance when it appears you will have to appropriately deal with it because you cannot deal with unbounded functions in a differential equation. This is the problem we want to deal with now because this we will encounter again and again not simply in chemical engineering in many such cases unbounded functions appear and it has to be appropriately dealt with. So, what we are saying now our distribution function which is f it can have a discontinuous part what is meant by this because this fraction of material it is either completely black or completely white. We do not know what it is and then there is a continuous function it is continuous. We understand what I am saying we can have situations like this. You have a chemical reactor regenerator is going between these two where r 1 is minus k 1 r 2 is plus k 2 is the reactor is regenerator. What is meant by minus k 1 it is 0 order what is meant by plus k 2 it is again 0 order. So, it is instances where f 1 and f 2 it is I will call this as s minus 1 plus g 2. These possibilities are distinct. So, how do you deal with situations where you have such kind of discontinuities in your distribution. This is quite common it is very common in theoretical physics they sort of handle very well. We have such a problem and we want to see how to handle these kinds of discontinuities in our problem. So, I will do state this once again you have you have a reactor you have a regenerator this is this is given by r 1 equal to minus k 1 r 2 equal to plus k 2. Now, because of the fact that this is 0 order 0 order means what this material gets completely consumed and there is a fraction finite fraction which belongs to completely black when a black means it is completely consumed. In the regenerator there is a finite fraction which is completely regenerated which is white. That means it is white black means completely consumed white means completely regenerated. These possibilities exist here is a reactor regenerated system in which you have in the reactor because of the reaction that is taking place the material gets completely deactivated. It is fully coke deposition is such is completely deactivated and the possibility that in the regenerator because of the reaction it can be completely regenerated. So, complete deactivation means activity is 0 it belongs to delta s equal to 0 it is a delta function at s equal to 0 only for 0 order this happens only for 0 order because if you look at a first order process first order process what x equal to e to the power minus k t infinite time it takes. So, this only in situations where the time of complete consumption is finite which is the case with external diffusion we have done that in class. All these problems of non catalytic gas solid reaction we have shown that the time required for complete consumption is finite and we know how to calculate this because we know the rate constant diffusion coefficient and so on. So, in situations where the time required for complete consumption is finite you will find that in stirred tank kind of RTD's there is a finite fraction which belongs to completely black or completely white and we should be able to deal with this kind of discontinuities in the population balance. So, this is the illustration that we are trying to do for which we said whenever we have this kind of problem we get rid of it and solve the homogeneous problem. And to the homogeneous problem we generate the appropriate boundary conditions and solve to get all our answers. So, we will try to do that now. So, I will write let us write the generated. So, let me do it for a reactor first help me recognize that we will not worry about this will only worry about the continuous I will come back to it as you go along input minus of output plus generation equal to accumulation. So, continuous one is what g 2 I will say it is 1 this is 2 this is. So, g 2 minus of g 1 minus of d by d s or d a g 1 r 1 t 1 bar equal to 0 this is for the reactor is it alright. Now, let us write same thing for the regenerator g 1 minus of g 2 minus of d by d a of g 2 r 2 t 2 bar equal to 0 this is for regenerator is that clear. Now, we have done this for the case of first order process and we could integrate and solve the problem. The reason is that in the first order process the time required for complete consumption is infinity. There were no discontinuities no unboundedness and all that there was no great problem in solving. Now, we know that these problems exist because our functions are 0 order and therefore, these problems exist. Therefore, we should recognize that these functions have discontinuities at where are the discontinuities in the reactor it will be at s equal to 0 in the regenerator it will be at s equal to 1 we know that why in the reactor complete consumption can take place. Therefore, it can be completely get cooked and therefore, the activity can become 0. Therefore, we know the discontinuity occurs at s equal to 0 at reactor s equal to 1 in regenerator we know all that. So, with this knowledge let us go through this and see how to generate the boundary condition at the appropriate. So, this our problem now is generating the boundary conditions. Once again what do we do we write input minus of output plus generation equal to accumulation limit as a tends to 0 d a tends to this is 1. So, we write it between a minus a minus d s a minus d a and a n. So, let me write convective v naught where are we multiplied by g 1 plus k naught delta of a minus of 0 d a is it all right input do we agree with this why I have written this is it ok with everybody we know this. See based on the understanding of the physics of the problem we know that the discontinuity occurs at a equal to 0. That is why there is a continuous part there is a discontinuous part you have taken both into account is this ok with everybody now input output v naught g 2 g 2 what else is there plus l 1 we can write delta of s minus of 1 d a, but this problem is at 1. So, it will disappear anyway. So, now plus generation w r 1 a minus of d a g 1 a minus of d a minus w r at a g 1 at a equal to 0 is it all right. Please look at it there is no need to rush this term by term please understand we are writing a material balance ok. We want to write this material balance in the reactor that is why we are ok what is happening input output generation accumulation. So, this should be between s and a see we have taken an element we have taken an element and we are writing inputs and outputs for this element correct. So, we are writing a material balance. So, how much is the input going in how much is the input coming out and reaction terms have to be written and whether we have written it correctly. We said there is convective flow correct we said convective flow and then there is reaction term. So, I this is input this is the output what shall we do ok. Now, let us go further now now what are the terms that will disappear what are the terms that will disappear now this this happens only at a equal to 1. Therefore, we are taking limit as a tends to 0 d a tends to 0. So, this term disappears and d a tends to 0 this is a continuous function this term will disappear this is a continuous function this will disappear and then there is no material that belongs to a less than 0. So, this will disappear. So, what is left minus v naught k naught delta of a minus 0 minus w correct r I put r 1 r 1 g 1 at 0 equal to 0. Can we simplify this please can we simplify this what do we get g 1 r 1 w equal to 0. V naught and this d s the d s is this is d a I forgot that. So, this whole goes to 1 therefore, it becomes simply k 0 with a minus sign is it all right let us do it once again input output generation equal to 0. Now, we knocked out this term g 1 d a because it is continuous term g 2 d a it is continuous we knocked out there is no material belonging to a less than 0 g 1 g 2 are continuous discontinuity is a equal to 0 for which we are separately representing. See we said please recall we said the following we said function f 2 has a continuous part and a discontinuous part is that clear is it ok with everybody what we are saying there is a continuous part there is a discontinuous part. Now, we are writing the material balance input term output term and this is the generation term what we are saying is that g 2 d a g 2 being a continuous function g 2 d a goes to 0 because limit as d a tends to 0. So, this term disappears and this delta of a minus 1 discontinuity occurs at a equal to 1, but we are talking about a tending to 0 therefore, this term will disappear is that clear therefore, the term there is no material that belongs to a less than 0. Therefore, this term r 1 a d minus 1 will disappear. So, what is left behind is only this and k 0 term delta a minus 0 d a is 1 by definition 0 k is it all right. So, this gives us where are we here. So, our boundary condition says that g 1 r 1 at 0 equal to this or g 1 r 1 t 1 bar at 0 is minus k 0 is it all right. We all agree with this we have got one boundary condition now let us generate one more. Now, we are going to do limit at a tends to 1 d a tends to 0. Once again input output generation equal to 0 which one we are writing for reactor we are writing for reactor sorry I should say that we are writing for reactor we will do for regenerate also. We will do for regenerate also we will finish reactor at a equal to 0 we have done a equal to 1 we will do similarly, we will do for regenerate. So, this is for reactor please I should have said this now input is what input will be v naught g 2 d a plus l 1 delta of a minus 1 is it all right yes or no is it fine. So, this is input output is what v naught integral g 1 d a plus k 0 delta a minus of 0 d a is the d a is here plus w r 1 f 1 will take between a a plus d a. So, at a minus w r 1 a plus d a equal to 0 is it please see yes or no input output generation is it fine. So, at a minus w r 1 a plus d a is equal to 0 is it please see yes or no input output generation is it fine. Once again limit we have done limit a tends to 1 d a tends to 0 whenever d a tends to 0 all the continuous terms will go away. And since there is no material belonging to a greater than 1 this will go away. So, and then we are talking about material balance around a equal to 1 therefore, delta a this disappears is it all right what we are saying. Therefore, we have v naught l 1 because and then the other term is plus w r 1 f 1 at 1 equal to 0. So, in the limit what does it become w r 1 f 1 at 1 equal to minus of v 0 l 1. Therefore, it becomes it is not g g I put g I am sorry sorry it is not f g I am sorry I am sorry about that this is g. So, this becomes g 1 r 1 t 1 bar at 1 equal to minus of l 1 is that clear what we have said. So, this I will put this condition here therefore, g 1 r 1 t 1 bar at 1 is minus of l 1. We can actually show this we will do it when we meet next time we have run out of time today. So, this will become plus k 0 at 0 we will show this when we meet next time may be tomorrow to plus l 1 we will show this tomorrow. What we have done what we have done is we are looking at an example of the population balance distributions having discontinuities. And whenever there is a discontinuity we said that we must generate appropriate boundary conditions to take care of discontinuities else we cannot solve the population balance equations. We have generated those conditions now basically we have got those conditions in front of us therefore, we will be able to solve the differential equations and find out those distributions and how those distributions are affected by choice of the process variable which is k 1 t 1 bar k 2 t 2 bar or in our nomenclature alphas and beta. We will finish that when we meet next time let us talk that.