Merci d'être venu, merci d'être venu, merci d'être venu pour votre努力. J'apprécie que vous êtes venu à probablement l'une de les dernières sessions de la CUPCON Paris. S'il vous plaît, n'hésitez pas à passer la fête à 4 p.m. Nous sommes tous fiers, j'espère que vous ne pourrez pas dormir pendant la présentation. J'espère que je ne vais pas dormir, aussi. Nous sommes sur le stage, nous allons parler d'utiliser Kiverno pour contrôler et appliquer des policiers dans les projets de CloudNative en utilisant des policiers de Kiverno. Raoul va commencer et Mariam va parler de récentes additions en Kiverno et je vais parler de l'avenir de Kiverno, de ce qui s'est passé pendant l'année passée et de comment Kiverno pourrait changer dans la prochaine version. Raoul, merci. Bonjour tout le monde, mon nom est Raoul Garcia. Je travaille pour le D-Kix, l'une des plus grandes échanges internet en Allemagne. Avant de commencer, je vais introduire qui le D-Kix est et aussi vous montrer comment l'environnement se regarde avant de voir comment nous avons implementé Kiverno et pourquoi. Le D-Kix est l'une des opérateurs de l'IxPies pour faciliter la connexion interne des réseaux afin d'améliorer l'efficacité des services de l'IxPies globalement. Nous offrons beaucoup de services différents, comme pour le peering ou d'autres connexions interne, comme CloudConnect, afin de jouer un rôle important dans l'architecture de l'Internet pour les providers de réseaux, CDNs, les réseaux de large entreprise, et tous ces réseaux d'exchange de trafic directement afin d'améliorer l'attention, d'améliorer la banque, et d'améliorer la compréhension sur l'Internet. Ici, sur cette map vous pouvez voir où nous sommes présents et où vous pouvez l'interconnecter avec nous. Comment l'environnement se regarde? Nous avons une application platform qui provoque des services centralisés, comme un monitoring, un storage long terme, un stack de login, nous avons aussi l'OCI Image Registry, nous avons un store secret, un repository code, etc. Nous essayons d'améliorer l'architecture de l'IxPies pour tous les équipes, et nous avons d'autres équipes qui ont des clusters de Kubernetes, ils ont un stack de monitoring, ils ont un environnement de logging que nous prenons en compte, nous les providerons avec un contrôle de l'intérêt, avec des accesses de store secret, etc. Mais tout de suite, les équipes sont encore en mesure d'améliorer l'architecture de l'IxPies, donc nous voulons que les équipes puissent créer leur emploi pour utiliser les techniques de Kubernetes, et tout de suite, par contre, dans une façon guideline, donc nous n'avons pas les équipes donc pour cela, c'est exactement où l'IxPies s'entend et avant d'aller voir des exemples de l'architecture de l'IxPies, je vais rapidement introduire l'IxPies pour ceux qui n'ont pas eu l'expérience de l'architecture de l'IxPies. Alors, qu'est-ce que l'IxPies? L'IxPies est une entreprise d'architecture de l'IxPies, qui est intégrée nativement dans les Kubernetes. Il s'agit d'un grand stack de fonctions que vous pouvez utiliser pour valider, to mutate, to generate, or to clean up resources. It also has a possibility to do image signature verification. Next to it, it also has a rich reporting functionality so that you can, you get an overview with a user interface to see which policies or which validations of policies are passing and which of them are failing. You can also expose Prometheus metrics, which are very good, so if you want to see in a long term how your teams are behaving and last but not least, there is a huge community in Kiverno existing, so they have already 5,000 stars in GitHub and there is also a huge amount of policy examples on kiverno.io slash policies where you basically find predefined policies for every use case. All right. Let's have a look what we are using it for. The day kicks, since I mentioned two slides before, we provide teams with managed Kubernetes classes. We want them to deploy their stuff by themselves. However, we don't want them, for example, to deploy privileged containers or also to deploy services of type NotePort or Load Balancer so that they don't expose any kind of traffic to the internet by themselves, which is not regulated by our network team. Next to this, we also prevent them on the management of resources. So let's say we deploy resources to the clusters of the specific teams like the Ingress Controller and so on. We don't want them to be able to make modifications on the Ingress Controller. We don't want them to be able to change the Ingress Controller, to change the image version and so on. So we basically have a rule in place that mitigates that they make changes to the managed namespaces that are provided by us. Next to this, we also have a validation policy in place that ensures that no one can deploy any blocking port disruption budgets. I mean, we have seen quite often the situation that teams deploy a deployment where they say replica is one and then someone goes and deploys a port disruption budget says min available is also one. When it comes now to a cluster update, the train of the node would be blocked because the min available and the replica is equal so the train would not be able the node would not be able to be trained. In order to prevent this, we have created a keyveno policy that is preventing this and I will show you also an example of this on the next slide. Yeah, what else do we have? We also have policies in place to mutate so basically we add to every port that a team deploys a node selector so that every port that a team deploys ends up on the correct node pool. Last but not least, on the mutate side we also disable the out amount service account talking for the default service account so in case that any team says that they want to make any calls from their port against the API server we have created an independent service account for this specific service. And last but not least we also use keyveno to generate road bindings for user created namespaces so in our environment users only have permission to do operations on namespaces that they create by themselves and we use keyveno to create the necessary road bindings so that only the team members of the specific cluster get access to the namespaces that they create by themselves. Every other namespace they don't have access to they can read in the namespace but they can do any modification and this is all being handled by the road bindings that are automatically being created using keyveno. All right, let me quickly let me quickly show you an example so what we see here on the slide is one of our rules the blocking process for option budget so what we see here on line let me just make this bigger here so what we see what we see here on line 58 is that we are running this rule whenever a deployment scale command is being passed to the cluster so whenever you say kubectl scale deployment there is replica 2 for example this rule is going to check a deployment that is existing for this scale command so that you see for example here on line 62 is existing and if it is existing then we basically go check the replica that is defined in this deployment and next then we go make another call with this JSON match expression to obtain the min available definition of the pot disruption budget that is linked to this deployment so once we got this 2 numbers we know how much is the min available and how much is the replica value in the deployment and next then we compare them to each other so we check how many replicas have we defined in the deployment and how many min available have we defined in the pot disruption budget so should the replica in the deployment now be equal to the amount of min available this policy is going to block the operation and same is also happening if the replica is going to be less than the amount of min available in the pot disruption budget so that no user can create any blocking pot disruption budget and I mean you can see this is only a short overview of what this policy is doing, you can see there are some more rules defined and this is basically one of our use cases we have I think currently like 30 rules in place in every cluster which we use to prevent the users from doing anything that we do not allow on the platform and yeah but that I'm done and give over to Mariam thank you Hi everyone I am Mariam Fahmi I am a Kiverno maintainer as a software engineer at Nermata today I'm going to talk about Kubernetes validating admission policies and how Kiverno provides a full policy management experience to validating admission policies so before digging into Kubernetes validating admission policies I would like to explain first what problems do validating admission policies solve and why do they even exist so before validating admission policies custom policies were enforced through admission webhooks so typically when you create a new deployment an API request is sent to the API server and then this API request gets processed and you know it gets through different phases of execution the first stage of course is the authentication and the authorization where you want to know who sent the API request and whether he is applicable to perform that action or not and the second phase is the most interesting part here it is the admission controllers the thing is that it is run different built-in admission controller where it is configured in the API server some of the admission controllers run directly in the API server whereas some of them can run as an external system and this external system is often used when you want to perform complex validations mutations and in this case you use Kivernu which will be responsible of receiving the API request from the API server and then responds back to that request with either allow or deny and as you see you know this can cause some delay or some latency in the Kubernetes cluster and of course the responsibility to make release plans for this admission controller and for that for these reasons validating admission policies comes in so so validating admission policies provides an alternative solution for admission web hooks specifically for the validating admission use cases you know in validating admission policies you write validation expressions in cell language and these validation expressions are usually evaluated directly in the API server and as you see it's directly evaluated in the API server so there is no need for admission controllers at all and hence validating admission policies reduce the latency that comes you know as a result of the round trip between the API server and the admission controller and of course it also reduces the complexity of writing and maintaining an admission controller so with that said let's take a quick look on how to write validating admission policy so first of all you write a policy definition where you specify the resources that you want to check that you want to apply the policies to them so for the sake of this example in the left manifest you will see that we have a policy definition that matches deployments and you also specify validation expressions those cell expressions are going to be checked again as the incoming resource so in this example it checks for the deployment replica it makes sure that any incoming deployment should be less than or equal 5 and of course this cell expression will be evaluated to either true or false so if it is evaluated to true this means that the API server will allow the application of such resource because it doesn't violate the policy otherwise if it violates the policy then the cell expression will be evaluated to false and the API server will have to take an action regarding the violation of the resource and this is important and this is how the validating and mission policy binding is important for us so the validating and mission policy binding as you see in the example in the right manifest you will see that you can use the binding to specify the validation action that the API server will take in case the resource violates the policy and in this example it is set to deny which means that the API server will block any resource that violates the policy and another thing is that binding provides scoping to the resources that is mentioned in the policy definition itself what does that mean so as you see in the right manifest the binding is actually specifies match resources field where it specifies that it will be applied to all resources whose namespace labels is set to environment as a key this means that together with the policy and the binding it will be applied to deployments but not all deployments it will be applied to only the deployments whose namespace labels has the environment label yeah as I said validating and mission policies you know is used to write policy definitions and apply them to resources but it lacks some important tools that provides a full policy management experience to users and that's where Qiverno comes in so Qiverno is a batteries included experience when it comes to managing, validating and mission policies one of the most important tools provided by Qiverno is the Qiverno CLI so the CLI can be used to apply validating and mission policies to resources locally or again as clusters and this makes it easier for you to simulate the policy enforcements without altering the cluster state and of course it makes it easier for policy authors to make adjustments to the policy before deployment and you know making sure that the policy achieve the desired outcome and of course users can use the Qiverno CLI to validate resources in CI CD pipelines and there are many much resources sorry there are many much use cases that you can benefit from the Qiverno CLI I prepared a quick demo on applying validating and mission policies to resources using the Qiverno playground so that you can see how you can run validating and mission policies without actually deploying them in the cluster so first of all on the left side we have the policy definition and here it is the same example as the manifest I have showed in the slides so this validating and mission policy matches deployments and it checks that the deployment replica is less than or equal to and yeah sorry and we have also the validating and mission policy binding as you see here the validating and mission policy binding is used to select deployments with a label with the app label so again this policy will not be applied to all deployments it will only be applied to the deployments who has you know the app label and the validation action is set to deny which means that the resource will be blocked in case it violates the policy ok with that said you will see on the right side on the right side the resources manifest we have two deployments the first deployment you know is called busybox deployment and it has a replica of four and as you see here it has the label app and the second deployment is the engine x deployment 1 and it has also the label app but with a different value ok and you know it has a replica of four again so both deployments violates the policy but one of them the policy will be applied to and the other the resource will be skipped because it doesn't match the policy in the first place ok if we run it yeah you will see that only the engine x deployments batches yeah you will see that only only the deployments the engine x deployments that matches the policy so the policies apply to them fail and the other pass this is because there is a third deployment that has a replica of two but yeah I forgot about it yeah anyways yeah here is it anyway I provided a link to this example in the slides so that you can enter you know click on the link and you can manipulate with the resources furthermore and if you have any questions please reach out to me it is just a basic example if you want more examples yeah I am glad to help if you have any specific use case ok the last yeah the last thing that I want to talk about is the reporting system so in addition to Qiverno CLI it provides a reporting system that generates policy reports as a result of applying, validating and mission policies to resources and these reports you know provide valuable insights and information about the complains and the state of the cluster and the state of the policies in the cluster and you know teams can analyze these reports and identify the policy violations and then they can take appropriate actions to rectify them you can also even have an existing resources and then you for example deploy the policy so you want to apply this new validating and mission policy to the existing resources so this is extremely benefit when you want to look for the existing resources and there is some some part of the manifest of the policy report it shows us the result of applying the validating and mission policy which is called check deployment replica to the deployment whose namespace is staging an S and the result is fail as you see and why does it fail it violates the deployment replica it should be less than or equal 5 but it seems that this resource has you know a higher number of replica that's it if you have any questions you know I will be glad to help next we will talk about Kivirino Jason and Chalwar will yeah we'll take the lead in this part thank you OK thanks Mariam so my name is Charledois Boitiché I'm working at Nirmata as a staff engineer in the same team as Mariam so I started working at Nirmata 2 years ago I did a lot of contributions to Kivirino during the first year and the past year I spent most of my time doing research and innovation to see how we could do the same thing as Kivirino but outside of Kubernetes cluster basically so we are going to talk about that and that's what the 2 infinity and beyond is about how do we take what we are with Kivirino working well in Kubernetes clusters and make this generic enough to apply that to other technologies than Kubernetes so to start with we studied the strengths and weaknesses of Kivirino because there's something important to realize it's that Kivirino is a Kubernetes native project being a Kubernetes native project is great because it works well with our native ecosystem it was built for Kubernetes so it's definitely extremely easy to use Kivirino in a Kubernetes cluster but when you try to use the same tool outside of Kubernetes what was an advantage at the beginning becomes a problem actually so we had to first ask the question what are the strengths and what are the weaknesses of Kivirino so for those who know Kivirino it will be an evidence and obvious for those who don't know Kivirino it will be good reasons to adopt it so Kivirino is simple it doesn't require any coding language and then it's really easy to adopt and to start with it is Kubernetes native if you are running Kubernetes it's great but it makes it not portable and with those attributes of course Kivirino grew quickly and became widely adopted it evolved fastly but also suffered a lot from the Kubernetes influence we added features in Kivirino but we were always focusing on making those features work well in Kubernetes clusters so in the end the more we added features the more we were coupled with Kubernetes and the more it was going to be difficult to move outside of Kubernetes and to do that we probably wanted to do something different thank you but different but the same actually and other slides will be same but different but yeah it's kind of similar basically we would like to keep what we love in our toy but making it more modern and more adapted to the today needs so for example most of our users wanted to be able to use Kivirino policies with infrastructure as code and they wanted to write policies for their Terraform code they wanted to write policies in the same way they do it for Kivirino so with just basic camel definitions in a declarative way and that's what we wanted to do for that we wanted to escape the Kubernetes jail Kivirino was logged in while keeping the simplicity while keeping the no coding requirement we wanted to erase the Kubernetes native attribute and make it portable so for that we had to look at the anatomy of Kivirino policy actually what is doing a policy engine we can summarize the job of a policy engine like very simply given an object you have an object in your hand and you have a set of policies the policy engine is going to take all the rules in your policies is going to first determine if the rule applies to the object if it doesn't apply it will move to the next policy and the next rule if it applies it's going to evaluate the content of the rule against the object you provided and provide an outcome so is it matching the expected requirements or not so and at the end you have a bunch of outcomes corresponding to the result of evaluating every rule with the given object and you can make a decision I am going to validate this object or not for that the structure we have here is perfectly adapted but if we look on the right there are a lot of things that are very Kubernetes specific like resource kinds labels namespaces, cluster roles it is completely Kubernetes specific so taking this didn't make sense keeping the same structure made sense but without the Kubernetes specific parts so we are somehow to replace that the question is how are we going to replace it with and we are going to go through a few examples of how we could do that by comparing QIverno policies and QIverno JSON policies on the left we have QIverno policies for deployment so the match statement says any resource that has the kind deployment we can do the same in QIverno JSON with something quite similar we will match on any object that has a field called API version and the value app.sv1 and another field that has the name kind and the value is deployment so this time we don't have any dependency on the Kubernetes schema instead of API version app.sv1 it could be type s3 bucket it's just the partial definition of an object if the object we are provided matches the partial definition we have here it will be matching the second point is how can we for example check that the number of replicas of the deployment is greater than 2 so in a QIverno policy we used patterns which represented comparison operations so we go in spec then in replicas and we apply the greater or equal to 2 and this was replaced in QIverno JSON with something a bit different but a lot more flexible so we replace validate with assert and we have all check that our intermediary stands as and we are checking that spec and this time we take replicas we apply comparison operator so replicas greater or equal than 2 and we expect this to be true so it looks a bit different but also close to what we had in the in the first place but in the second case we could have other conditions like this so it makes it a lot more flexible and the third one is about doing array processing differently so we introduced a way to process arrays a bit more elegantly and a bit more elegantly and flexibility so we now have the tilde in front of the data that means that QIverno JSON will iterate over every item applying the same assertion to every item in the array so basically this allowed us to write QIverno policies for Terraform code and in this one we have a match this match is going to match on something that's completely different than QIverno it's resource for this one it's an ECS task definition so if the payload we are receiving contains any ECS task definition it's going to check that the resource AWS ECS task definition network mode is AWS VPC if it's different than that the resource will be considered violating the rule and will be reported so basically this is the new tool QIverno JSON this one is simple it has no coding required it is portable this time and it gives more freedom for policy authors allowing for example to use it as a go long library so one developing is our own tool yes sorry so it can be used as a CLI tool as a go long library or as an API and finally this is mostly a technology this is not really a complete project because when you on code for example you are probably talking about TF files those TF files are not directly expressed in JSON so you probably have to convert that to JSON before you can process them with QIverno JSON so this is more technology than product there's probably something to build on top of that for that we created two tools the first one is QIverno Chain it's a tool to run end-to-end tests that we used internally and that we open sourced a lot of folks started adopting it and we are creating an envoy plugin to be able to perform authorization based on policies in service meshes like Istio so this is really a project this time this is really outside Kubernetes clusters because we are going to use it for very different things than before and in the end the goal is to give that back to QIverno so that QIverno we should benefit those evolutions in the future oops sorry and yes finally those two tools are working well so the next challenge is to get this back in QIverno that's it and thank you so just to recap you can join the community we have a very active Slack channel we have weekly meetings you can contribute to our projects share your feedback and we hope you enjoy the conference and the coupon this year


