 So, welcome to lecture 38. Now, we will go to the next complexity in our FEM you know formulations. We will now consider non-linearity. We have not considered till now non-linearity. So, what we had considered till now was first was simple you know static case then we went on to time harmonic case then we went to couple cases couple circuit field voltage fed or current fed then we also saw of course the other complexities like you know moving machine case of rotating machines and all that, but there also we had considered essentially linear case. Now, we will see how to we how do we handle non-linearity and then this formulation can be integrated into any of our earlier formulation and then we can solve any non-linear problem in two dimensions. So, now this non-linearity will handle by well known and very much popular Newton-Raphson technique which is widely used even in power systems and power system analysis because of its first convergence. Now, let us consider solving Poisson's equation with non-linearity involved. So, what we will do at first at the first instant we will assume constant permeability in whatever medium magnetic medium is there. So, we will assume constant permeability everywhere in the medium as the initial case. So, then we are actually this mu is 1 over mu and then this is our standard Poisson's equation that gets reduced to c times a is equal to bj after applying FEM discretization procedure. So, now what we will do we will actually get a as c inverse b. Now, we are calling this as we are in the first iteration and this c matrix is calculated using the initial case of permeability. So, here you have to remember that this c because finally what is c global coefficient matrix is a function of geometry and material property. So, the material property that is mu everywhere in that wherever that magnetic medium is there in the whole domain there d will be taking will be assuming constant permeability and then we will be calculating c. So, is the first initial guess for c as well and since we are in the first iteration we are calling this as a1 that means magnetic vector potentials at each and every point in the domain at first iteration is equal to c inverse bj, bj comes from the source condition that is basically j is j. Then having got this a in the first iteration then we can calculate magnetic flux density at in all elements using this upper standard equation which we have seen. If you want to refresh yourself you can refer this lecture 21 slide number 2 it is we have seen it earlier more than 2, 3 times. So, now using this computed flux density mu in non-linear region can be updated is it not. So, you can update mu now how do we update mu because we will see that we have to use some function mu can be expressed as some function of b. So, how do we do that we will see in a later slide. So, mu since mu is a function of b and now we have calculated b in each and every element then mu in each and every element of the non-linear region can be updated. Now in the first guess here everywhere mu was constant. But here after having got this b now b in general will be different in different elements. So, mu now will be in general different in different finite element. From the same magnetic domain. Is it not. So, that is the reason now this mu will be will have generally different values in different finite element starting from this calculation right because b in general would be different in different element. So, now this we can calculate the residue as r stands for residue is in the first iteration is c in the first iteration. Now this c 1 means c with updated values of mu into a 1 in the first iteration. So, please do not confuse this a 1 and this a 1 this a 1, a 2, a 3 they are the magnetic vector potentials at the nodes of any element e. Whereas this a in the curly bracket is the column vector of magnetic vector potentials at nodes at the three nodes in the element if you are at the element level and later on if you are forming the global level equation then this a will be magnetic vector potential at all the nodes in the problem domain right. So, then what we are doing now this this residue is simply because now c a minus b with this updated mu this need not be necessarily 0 because this will not be 0 because depending upon how close you are with respect to the your final you know new solution right then only this this if you are very close to the final solution then only this residue will come to 0 in that particular element. But in general at the start residue will not be 0 because our you know we need to refine our gas and we have to iterate number of times then only our gas will become more and more perfect and then residue will come turn out to be 0. So, at the element level so this remember this is at the element level what then we are doing this c we are splitting into 2 right. We are splitting c into 2 parts to 1 is mu 1 times cl. So, mu for this mu is nothing but 1 over permeability and what we are assuming the permeability over the whole region is whole element region is constant. So, for every element mu is constant. So, for different elements mu will be different but over one element area mu will be constant. So, mu will be constant and it will be it will be it will become it is representing non-linearity right whereas this cl this is a linear part of c that is not changing with mu. So, we are splitting this capital C into 2 parts 1 is mu which is non-linear and c which is capital CL is linear part right. Now, what we will do we will consider Taylor series expansion r of r at or r of a plus delta a is equal to r a daba r by daba a into delta a and plus higher order term. So, this is nothing but this similar to f of x plus h is equal to fx plus h f dash x is it not f of x plus h is equal to f of x plus h f dash x right and then this is where if we neglect the higher order term then only we can stop at this this term only that is what we are doing neglecting second order and second order and higher order term and approximating the updated residual to 0 because that is our objective that residue should be 0 right. So, then what we are doing we are equating this equal to 0 that will give you delta a as minus of daba r by daba a inverse into r sorry again remember this r and a they are written in curly bracket because it is a column they are column vectors and if you are at the element level this will be r and a both will be 3 by 1 a of course is 3 by 1 a 1 a 2 a 3 similarly r will be r 1 r 2 r 3 residue at each node right and then you have daba r by daba a is the Jacobian matrix here this should be r and a should be in curly bracket right r and a should be in curly bracket like here. So, this is Jacobian matrix so the residual matrix and its Jacobian at the element level can be now written as the following. So, this is the Jacobian and this is the residual matrix now this residual matrix is just a same equation written with all its 3 components because I as I said earlier this r is a column vector or column matrix is a column matrix r 1 r 2 r 3 in the iteration 1 is equal to nu 1 which is 1 over mu in the first iteration C l is this C 1 1 C 1 2 C 1 3 up to T 3 3 so this is element coefficient matrix and with a superscript l because this is linear this is not function of mu right and then this a 1 a 2 a 3 minus b 1 b 2 b 3. Now again see here there is no subscript 1 because this is anyway constant for the time instant under consideration right. So, this is constant if you are solving a static problem then there is only one value if you are solving transient non-linear problem then at every time instant this will be constant when you go to the next time instant and do again iterative procedure then of course this will change but in one time instant this is going to be constant right. So, that is why subscript r only for this this and this and then this this matrix daba r by daba a at the first iteration is this because r r is also column vector a is also column vector. So, that is why you it is but natural that we will get this as 3 by 3 matrix daba r 1 by daba a 1 a 2 and a 3 and then similarly r 2 and r 3. So, this is a 3 by 3 matrix in the first iteration. Now, the first element of the Jacobian matrix r 1 now we are just expanding this first row we are rewriting it. So, r 1 is equal to u 1 times this times element level a vector minus b 1. Now, daba r 1 by daba a 1 now this is only r 1 this is not currently bracket because this residue at node 1. So, daba r 1 by daba a 1 will be simply. So, there are two terms here. So, first this into derivative of this with respect to a 1 which will be simply c 1 1 small l plus this whole term into derivative of nu with respect to a 1 right. So, then this as it is and then this term as it is and this partial derivative we are splitting it like this why we are doing it will see shortly. So, we are writing it as daba nu by daba b square into daba b square by daba a 1. So, non-linear magnetic characteristic can be approximated as with hysteresis neglected. So, we can in one of the approximation you can have it like this h expressed as some non-linear function of b right and here b square appears. So, this whole term is representing nu that is 1 over because h is equal to 1 over nu into b or b by h is equal to nu into b because b over mu is h b over mu is h. So, this is 1 over mu or this is nu. So, this is nu 1 over mu is a function of b square and now why we are taking as a function of b square because in our FEM formulation we directly get b square element level when we calculate b we directly get b square is it not. So, now daba nu by daba b square will be simply this derivative of this nu term right and then daba b square by daba a 1 will be this right our standard expression of b square if you recall from our previous slides and differentiate with respect to a 1 you will get it this. Now what we do now we will go to the global level now these are global level quantities. So, we combine element level quantities as we did many times earlier in FEM formulation to get global level quantities. So, this correction in A which will be you know now n by 1 column matrix will be Jacobian inverse which will be n by n because this is n by n into residue column matrix at iteration 1 right and what is r? r is simply r 1 to r n residue that various nodes. So, the updated values of the nodal potentials can be written as this. So, a now add because we were till now in iteration number 1 now we have to go to the next iteration. So, a at next iteration will be a in the first iteration plus correction in A that we calculated in the first iteration using the inverse of Jacobian right. So, then we by this we would have got a in second iteration using that now we can update b because b square is a function of all is for any element right. So, we then calculate b from b we calculate mu because mu has been expressed as a function of b or b square is it not and then using this mu again we calculate we calculate r again at the element level and then at the global level. So, again using the same because now we have updated this mu 1 right this is anyway fixed this is known is anyway which remains fixed for the iteration for the for at any time instant and for all the iterations at any one time instant if you are solving transient problem if you are solving static problem of course then this is always constant right and then compute residue vector and continue these iterations till maximum of residue because there are residues at every each of the nodes. So, if there are say thousand nodes there will be thousand residues. So, maximum of that thousand values if it is less than some threshold number which one can set which can be a very small number. So, if maximum of that residue values is less than that threshold value then you can stop and then you can say that the convergence has reached and then we have got the solution. So, now what we will do is we will take one case study as we have been always doing after every formulation we do a case study. Now, this is coupled circuit field non-linear transient simulation now see there are three you know complications here. So, we had seen here earlier coupled circuit field voltage fed is it not formulation then we saw in the previous lecture we saw transient formulation and in this lecture now we saw non-linear formulation. So, we are combining now all the three formulations together in this example where in transformer this is a three phase transformer with three phase primary windings they are excited by some voltage source they are switched on two voltage source and then that this transformer will draw in rush current and then we will study the in rush currents in all the three phases. So, it this these windings primary windings of these three phases are driven by coupled circuit which is which is a voltage source and function of time that is why it is transient and it is of course, non-linear because magnetic circuit is non-linear. So, now we will see the simulation in time. So, here now you can see this animated FEM solution by using this coupled circuit field non-linear transient simulation that transient formulation that we saw in last three lectures the present lecture and previous two lectures we saw all these formulation and the combined code if you write considering all those complexities then we can get such time domain simulation result we use a time domain simulation time domain that is what transient as well as non-linear because mu is a function of B and why it is a function of B because in when the transformer is switched on the flux density in O can be quite high and can drive the transformer into deep saturation depending upon the residual magnetism and the instant of time switching. And you can also see because of the saturation you can see here at some instance of time you can see the flux going out of the core. So, that means flux is coming out of the core depending upon the saturation level and that also can be very well studied using such simulation. So, after seeing that animation of the solution obtained we will now see the currents in time domain the currents as a function of time. So, you can see here r phase y phase and b phase current marked with different colors. So, the r phase current is maximum because in the simulation we basically excited all the three windings at an instant which corresponds to r phase voltage being 0 that means r phase voltage was at 0 and that is why the that switching instant is worse for the r phase and it is not as bad to y and b phases because we know from the basic circuit theory that you know in an RL circuit and purely here we are what we are doing is we are considering this as a lossless case we are not considering resistances. So, like this we can do transient non-linear coupled analysis for any electromagnetic device like we saw here for a transformer. Thank you.