Let us quickly revise what has been taught yesterday. Yesterday I started with special topics in computational heat conduction. There I talked about multi-solid heat conduction and non-linear heat conduction. Those are special cases of single solid heat conduction cases with constant thermal conductivity and thus there are some minor modifications you need to do in the code to solve those problems. Thereafter I went on to pure computational advection and heat transfer and then we went into computational heat convection. Convection is a combination of advection and diffusion. Thereafter I discussed for each of these cases I had taken some example problem which has some exact solution and I had shown you that how to, what is the, I started with finite volume discretization then I had shown you implementation detail solution algorithm and finally using all those code has been developed which is which are given to you for the lab session and using those codes results have been generated for the problems which we are showing yesterday. And thereafter I discussed finite volume discretization in the afternoon lecture session and towards the end I had started the solution of Navistoke equation on a staggered grid. I can understand I started this topic which is very important topic and maybe one of the most complex topic in this workshop on staggered grid yesterday evening why could understand that many of you who are looking into it probably for the first time it needs some revision. What I had planned is that I will begin this lecture where I will show you in detail basically I want to want you to get certain key ideas of this. So the first key idea is how staggered grid generated and how are the grid point locations. So let us suppose this is a control volume for simplicity and clarity I am just showing you 3 by 3 control volume and here I had mentioned that right now I am showing you 9 grid points. So this 9 grid points are used for pressure only pressure and temperature scalars and I said that the velocity grid point u velocity grid point are located at vertical phase centers and v grid points are located at horizontal phase centers. Now when we apply law of conservation of mass x momentum y momentum we have to take control volume where the corresponding grid point should lie at the centroid. So let us say if you want to apply law of conservation of mass then the pressure grid point should lie at the center. So what I will do is that I will show you one by one. So we start with this pressure grid point and let us look how the so for this pressure grid point we need a control volume where pressure is lying at the centroid. Now when pressure is lying at the centroid what I am trying to show is this control volume. Now in this control volume u velocity is lying here v velocity is lying here. Now if you want to name them then the representative control volume we have not noticed sorry this is the grid point for pressure. I had mentioned that the convention we follow in the positive phases we take the u this will be up this will be vp and then this will be uw this will be u sorry v south. Now where this is used? This used for applying law of conservation of mass is that clear? This is used for applying law of conservation of mass. How do you calculate mass flux? For this control volume let me denote this mass flux which is at the east face of this control volume this will be rho into normal velocity is u. So you do not need any interpolation note that. Similarly m north will be equal to rho into vp. Similarly you can calculate at the other phase. So note that by this type of staggering by this type of staggering we are avoiding any interpolation to calculate the mass flux at the phases of the control volume. Now let us take the u now we want to apply law of conservation of momentum x momentum. Let me do one thing y momentum and let me write energy also. So for x momentum equation I will take let us suppose this control volume. So this if I want to take a control volume such that this lies at the centroid then I have to take a control volume like this. So if I take a control volume where u velocity is lying at the centroid up if this is lying at the centroid then the corners are this v is that clear? If this is if you are having a uniform grid generation and if you want a control volume where this green square is at the centroid then this will be at the corner you are able to see. So now this will be v. Now let us try to what will be this this will be v what will be subscript here. Let me draw the pressure grid points also this will be the pressure grid point what will be the pressure here p subscript p this will be p subscript e because once you write this subscript for p then it is because all the reference which you take you take reference with respect to pressure. So if this is pp this is up then this will be v subscript will be p. If this is p subscript e this will be v subscript e any question on this? Sir could you please tell what is the advantage of writing in terms of p e and so on because when we write a program we are going to write using running index sir. This question is that what is the advantage of writing this subscript as in terms of letter why not write in terms of running indices? You are right I could have alternately written this v as let us say v i plus 1 comma j finally because when we program it has to be done like that but traditional finite volume method for explanation as far as east neighbor, west neighbor, north neighbor which is just for understanding but when we do coding you note that all over what p means p means i comma j e capital E means i plus 1 capital N means capital N means j plus 1 capital S means j minus 1 capital N e north east means i plus 1 j plus 1. So for understanding we are writing neighbor with subscript east west north south in terms of neighbor that is what is commonly used in finite volume method for better understanding but note that in coding there is one to one correspondence between the subscript which are using here with the running indices. Now what will be the what will be the subscript for v here and here v s here and this will be v south east is that where the south east will be j minus 1 sorry j minus 1 i plus 1 south corresponds to j minus 1 east corresponds to i plus 1. Now let us take the this is for x momentum equation now let me do for similarly for now before I let me do this for y momentum equation y momentum I have to take from here. Now I take a control volume where this v p is lying at the centroid.  So what will be the subscript of this pressure p the subscript of this pressure will be N if this is p this will be north neighbor.  Now once you know the p it is easy for you to write the if this is p p this will be u p if this is p n this will be u n and what will be this this will be u w because if this is p this will be the west neighbor and if this is north this will be north west is that clear. Now let us write the if you have energy equation in energy equation control volume used is pressure control volume and here again for pressure control volume the normal velocities are sitting at the face center.  Now I did all this just to give you a feel at step by step how you can understand you can take a small 3 by 3 control volume and from there you can draw the different control volume this is for applying law of conservation of mass continuity equation this is for applying law of conservation of x momentum law of conservation of y momentum law of conservation of energy. This was the first objective to give you a that how you can start from scratch and draw this grid points and note that I have written subscript with neighbors but finally you code you have to write in terms of running indices and there is one to one corresponds. Now the second thing which I want to highlight through this slide is mass flux calculation where mass flux comes mass flux comes in mass conservation anyway it will come in mass conservation but it also comes in all the transport equation what are transport equation x momentum y momentum energy equation where it comes this mass flux in the advection term. There is a the bulk motion of the fluid causes momentum transport and energy transport.    When you want to calculate mass flux on the north phase of u control volume now when you want to calculate v here you do not have a inverted triangle here but you have some neighbors what are the nearest neighbor these two neighbors okay. So this will be rho into nearest neighbor for v is this 2 so this will be v p plus v e divided by 2 is that clear similarly you can calculate for other cases if you go to rest here you want m e for v control volume how you will calculate this what are the nearest neighbor of u there is no u point here nearest neighbor at this this will be rho u n plus u p divided by 2 similarly if you want to calculate let us say here let me do it here because there is no space here let us say if I want to calculate m at south phase center of v then this will be rho I need v velocity here so I will use this and this neighbor so this will be v p plus v s divided by 2 so the message here is that for mass conservation and energy conservation when you want to calculate the mass flux you do not have to do any interpolation okay but in the momentum equations you have to do some interpolation to calculate the mass flux. So where you are avoiding interpolations all this we are doing to avoid some interpolations I had mentioned in the beginning we are avoiding interpolation in the calculation of mass flux in the mass conservation and energy conservation we are also avoiding averaging in calculation of pressure in case of momentum equation what will be the pressure force here how you will calculate pressure force in x momentum it will be p p minus p e into delta y in this case it will be why momentum it will be p p minus p n into delta x the pressure force you want to calculate for this control volume and this are the phase center and at this phase center the pressure grid point is sitting so you do not need any interpolation so you are avoiding interpolation for mass flux in mass conservation and energy conservation and you are also avoiding interpolation for pressure in momentum equation is that clear any question on this in case of momentum equations while calculating the momentum flux okay since we have staggered the grid yeah we do not need any advection schemes no our question is we do not need advection scheme for x momentum equations since we have staggered the grid that is not that is not true even if we have staggered but the we have to make sure that we take the proper control volume where the proper variable is sitting at the centroid so for let us say x momentum we will take this control volume and in this control volume we have to make sure that the x momentum conserved law of conservation of x momentum is obeyed if you have to make sure that you need to have momentum flux entering from this phase this phase and leaving from this phase and this phase okay so you have to do all those which had been discussed earlier but it is just that the control volumes are different staggered for different conservation equation so the point is that here you may say that we are not obeying the conservation equation in this all the conservation equation in the same control volume that is true but this does not affect that final result we obey law of conservation of the different conservation law in different staggered control volumes you can see not in the same control volume that is true whenever you are conserving mass you are using momentum satisfying velocity whenever you are you are getting this point here the velocities which you are will be using finally the solution which you get you know that I had mentioned yesterday that this law of conservation of mass finally it becomes a pressure correction equation and in that you solve it iteratively and when you solve it iteratively in the last iteration when you get the correct result the velocities which satisfy this continuity equation in the last iteration they are in fact already satisfying the momentum equation finally what you end up is after that pressure correction iteration you get a velocity momentum satisfying velocity field which obeys the mass conservation. Now you have some question. Sir advexing scheme yeah whether we have talked about different advexing schemes advexing schemes we have to implement here or on the you have to use advexing schemes advexing schemes yeah but checkerboard distribution when it is when problem is identified suggestion is one is go for stagger grid with same up in scheme or we can avoid that problem with higher order schemes. No you cannot avoid by higher order scheme all the advexing schemes which I had discussed all those are applicable in this case this pressure velocity decoupling cannot be avoided by the it is not a problem of advexing scheme this velocity pressure decoupling is not a issue of advexing scheme that is completely independent okay so all the advexing schemes you have to use here. Sir I did not get the answer. Yeah. You did not get the answer I mean advexing schemes because we have the value of the value of the velocity of the pressure still we are using peak or central depressor. For which you are saying x momentum or energy? x momentum and y momentum. In x momentum y momentum you do not have u velocity here to calculate x momentum you do not have v velocity here to calculate the y momentum okay because in this control volume note that in this control volume the x momentum which is coming in you have to take here x momentum leaving x momentum entering from here x momentum leaving from here in this case it will be y momentum on all the four phase center. Only central you are using now. Can you repeat? I mean here you are showing only with central this thing. Central different. But we can use other schemes also you mean to. Okay note that do not get confused this mass flux I am what the way I am writing it is not advexing scheme do not call it as an advexing scheme because this is a driver I had mentioned that we do for passenger there is a second velocity which will be coming advected variable okay. When I was discussing finite volume method also at that time I highlighted this point and I mentioned that the normal velocity we can calculate by this averaging do not call this as advexing scheme. Because for advexing scheme you use the mass flux direction and then calculate or and magnitude as well to calculate the advected variable. There are two velocities coming into the advexing any other question? Okay now let me show you the formulation because yesterday I showed you some philosophy and then I said that if I show you the philosophy and then come to then I will show you the equation philosophy of pressure correction method. So the idea is that let us suppose you have a I am showing you only one control volume but in actual problem right now I showed you let us say nine control volume. But I am here I am showing you only one control volume and let us suppose the previous time level pressure is one atmosphere okay. So using the previous time level I am showing you in this grid point only but the neighboring grid point will also come in your calculation. So I mentioned yesterday that we take the pressures of the previous time level and if you follow a fully explicit method then you can calculate the advection and diffusion using the previous time level velocity and predict a velocity. Now you know that if this is a control volume for mass conservation then the velocity which you have predicted comes like this. Let us see whether you are getting what I am saying this control volume is mass conservation control volume okay. So let us suppose you obtain up star so this is pp okay. This pp is right now what one atmosphere so you predicted up star and multiplied by rho and surface area and you got this.  So that way using the previous time level value of velocities and pressure you predicted normal velocities and multiplied by density and surface area and got this. So these are the predicted mass fluxes. Is it clear? I will show you equation also. I can switch back forth and show you what is the equation okay. What is the equation for this? So what is the equation? Let me start with so there is an original proposition. What is original proposition? Rho delta vp up to the power n plus 1 minus up to the power n divided by delta t. This is the finite volume discretization of unsteady term. Then the total advection term let me write it like this. This is equals to the pressure force acting in the x direction. pp minus pe into delta v plus diffusion we are using an explicit method. Advection and diffusion we will take at time level n. Now if you want to obtain correct velocity for the new time level you have to take this as at new time level. Is that clear? Okay now so this is the original proposition. Let me denote this as equation number 1. Now there is a predictor step. In predictor step what we do we write the same equation but the only difference is this pressure at n plus 1 we do not know. So what we will do? We will write this as pp n minus pe n into delta y plus dn. This reference side will be same. Rho delta vp up n plus 1 minus up n divided by delta t plus apn. Is there any mistake here? Up n plus 1 should be star. This should be star up star okay. So from this what we will get? Up star as a function of this advection diffusion will involve u velocity, v velocity at n pressure at n okay. So you got this. Is that clear? Is that clear? Similarly you can obtain vp star. Similarly you can obtain uw star. Similarly you can obtain vs star and multiplied by density and surface area and obtain this as 1 kg or 2 kg whatever it is. Is that clear? Okay. So here I am talking philosophy. In pen and paper I am showing you equations for that. One to one correspondence. Is that clear? Okay. Now what happens is philosophically if 4 kg per second is going out and 2 kg is going in so more mass is going out. So what if you have knob to control the pressure of this control volume. What you would like to do? You would like to more mass is going out. You want to decrease the mass input so that it is balanced. So you would like to decrease the pressure. When you want to decrease the pressure then what we have an idea which we call as the pressure correction. So let us suppose you want to have new pressure. New pressure is equals to old pressure plus pressure correction. Old pressure is 1 atmosphere. So the pressure correction will be in this case let us suppose we reduce the pressure and the final pressure is 0.5. So the reduction which we did was minus 0.5. So the pressure correction is minus. Note the word minus. Pressure correction is minus 0.5 and the mass imbalance is plus. Note the word plus. Plus 2 kg per second. So what is the relationship between the pressure correction and mass imbalance? Negative relationship. Okay. I will show you an expression where there will be a negative relationship. Okay but this derivation is little lengthy. Pressure correction is a function of mass flux correction. Now let us do the original proposition prediction. Now the way we are saying is that to get the correct value we have a predictor step plus character step. So if you want to get an equation for character step you have to subtract from predictor from original. If you subtract this to what will happen? You will get rho delta vp upn plus 1 minus up star divided by delta t. What will happen to this apn? This will cancel down. And on the right hand side you will get ppn plus 1 minus ppn minus of pen plus 1 minus ppn into delta 1. Yeah sorry. And this is what we call as what is this? This we call as ep prime.  Is that clear? This plus this is equals to this. Greater path character is the final value. We are using some symbol as you know that we use for we get some velocity which will not obey the continuity equation. So we will use subscript star just to denote. It is just a symbol to denote. And star is the predicted value. So this is the correct value which we should get. Actually this strictly speaking this upn plus 1 is actually new value of up star. Yeah. What means the path for ppn plus 1? Yeah. What means the path for ppn plus 1? There we do not introduce. Yeah I can understand what you are trying to emphasize. But actually in the first iteration it is n. But in the subsequent iteration it becomes star. Yeah you can say that it is true.  In the first iteration this is pp to the power n. But in subsequent iteration it becomes pp star. That is true. Okay. So is that clear? Now from here what you can get? From here you can get? Yeah. Okay let me I have not written the heading let me write down. What is this? This step is corrector step. Is that okay? Corrector step is this is 1. This is 2. Corrector step is 1 minus 2. Okay. Now here what we get is what we got is up prime as a function of p prime. This up prime if you multiply by density and surface area what it will become for a mass conservation I am talking. I am talking for mass conservation. If you in the mass conservation this up is sitting at the face of the pressure control volume. Correct? In case of pressure control volume where is this up? Up is here. Okay. So if you multiply this by rho so rho up prime will be can I write this as mp prime mass flux is the product of density and normal velocity. So this becomes this becomes function of p prime. So here I am showing an equation of mass flux correction as a function of pressure correction. Is that clear? The p prime you write that is the pp and pe. I had written actually it should be I am not writing the subscript here also I had not written the subscript neighbors will be involved but I do not want to write it as a big expression. So that way I had written only p prime but implicitly I mean that there will be I am not writing any subscript but there will be many subscript coming. I want it to be little short and general. Here also I am not writing subscript intentionally. There will be lot of subscript which will be coming for this velocities when you are predicting this u star also. Okay. So this is the equation to predict velocity from the velocity of the previous time. This is to calculate the mass flux correction as a function of pressure correction. We need one more equation. What is that equation? Pressure correction as a function of mass in panel. That from where you will get that? You will get that from continuity equation. So let us use continuity equation. This continuity equation will convert into pressure correction equation p prime equation. Okay. And how it gets converted? What is the discrete form of up n plus 1 minus uw n plus 1 into delta y plus rho vp n plus 1 minus vs n plus 1 into delta x should be equal to 0. Now what we do here is this if you look into this equation. Okay. In this equation I can write this up n plus 1. How I can write this up n plus 1? This up n plus 1 let me write it here is equals to up star plus delta t divided by rho p prime minus p p prime divided by delta x into delta y. Is this correct? Sorry not from here. This is coming from this. Sorry. This is coming from here. This delta vp is what? This is delta x into delta y. Is it okay? So this is pp prime. This is p e prime multiplied by delta y. But when you divide by volume you will get one delta x in the denominator. Up n plus 1 is equals to up star. This delta t divided by rho delta vp will become delta x delta y. So this delta y will be divided by delta x delta y and then you get this. And then you substitute this into this. So similarly you will expression for uw, similarly for vvvp and similarly for vs. Once you substitute it and then do algebraic manipulation finally you get an expression like this. Is this correct? So from here you got an equation un plus 1 as a function of up star and up prime from here. Similarly you can get for vp star, uw star, vs star okay. And then you substitute and then do algebraic manipulation you will get an equation like this. And then you study I had mentioned that this discretization is very much similar to study state heat conduction diffusion term. And this is very much similar. So this is like a del square p by del x square. This is del sorry del square p prime by del x square. This is okay let me do in there. So the equation is something like this. Del square p prime by del x square plus del square p prime by del y square. That square is equals to minus of summation of m star. This is what? This is the Poisson equation. And here the equation which you have got is p prime as a function of mass imbalance. So we have got three equations. What are those three equations? Mass flux prediction. From here you can predict mass flux. This is for mass flux correction as a function of pressure correction. And this is pressure correction as a function of mass imbalance. So now let us go to the slide. So I had already told you that this 2 kg, 1 kg per second is obtained from which equation? This equation. Now this pressure correction minus 0.5 where you get? 1 atmosphere to 0.5 the pressure correction is minus 0.5. That you get from where? Pressure correction as a function of mass imbalance. Mass imbalance I am not saying any equation because that is very easy to suggest an addition. This is obtained from this equation. So that minus 0.5 is obtained from this equation. I forgot to, you can see here there is a negative sign. So there is a negative relationship which I mentioned earlier. Mass imbalance is plus 2 kg. So the pressure correction is minus 0.5. Pressure correction is you have negative sign here. So that relationship is what I am discussing here philosophically. There also you can see it. Now how we calculate minus 0.5? I had shown you an equation to calculate as a function of this 4 minus 2 kg per second. Now with the new pressure value what we do is that we solve one equation. Which is this equation? So this 2 kg per second and 1 kg per second should change. There should be some positive or some negative thing. Some addition or subtraction it should occur. What will be that? That will be mass flux correction. Right now this 2 kg per second and 1 kg are mass flux prediction. Now we need some mass flux correction as a function of pressure correction. And what is the equation for this? This is the equation. Mass flux correction as a function of pressure correction. So what is the mass flux correction you will get here? For the north and east phase it will be for negative phases it is plus 2. And for north and south it is minus 1. And the equation from where it is obtained is this. Mass flux correction as a function of pressure correction. Once you get that what is the next thing? Again you will get new mass imbalance. And from the new mass imbalance there will be new pressure correction. What is the new pressure correction? Plus. Why it is plus? Because the mass imbalance is minus. Minus how much? 4 kg per second. 2 minus 6. Mass imbalance is minus 4 kg. Mass imbalance is 1 plus 1, 2 minus 3 plus 3. So this is minus 4 let me repeat again. So due to this pressure correction of minus 0.5 from this equation you will get from pressure correction you will get mass flux correction. That mass flux correction is minus 1 for the north and east phases and plus 2 for west and south phases correct using that equation. Is that clear? Now in this you can calculate the mass imbalance. And I had shown you what is the equation to obtain pressure correction as a function of mass imbalance. Using that equation the pressure correction as a function of mass imbalance comes out to be plus 1.5 atmosphere. So the pressure correction is plus mass flux mass imbalance is minus 4 kg per second. Is that clear? So I showed you full expression but this is I had shown you symbolically how things happen ok. So we predict mass flux then we calculate mass imbalance then we have equation for pressure correction as negative of mass imbalance from there you can know that minus 0.5. Then we have equation for mass flux correction as a function of pressure correction from where let us suppose you got 2 kg and minus 1 kg. And this so this is your the first picture is your first iteration this is second iteration then you will have third picture third iteration fourth iteration note that I am showing you this for one control volume. What you will have if you have million points it will happen for million control volumes. Any question on this? This problem you have taken unsteady problem correct. Suppose if it is a steady steady problem. Yeah. Still you will approach in a pseudo time pseudo transient problem or how do you. The question is that I am using as unsteady state approach and if the problem is steady state then this approach is called as a pseudo transient approach. There is another approach which I am not discussing here because this is more general that is a steady state approach. I think this question is then a steady state approach whether we go we solve the problem in this manner the answer is yes. Without pseudo transient also can we solve? Yeah. Without pseudo transient also this. That means in only one step we will get the answer. You know not one step. No one cycle of iteration. No no there will be two loops anyway in that case also. The only difference is that in case instead of time loop there you have iteration loop but that will be there anyway loops will be there also. If you know that the problem if you are if you are sure that the problem is a steady state problem and if you follow a steady state approach it takes less computational time. Yeah yeah. And ultimately that decides which one you should follow. Sir I think as I understand actually you are not doing corrections individually for each control volume we are simultaneously solving the correction for mass pressure first and then the mass simultaneously I think because the way the equations are. No it is not simultaneous we do one by one. Each control volume separately. Yes each control volume one by one. Okay but that involves say corrections for other cells also. Neighbor yeah neighboring it is coupled between the neighbors but not all the neighbors because we have a sparse matrix. Yeah but yeah. We are solving simultaneous equations every time so can means are we constructing the equation for all the volumes put together at a time and then make a correction or. Okay let me put this question in a slightly different way I think the way he is asking is I am solving let us say pressure correction Poisson equation. We solve it iteratively we start with an initial value of pressure correction and we solve it iteratively and it is a sparse matrix so we are using an iterative method of solving. Okay so the way you solve let us say a diffusion equation with a source term iteratively that is the way we are solving it. Corrections simultaneously for different cells is involved say different volumes are involved here. Yeah yeah. So obviously unless I know the correction for other volume I cannot find out here. Correct. Are we not doing the correction simultaneously for all the. Yeah simultaneously we are doing when I later on discuss the implementation detail that will come out more clearly we are doing simultaneously you are right because what is pointing is out that I do one iteration of pressure correction then I get an updated value of this okay then I solve it again so it is not that this is a constant value then I solve it it converges I update this after every iteration that is true. Sorry is it that in this case then for correction pressure correction also we need a boundary conditions. Yeah we will come to that we will need because as this is an elliptic double derivative in X and Y direction you will need pressure correction boundary condition as well however if you are using a staggered grid that can be avoided but for collocated grid you need this. Anyway I will discuss the pressure correction boundary condition towards the end of this lecture. So I hope now you got more clear idea of what you have from yesterday whatever you have understood. Now let us go to quickly I will just revise whatever I thought the equations so in semi explicit method this is an original proposition then this is the predictor step then this is the difference between the two which we call as the corrector step and then this becomes the velocity correction this becomes the pressure correction. Similarly for v velocity these are the equations and for continuity this is the way I had shown earlier that for continuity use the velocities of the new time levels and then use substitute u p n plus 1 v p n plus 1 as a function of u star and p prime u star v star and once you substitute you get this right now here I am showing you the algebraic form of the equation. So the point here to note which he was pointing out is that we saw we do one iteration of pressure correction and then after doing one iteration we get new value of this u p star because as I mentioned in my previous slide I emphasize that this u p n plus 1 you do not get in actually one iteration this is actually u p star new value as a function of old value. So once the mass conjunction occurs then this new value of u p star becomes u n plus 1 because this is an iterative method of solution this you do not get in one iteration many times we when we do formulation we fall off symbols because here I cannot write it as u p star but I can also not write it as u p n plus 1 because so I use one of the symbol and then I clarify that this is not u p n plus 1 this is actually u p star new value and this become n plus 1 only when it is the continuity equation in the last iteration. In the implicit method the difference is that we take the advection and diffusion at the new time level. Now you may be having question that why we are calling that method as a semi explicit because we have to take pressure implicit if we had take if we could have obtained correct solution just think what do you mean by a fully explicit means let us suppose you take pressure at old time level and let us assume that it gives you the correct u velocities and v velocities then and if so those two equations are sufficient to obtain the solution because those velocity needs to obey the mass conservation. So fully explicit is not possible in case of new stroke equation at least you have to take pressure implicit however if you want to do fully implicit also that is also not possible because this breaks the philosophy with which we are solving the set of algebraic equation note that we want to solve here algebraic equation where the coefficient is sparse. So the idea is that we want to solve algebraic equation where we should get an equation where the value at one point should be function of its sum of the neighbor not all other points all the neighbors. So like if you have yellow circle 25 interior grid points your equation should not be that the equation for one point is a function of 24 neighbors because if the coefficient matrix is dense then if you follow this iterative method it is very costly. Yes it is an explicit we use in semi implicit also you we do not use stability criteria in semi implicit method but in semi you know in any explicit method we have to use stability criteria. Sir but semi implicit also we use sir. Semi implicit we do not use stability criteria in explicit we use in implicit we do not use as we do in earlier cases. So in the solution methodology in semi implicit is also very much similar the difference is that this advection and diffusion at they are at n plus one time level ok this is for u velocity this is for v velocity to do the prediction what we do is that we take the pressure at time level n ok. Then in this case we get a set of algebraic equations like if there are 25 points you will get 25 equation and in each equation there will be not more than 5 unknown because you can have maximum 4 neighbors plus central points of 5 unknown. So this x momentum prediction y momentum prediction in the semi explicit method you got an equation where let us suppose you have 25 equation in each equation there was one unknown but here in this case this x momentum equation and y momentum equation prediction velocity prediction they are iterative in nature. So you have one loop for the convergence of this second loop for the convergence of this and the third loop for the convergence of where is in and over and above this three are inner loop over and above you are anyway you have a loop for study steady state convergence in a semi explicit method you only have one inner loop and one outer loop inner loop for applying law of conservation of mall that is pressure pressure correction loop and the outer loop is for study state convergence. So how you will get the equation for correction you just subtract these two this minus this will be what if you subtract the two you get an equation like this now if you convert this into algebraic form you will get an equation like this. Now this equation has a problem the problem is that the velocity correction is a function of the velocity correction of the neighboring point and this velocity correction in function of the neighbor point are function of pressure correction. So if you use this equation the problem with this equation is that the coefficient matrix which you get will be very dense as I said you will get if there are 25 grid points you will get equations where in each equation the value at a particular point will be function of 24 neighbors and in CFD we do not have 24 25 points we have millions of points. So we have millions of equations. So just compare let us suppose if you have millions of equations and each equation is a function of four neighbors versus each equation is a function of million neighbors just think about the computational cost. So you will see in all many CFD books that till this step this is fully implicit and between this step and this step we are doing something due to which it becomes semi-implicit. You see this statement in let us say book by Patankar that this equation to calculate the velocity correction of a particular point it involves velocity correction of the neighboring point and this velocity correction will have the pressure correction of further neighboring point this will make the equation coefficient matrix dense. Now we want to avoid that because it will be computational cost will increase a lot. So we drop this term drop this one is when you drop this term this will be equal to this this is this is that clear any question as you done in semi-explicit method here also what we can know when discretizing only for those terms we can give nth level previous level then it get cancelled the while subtracting getting pressure correction velocity correction equation that term will get automatically cancelled this term will get automatically cancelled your thing this term how it can get cancelled I am not actually from here to get this this is a very lot of step I am not showing you all those details step because this APn plus 1 minus AP star actually involves neighbor so the neighboring velocity corrections will come up so it is a big equation it will not never cancelled stop.  So it will never cancelled. So out of this semi-implicit semi-explicit so which one is going to converge past how can we say that or is it problem specific. We will come back to little later let us first complete what are the different method then we will discuss the comparison between the different method so in the similarly for V velocities we can get so note that here what I am basically showing is the although it is a velocity but the velocity sits in the continuity equation I can also call this as mass flux correction for the east phase as a function of pressure correction. And this is I can call it as a mass flux correction of the north phase center of the pressure control volume as a function of pressure correction. Then from this actually this is Vp n plus 1 minus Vp star. You can write Vp n plus 1 is equals to Vp star plus this term and then you can substitute into this continuity equation. What is this? This is Vp n plus 1 is equals to Vp star plus this is Vp prime. And once you substitute this you get an equation which I have shown you earlier for semi-explicit also. This is the pressure correction equation obtained from discrete form of continuity equation.


