I finally understood the weak formulation for finite element analysis
Вставка
- Опубліковано 2 чер 2024
- The weak formulation is indispensable for solving partial differential equations with numerical methods like the finite element method. Yet, the concept of the weak formulation is not easy to understand by just staring at the formulae. This video aims to visually explore the weak formulation following a simple example, i.e., the one-dimensional Poission equation with Dirichlet and Neumann boundary condition.
0:00 Introduction
1:36 The Strong Formulation
8:08 The Weak Formulation
20:09 Partial Integration
23:21 The Finite Element Method
27:57 Outlook
Recommendations:
Finite Element Method - Numerical Analysis by Julian Roth • Finite Element Method
A Brief Introduction to the Weak Form - Chien Liu www.comsol.com/blogs/brief-in...
The Mathematical Theory of Finite Element Methods - S. C. Brenner and L. R. Scott link.springer.com/book/10.100...
Music: Swans In Flight - Asher Fulero
I have searched high and low for videos to explain this over the years; this is the one!
Thanks a lot! Glad to hear that making the video was worth the efforts. :)
amazing!
Please, I would like a second part that focuses on the finite element method, this is incredible
It's on the to-do-list! :)
@@ComputationalModelingExpert thank!!
@ComputationalModelingExpert Very much looking forward to it!!! You are making history!
as a computational physicist i have to rate this a 10/10 youtube vid.
Thx!!! 🥰
20:11 "partial integration" == "integration by parts" (just in case anyone was confused and thinking of undoing partial differentiation like I was).
Fantastic video! You are able to explain a difficult concept in an order that makes sense without glossing over the math. Textbooks usually go over the weak formulation in detail before expressing how what one really wants is an ansatz on a properly defined basis to solve the problem - I like how you start out with that, present how it won’t work naively, and then proceed to motivate weak formulations.
I think a lot of people, myself included, would appreciate if this evolved into a series on FEM and its intricacies!
Thanks a lot! 🤗🤗🤗 Yes, more content on FEM is planned! :)
Yes, I thought the way this video divided the ideas up was extremely useful. In most introductions those things are all just "rammed together," and while you still can see that all the math is "technically correct," it's easy to lose sight of those boundaries.
wow, crystal clear, you did amazing job, you deserve a medal for this video bro
Thank you! :DD
Did you build a pyramid or a tower? Where did you get your inspiration from? What did you drink while making this video? Look at this. Perfect!!
🙏🙏🙏
Beautiful explanation! This video deserves going viral!
Thanks :)
Awesome video! In my computational science masters program we mainly focus on mathematical proofs but I never quite got the intuition. This video helped me a lot! Glad to see more about FEA from you!
I would love further information on FEM in higher dimensions, in particular deriving a weak formulation for various PDEs and how to choose a good test function. Thank you for the video!
Thank you! Many seem to be interested in more details on FEM. I will definitely do a video about it in the future! :)
Great video. Looking forward for the next ones. Thanks.
The easiest to understand explaination I've ever come across. Each one of your videos so far is incredible please keep it up!
Thanks, Joe! This means a lot to me. :)
That’s a 12/10 vid, extremely grateful. Thanks for adding an example and a short look into finite elements!! Looking forward to a full finite elements playlist😊
Thanks :)
Wow. Thank you for all the hard work. Keep posting.
Great video, many thanks!
What a watch! - greatly explained can't wait for more videos :)
Thank you so much Nathan!!
Great video, loved the explanation and animations!
Thank you so much, Daniel!
Amazing explanations. Congratulations for the channel, and well done.
Thank you so much for your kind comment! New video coming today. :)
Wow, wonderful video, I came to the same intuition last year when I got to know PDEs, howerver I clearly could not explain it with such beautifuls images and great explanations: you truly are the boss!!!
Thanks 🙏♥
Incredible video, thanks
Outstanding work. Thank you for producing this content.
Thank you so much, Allan! :)
Would love to see more vids like this on variational methods, functional analysis for PDEs, and more! This video helped me a ton for getting some intuition on how we set up FEM problems and why they turn into linear systems. Awesome job!
Thanks! :)
Gold.
This is gold!
Thank you so much!! :D
Great explanation, thanks!
Welcome :)
Finally i have found a helpful video on weak formulations after months of searching. Thanks for the great explanation. Looking forward to more content from you!
Thanks :D
Great explanation. Thank you.
Thanks, you're welcome! :)
It's a great content
please keep forward
Extremely good videos, keep it up
Thanks Guiseppe!
This is so so useful. The explaination is easy to follow and the animations are beautiful! I definitely would love to see a video on FEM and FEM at higher dimension than 1D. Amazing job! Thank you so much!
Thank you so much!! 🙏🙏🙏
the only problem with the explaination that such test functions are not allowed since the left hand side can not be integrated by parts. I think it is easier and more mathematically correct to explain the weak formulation using that residual (u''(x)-f(x)) must be a L^2 orthogonal to the test functions and if we have enough test functions, it actually forces the residual to be zero pointwise.
I am using the discontinuous test functions here only for developing some graphical intuition about the meaning of the fundamental lemma of the calculus of variations (before even talking about partial integration). It should also not be taken as a rigorous proof of the lemma. For those interested in more mathematical details, please refer to Theorem 0.1.4 in "The Mathematical Theory of Finite Element Methods" by Brenner and Scott, where continuous test functions with compact support and partial integration are considered.
Bravo! I studied computational mechanics for my PhD and this is one of the best explanations i have seen. And one of the best videos on UA-cam. A second part would be great!
Yay, computational mechanics rocks 😁 I did also my PhD in computational mechanics :)
This video is nothing short but amazing for getting the intuition behind the weak form and FEM!
Thanks :)
Great explanation!
Thanks!! :)
Awesome.Thanks.
Plz keep going.
Thanks Farzin! :)
Would definitely be interested in further videos into the finite element method
It's definitely on the list ✅ Will take some time unfortunately
This not an area of Mathematics I've been remotely involved in at all, but I do have a good background from PDEs/ODEs in general and damn... what an insightful video. The intuition and explanations were so damn good, I was able to see that Integration-By-Parts was going to be necessary as soon as I saw you multiply and constrain the original strong form of the equation by v(x). Was plainly obvious (and no I did not skip forward!). The video lead the conclusions at each stage super well.
Lovely job! Not everyone that uses this software to produce Mathematical animations has such a clear talent for demonstrating this tricky concept as you do. I forgot the name of the software, so if you could drop a name for it, that would be greatly appreciated.
Best,
Vhaanzeit
Thank you Vhaanzeit :) The name of the software is Manim (standing for mathematical animation)
This video is amazing, as a Master student who is currently studying Linear and Non Linear Continuum Mechanics, this video is very helpful. Also, I would also prefer to continue to upload videos of more advanced topics please
Thanks for the suggestion! There will be definitely more advanced content down the line... :)
Very good job!! did you save the Manim files into a repository?
Thanks :) Manim files are not public yet. This was my first time using manim, so the code is a big mess. Maybe for future videos, I will share manim codes 🙂
Your channel looks great
Thx!!
this is great
Cool Video!
But I am a bit confused about what you say at 22:35 - 22:55. Does that mean you get different results by using the weak formulation instead of the strong formulation?
This must be caused at the last step at 20:10 during the partial integration, but why does this change the solution?
Thanks Peter,
the analytical solution (the quadratic function) is a solution to both the strong and the weak form. But when we introduce the piecewise linear finite element ansatz, we cannot use the strong form anymore. So, the numerical solution that we find in the end is not a solution to the strong form.
You are right, the part of the video you are referring to is confusing! All I wanted to say is that when we choose a parameterization of u, it is better to consider the weak form because it allows for the piecewise linear parametric ansatz whose second derivative is zero almost everywhere.
I think this was very good. You completely dodged the messy business of coordinate system transformations, where you bring the "real" coordinates of each element into a common "local coordinates" formulation. I think that's important, of course, when really learning finite elements, but it is unnecessary if your goal is to motivate intuition. So - good call. I think even in a video aimed at teaching finite elements it would be best to treat those two aspects separately - the local coordinate thing is more of a "computational optimization" than it is critical to the core concept. It lets you think in terms of "universal shape functions" that get transformed (via Jacobians) to fit each element in turn. But this is completely separate from grasping the general idea that you can transform the continuous original problem into a parameterized linear algebra problem.
Yes, I am 100 percent with you! To understand the core concept of FEM it is not necessary to learn about the reference element. Of course later it is necessary to understand why the reference element is so useful...
@@ComputationalModelingExpert Yes - it's useful from the "practical computation" standpoint. I was fairly fortunate in graduate school; in my first "introductory" class the subject was presented very mechanically - the professor sort of "took us by the nose" and dragged us through it. But then I took a "topics in FEM" class that was taught by Eric Becker, who was a fairly prominent FEM "guy" and had written textbooks on the subject. His style was very interesting; he'd just wander into the lecture hall, stand there and ponder for a minute, and then just start talking about some aspect of it all. Kind of whatever happened to be on his mind that day. He chose well, and wound up showing us a lot of interesting things. The "informality" of that approach would have been disastrous in the first class, I think, but in a "follow-up" class it just worked extremely nicely. I always looked forward to those lectures.
Wow - that was... so long ago. Back around 1990 or so, maybe the late 1980's. Dr. Becker actually sat on my PhD committee. I felt privileged to learn from and be exposed to such a knowledgeable person. This was at The University of Texas at Austin.
It also helped a lot that I'd taken a linear algebra class prior to studying FEM.
As clear as 3Blue1Brown ! Thanks a lot !
Wow, this is a big compliment. Thanks! :D
How is one sure that if you evaluate the weak form for N test functions the solution we get satisfies the weak form for *any* function , after all solving the linear equation in the end just show that it satisfies for the N test functions one has chosen , the solution we get from this may not solve for some other test function that i might come up with ?
The discretized weak form will be satisfied for the N test functions. But it will also be satisfied for linear combinations of these test functions, e.g., if the weak form is satisfied for v=N1 and v=N2, it will also be satisfied for a*N1+b*N2, where a and b are some scalar values. So after all, we at least know that the discretized weak form is satisfied for quite many functions...
Thanks very much for this wonderful and clear explanation of the weak form. Is it possible to make a vedio on how to solve the Poisson equation using FEM by python programming, thus to help master the concept!
Thanks a lot! For the next few videos, I am planning to mostly focus on theory. At some point in the future, I will also share codes! :)
i would be interested in a follow-up video/notes explaining a-priori bounds for | u - u_approx |, where u = the weak solution, and u_approx = the linear combination of shape functions at 24:00.
yes I see the reference in the description, but i would like *your* take on this. =)
Thanks for the suggestion! I hope I can cover this in one of the next videos on FEM. :)
Would this also allow for the computation of solutions parameterized on other basis sets (e.g. Fourier series, wavelets, Chebyshev polynomials, etc.)?
Don't see a problem with other parameterizations. Some people recently tried to use neural networks as parameterizations. However, the power of the ansatz functions with local support (i.e., functions that are zero at many nodes) is that the matrix K has a lot of zero entries because many of the integrals vanish. This reduces the computational costs for computing the integrals as well as for solving the final linear system of equation, which is one of the reasons why the FEM is so powerful.
@@ComputationalModelingExpert Good point on the locality; The advantage of other parameterizations would be requiring fewer paramters to start with and thus a smaller matrix K to start with. Wavelets may be interesting because they retain some degree of locality
If I remember correctly, for problems with periodic boundary conditions (for example multiscale homogenization problems) a Fourier-type ansatz is very popular.
What happens with other Boundary conditions?
Noooo, how do you compute those integrals? What programs do you use? :'d
In this video, the functions to be integrated are very simple. They can be computed by hand. Of course for higher dimensions and for higher degree polynomials numerical integration (Gauss integration) should be used. This video had not the focus on FEM. This will be covered in the future.
u know that the creator of the video is german when he uses the expression "partial integration" :D
Danke für das Video!
This and the very German accent :D
So if I understand correctly, for every strong formulation there is one and only one weak formulation, but that does not mean that both have the same answer?
Hey,
regarding the second part of your question: if no finite element discretization is considered, the strong form and the weak form have the same solution. For the example in the video, the analytical solution is a solution to both the strong and the weak form. But things change after introducing a finite element discretization. The solution that we obtain from finite element analysis, i.e., the numerical solution, is a solution of the discretized weak form, but it is not a solution of the strong form.
Regarding the first part of your question: Whether there always exists one and only one weak form for any PDE is a tough question. It can be shown that some PDEs like the one in the video can be written as minimization problems (a.k.a. variational problems). The weak form can then be interpreted as the necessary condition for a minimum of the variational problem. Unfortunately, I don't know whether it is always possible to find a proper variational problem for any arbitrary PDE given in its strong form. Maybe a mathematician is following this thread and can help. I would be highly interested! :)
A video on variational calculus is planned for the future...
responding to the second part of the answer: probably no, especially if you are thinking of non-linear PDEs, as they are studied on an ad-hoc basis. Sometimes, it is easy to write down the weak form, e.g. Navier-Stokes, where the non-linear part is actually bilinear, so it is not too bad.
@@strikeemblem2886 I just learned that you can see the integral as a scalar product between two functions.
Then under some mild conditions, what you have in the weak form is an approximation of the solution of the strong force !!
Really beautifull math, if you want I can show you the proof
@@chainetravail2439 thanks, but i am familiar with the proof (i work in PDEs). =)
But to be more rigorous, we have to make sure u is indeed two times weakly differentiable. But as what you constructed, u cannot be two times weakly differentiable because there is no continuous representative of the weak derivative of u (a continuous function that agrees with the the weak derivative of u except on a null set, which also admits the same integration by part formula) , which guarantees u is not two times weakly differentiable, hence no two times weak derivatives exists for such u unless u is constant.
Are you referring to the piecewise linear ansatz? These are commonly used and I don't see a problem with this ansatz. Can you be more specific or give a reference? Thanks :)
@@ComputationalModelingExpert Maybe put it this way, it is well known that if strong derivative exists, then the weak derivative, if it exists, agrees with the strong derivative. But we see that the second derivative of u is 0, which does not recover u' at all when integrated, it must not be second weakly differentiable. This made it hard to justify why integration by part can applied to u' at all, hence it is hard to understand why this approximation works.
for all functions wii
I love this kind of presentation, what kind of applications or software did you use to create this type of video? Excellent job
looks like manim
Yes, Manim. In other Videos, I also use matplotlib. I do the video editing with OpenShot and the audio recording with Audacity. So everything is open source or free (in case you are also interested in making videos). :)
6:00
Excellent videos. Please give us a way to donate money to you. Your channel is still too small for you to enter UA-cam's partner program, I believe, - won't be for long! - but you sure deserve compensation for these quality explanations. I can't give much, but I'll be glad to chip in.
Needless to say, I eagerly await more videos from you on any topic you wish to pick. Cheers!
Hey fbt :) thank you so much for offering your support!! This is a hobby for me and there is no need to support me financially at this stage. But of course I would be very happy if you could support me by sharing my content with your friends and colleagues. Cheers! 😁
This is the best explanations but nowadays to get job you dont need this. Need only click the mouse in ansys. Companys hire bunch of kids who have no idea but know to click the mouse. Good companys and hiring manager only knows these values which is hard to find
i cant wrap my head around rotating u only offsetting its derivative u' by some constant ,
adding +Cx to u offsets its derivative by C , how does rotation do that ?
you mention this at 3:45
Good point! Thanks for pointing this out!
For the animation in the video, I have actually added a linear function to u like you suggested.
If you think about it, this is very similar to rotating u, especially if the slope of the linear function that we add to u is very small. The x-axis intercept of the linear function added to u determines around which point u is rotated. When the slope of the added linear function gets bigger, it does not really look like a rotation anymore.
Sorry for being imprecise in the video; it would be more clear to say that adding a linear function to u does not change u''. :)
Audubillah i am wet in hose bombaclat explained
😂😂😂😂
you are 100% wrong!
Great video, would like further videos.
Thanks a lot! Appreciate it! More videos planned.