Hi everybody, my name is Andrea Trousty and I run a Whitening Pro Academy teaching course but also a tooth gem training course as well. And I'm going to go over common tooth gem mistakes that I see from students. So this is in no way talking about any particular student. Just these are harder for students or tooth gem technicians to really grasp. So I hope that this video helps you to think about it. And you might notice or think to yourself, oh I've been placing tooth gems but this isn't working, this isn't working. I bet these are one of your mistakes and I'm going to teach you guys how to correct them. So the first mistake I see which is the most common is leaving too much bonding and or compass it behind the tooth gem and then curing it and then it's oozing out from the sides. So you apply it to the tooth gem or the tooth whatever application method you had learned. You place it on the tooth and then you like cure it. As soon as you like cure it, that sets everything in place. So you need to clean it away before you like cure it. If you go to take away the extra composite or bonding material after it's like cured, you can't unless you're working in a dental office where you have access to high speed hand pieces to basically drill away the extra because that's what the curing light is all about. It bonds it, it sets it to the tooth. So the best thing to do and I teach this inside my tooth gem training course is you want to place that tooth gem but then make sure to take a micro brush or whatever tool you prefer to use. Some use a wax tip applicator. Some even use tweezers because it's like pointier to get around. I prefer a thin micro brush. I will hold that tooth gem in place and then clean around it with a thin micro brush and then cure it after that. You would be amazed how much extra is there because you don't want it oozing off from the sides. It's meant to be under the tooth gem. So do not forget to clean it off because as soon as you like cure it, you're done. Like you can't do anything about it unless you want to physically remove the tooth gem by hopefully trying to pop it off. But the whole point is that they don't come off easily, right? So that's a very common mistake I see. One mistake I see is not curing that tooth gem or the bonding agent long enough. So you would apply etch, the bonding agent, the composite, and then the tooth gem. What I see is people might quickly cure the bonding agent for five seconds and then they move on right away to placing the composite on the tooth gem and then they place it and then cure for another five seconds. It's not going to hold. It might hold for that appointment if you're lucky and that's just luck. I would think it wouldn't hold very well. But it's going to pop off within a day, within a couple weeks. It's not going to last. Do not use those key chain curing lights. There's not enough power to them. It just won't work. It's kind of like using really cheap batteries from the dollar store versus using batteries from somewhere else that you paid five times the price for. The dollar store batteries are not going to last you nearly as long as the ones that are more expensive, but you want to give your clients the best product, right? It just takes an extra few seconds to cure properly. I suggest 20 to 30 seconds with that curing light after the bonding agent and then after the composite to cure the tooth gem to the tooth. Another thing I see is a tooth gem technician not explaining things to the client properly. You want to explain everything to them so they know what to expect and make sure you understand their expectations. Do they want a tooth gem on five teeth? Do they want three tooth gems on the same tooth? Do they understand that it could pop off in two weeks if they're picking at it or they're eating sticky candies or they're not brushing well? Or do they understand it could be permanent until they get it removed? Let them know that. Somebody might be coming to you because their best friend has a really nice tooth gem and they love it and they've had their tooth gem for 10 years. But they didn't know that they had it placed at the dental office with a permanent cement. That can happen too. You're not using a permanent cement unless you're working in a dental office. You are using bonding agent and composite material which in my opinion is better than permanent cement just because you know who wants it permanent but they might want it to last a couple years or they might not. They might say to you I thought this was going to last a couple weeks get this off of me right now. Well they can go to the dental office to get it removed anytime. So make sure they know that and make sure you tell them to brush it really well. I find a lot of clients are afraid to brush the tooth gem and then they wonder why stain starts forming around it. That's plaque. That's plaque that has then caused stains. So I would say you guys though those are the three most common mistakes. I hope this helped. If you are looking to become a tooth gem technician I do have a tooth gem training course. Check me out at whiteteethschool.com. I do offer teeth wining training but then a separate tooth gem training course as well. I would love to have you inside the course. I will see you guys very soon. Let me know if I need any questions.


