 So, now, welcome to this 33rd lecture. So, in this lecture, we will see modeling of rotating machine. So, actually, we have already seen in time harmonic simulation when we analyzed torque-speed characteristic of a motor, right. That time we had, what did we do? We took a one condition of the stator and motor, the rotor. So, it was like a static condition, is it not? And then in that condition, we varied the slip, right. And based on that, we then calculated rotor loss and then from rotor loss, we calculated torque. And so, that was like a static condition or quasi-static condition. So, if we have that kind of, you know, fixed rotor structure in your simulation, then, you know, you have, you can, you have the option of modeling a section of the motor using either Neumann or Dirichlet conditions, right. For example, here, this case A and this figure, you have one pole of the machine, you can see here, is it not? This is the one pole. In this case, the outermost boundary is typically always A equal to 0 because you have to contain all the flux within the stator structure. That is why A equal to 0 and this is the end of the boundary. So, we define A equal to 0. Now, here on this, these two sides, you have homogeneous Neumann condition because of flux condoms. Sir, can you see here? They are going normally on this, right. And actually, it will be like that. Here, we are imposing, that is why you are getting it. So, this is homogeneous Neumann condition on both these sides. But if the same condition, if you model two half poles, instead of one full pole, if you model two half poles, that means then the flux is, is one half pole and is another half pole and the flux is basically getting combined like this, right. So, the flux is flowing like this. So, this, this, here in this case you have two half poles. Then again, here in this case, A is equal to 0 on the outermost boundary and then A is equal to 0 on this also because there is a flux parallel condition here. Can you see here? There is a flux parallel condition whereas here it was for flux normal, right. So, here you have flux parallel condition, right. So, then here in this case, when you are modeling two half poles, the way they are modeled, then you have flux parallel condition at these two boundaries and then you will have A equal to 0 on these and this. Third condition is if you want to further simplify, you can cut this model further like this at this symmetry line because now you can see here on this symmetry line here, the flux is normal, is it not? Everywhere the flux is normal. So, then you can cut it here and impose A by Dab by N equal to 0, again homogeneous Neumann condition, right. So, the model becomes still simpler. So, this was one fourth model, this becomes one eighth model. So, here you have deleclate and Neumann condition applied on these two boundaries respectively, okay. Depending upon which section of this model you consider, either you will have homogeneous Neumann condition or deleclate condition or combination deleclate and Neumann condition, depending upon the section of the model being, the whole model being considered. Going further, here we have modeled two poles of a 6 pole permanent magnet synchronous motor. This flux plot is for a section of the motor with magnets on its rotor surface and here we have imposed homogeneous Neumann boundary conditions on these two boundaries and we have imposed A equal to 0 on this outermost boundary and this innermost boundary. It should be noted that A is equal to Zubis impose on this innermost boundary which is the outer boundary of the shaft because we are considering the shaft as made from a non magnetic material. This simulation is for a static condition. If the rotor is moved as shown in this simulation, you can see that the flux plot is distorted. On the outermost and the innermost boundaries we can still define A equal to 0, but on these two boundaries here, these two boundaries one is this and one is this, the flux is neither parallel nor perpendicular. You can see that the flux is going in arbitrary directions. Therefore, in this case for these two boundaries deleclate or Neumann boundary conditions are not applicable. However, we still want to simplify the model and how to do that we will see now. So, what we can do in that case, we can use periodic and anti periodic boundary condition. Now, what are these? First let us consider periodic boundary condition. Again, this is consider this model of rotating machine and this is 120 degrees mechanical. This is 120 degrees mechanical and then if we consider even number of poles, then we have these equation A z rho phi 2k phi by P is equal to A z rho phi. That means what we are doing is we are equating the potential values on this boundary to the potential values on this boundary. So, remember that on these both these boundaries there is no neither Neumann or nor deleclate. But what we are saying is we this potential values repeat after these many degrees. Now, here in this expression K is the number of poles to be considered and K in this case is even number and then that becomes periodic boundary condition. So, for example, here again here on this boundary A can be defined as 0, A equal to 0 on this boundary whereas here these boundary and these boundary. So, you have A 2 and A 1 we are saying that A 2 we are forcing A 2 to be equal to A 1. So, now let us see two examples for a 6 pole machine and if we want to model two poles as actually shown here you have two poles here of the machine being modeled. Then you have if you substitute it here now K is 2 and capital P is 6. So, this becomes 2 pi by 3 capital P is 6 K is 2. So, this becomes 2 pi by 3. So, that means whatever is A z at 5 plus 2 pi by 2 pi by 3 that is 120 degrees is equal to A z at 5. So, here if for example, if phi is equal to 0 if suppose this phi equal to 0 then phi plus 2 pi by 3 that means 120 degrees the conditions will repeat. So, for a now let us consider a two pole machine. So, for a two pole machine and if we have to model both the poles K is even number and K is 2 then obviously you know you have to model all 360 degrees is it not and which is obvious from this P is equal to 2 K is equal to 2. So, this 2 gets cancelled and then what you remain what remains is 2 pi. So, that means effectively you have to model the whole 2 pi. So, that does not actually give you any advantage, but just for confirming that this formula is indeed right I have just shown it for a two pole machine. But definitely this here you can see effectively you are modeling only one-third of the geometry and you will get the full flux plot. We will see later how do we obtain that. Now, in this slide we will understand anti-periodic boundary conditions which are applicable when we have odd number of poles. The corresponding equation is this which equates potentials on two boundaries but with negative sign. For the shown section of a permanent magnet say synchronous motor A that is magnetic vector potential on this boundary equals negative of magnetic vector potential on this boundary. Let us understand intuitively why these two potentials should be equal and opposite. Here a section with one pole is modeled and flux pattern will be such that half the flux will take path this way and the other half will take path this way. Fictitious current sources producing this pattern would be placed here with dot so that this flux goes like this and here with cross so that the flux completes path like this. So that means here current is coming out of the paper here current the fictitious current is going into the paper as for the right hand hold. Since the fictitious current sources are oppositely directed the corresponding magnetic vector potential values on these two boundaries will also have opposite sign. Now let us see two specific examples here. For a six pole machine with one pole being modeled that is p is equal to 6 and k is equal to 1. We will get pi by 3 here with this expression if we substitute k is equal to 1 and p is equal to 6. So here we will get pi by 3 and hence we need to model 60 mechanical degrees with anti-privileged boundary conditions specified on this boundary in terms of potential on this boundary. On the other hand for a two pole machine with one pole being modeled that is p is equal to 2 and k is equal to 1. We will get pi here and we need to model 180 mechanical degrees with anti-privileged boundary conditions. So going further now in this geometry regarding boundary conditions are applied only to boundary two. However, leaving boundary one without applying a boundary condition leads to automatic imposition of homogenous Neumann boundary conditions. Refer L12 slide 6 and L22 slide 7. It should be noted that imposition of homogenous Neumann boundary condition means forcing dabaz by daban equal to 0 on that boundary which implies forcing flux counters perpendicular to the boundary. However, this is not what we want as explained earlier since under rotation flux is neither perpendicular nor parallel to the boundary. Therefore, we need to consider this counter integral which is obtained after writing weighted residual statement for either ith node of a finite element which was discussed in L22. In this case of modeling a rotating structure this integral does not lead to the boundary condition matrix capital B subscript small b discussed in L28 because in this problem a constant value of non-homogenous Neumann boundary condition is not applied. This term in fact leads to a square matrix whose number of rows and columns equals the number of nodes in the entire problem domain with non-zero entries only for the nodes on boundary 1. Let us understand this. Consider a part of boundary 1 with 3 elements as shown here. For element 1 let node 1 be the local node number 1, node 2 be the local node number 2 and node 5 be the local node number 3 and then approximating the magnetic vector potential in element 1 as this we know very well now which in turn is given by this with a1, a2 and a3 given by these expressions. This we have seen number of times earlier. For simplicity to explain the mathematical formulation consider the boundary 1 as horizontal line in which case a in hat will be minus a y hat in the negative y direction. Normal to this boundary will be in negative y direction and d tau will be dx and this in fact is the initial position of the rotor structure. The angle of the rotor part of the boundary 1 changes with the rotor angle and a in hat then will be in an arbitrary direction but the part that corresponds to the stator will always be horizontal this part. So the close counter integral for node 1, close counter integral for node 1 is then reduced to because this is because the value of the integral for the 2 inner edges of the element 1 this edge and this edge they get cancelled when we form the global level matrices. You can refer L28 for this and hence the integration will be only for node 1 to node 2. So integration will be non-zero only for this edge and for these 2 edges the integration will reduce to 0. So going further since a in hat is equal to minus a y hat as seen on the previous slide and d tau is equal to dx the integral i on the previous slide reduces to this expression. So shooting the approximate function of a z 1 and remembering that n3 that is shape function of node 3 of element 1 is equal to 0 on boundary 1 because node number 3 is global node number 5. So shape function of this node on this segment will be 0 and hence the integral i the differential term in the integral i which is this that gets simplified as given here. So d by double y double y of a of a z of element 1 is double y double y of a z of element 1 and that gets simplified to this their n3 is 0 that is why the third term is not there. Also a1 and a2 of element 1 are nodal potentials and they are independent of x and y and ni as given by this expression is a function of x and y. Therefore the differential term in the above integral this differential term reduces to this is straight forward and then substituting this term in the integral we get i is equal to this and then since only n is a function of n1 is a function of x so only that appears under the integral sign and this bracketed term with these two terms being added is taken outside this integral. So moving further this now integral i we can simplify further by putting the expression for n1 of 1 and then we integrate and we can get then this entire expression as given here you can easily verify this by putting the expression of n1 and then integrating with respect to dx. Now this whole expression is rearranged here so that then eventually we can write it in matrix multiplication form with this whole matrix multiplied to this column and this CB11 CB12 and CB13 are basically these three terms CB11 will be the coefficient of a1 CB12 will be coefficient of a2 and CB13 of course is 0 because the node 3 which is the global node number 5 has no contribution to the integral as explained on the previous slide. Thus at the element level we get this equation when you apply the FEM procedure for Poisson's equation right see when our normal Poisson's equation is generally leading to the equation CA is equal to BJ. Now here because of periodic bonding conditions we have one more term here CB into A at the element level. Now as explained on slide 4A this will be 3 by 3 matrix the square matrix 3 by 3 and when we form global system of equations by combining all these element level matrices this will be n by n matrix. So periodic bonding conditions are taken into account by adding this term at the element level and the corresponding term at the global level and then we can solve the problem as usual by using the finite element procedure and get the solution. Now next we will go how to let us understand how to model rotation. Now here this is the air gap. Now in the air gap we can you see here there is a you know gate curve so which separates what is called as fixed mesh and a moving mesh. So on the right hand side of this gate curve there will be fixed mesh and that mesh will be fixed to the stator part and on the left side of this gate curve in the gap you will have one layer of mesh which will be attached to the rotor and it will move along in the rotor. So this is what you know we will have so we will have to have at least one two layers in the air gap to have rotation effectively modeled. So now what happens in that air gap? Now this is that air gap and this is that in the earlier slide this was that gate curve middle one. This mesh is attached to the stator and it is fixed this lower one is attached to the rotor and it moves along with the rotor. So this was at the initial instant now this is at the next instant rotor has moved so this has moved so this point has moved to this point this is a point B point A is this. So point B when you are in this position point B is actually joined to the nearest point on this fixed mesh. Now in this case nearest point is still A and not this this point is further from B as compared to A. So that is why B joined still joined to A and that is how and then the other nodes are respectively joined to the other respective nodes. Now when actually this moves further when it comes here for example now this node will be closer as compared to node A and this is joined to B joined to the next node and similarly the other node. Effectively then what we are doing here one more node gets added. So the main thing in this moving band method is the number of elements remain fixed the number of nodes go on increases goes on increases the number goes number of nodes goes on increases. When it moves further when this mesh the motion makes B point come here right one more node will get added here so and this goes on and this will come continue up to when this point comes here. So moment you solve for from this point to this point that means corresponding to time when condition was this to the time when B comes here and this whole this whole thing becomes like this will become like this. So that will complete our one set of simulation here you can see here at t is equal to 0 you have we have created this mesh right and then we will see what happens now here this is the air gap and these are the you know slots and you can see here in each of the slot there are two coils right ok. Now you can see in this case now the rotor has moved so is the corresponding moving mesh associated moving mesh in the air gap it has moved but in this position still there is no node is added no new node is added yet right it has just this mesh has just got sort of tilted and got distorted in the next position and you can see here now you can see there are two nodes are added here one is here another is here the two nodes have been added right and this has moved on them. So this how it you know goes the node in nodes increase elements remain the same. So boundary condition is on this whatever is A on this is the same as A on this if it is even periodicity and this A will be negative of this A if it is odd periodicity poles are even then it will be this A and this A and this A will be same look the number of poles modeled are odd number of poles are not actually odd number of modeled poles are if they are odd then it is anti periodic boundary condition right ok. So for even here I showed the very first case here you know you can for example here you have cut is it not. So depending upon how many poles or fraction of poles you model that is in your hand you can actually reduce the geometric dependence of if you can exploit the boundary condition is it not. So you can either model even number of poles or odd number of poles right if you can exploit the boundary condition. So this flux plot is for a section of 6 pole permanent magnetic synchronous motor considering a rotation with magnets placed on its rotor and AC windings on its stator in the considered section two poles of the motor are modeled the fluid solution is obtained after imposing boundary conditions as discussed earlier because of periodic boundary conditions whatever flux you see here inside and rotor inside rotor and stator parts appears here on this side here in both parts and continuity of flux is maintained as will be demonstrated on the next slide. Now here we see the complete flux plot using the periodic boundary conditions we have solved for 120 mechanical degrees but the so but using that solution we have obtained flux plot for entire 360 degrees the flux pattern in the region of 120 degrees gets repeated twice in the remaining 240 degrees and the flux continuity is maintained at the interfaces as you can see. Before going further let us refresh ourselves in the procedure we studied in L24 for calculating flux linkages of a coil in a rotating machine for a coil fit two coil sides one and two as shown here which are one pole pitch apart coils total flux linkages given by this formula where in AC1 and AC2 are the average values of magnetic vector potentials of the two coil sides because of symmetry AC1 is equal to minus AC2 and after some mathematical manipulations we get the formula given here and for lecture L24 for this and this is for jet phase coil of the considered machine here factor 2 appears if we are modeling only one coil side if both coil sides are modeled then the factor 2 will not appear how do we intuitively understand this formula let us see we know that flux is integral of a dot tl so summation i goes from 1 to 3 ai e by 3 gives the average a over the triangular element under consideration and then summation of this average a multiplied by the element area or all elements in the coil side and then divided by the coil sides cost section area gives the average value of a over the coil side containing n e triangular elements this overall average multiplied by length L gives the flux which when multiplied by number of turns n and the number of pole pairs n p gives the total flux linkage of the coil the element level g j e matrix is given by this expression and when we assemble element level matrices by executing the summation of all elements of the coil side we get the flux linkage in terms of global a and a and g matrices now let us go further flux linkage is expression in the previous slide is modified here by dropping 2 because in the simulation shown on slide 10 of the lecture we are modeled 1 pole pair if you model only a single pole then you have to use 2 in the expression and hence now by dropping the factor 2 and following the same procedure discussed in the previous slide we get the expression of the flux linkage as this and element level matrices as this and then now the discuss formulation is applied to calculate flux linkages with stator coils for the PMSM geometry shown in slide 10 the flux linkages of phases a a b and c are shown in this figure it should be noted that the flux linkages are calculated for different rotor positions which are indicated on the x axis here this means that at every rotor position we calculate flux linkages using the magnetic static formulation. Thank you.