Jesus said this about living a meaningful life, but it's a complete opposite of everything our culture stands for. We embrace self-love, self-preservation that we come first, that we must self-actualize through the pursuit of our most intrinsic desires. But Jesus says this, You must lose your life for my sake to find it, to sacrifice yourself for the sake of Christ. But we can't do this on our own, it's not in our nature, we do everything in our power to preserve our life. But when we put our faith in Him, God gives us a new heart. We are being transformed into the person that God actually wants us to be. Greater love has no one than this that a person would lay his life down for his friend. But Christ did so much more than this while we were still enemies with Him, He laid his life down for us. A meaningful life is found when we receive God's good gift of salvation and through His power and love seek to exemplify a sacrificial life.


So GameStop has actually do it something really really interesting and new and something I've never even heard of I've used services like Gamefly in the past You know where you pay a fee every single month and you can rent out a certain amount of games I you can hold on to those games for as long as you want But you never own them yet to send them back now You can purchase the games for reduced price if you want, but that's got really nothing to do with your membership fees It appears GameStop's getting into the game rentals business Currently I can only think of two ways to rent video games Through Gamefly or if you have a local red box, you can rent games through there Which is obviously the cheapest way to rent games. However There's usually a very limited selection of games now if you've ever been inside a game stop You'll know they have a huge library of used games, especially for systems like PlayStation 4 Xbox one Xbox 360 Etc etc etc the Nintendo switch use section isn't very big right now But again switch hasn't even been around a year yet And there's just not a lot of people reselling their switch games at this point because the kind of games that usually get sold back to the store are You know ones that have more consistent releases like next year if switch gets NBA 2k 19 NBA 2k 18s Gonna start appearing in a lot of game stops in summer of next year. So What GameStop is launching is something they are calling the power pass It's really interesting So it cost $60 the the ad I'm throwing it up on the screen now So six months 60 bucks enjoy half a year of unlimited gaming for the price of one new game Pick any pre-owned game from throwback classics to the latest hits Swap as often as you want and keep the last one You could sign up starting on November 19th Yes any game, so you bet you could take one game out of the time and Okay, the basis that you pay 60 bucks and you could take any game out at a time one game Play it as much as you want bring it back trade it in for another used game and another used game or another Is and you just keep and you can do it at any store So if I pick one up for my local GameStop I can bring it into another GameStop somewhere else and get a different game out and Yeah, at the end you get to keep the final game that you have rented out Now obviously, you know, if you're a savvy consumer, you're going to turn in You're gonna trade in your final rental game To get a game that is close to full $60 right because they're including games that are anywhere from costing You know $5 used all the way up to when they buy like a brand new game back in their reseller for $55 You could walk out one of those $55 games while having played all those other games along the way It's a really interesting rental system to me because one GameStop has one of the largest local libraries of used games around and Two if you're gaming on a budget, this feels like a really smart way to enjoy a ton of games Now obviously before you jump in you should make sure hey There's already enough games out you want to try but maybe not buy In the first place to take advantage of it because you never know You know if you're hoping for like a used copy of Super Mario Odyssey to play in the next six months You you might be out of luck Although you could be thinking oh well maybe at the end of the six months I could find one store that has one copy of Super Mario Odyssey used and hey you get to keep it It's a really interesting thing that I kind of understand from a business perspective now You're obviously gonna have the concern that oh Someone's gonna take out a game and not return it But see this is why the six months for 60 bucks thing is so cool because if you don't return that game you get to keep it anyways So it's actually smarter than red box is red box. I know there's people who have a huh Basically stolen from red box they'll rent something with their card a credit card check card or whatever They'll rent a game out and then they will cancel that card go get a new one because that costs them nothing And then never return the game and then their their card can't get charged and basically they don't get in any trouble I don't know if that's ever gonna catch up to people that do that But I know that people do movies and all that stuff as well So it's not actually a new thing but people do it with games and that's stealing here If you do forget to return a game you just get to keep it anyways So that's I really actually like this now. I understand the GameStop gets a lot of flak for a lot of deserved reasons I don't think necessarily them opening up the new games is You know after a couple weeks of it being out is really as big of a deal as people make it out to be Obviously when you when you buy like a brand new copy of a game The first thing you should do is check the disc and make sure it's literally a brand new disc And it makes it with a used disc, but beyond that I don't actually think that's ever been a big deal I think if you want something like that you should go you know to a store like Walmart or something if you want a fully sealed copy because Reality is GameStop deals with just games and they want people picking up the games off the shelves and looking at them And when that's the case They're not gonna have everything behind a glass case to prevent stealing So they have to they can't leave the discs in the brand new boxes or people are gonna start stealing the discs I mean it happens at Walmart if you ever go to their Their section of like of cheap DVDs or even cheaper games they don't have behind the cases sometimes you'll notice One of them has been slit open by someone and the disc is missing It's something that GameStop would have to deal with on a huge thing if they didn't take the discs out themselves To prevent theft so I'm actually okay with that They're not gonna they're impossible for them to have enough room behind the counter to hold all new copies of all video games out There and just leave about one box on the shelf They try to do that sometimes, but it's almost impossible so That doesn't bother me GameStop has had some crappy customer servers a certain store as well I went over in the past so my local GameStop is actually very nice to me But there are other good gaming deals out there You know you can go to Best Buy their gamers clubs really nice I'm an Amazon Prime member So I think I get like 20% off of all brand new games But what I don't get is the price of one game try as many games as I want over the course of six months and decide at The end what game I want to keep that is a very I mean even in this ad I mean look they're showing our Call of Duty Black Ops 3 you have Madden 18 there breath of the wild Pokemon Sun and Moon Super Mario 3d World even from the Wii U Horizon Zero Dawn Grand Theft Auto 5 Overwatch I mean these are all games that you're not getting for 60 bucks anyways even used so This is just really cool to me. I think this is obviously You could argue it's a desperation move, you know best buy or best buy Blockbuster tried to do this for a little bit before and obviously blockbuster was a rental place But I think like this is just a better deal than even what blockbuster was doing since it's as many games You want you can bring a game home play it one night.  I think all of us understand like coming up here You know, there's like a whole bunch of games coming out this holiday There's no way in heck I can afford all those games But over the course of the next six months I guarantee I can find used copies of those games inside one of the one of my you know I have two local game stop stores inside one of those game stop stores I could probably find a used copy of all of those games within the next six months and be able to try and play them I mean if you think about it I could rent out a game like horizon zero dawn beat that game turn it in and not be out any money and just grab another game It's crazy. It's crazy to me that that they're running the service. It's obviously because they have such a huge a huge swath of games and this obviously guarantees them that someone paid 60 bucks for at least one game at the end of the day So I'm a game stop gets their money. We get to play as many games as we want I think this is almost a win-win. That's not I mean it's 10 bucks a month It's kind of like the cost of game fly without the inconvenience of having to put it in the mail, right?  I can find something I want to try Every time I go in and I'm done with whatever game. I rented out at that time This is really interesting too for like a game like Madden you can get a game like Madden just play it during the That it's parts of the NFL season turn in later get a different game. It's I don't know I think this is a really I have to actually applaud GameStop. This feels like a good deal I don't always like everything GameStop does I didn't like obviously the program they have with their employees trying to push to use game sales and Trying to push, you know, people buying passes and their GameStop cards and blah, blah, blah Like I just upgraded to I wasn't called their elite pro card And I only did that because I had enough points on my card and for it didn't cost me anything And it gets me like free two-day shipping. I guess which is nice if I have to order from GameStop And can't get it off Amazon And obviously gives me bonus points and 20% off pre-owned and blah, blah, blah, blah, like it's a little bit better than their original pro card But whatever it doesn't matter I don't know if I shop enough of a game stuff to even make that worthwhile But I'm excited about this this pass. I Did this in the power pass unlimited gaming? I'm gonna give it a try. I'm gonna give it a try on 11 19 I'm going to pick up a power pass and hopefully be able to play some switch games That I don't currently own and it's just really cool at the end of it all I get to keep one of the games So it's not just a rental service like Gamefly where once you're done, you know, once you cancel your service You're done. No, I pay my 60 bucks and at the end I get to keep whichever game I want That was obviously a used copy again. You guys, let me know what you think about this in the comments below I'm personally excited about this because now this is gonna give me the opportunity to play so many more games That I might not have otherwise had the opportunity to play I mean, there's so many games just this year I have missed out on because money money money you guys have seen it during my live streams and my Q&A's at times You know when people ask me, hey, why haven't you gotten this? Why haven't you gotten this and I just put up the money sign because I can't afford it Gaming is an expensive hobby. I'm all for anything that makes that just a little bit more affordable Obviously, you know as a game fly user in the past I understood the convenience of that But this is even more convenient for me as someone who lives close to a game stop Yeah, I'm excited by this. I hope you're excited by this Let me know all of your feelings down in the comments below Anyways folks, I am Nathaniel Robles from Nintendo Prime and if you like this video, you know what to do and if you dislike this video Well, you know hit that dislike button Subscribe for more content just like this and I will catch you in the next one