In the previous lectures, we saw two-dimensional formulation in terms of magnetic vector potential and you know we saw the procedure to calculate AZ basically, you guys have two-dimensional formulation. So, formulation is in terms of AZ and then but our main you know purpose is to get B and H fields. So, in this lecture 21 lecture number 21, we will find now way to get B and H from computed AZ values. So, now we know already that A in element is N1 A1 plus N2 plus N3 A3. So, now if you substitute the expressions for N1, N2 and N3, you will get this. So, this is N1, this is N2 and this is N3 and 1 upon 2 delta is common in all those expressions. So, then you can actually as we did last time we will denote these all these bracketed terms y2 minus y3, y3 minus y1, y1 minus y2 as P1, P2, P3 and similarly Q1, Q2, Q3. Then we come to B is equal to del cross A and now in we have only AZ component, AX and AY components are 0. So, this curl expression will reduce simply to this. So, AX component and AY component which is the case because current is in Z direction, A is in Z direction, B will be in X and Y direction. This we now know very well and notice BX component is daba AZ by daba Y and BY component is daba AZ by daba X. So, now if you actually substitute AZ from the previous slide is entire expression. Now, we know here there is a variation with respect to X, variation with respect to Y. So, variation with respect to X will have P1, P2, P3, variation with respect to Y will have only Q1, Q2, Q3 terms. So, that is what daba AZ by daba Y. So, it will be A1, Q1, A2, Q2, A3, Q3 and with respect to X it will be A1, P1, A2, P2, A3, P3. So, this constant, these terms will not, because they are constant. So, derivatives will be 0. So, only derivatives will remain corresponding to these two terms. So, now, so this you have got, this is a BX component and this is BY component. So, magnitude of B square in element is simply square of this plus square of this, right. So, this is a BX component. And then you can then calculate HX as BX upon mu and HY as BY upon mu. And as I discussed earlier, we can assume permeability over element area as constant. And then H will be given by this, straight forward. We know area of the element is given by this, of the element. Now, this, I think in basics of electromagnetic, we discussed this aspect, the energy. Why energy is integral HDB? Energy density is integral HDB. Again, just for the sake of completeness, I am giving it here, because we want to calculate now inductance, right. What we want to calculate, inductance of that bar that we have simulated, an isolated bar we have simulated in 2D. So, we will calculate the inductance and verify with analytical formula. So, energy is, we know it is integral VIDT power into time integrated, right. So, I U replaced by this expression, HL is equal to Ni, phi is V is equal to ND phi by DT and phi is B into S, S is the area. If you substitute all this here, you will simply get integral HDB S into L, right. And S into L is the incremental volume, small volume, right. And then, so you get, if you actually evaluate this, if you put H is equal to B by mu, then you will get this integral as B square upon twice mu into volume, right. So, now remember, some magnetic material will be there that is divided into small, small elements. Each element has volume V. In each of those elements, you have calculated B by this expression, because we calculate, we know A, we calculate B and B is constant, because it is, you know, first order approximation, A plus B x plus C y, is it not. And that is why you can imagine the corresponding A expression is also linear, we varying with x and y. So, these derivatives are just becoming constant. So, B in each element will be a constant number, right. So, then, over each element, you will get B square upon twice mu that you multiply by corresponding volume of the element, right. It is a 2D formulation, the area into 1, 1 meter depth in z direction. So, that is the energy associated with each element. And if you want to calculate the energy for the entire core, then you have to add energy of all these elements calculated in such a way, right. And then, we also understood when we were studying basics, the energy is represented by the shaded area and co-energy is represented by the remaining area. The physical interpretation of energy and co-energy and usefulness of co-energy we will see later when we calculate forces. So, till that time, I am just sort of differing the discussion on co-energy, right. Going further, now we have simulated and got the field solution for a rectangular bar, use that rectangular bar and we had enclosed this in a another rectangle, is it not, right. And then, we got the solution. Now, using that solution SEM solution, we can calculate the inductance of this bar. How we can calculate? From the, of course, this is the, first we will see the analytical formula. Analytical formula for an isolated bar is given by this, where Lb is the length of the bar in centimeter that is length means it is in z direction. Because this is xy, length in z direction we are assuming it is 1 meter, so per meter depth. We are calculating the inductance.  So, if you substitute, this is in centimeters, this in centimeters when substituted here in this formula along with this Lb, you will get L as so many n rings, right. Now, we can verify the length of the bar. We can verify this by using finite element method. So, we already have got solution, right. We have got b values in each of the elements. We can calculate this square upon twice mu into the volume of each element that will be the elemental energy. We add energies of all elements and that we equate it to half L i square. Current, you can assume some current flowing here and then you know whatever we have not assumed, what current we have specified in our FEM simulation and corresponding J that we would have specified there, that current we have to take. And this expression of half L i square should be equated to the energy obtained by FEM simulation which is sum of all elemental energies throughout the domain. Each elemental energy is b square by twice mu naught multiplied by the elemental volume. So, now when you do that then FEM simulation gives you know 0.22 into 10 to the power minus 6. When we do with that original boundary which was this 40 by 40 bar was in 100 by 100 rectangle and that time I had mentioned that this boundary is rather too close that gets evident here. Now, you can see this formula is quite far off from this analytical formula. So, this is you know quite approximate solution because boundary is because this formula analytical formula is for an isolated bar. So, here you know this boundary where we had taken it too close and we had taken it too close because we wanted to understand FEM coding for a simple geometry with Q number of elements that is why we had taken the boundary close. But later on we developed a code also. Now, you know using that code if we take the boundary far enclosing it into 1 meter by 1 meter much bigger boundary around it far off. Then you will get L as this which is closer to the analytical and remember in fact this answer will be more accurate than this because this is analytical. There will be some because there are there are some empirical factors here is it not and those empirical factors depending upon the dimension the accuracy will vary. So, this value of 0.672 will be more accurate than this 0.747. So, now how do we calculate the same thing while we will see now in terms of coding. Now, again we we have got the solution already then you know for each element we run a form for loop and then for each element you you know using this command for 1, 2 number of elements nodes is equal to this now by now you are familiar with this by this command what will happen from the T matrix which is 4 by number of elements, second, third and fourth entries are the global node numbers. So, those will come into nodes for that element and then these these two commands will get x and y coordinates of those global node numbers and this will be x and y will be 3 by 1 matrix x x coordinates of those 3 global node numbers and y c will be 3 y coordinates of y coordinates of those 3 global node numbers corresponding to the element under consideration in this for loop and then you know we have already this is just a initial initialization and then p1, p2, p3 and q1, q2, q3 are this we have already seen that we basically calculate these values and then we just now saw by and bx are given by these two expressions d y is this d x is this area of the element is this this also we have seen in in the previous you know class and then you know you then calculate b y you know this minus sign this minus sign is here this minus sign is for this and then this is this expression coded here sorry not this expression this expression coded here and then similarly bx this expression for that corresponding this line is there then b net is square root of bx square plus by square and then hx and hy is corresponding division by mu right and then finally h element will be b net upon mu mu of that element right. So, then by this we have got b and h values now we calculate energy it is p square upon twice mu into so this will be the square upon twice mean mu will be the energy density into the area into 1. So, this will be the volume is the area of the element delta into per meter depth into 1. So, this is the so that is what you have got energy in the entire domain since the sum function adds energies of all elements in the domain and the total energy is equated to half L i square for which first you have to calculate i. So, i is you know this is 0.04 into 0.04 is the area and into the current density that we had taken that time. So, j into area so that gives you current and then simply half L i square is equal to En so L is given by this and then you get L in micro energy because here we have multiplied this by 10 to 6. Here there is one you know just a command here you see here dot is there if you put a dot here that means suppose there are two column vectors and you want corresponding entries of b net and delta column vectors to be multiplied. So, that is why we are putting a dot here. So, now we have seen a variational formulation and the corresponding procedure. In one of the first lectures probably I mentioned about there are two approaches distinct approaches one is variational and other is weighted residual. Variational approach is more related based on physics principle because we are minimizing energy whereas weighted residual approach is more like a mathematical error minimization approach. Now, we will see we will quickly see this method of weighted residual and also see the equivalence between the two approaches variational and this weighted residual approach and we will in fact prove that both the approaches lead to the same final system of equation. So, now and why weighted residual approach is sometimes preferred because it is more general method because in variational approach you have you know you need to find a functional for a given pd right. So, for standard pd is of course you know the functional and all that, but if you get a non-standard pd then you have to first find corresponding functional and then only process. Instead of that in weighted residual approach you need you do not have to find out the function. So, now again let us start with partial different equation which is say L phi equal to H where L in this case is say Laplacian operator minus del square. So, effectively this is a Poisson's equation right and phi is the unknown potential function and H is the forcing or source function which is known. Now, again we start with whole domain approximation right and there we will approximate phi tilde tilde stands for approximate as c0 plus c1 phi c2 phi 2 and so on right. So, now here residue is L phi minus H right. So, L this is phi is the here it is the approximate right. So, residue the agar is minimized in weighted integral sense that is integral wr area equal to 0. Now this omega d omega stands for area. So, we could call this as ds also earlier we have been using ds. So, you can say this as ds also. So, now in this case there are different residual approaches available. So, the first method is collocation method in which we use direct delta function as the weighting function. So, what is direct delta function? It is defined as like this delta of x minus x y is equal to 1 if x is equal to x x i and this you know in signal cell system this is very popularly used and it is 0 if x is not equal to x i. So, basically this function you can use to focus on a particular point in the domain and you know apply the equation only at that point and everywhere else you make it 0. So, now number of collocation or matching points in the domain should be equal to the number of unknowns is it not. So, like finally our objective is to find number of equations equal to the number of unknowns. How do you do that? Now let us again and of course, higher the number of points collocation points higher will be the accuracy again discretization. Now consider again our equation that we have been seeing for quite some time now phi double dash plus phi plus x is equal to 0 with boundary conditions that at the two end points potential is 0. So, let us have second order approximation. So, then phi tilde is equal to c 0 plus c 1 x plus c 2 x square and then if you apply this boundary condition this we have already seen earlier c 0 comes 0 c 1 comes minus c 2 that is why phi tilde becomes c into x into 1 minus x. Now residue is phi double dash plus phi plus x. Now you substitute the you know expression that we have got phi tilde this expression you substitute it in this equation you get this right. So, now this is the residue at each and every point depending upon the value of x the residue will vary is it not in this one dimensional domain. So, now you have here only one unknown which is capital C. So, then only choose one matching point that means that this direct delta function you operate only at that one matching point that you have chosen and that the chosen matching point is x is equal to half midpoint because it is logical is it not that we choose if we are choosing only one point let us choose in the middle. So, then when you actually execute this integral W r d s this omega is nothing but s is equal to 0 and W delta of x minus half if you substitute here as wetting function then you will get this will reduce to r half. So, we obtain a residue at one half at 0 and then this substitute x is equal to half you will get this you know this equation and then that will lead to c is equal to 2 by 7. So, you get this solution right. Now let us do third order approximation with you know 4 coefficients c 1 2 c 0 2 c 3 and then again apply boundary conditions you get phi tilde as this this also we had seen earlier is it not in case of 1 d with third order approximation we had in fact got the same solution earlier and then phi double dash will be using this will be this then the residue is phi double dash plus phi plus x is it not that is the residue and after simplification you will get residue as this I hope you are getting it see this is residue at every point is phi double dash plus phi double dash plus phi plus x is it not. So, in that we are just substituting this phi tilde what we have got here now. So, if you substitute it you will get residue as a function of x as this now we there are two unknowns here c 2 and c 3. So, we have to use two matching point so that we get two equations right. So, let us choose two matching points again equidistant one-third and two-third and then you get so r 1 by 3 equal to 0. So, when you get execute this statement with you know direct delta function operating at one-third and two-third right you will get these two equations r of r at residue at 1 by 3 is 0 residue at 2 by 3 is 0 and that you know you are substituting x is equal to 1 by 3 and x is equal to 2 by 3. So, we get two equations into unknowns and then we get c 2 and c 3 as this and but this method is not amenable for 2D and 3D problem right. So, because why the point collocation method is not suitable why because how many matching point that you should choose and where that will be a matter of measurement here it was 1D it was there. So, that is why you logically chose equidistant, but you can imagine for a two dimensional or even more complicated problem it will be difficult. So, before going further we will also see the corresponding errors and compare the errors in the two approaches that we have seen. So, this slide shows exact solution for that equation that we have been seeing. So, this black one is the variational method third order approximation and red one is the point matching that is collocation method that we have seen just now. So, the results are quite close in both cases and now we will see in this residual method residual method the residue can you see here at what were the two matching points x is equal to 0.33 and x is equal to 0.66. So, exactly at those two points residue is coming equal to 0, but at other points residue will not be 0 because we are not forcing residue to be 0. So, at those two points residue is 0, but that does not mean that we will get the minimum error in potential at those two points. So, here is the error in potential with respect to x. So, although you are getting lower values of you know errors in potential, but they are not 0. So, what we are ensuring is the residue at those points are 0 we are not ensuring by our formulation that error in potential is 0. So, we will stop at this and continue our discussion in the next lecture.


