 So, welcome to 27th lecture. In the previous lecture, we saw how to derive element coefficient matrix, some of the entries of the element coefficient matrix in case of you know quadratic element right. So, first we saw in fact, C11 the derivation of C11 diagonal element and then we also saw that it comes equal to this which was same as in the linear element right. And then we also saw that expression, remember that this originally the expression this right hand side was same, left hand side there was n1, n2 and n3 here in case of linear right. As for linear elements n1 is equal to l1, n2 is equal to l2 and n3 is equal to l3. So, the fundamental formula is this, incidentally for linear elements n1 is equal to l1, n2 is equal to l2 and l3 is equal to l3 that is why we had started for linear element with the same expression with this as n1, n2 and n3 right because these are more fundamental area coordinates right. So, l1 is that p2 3 divided by total area of triangle right. So, that is fundamental incidentally for linear element n1 is equal to l1 and that is why okay. So, now let us see C14 coefficient, now this is coming this will come different than anyway it is C14. So, in case of linear element C14 does not exist because it is a 3 by 3 matrix right. So, now small C14 of any element E is given by this expression, daba n1 by daba x into daba n4 by daba x similarly in terms of y derivatives with respect to y and integrated over the elemental area and 1 over mu. So, daba n1 by daba x we have already derived in the previous this we have already derived right. So, twice l1 p1 upon delta minus p1 upon 2 delta. Now n4 is 4 times l1 l2 this also we have derived here n4 is 4 times capital L1 capital L2. Now dn4 by dx is simply will be this is it not because there are 2 product of 2 variables. So, daba dn4 by dx will be this and dl1 by dx will be p1 upon 2 delta and dl2 by dx will be p2 upon 2 delta just to you know sort of refresh your memory I have written l1 our standard expression and so if you take derivative with respect to x you will get only y2 minus y3 and that is nothing but p1 right. So, p1 upon 2 delta then so we substitute here. So, we simplify it further and then we now have both these expressions. So, then we take product so you get this. So, further you know simplification will give this expression and then now we have to integrate over the elemental area. So, if you integrate and simplify and then invoke this formula right then you have you know here for example, twice p1 square integral l1 l2 right. So, it is like l1 raise to 1 and l2 raise to 1. So, it is one factorial 1 factorial plus 0 factorial. So, this is 1 this is 1 is it not. So, 1 factorial into 1 factorial upon 1 factorial 1 factorial 0 factorial is 1 1 plus 1 plus 0 plus 2 is it not. So, that is why you will get you will get 4 factorial because you have got l1 into l2 is it not we have here l1 l2. So, l1 raise to 1 l2 raise to 1. So, 1 factorial 1 factorial 0 factorial is 1 1 plus 1 plus 0 plus 2. So, that is why you get 4 factorial and into 2 delta. So, likewise you know you can again do it for the other 3 terms and you get these expressions right. And then after simplification you will find that these 2 first 2 terms are getting cancelled and then after you combine these 2 terms you get these as the expressions. Similarly, now with respect to y product of derivatives with respect to y. So, then the entire this you know C14 because this we started with C14 we will get it as this with of course, I think 1 over mu will come here right. So, now the boundary the right hand side matrix which is contributed by the source J. So, now we have here you if you remember in case of linear elements we had J delta by 3 as the contribution on the source right. So, here let us see what happens. Now here b1 e that means with respect to node 1 the J is there throughout the element right. And now we are actually seeing how do we afford J at various nodes right because we are discretized we are going from continuous domain to discrete domain is it not or discretized domain I should say right. So, then you have b1 at J double integral n1 dx dy. So, now n1 you substitute twice l1 square minus l1 then you get this after simplification again invoke the same formula here now it is l1 raised to 2. So, l small l is 2 m is 0 n is 0. So, it will be 2 factorial upon 4 factorial right. And then you will find that these 2 term get cancelled and it becomes 0 similarly b2 and b3 is 0 right. So, that means whenever J is there in case of quadratic element J does not get a portion to the main nodes 1, 2, 3, but they get a portion to middle nodes 4, 5, 6. Now let us see that. So, b4 will be J double integral n4 dx dy. Now n4 is for l1 l2 and now again 4 J l1 l1 l2. So, this is l1 raised to 1 and l2 raised to 1. So, 1 factorial into 1 factorial into 0 factorial upon 1 plus 1 plus 0 factorial into 0 plus 2 whole factorial. So, that is again 4 factorial into 2 delta of course that it comes in that formula. So, this comes J delta by 3. So, b4, b5 and b6 that comes as J delta by 3 right. So, that means you have any triangular element quadratic element with nodes at the centers of the 3. So, suppose this is 1, 2 and 3 and this is 4, 5 and 6 and suppose you have some J. So, this J gets a portion to J delta by 3 after discretization fm discretization and that goes that gets a portion to this 4, 5, 6 nodes and not 1, 2, 3 in case of quadratic element right. So, now we have thus seen the entire procedure for quadratic formulation. By this what we have done? We have derived the entire v matrix at the element level is it not because we are talking at element level. Similarly, we have we derived one of diagonal elements of the element coefficient matrix C14. We derived for example, we derived one diagonal element C11 right. So, then by doing this we would have then derived the entire element coefficient matrix because I just showed you one diagonal element derivation, one of diagonal element derivation is it not C14 we saw and C11 we had seen derivation and then others can be derived in similar way and then we also derived the b small b e that is the source contribution. So, after doing all this then the rest of the procedure is same because then you have to form a global coefficient matrix capital C and capital B right and then you have to impose the boundary condition and the rest of the procedure is same right. So, then this completes the quadratic formulation. So, we will go now to the next topic that is solution of diffusion equation that is time harmonic problem. Now, these are very common in fact most of our electromagnetic devices they are AC devices is it not. So, time is varying see earlier also when we did electrostatic analysis right there also voltage is varying at every point in like transformer or any other high voltage equipment voltage is varying, but when we did electrostatic analysis we you know did analysis at the peak of the voltage that is why we did it as a electrostatic analysis. So, we have to remember that actually the voltage also is time varying there, but we are actually we calculated electrostatic field assuming peak voltage difference between given two electrons right, but here actually when we are interested for example, in eddy current and all that we have to take induction effects. If you have to take induction effects we have to you know take into account time in transient case or frequency in you know time harmonic case when all the quantities are sinusoidal right. So, right now what we are going to see is we are going to see time harmonic case that means all quantities are sinusoidal effectively what you are assuming is the all the materials in given problem domain are linear that means suppose you are applying voltage right B will be sinusoidal. Now, if magnetic material you are assuming as linear H and I will be also sinusoidal right. So, there are no harmonics right. So, even if there are harmonics in excitation that means, but if the material is linear then what you could do is for each harmonic case you could do use this formulation and then combine the effect, but linearity is important is it clear. So, now let us get into this diffusion equation. So, this we have already seen is it not when we saw the basics we have seen this equation. So, this represents the induced effect sigma dA by dt and in fact you know dA by dt is what now let us see here this is a unit of J 0 current density. So, this also has to be current density. So, A by daba t is E sigma into E is again is it not. So, this unit wise or variable wise it is matching. So, sigma dA by dt is the induced A d current density sigma times E daba A by daba t is induced electric field intensity this we have seen earlier is it not in basics right. So, now this is in time domain in frequency domain d by daba by daba t gets replaced by J omega and now again the functional this also we have seen when we derived the functional we started first with Laplace equation then we derived for the Poisson's equation and then we there also wrote the expressions of functional for diffusion equation if you remember and here the logic is simple I earlier also I mentioned to you you take this term on the right hand side and whatever is that sign that comes here in the functional expression right. So, this term when goes on this side is X and here A is there. So, here you get A square J 0 is alone here. So, J 0 gets multiplied with A this is by you know sort of inspection or by intuition this rule I am telling you right, but you can actually derive this functional using the procedure that we have seen earlier is it not you can derive functional for any PDE including this diffusion equation and here half comes for these two terms because there is a square term here again that is the rule that I told you earlier. So, whenever there is you know square term in the functional you will get half multiplied and here there is only A. So, there is no half here. So, this is the expression for the functional now this functional is in general for the whole domain. Now if we discretize using FEM procedure then we will get this entire whole expression for F this is summation over all elements right because we are discretizing the whole domain. So, it is summation over all elements and then we know this del square will result into 9 terms is it not and the corresponding element coefficient matrix which will have 9 entries del ni dot del nj. So, this actually basically follows from this when you discretize and follow the FEM procedure. So, this basically these two summations and this whole term will give you this bracketed term will give you the corresponding element elements of the entries of the element coefficient matrix multiplied by A and A j right and when we actually minimize one of these A i's or A j's will go then what will remain is C that one entry of C small e C into the corresponding potential is it not. So, that is you are in the final set of equation you have C A is equal to B is it not. So, are you getting. So, I am again repeating this energy this bracketed term is going to give you the element coefficient matrix one entry if i is one j is also one this will give you C 11 and then if it is one i is equal to one this will be A 1 this will be also A 1. Now, when we minimize will minimize will basically differentiate with respect to A 1. So, one A 1 will go. So, that is why then this will remain like C small c 11 into corresponding A 1 in the final linear system of equations. We have seen this number of times, but just to again bring to your notice I am repeating then this third term also is similar exactly identical in fact there is no change here right. So, this eventually will result into j delta by 3 for the linear element is it not and those will get apportion to nodes 1, 2, 3. Now, here remember again this we are using now linear elements here not quadratic right. And then the what is new here is only this term because this first term and last term they were there in Poisson's equation also. What is new here is only this second term which has you know frequency there. So, that actually if you substitute in terms of A you have you know A square. So, you will get this because in place of A you will substitute that summation you know n i A i is it not and i goes from 1 to 3. So, then you will get this right when you substitute it here. So, again here I just explained here you have basically A as A e A superscript e is n 1 A 1 e plus n 2 A 2 e plus n 3 A 3 e square of that you will get 9 terms and those 9 terms basically will be 2 summations. Now, again the same formula now again we are going back to n 1 n 2 n 3 here because this is a linear element and n 1 is nothing but capital L 1, n 2 is capital L 2 and n 3 is capital L 3 right. And that is why we are using again going back to the same old formula in terms of n's because this is a linear element first order element right. So, now actually the as I said this first term and third term are same as earlier. So, we are only concentrating on this second term. So, now that here you have product of n i and n j. So, product of n i n j d x d y right. So, now here it is n i n j. So, it is rest to 1 and rest to 1. So, that means small l is 1 small m is 1 n is 0. So, 1 factorial 1 factorial 0 factorial 0 factorial any way is 1 divided by 1 plus 1 plus 0 plus 2 factorial. So, it is 4 factorial into 2 delta right. So, this comes as delta by 12 where delta is the area of the element. So, off diagonal entries will be delta by 12 diagonal entries will be when i is equal to j this will reduce to n i square. So, n i square means small l is 2 and m and n are 0. So, it will be 2 factorial divided by 2 plus 0 plus 0 plus 1 factorial. So, it will be again 2 factorial upon 4 factorial into 2 times delta. So, that gives you delta by 6. So, these are the diagonal entries. So, the element level matrix equation after minimizing the functional will be this. So, now this c times a and b they are same as in Poisson's equation. So, here just note that this a vector and this b vector as are enclosed in curly brackets just to you know remind ourselves that these are column vectors. So, column vectors are generally written in curly brackets right. So, now this d so j omega a e. So, this n i n j we have we have got this diagonal and off diagonal entries is it not. And then only one a appears because as I have mentioned to you earlier after minimization this one of these a i's will go is it not. So, only one a remain will remain after minimization because will be you know differentiating with respect to a i's is it not. So, one a a will remain. So, that is this one a is remaining here. And then this d matrix is this diagonal entries are delta by 6. So, delta by 12 is taken common. So, it is diagonal elements are delta by 6 off diagonal elements are delta by 12 into sigma there is a sigma here and of course, j omega is there anyway. So, now this is the our equation right. So, as compared to Poisson's equation what is new here is only this. Now, we have to remember that this a is actually phasor because now we are in frequency domain. So, this a is phasor. So, is this b because b is say is a function of j each of these entries is some function of j is it not. So, j also is current density also is a phasor is it not. And so this whole thing is in a phasor form entries of c capital C and capital B are same as earlier right. So, now what we do is to bring it to the same form as like you know c a is equal to b final expression we can combine this capital C e plus j omega d e as c complex is capital C and this small c stands for complex right. So, capital C c is equal to capital C e plus j omega d e and then you finally, get you know this expression just becomes c because we are now combining these two matrices. So, then it is c c e a is equal to b. So, what is unknown here is magnetic vector potential right. Now, this is at the element level now actually we have to combine all the elements and then by the usual procedure of formation of global matrices. Then we would get only this capital A for the whole domain capital B only b not b e because this element level capital B and capital C small c for the that is the global by our normal procedure of combining element level coefficient matrices to form global matrices. Once we do that then we actually just take the inverse of this matrix c c global and then we will get the unknown case. Before that you may have to also apply the boundary conditions. Remember this b is only coming from j is it not. So, only the source is being represented now here. There could be a boundary of course, there will be boundary in case of finite element method. So, then you have to impose boundary condition somewhere a is will be 0 on the at on some boundary. So, those also have to be imposed and then finally you get you can solve this global equation in terms of C A and D right. Now, what we will do is we will quickly the two points which I did not cover in basics of electromagnetic we will cover now which are very important for you know time harmonic analysis and in general you know we should know one is complex permittivity and other is complex permeability right. So, now here these are very simple straight forward derivations starting from Maxwell's equation. So, del cross h is equal to j plus daba d by daba t in frequency domain and replacing d by epsilon 0 epsilon r e you get this right take e common with j replaced by sigma e right and then you take j omega epsilon 0 common here. So, you get this straight forward. So, now here we will call this thing as epsilon complex which is epsilon 0 into epsilon r minus j sigma over omega epsilon dot. So, it is basically epsilon dash minus j epsilon double dash. So, the complex permittivity has real component and imaginary component. This imaginary component is representing losses right because of this sigma term. If there is a conductivity finite conductivity for the insulation the finally, what why what we are considering is called complex permittivity will be up real for a for example, for a capacitor a practical capacitor will be r and c in parallel ideal capacitor will be only pure c. So, if it is ideal capacitor you will have only epsilon dash if it is practical capacitor lossy capacitor r also will be there that will then get represented by this epsilon double dash. So, now if we have got this if the complex permittivity as epsilon dash minus j epsilon double dash we know for capacitor we know that i is equal to j omega j omega c v is it not j omega c v is the current to the capacitor because i is equal to v upon 1 upon j omega c is it not is the reactants capacitive reactants right. So, i 2 capacitor is j omega c v and c is nothing but epsilon a by d, but here epsilon is epsilon dash minus j epsilon double dash is a complex number into area v we are denoting area by variable s. So, complex permittivity into area divided by d right is the capacitance. So, j omega c v is the current. So, now we substitute this here we just you know sorry we simplify this. So, then this j omega is taken out. So, you get this expression right. So, this is the final expression. So, now the one common you know diagnostic term for capacitor is tan delta which is the real component upon the imaginary not I should not say imaginary. The resistive component under pure capacitive component of the current. So, i r upon i c right. So, it is nothing but if you substitute now using this right. So, then here you will get epsilon double dash upon epsilon dash. So, just seeing the difference between standard thing here the lossy component is represented by epsilon double dash right and the non lossy component is represented by epsilon dash right. And then here the same is represented by this phasor diagram here you have i r i c and this is the resultant i component. And then here you have theta and delta is 90 minus theta right and tan delta is opposite side upon this side. So, i r upon i c right. So, this is the you know this is complex permittivity. Now, where this would be useful suppose you want to find through finite element method you want to find out losses in a dielectric right. Then this formulation would be useful there you have to use complex permittivity and time harmonic analysis for that you need to know the conductivity of the dielectric. Next is complex permeability. So, here you have we start with v is equal to n d phi by dt n d phi by dt v into area is phi or we call n d psi by dt because we have we have been denoting flux by psi. So, it is basically n d psi by dt. So, now you again d by dt you make it j omega and then you rearrange this to get b as this then we know h is equal to n i by l right and mu is equal to b by h. Now, you substitute in place of b you substitute this expression and in case in place of h you substitute n i by l. So, then you call v by i at z. So, why we are doing all this we are trying to find out equivalent circuit you know equivalent is it not. Here also we why did we did we do all this because finally, we wanted circuit equivalent because we basically j omega c v. So, here also we are doing the same thing. So, now going further z you replace by r plus j omega l further you simplify this then you again you get one real term and one imaginary term mu dash minus j mu double dash right. So, here one thing is interesting you can see here again I want to bring this point to your notice here we have taken v is plus n d psi by dt. So, it is a circuit view point we are not taking minus sign here we have discussed this in basic is it not. So, that is the reason that v when we say v is equal to n d psi by dt v leads psi or b by 90 degrees is it not. So, that is why b or psi is if it is like this b will need by 90 degrees. Now, there will be you know since we are talking of losses there will be you know I will lack v by some theta because this is a lossy case moment you have got mu double dash that means it is a lossy magnetic material. That means in corresponding circuit I will lack v by some angle. So, here you will have. So, v i cos theta is a corresponding loss if it is you know if it is purely lossless this angle will be theta will be 90 and if it is a perfect resistive material the theta will be 0. Now, this why are we getting this you know loss for example, if it is only we are considering the hysteresis loss now hysteresis loss also we have described is it not in case of hysteresis phenomena h leads b by some hysteresis angle theta. In order to further understand elliptic or complex permeability let us you know study this hysteresis curve original hysteresis curve in given in blue color. Now, this is a measured hysteresis loop and as we know there is a hysteresis angle between b and h here. So, h goes to 0 first at this point and at this point b goes to 0 when the curve is traversed in anticlockwise direction. Now, if we plot b and h with time separately as in this diagram then and if we force b to b sinusoidal which can be done during the experimental measurement so b is forced to be sinusoidal then h has to be obviously non sinusoidal as per this blue hysteresis curve and in this case h is having fundamental component as well as harmonics. Now, this you know b and h representation and corresponding you know harmonics in h this is not amenable for time harmonic formulation because in time harmonic formulation we have seen all the quantities field quantities or field variables should be sinusoidal at one frequency. So, what we can do is we can neglect the harmonics in h field and consider only the its fundamental component. If we do that then we get h waveform as this and b as you know original sinusoidal. So, now both b and h fields are sinusoidal and now we can use time harmonic formulation and the corresponding then b h loop becomes as given by orange curve here. Now, this orange curve is you know having both b and h with their fundamental components only and the hysteresis angle although we have neglected harmonics in h the hysteresis angle here is preserved. So, even if we do not have harmonics here in the h waveform the hysteresis angle here as well as here is same. So, we are preserving that right. So, then with this simplification and assumption that harmonics in h can be neglected then both b and h becomes sinusoidal and then we get the b h curve as given by orange color and the corresponding permeability is called as elliptical complex permeability and the formulation time harmonic formulation in terms of complex or electrical permeability which was discussed in the previous slide can be used and one can do FEM analysis with you know this elliptic or complex permeability and that will be called as frequency you know domain formulation. So, we will stop here and we will continue to the next lecture and in that we will continue our discussion on diffusion problem in the next lecture.