Nowadays more and more companies are relying on a p.m.. And web driver to build custom frameworks test their web and mobile applications and As you know, they are many flaky tests and usually the reason for that is that we don't treat our test code is a production code Moreover, we don't treat our frameworks as products and This is what I will talk about today You'll get what's a few insights how you can test your test automation frameworks And I'll give you examples from our own First who am I I'm Anton angle. I came I come from Bulgaria I have eight years of experience in the field of automation testing I worked as a q-architect into big companies in Bulgaria and part of my job was to Write and design scalable test automation solutions. Meanwhile, I was working as a consultant as well and let many trainings So Here's our agenda first We'll get through some definitions What is the difference between a library a framework and test automation framework then? I will tell you more about our framework so that you can understand the context and I will share with you what tools do we use to release it to test it about a little bit about our branching strategy and Later on the second part of the presentation will be about the different types of testing We do to make sure that our framework is working correctly Let's begin So first what is a software library like web driver? It is generally consisting of Pre-written code like classes methods data definition files constants, etc. That you can use Later on in your own code without explicitly writing it the code again Basically, we already use the code here on the slide. You can find an example from This is actually a dotnet code the daytime library in dotnet. This is a library The framework is something more generic and more abstract Usually you can overwrite and customize its behavior by overriding some of the methods and there are four major things that Make the framework different from the library The first one is inversion of control and here. I'm not talking about inversion of control containers rather Usually the framework is controlling the fall of the program rather than the user Usually the user is controlling the fall in the libraries Then the framework usually provide a useful default behavior Also You can extend the framework meaning as I told you you can do it in a several ways You can override some of the methods Some frameworks provide delegates or hooks which you can subscribe on or you can use template design pattern template method design pattern and so on and Lastly you can extend and customize the code, but you cannot modify it What about the test automation framework? It's a bit a bit different than the software framework For example, imagine that you have a custom framework using underneath APM or web driver Usually we use page objects for the page objects. You usually put them in separate projects from the tests But you need to pick one type of page object What I mean is that you can there like at least 10 different types of page objects you can use for example You can define the elements as Private you can expose them as public properties You can spread the elements through different files and use them in the page object and so on and so on So you need to pick one particular type of page object Then you are talking with your colleagues and you decide that instead of writing pure unit tests you want to use BDD syntax like gherkin and Then you install for example for .NET speckfall and As you know for gherkin in order to work it needs to have these coded Steps so you put them in a different project and of course you need to have one more project to put your spec files in the tests Later on one month after that you decide with your colleagues that you need some kind of a coding standards So that your team shared Like a high-quality coding standards and you are notified and because of that you install for the .NET A tool such as stacop or editor config and you need to define this kind of coding rules Inside a specific file. So as you can see the test automation Framework is not only about the methods and classes you use it's about the different rules patterns Etc that you need to follow the following guidelines. This is the test automation framework all of these things Next as you know one of the seven principle in testing is the context meaning that In order to understand what type of testing we do I need to share with you what we do We develop a test automation framework written in .NET in C sharp We use .NET core so that it's cross platform meaning you can write and execute the test on different platforms such as windows linux mac We have different modules for testing web Android iOS desktop API and wall testing and of course underneath we use web driver api and WinApp driver s sharp and so on There are two ways how you can use the framework usually Big part of our users use the framework as you get packages. This is the packaging platform for .NET In order to make the usage easier We developed a UI installer so that it configures all of the projects for you But it's like it's working on windows and in order this to work. We created common line and store for mac and linux and the second way of using the tool is actually how our enterprise users use it because they have the source code and There we removed all of the licensing checks like all security checks actually because later on I will tell you that For example, we use third-party tools to obfuscate all of the DLLs so that nobody can like reverse engineer what we do So now about our test infrastructure Mainly right now all of our Continuous integration jobs are placed in azure DevOps Before that we actually use a combination between Jenkins and allure If you don't know allure, it's like a test report in portal however, we stopped using Jenkins because we had many test agent machines and We use like these Jenkins agents, but they keep disconnecting and because of all of these troubles We move to azure, which is much more stable and its agents and about the allure It had some integration with azure, but since it's third-party. It was not working Very well and because of that we switched to using the built-in functionality in azure to visualize the results This is a really nice test results dashboarding like you can see the Time for each build you can see the detailed reports about each test And also if you use MS test or any unit you can attach for example videos and screenshots to each of the tests What else I told you that In production most of our users use the framework is new get packages. We applaud them to new get orc However, since we strive to make major releases each month or two We cannot applaud our current development new gets packages to new get orc since like our current development We will go live because of that. We created test feed in my get. This is like a Private new get feed This is the fact our test environment where where our current development is there and our tests are running against it Something else most of our tests like we have over five Thousand system tests verifying that the framework is working correctly These tests are usually running on Windows machines like several of them However is mentioned we promise that our solution should be cross platform And in order to support that we bought a machine Mic machine in the cloud there is such a service instead of buying a physical machine We just buy a virtual machines in the cloud where we run all of these tests again But on Mac and you'll be surprised how many problems they are and dotnet core is not really out of the boss running on Mac So you need to test that What about our branching strategy? We use the built-in Git support in Azure. So our primary source control system is git We have a couple of branches first. We have this release branch, which is actually our master. This is what is our production code Then when when we make sure that the current release is stable the code goes there in the release then we Check our roadmap and we ask our users. What are the most three top features that they want from us and We pick them and start a new branch for example We pick the most prominent feature of these three and name the branch on it For example wall testing release five. So for the next month or two the current development is happening in this particular branch but since as every like wife product we need to make sure that We make bug fixes every day and if there is for example new version of APM or web driver to support particular Android version or new browser we need to update and make sure that everything is working So we have this maintenance branch where we put all of these fixes, etc And when we make sure and run all of the tests against this branch and everything is working with the fixes Then we merge it with the release branch and make a release and this may happen every day or when it's necessary This is like a service pack releases And the last branch that we have is the so-called enterprise edition branch where as I told you We removed all for example wife's ing checks obfuscation and so on but since it's semi-automated merge we need to make sure that Like again run all of the tests against this particular branch again because even Since the users are not using the framework packages when they have the The source code they just reference the projects because of that we have a spare set of tests against it And the last one infrastructure share is actually not a branch. It's a complete new repository where We put all of the different for example We have different our own packages for distributing the drivers for web driver for each different browser set we have demo applications for Testing desktop apps for we have demo applications for Android for iOS We have a for example common line video recorder and so on we put all of these executables in this particular repository not in the main repository because If we put it in the main repository, this means that all of our builds will get slower and slower over time because of the history of these big executables and But we want to keep the history of them because of that we have a this separate repository As you will see later on we have lots of integrations with visual studio and different ideas to make the work with the framework easier So we have for example project templates item templates for page objects snippets for faster writing and all of this new get packages seemed like the product itself is Containing many moving parts and we strive to automate the release of everything and not do it manually because of the human errors because of that we created Like a release application. We called it release manager It this is the UI version, but we have a common line version as well so that we can put it in build definitions It's primary job is to for example build all of the projects automatically then it called the third-party tools to Offer skate the DIYs then packages everything into like more than a hundred different packages It can deploy the packages to the different environments and so on and so on many complex things But the main thing here is that we strive to automate all of this stuff and not do it manually because Because of the human errors most of the books are happening because of them Now let's talk about the different test types that we do First of course the functional testing In order to test the functional testing here, we have as I mentioned Our own demo applications for example for web We have created mock pages instead of wife pages supported somewhere so that our tests are Like running quite fast for Android and for iOS. We have separate like native and Hybrid applications that we test against for the API which is like web service testing We have a like a common line Deployable web service which runs again with the tests. So you get the point but here As you know in a PM and in web driver Usually when you find an element it it's represented like with the I web element interface or Like it's a single class or interface in our framework. Each control is a different class Providing different methods for usability purposes like making the code a little bit easier to use more readable etc and This is definitely something that we need to test like here on the site You can see these date element This is like a data picker where we call this set date method and we choose the date and we need to make sure that This is working correctly Next like a functional testing we do is that is with any good program and practice if something Is going wrong we throw a proper exception message containing information what went wrong and What you need to do to fix the problem? But again, this is something that you need to test whether it's working because it's custom code in the framework If you recall the definition what the framework is One I think the the major thing about the frameworks is that they need to allow you to customize and Extend the code so this is such functionality for example for each Method in our framework we Give extensibility points to put your own code For example before setting the date after setting the date and you can write something like a plugins But this is definitely again something that we need to verify that it's working if you have used for example, I think the interface was Firing web driver. It's something similar providing your interface for extending web driver Another way how to you can extend the framework is like for example here if you don't like how our Implementation is done for example how you will get the date we provided a way how you can overwrite The behavior at all in particular test or globally in all tests and again This is something that you that we need to verify otherwise there might be regression books during our development Sometimes Like again, we have what's a few unit tests. So here you can see one unit test We have this functionality called BDD logging which is based on the Extendability points I showed you before but instead of running emulator simulators and browsers We just mocked the our logo and verify that it's logging the thing that it should be Like Another thing that we do is that basically for for example, this is example for Android as you know if you search for an element in Android and For example, if the element is here, it's not visible on the screen And if you're trying to search it if you don't write some custom code your test will fail So there is a custom code using apium that can scroll down or scroll up until it finds the element on the screen and we developed the framework To hide this complexity and to allow users just to write for example create by ID containing and the framework is doing is doing the scrolling Automatically for you, but again, this is some custom low-level apium code That it's under the hood and we need to verify that it's working So this is a test where I know that the element that I'm searching is below the visibility point and I check that it's visible warning tests warning tests are something interesting. Yeah, they're like Special test that don't test the framework itself or the product itself. They can be used to test Different third-party dependencies in your application Meaning that for example in our case we use web driver and apium under the hood but as you know during time they are updates of the web driver or apium and We are humans. It's open source project. Sometimes they are bug something He's not working on the new Android versions or the API is changed And we need to make sure that this compatibility between the framework and apium or web driver is working And it continues to work to make this decision Easier for us to choose whether we need to upgrade the framework or not We have this separate project where we just call the apium the way we call it in our framework but Without all of the complexity underneath and we just upgrade this particular project run this small set of tests and see If they are green or not if they are green then we can upgrade everything can verify that it's working But otherwise we don't do it or try to work around it, etc It's more easier approach. You can do it for web driver for apium or for any third-party tool that you use Of course, there are many features that We don't try to test at all Not test at all. We don't try to automate them. For example, as you see here this video recording attribute We have such a functionality in our framework that allows to Record the Test execution and if the test fails it will keep the video recording However, this is doable to be automated. However, it's like I guess it will be too complex of a test and Such kind of features in our framework. We actually in our company We're like automation hub that different companies hardest to automate their projects. So we use our framework day-to-day to Test some applications and we use this troubleshooting Features ourselves and if the for example videos afforded to Azure not working group or anything I will see it immediately and there is no no need to to write some complex fragile tests to to verify that the video recording is working or not Something similar for the UI and store like Definitely you can write and I wrote in the past test that verify that the installer is installing everything However, we prefer to test it manually We have this checklist with what needs to to be checked etc. Because it's a visual thing like again We can use sickly or something whatever to verify, but again, I think this type of test will be like Too complex and no need like we just do it Once before a major release to verify that it's working or not What about the upgradability testing I show I told you about our like warning test we use to verify that We see if something is working or not There are two cases if you see that something is wrong For example, it's easy in web driver Because there are many of the things can be work around using JavaScript or whatever until the buck is fixed in APM It's a bit different a bit harder like again. You can use espresso or adb or wall level stuff like that to work around something but Not every time is doable. If something cannot be fixed and work around like this We just submit a book to the GitHub maintainers and try to help them to resolve the issue or not About our API as you know as every API It evolves over time. However We Here this is a code copied from the official c-sharp bindings for web driver As you can see here this obsolete attribute it marks that this particular Method will be deprecated in a few versions We do the same for our own framework like we don't delete or change the API immediately With this obsolete attribute we notify our users that this method will be changed removed Etc and in this message there in the string We just point when the feature will be removed how it will be changed and what needs to be done to Migrate to the new version and it's actually the same approach for the official APM and web driver bindings What about the instant is the ability testing? I told you about our UI installer. This is how actually common wine installers work in dotnet world like Typing these two commands the first one will store a template the second one will create in an empty folder the whole project Instead of again manually testing everything for the sake of verifying everything we created Separate builds for each of these templates to make sure that Actually, there is something in the template and that and That it's buildable because sometimes there are books of course in our release tool and once Like a year ago. There was a case where all of the templates were empty and our clients were what I Cannot install it and because of that we created separate builds for each particular Template to be verified that you can uninstall it install it and verify that it's buildable You can see here the definition what means portability testing in the case of test automation frameworks It means for me that when you write a test for a particular browser or for a particular Android version You can change the version or you can change the browser and the test should continue to work And we strive to give this possibility for our users in order to do so we Have these attributes and making like we try to support at least three versions Of the browsers and a couple of versions of Android and we make sure that this is compatible You can see here the official definition of what means interoperability testing This is basically how your program is Operating together with other applications in our case as I told you we have lots of integrations with the For example visual studio ID like providing these pre-configured projects Templates for creating automatically page objects and stuff like that So we need to make sure that all of these integrations are working When you install the product, but again you can like for example, you can use win-up driver to automate all of this but I Bet that the tests are like Can get a little bit fragile and because of that we use it just data in our day-to-day work and This is how we test it. We we don't automate this particular thing We also do performance testing like as you can see here this time-out attribute. This is especially useful for We run it especially for iOS tests Which when you run them in simulator on Mac machine in the cloud it can get quite slow and because of that we strive to test that we don't Add some kind of a regression performance issues during our updates and make sure that it leaves their own In a couple of seconds When you put the this time-out attribute if the test is running more than the specified time the test will fail This is the whole reason Another type of testing that we do This is like a decompiler for dot-net DIYs is mentioned for the our official packages We run this third-party fiscation tool that actually when you decompile the code It gets quite quite ugly and all of the strings etc. Are Like encrypted and you cannot see it like again You can automate this and verify that the code is ugly But instead of making this kind of complex tests again We just open from time to time some of the packages and verify that the fiscator is doing its job And as long for the licensing stuff. We just have unit and integration tests What about the usability and the stability of the API Well, we do alpha and beta testing We just when we have a new version of the framework we give it to chosen experts from the field They start using it and give us feedback This is one way to do it another way to do it is that in the past we have hired like their specialized companies in like evaluating the API usability of the framework they usually work with a network of consultants and domain experts they try to use the API or the library For a week or two and then afterwards they generate a report with feedback and suggestions etc. And then send it to you And even if you have these great features if your users are not using them then your product is useless And because of that we how we handle the suitability we do client interviews This is quite important for us like When we have the chance we just do client users Interviews asking the people what are their problems whether we can solve them with the framework or if we cannot How they suggest that or what we can do for them if we cannot ask them in person or during a call We usually use like Questionaries feedback forms etc To ask the same questions and during time Over time with all of this feedback the API like evolves and helps more of our customers and Was but not least I Bet that most of you have some kind of a custom framework especially more experienced of you and I bet that you spend countless hours teaching your new colleagues how to Ride the test or use the framework etc. Because most of these frameworks are not documented well And I think that there should be a more Automated approach how you can ease the learning process and allow people to learn by themselves One way we try to solve this problem is by providing this so-called starter kits or getting started guides For each particular technology for example, we have such for web Mobile Android iOS etc. What is it? This is basically a project that contains And explains how each feature of the framework is working like you he on the site you can see that they are detailed description With real-world examples explaining with comments what is happening how you can change it how it works, etc but moreover there are structured in a Like in a prioritized way where you built on top of each feature and Before proceeding to the next feature. There is this to-do text file Which contains specific exercises that you can try to do yourself so that you can keep up with warning How the tool is working And Especially important here is to verify is with any documentation that there are no syntax grammar, etc Errors we use tools such as grammar really to check all of this stuff automatically for us and Also, we have this static analysis tool as mentioned We use style copen editor config to make sure that all of our team members are following the high quality code standards and Both tools are working in a similar manner like As you can see below when you'll build the project if Some of the code is not following the guidelines. You will see these warnings in the error list window You can double-click on them in the problem code will be highlighted explaining what went wrong and how you can fix it I I'm sure that they are similar tools for Java and for other languages. This is not something specific for So we went through what is the difference between a library and a framework. I told you about our tools how we release them how we use the branching I Showed you most of the code here. It's about our framework and it's in C sharp but Because of that I structured in a way how it's in ice to be yours stuff like that where You can get the idea about the different types of tests and you can do these types of tests in your custom frameworks as well Or at least you can apply the warning tests or the getting started guides a little bit of Resources Most of the types of the tests There are detailed articles about them on my blog automated point.com you can get expired about some of the features of the framework in the official documentation and about stuff like in stores you get packages Templates etc. They are really detailed articles on MSDN Thank you If you have questions I can answer What do you mean by any platform? Yeah, it's it uses a p.m. Under the hood. So There were examples for render it in iOS as well So I can see actually more on the Android side not on iOS There were one example for eyes, but yeah, how we can make instrument for the iOS automation in your framework It's easy you just I will If you want after the presentation I can show you some examples But basically is the same way how it's done in Android like most of our framework is using these Attributes for Android. It's like Android up for iOS is just iOS up and under the hood We use the different drivers to to manage all of the stuff, but we strive to make the API similar for both Android and iOS so that it's more easy for the people to write tests for example if you Learn how to write tests for web or for Android it will be almost the same for iOS This is part of what we do in the framework, but all the xe will not work on iOS, right? It will work on iOS Executives dot exe file. Sorry dot exe file. We cannot install on Mac, right? No, you can run the test and write them on Mac. No, it is a dot DMG file Sorry What set up Whatever set up you so case in the presentation it was more towards dot exe You have installed and you did all these activities, right the framework go back Back back This one back back Yes Go front one Are you talking about this or more? Yes Yeah, yeah Yeah, this is not running on mac, but on mac you can use This one like these are special common wine in stores Distributed through new get packages and they are written on dotnet core and because of that the two can be run on dotnet core this is how Other dotnet core applications are working right now and they work on both linux mac and windows Okay, thank you But yeah, you don't have the visual in store just because you don't like The plugin system in visual studio for mac. It's completely different than the Than the one for windows Any more questions I have a question about why you create this release automation too because like jinkins or Like azure DevOps already have like that kind of release or publishing the Release automation too. Yeah, you're right Because of that we as mentioned we have this release automation in asia already this was like our old style of doing it before moving to asia like Yeah, it was a bit easier Like years ago to to use this visual tool So that we can manage and distribute it faster Right now we just have builds for that Yeah, and we use the common line version of the tool Any more questions? Okay, thank you. We can we can talk during the pauses