Hi everyone, Joe for jaspyscasebreaks.com coming at you with 2022-23 Panini Prison Basketball four box picker team number five, which actually sold out before four. So five is going to be a four box break from a fresh case. Big thanks to this group right here, Joe Locus getting the last four teams right here. So quadruple last spot Mojo. Thanks to everybody who got into picker team five. Now let's pop this case open and let's see which four we're going to do. How are we going to do this? I guess there's these four right on top, the second four right here, it's a third of a case break. So on the dice roll we'll go one, two, three, four, or five, six for those four boxes. It's going to be four. Two, three, four. So middle box or middle set right there and I'll mark these with X's so we all know they're from the same case and we got a shot, ladies and gentlemen, if that other filler sells out, we got a shot of doing another four boxes before the night is out. But we're running out of time so if you want to get that going, let's get that last filler sold out for picker team four, which is down to six spots left. All right, now let's roll with this one, good luck everybody. Another exciting night of hoops, ladies and gentlemen. So yesterday was the first set of play in games and as Oliver had mentioned earlier, these last two nights, all of the underdogs covered. I think the hocks were underdogs, right? They won outright yesterday. They beat the Heat 116 to 105. I feel like Atlanta has built a big lead. Heat actually kind of came back but hocks were able to hold on. Trey Young 25 points, eight rebound seven assists and the Heat wasting a 33 point Calari effort and of course, as a Laker fan, I was living and dying with nearly every possession near the end of the game. Timberwolves did cover, Lakers only won by six. The spread was like eight, eight and a half or something like that but Timberwolves covered and Lakers get to move on. Big effort by LeBron James, he could use the rest and tonight we had another exciting game, the early game, Bulls at Raptors. I think the Raptors at one point had built a giant lead in the first quarter, second first half and the Bulls ended up pulling it off at the end. They scored 37 points in the fourth quarter to the Raptors is 24. Zach Levine drops 39 points, six rebounds, wasting a nice Siakam effort, 32, 9 and 6. Behind Buddy Healed, Blue is, speaking of the Bulls, Ayo Dasunmu. Did Dasunmu get some minutes tonight? He did, he got six minutes here, picked up a rebound and it's going to go to Nicholas and the Bulls. Got a Pulsar not numbered and the Blue Buddy Healed going to Indiana, that's for David B, that'll be to 199. Kennedy Chandler, red wave, those are not numbered. EJ Lydell, 7 out of 99. Prism cards are real slippery, let's get this into a container here. And that'll be for the Pels, that'll be for Joe Locas. You got Jalen Williams, 009 out of 125 for the Thunder, he's a little rough on the centering there but there you go Thunder, Blue Ice Daniel with that one, Thunder with another underdog team winning outright, they beat the Pelicans, 123 to 118. Josh Giddy with 31 points, 9 rebounds, 10 assists, Paolo Banchero for Orlando, Daniel. Fran and Ingram dropped 30 points, 6 rebounds, 7 assists, wasn't enough. A couple of bad possessions from the Pelicans later on I think kind of sealed their fate too. I mean imagine how good the Thunder are going to be with Chet Holmgroome. This one goes to Daniel and OKC, James Harden Pulsar and of course all card ship. Behind Carinthine Towns is a Bernard King for the Knicks, that's going to be for Scott and New York. Ooh and a Hyper rookie, Chet Holmgroome, nice. Daniel with OKC, Carinthine Towns Purple Ice for Wen Chun and the Timberwolves, that's to 149. There's Josh Giddy and we've got Red, Jason Preston to 299, Benedict Mathurian and a T.J. Washington Jr. Rookie Silver. Who's going to win NBA Rookie of the Year, is it going to be Banchero? I feel like Benedict Mathurian was kind of the sixth overall pick, was kind of in the mix for a little bit right? Still one of the best jingles on TV today, Oliver, and Burger King commercial. Has not inspired me to go to a Burger King, but I definitely enjoy the song. It's going to be Banchero. I feel like the draft, this draft class might turn out to be pretty good. What do you say? Banchero looks like the real deal and we haven't even seen Chet Holmgroome yet. I don't know how much I've heard about Jabari Smith Jr. I think he's been playing OK. Keegan Murray's been getting minutes for your team, right? Jade Nivey for the Pistons, Mathurian for the Pacers. I feel like I've been hearing about those guys. Jeremy Sohan, Jaylin Williams been playing pretty well for OKC, so there's some promise here. Obviously very early in their career, we've got to give them some time, but Keegan record for most threes by a rookie, there you go. There's some promise in the future. There's Keegan Murray. That's for Anthony and the Kings, speaking of, right on cue. There's Jason Taft, man, points. Winter take all on the points. We'll do that randomizer at the end, 99 out of 149, Jason Tatum. It's Joe with the Celtics, one of his last spot mojo teams. Let's see if we can find him some hits. Cody Martin to 299. I always like to see just rookie parallels, even though it might not be the bigger names. There's Jaylin Williams, speaking of, that'll be for OKC, Daniel. He was not nearly as high of a pick, right? Yeah, he was 34th, he was in the second round. Kind of higher in the second round, but still. It has put in some positive, some positive minutes. It's Jason Kidd and here is Bryce McGowns. That's for Charlotte. That's going to be for Bryant and there's Jason Kidd for the Nets to 149. Wait, do they have two Jaylin, they have both Jaylin, wait, which Jaylin Williams is the, because they got Chet Holmstrom, then they got Jaylin Williams from Santa Clara and then Jay Lin Williams from Arkansas. Which Jaylin is the better Jaylin? Which Jaylin is the one getting minutes? Both Jaylins are getting minutes. Jay Williams, 32 minutes, 8 points, 8 rebounds, 8 assists, and then Joel Williams, Jaylin Williams, 11 points, 4 rebounds, 2 assists. Oh, Santa Clara Jaylin Williams is overall the better player, but Arkansas Jaylin Williams looked good tonight. It's Danny Green, purple, green, purple for the Gris. That's going to be for Marlon. That's 99. There's Jay, there's a J-Dub, right, that would be Santa Clara Jaylin Williams, Andrew Nemhard. Nemhard goes to the Pacers. That's going to be for David B. You know, I don't know Rex. I think they still, I think they do or have done. I've seen Budweiser hands the Dodgers logos to the LA area teams, or maybe I've seen Bud Light have the Dodgers logo. I think the red one is Budweiser, just regular Budweiser has the Angels logo. I think I've seen that some years. Yeah, I think Sohan's the number nine pick, right? I think they're top 10 pick. That's always good to see. The crazy thing is, and obviously we all have all the one and done, it takes maybe a couple extra years for players to really marinate in the league and really show what they can do. I mean, if you think about it, think about how long it took a lot of players, most players. They just, they really, I look at like Kevin Durant, I think he really, you know, he was putting up numbers, but he really wasn't dominating games until like five or six years into his career or something like that, where he was like putting teams on his back and stuff. There's Fred Brown for the Sonics, I'll go to OKC, that'll be for Daniel. I don't know, do all teams get, get the team logo on Budweiser cans for a limited time only? There's Kemba to 99, it's good to see any rookie in fun parallel, like the hyper parallel. Oh, look at this. It's some gold, that's Jaden Hardy. Gold rookie auto, sensational signatures rookie auto, that is six out of 10, nice low number for Dallas. That's going to be for Jai, Joe with Dallas. Now where was he? Oliver saying he was pretty good, looking at where he was drafted, was he a second round pick? Yeah, he was. Second rounder with first rounder ability was originally a Kings tray or Kings pick, but was traded to Dallas, 37th overall, early second round. So nice one for Dallas, Jai, Joe with that one. Dan Cherrow going to Orlando, that'll be for Daniel. D'Anthony Mountain to 75 for the Sixers, Joe. Gordon Hayward to 299 for Charlotte. We've got Osmani Yang, Silver for the Thunder, that'll be for Daniel. Brian Watford at Charlotte, number six sold out, I could get that in as our last break of the night. Well, when I go through orders, Oliver, you'll know who to yell at. Patrick Beverly to 149, Kennedy Chandler, Hyper, David Roddy, Silver, Napal-O-Ben-Cherrow. So yeah, sorry, Steve. First to fill, first to break has always been the rule. Yeah, I appreciate whoever sold out, break six. We got Seth Curry to 125, another Chet Holmgren, got a LeBron Fireworks to 25, nice. That's going to go to the Lakers, that'll be for Ed. Well, yeah, James saying, I seem to lose more than I win. That's definitely, you're not alone on that one. But the thrill of the chase, that's what keeps everybody coming back. That's why I keep playing Blackjack in Vegas. It's D'Anthony Mountain, sensational signature for the Sixers, that'll be for Joe. Locust, last spot mojo for Joe. Thanks for grabbing those teams, Joe. 70% of the time, last spot mojo hits 100% of the time. There's Anthony Davis-Blue and a Dyson Daniels, sensational rookie signatures for the Pels. That's going to be for Joe Locust, another one of his last spot mojo teams. 70% of the time, 100% of the time. Robert Williams-Pulsar and a Christian Vron at the end. Got to randomize those 600 points, but that's the break, ladies and gentlemen. That was pick your team at number five from Jasper's Case Breaks dot com. All right, let's flip back over here. Let's gather everybody's names. All right, name on top after five. We'll get some points, one, two, three, four, and five. There you go. Scott, I don't think I called your name too often in this break, but 600 points going your way. Thanks for watching, everybody. I'll see you next time for the next one. Bye.