So with this we'll move on to the next topic which is matrix norms. So now matrices are basically rectangular arrays of numbers, and we want to, let's say, define the size of a matrix and compute it in this form of, I call it a norm and compute the norm with matrix. Now, one thing is that if I take the restrict to square matrices here. Excuse me, sir. Yeah. Sir, if we start with the pre-norm, can we get directly what would be the dual of that norm? Yeah. So the dual of the dual of a pre-norm will be a norm. It may or may not coincide with the pre-norm. It will coincide with the pre-norm if the pre-norm was actually a vector norm. If not, it may be a more restricted version or a different version of that pre-norm. But once you find the dual of the dual norm, that norm and this dual norm will alternate with each other going forward from there. Does it answer your question? Yes, sir. We can't directly get it from pre-norm, like by adding something to it. Anything. That is not clear. We'll have to look at. So you're asking whether the dual norm of the dual norm of a pre-norm can be written in terms of the pre-norm itself by adding something or making something. I don't know that there is a simple modification to a pre-norm that will make it satisfy the triangle inequality and therefore become a vector norm, which is the same as the dual of the dual norm of that pre-norm. I don't know that there is such a thing. So as you can see, the wonderful thing about matrix theory is that it's very easy to ask a question for which it's in fact very difficult to find an answer. So we will discuss a lot of very deep results in this course, but always keep in mind that if you're lucky and later in life or in your research, if you're faced with a problem which coincides with one of these deep results that we will be looking at, then you can use those results and you can say very interesting things. But if it doesn't coincide with the results that we are discussing, it's oftentimes quite difficult to say what happens. So that's one of the very interesting things about matrix theory. If you go slightly off the beaten path, you may quickly be off in some uncharted territory where you'll actually have to derive new results in order to understand what's going on. So what I was saying about matrix norms is that if I take a matrix, which is of size n by n, what I can do is I have all these entries, I can simply vectorize them and I can construct an n squared length vector. And then I can say that now I can convert this into a big vector, a big long vector of size n squared by 1. And then I can say I'll use some vector norm. Now, this is one way of measuring the length or size of a matrix. Let me just say length rather than size because size can also be taken to mean the dimension of the matrix. But this is one immediate way by which you can measure the length of a matrix. However, matrices have multiplication defined on them. And so we want to, we really look for matrix norms that will help us relate the length of A, B to the lengths of A and B, the individual lengths of A and B. And that is an extra property that is desirable when you're looking for matrix norms. And so therefore the definition of a matrix norm, in fact, involves a condition involving products of matrices. So here we go. So the function, and as I told you in a previous class, I'm going to use three bars to denote a matrix norm. And this is a mapping from r to the n cross n to r. Is a matrix norm if for every A and B belonging to r to the n cross n, we have one, the norm of A is greater than or equal to 0. Two, or actually one A as we called it earlier. Norm of A equals 0 if and only if A is the all zero matrix. Two is the homogeneity property for every c and r. And three is the triangle inequality. So so far we have not deviated from the definition of a vector norm. In fact, if I vectorize a matrix like this, and then I compute any vector norm on this vector, that will satisfy all these four properties. And so the last property is the one that distinguishes a vector norm from a matrix norm, which is called the sub multiplicativity property. So why do we need this? Will be clear when we discuss matrix norms going forward, where this property turns out to be very useful, showing that a matrix norm defined like this does turn out to be quite useful. And so again, just for the sake of completeness, this is what we call the non-negative. This is what we call the positivity property. This is what we call the homogeneity property. This the triangle inequality. And this is called a sub multiplicativity. Okay, if only these properties are satisfied, then this is called a generalized matrix norm. And if one a is not satisfied, then as usual we call it a semi norm. Okay, so this is the definition of a matrix norm. It has one extra property besides what we used for vector norms. So I can make a few immediate observations. The first is that if I take the norm of a square, a squared is a times a. And by the sub multiplicativity property, this is less than or equal to norm of a times the norm of a. So I can write it as norm of a squared. And this is true for any matrix norm. So if you take the length of a matrix, the length of the square of the matrix is at most the square of the length of the matrix. And that's true for every norm. And in fact, if a is such that a squared, if a is such that a squared equals a, what do we call such matrices? I didn't put it. I didn't put in matrices, exactly. If a squared equals a on the left side also, I get norm of a. And so I can cancel this norm of a on both sides. And I can then say that norm of a should be greater than or equal to one. And for any a such that a squared equals a, then norm of a is greater than or equal to one. And in particular, the identity matrix is one such matrix for which a squared equals a. And therefore, norm of the identity matrix is greater than or equal to one for any matrix norm. And the second point is that if a is invertible, we have that identity matrix equals a times a inverse. And once again, if I use my sub multiplicativity property, the norm of the identity matrix, which is equal to the norm of a, a inverse is less than or equal to the norm of a times the norm of a inverse, which means that if I ask, what is the length of a inverse, it is at least equal to the norm of the identity matrix divided by the norm of a. Okay. Now, there are many more properties. We'll discuss them as we go along. Basically, as I mentioned, we can always vectorize a matrix and then compute a norm on it. And some of the vector norms that we've looked at are in fact matrix norms when you apply it to r to the n cross n, but others are not. So I'll just make a remark here. So if I take, for example, if I take the L1 norm, and if I define, so I'll define it with two bars here. This is just a function and I'll define it to be sigma ij equal to 1 to n mod aij. And I ask, is it a matrix norm? And the answer is this is a matrix norm. Now, clearly this, because it's an L1 norm, it already satisfies the first, these three properties, norm a greater than or equal to 0, this, this and this, triangle inequality. The only thing you need to show is that it will satisfy the submultiplicativity property also because the L1 norm is in fact a vector norm. It satisfies all these three properties. So we'll show that the next time and continue discussing other norms. And so, norm, and I'll say while the, if I define a infinity to be equal to max 1 less than or equal to ij less than or equal to n mod aij. So instead of taking the max, I'm taking the max of the vectorized version, this quantity is not a matrix norm. So we'll stop here for today and continue the next class. Sir, I had one question that I mean, this matrix norm translate to the tensors as well. So we have, it's a 3D matrix as we have there. A lot of it does. Just like we're discussing here, some parts translate, some parts don't. But the analysis of tensor norms is beyond the scope of this course. So I won't be discussing that here. I'll discuss about matrix norms, but if you're interested in tensor norms, I can point you to some references. Actually, the one of the, one of the reference textbooks does cover quite a lot about tensor norms. You can look at the textbook and learn for yourself about tensor norms.


What are you most proud of in terms of the way you guys battled, you know, throughout this game, compared to what you saw in the second half yesterday? I like that when we didn't make shots to start the second half We still got stops, you know, we still show them bodies. We still were rotating for each other and We made good plays so this team was playing with confidence I think we came in here on the second night of a back-to-back and Imposed our will to hold game Talked about this before about just how much you enjoyed battling against, you know, the better Hoopers in the league I know you just love hooping period But the other night he got Jimmy and the heat coming in in a couple of days Just articulate how much you enjoyed these kind of battles out there. Yeah, man It's good to see where you are early in the season, especially we don't play. I mean going into this next game we're gonna play The three three team four teams I was in a playoffs last year, you know So it was good to start the season off just seeing where you are individually and playing against different types of players You get guys like Brad and Spencer who can put pressure on you and having a guard. So this stuff is fun. Just You know gauging yourself individually and as a team