This is phenomenal. I have 5 pages of script that do nothing but confuse me, this gives me a step by step guide and something I can implement in a few hours.
Awesome video! Thank you! Love your explaining the five-point stencil. Very timely as I was curious about it. I watched a 1-hour lecture about the finite difference method for boundary value problems this week and they used differential operators to neatly and efficiently generate the sparse tridiagonal matrix equation for the ODE. That made me curious how that could be applied for elliptic PDEs since you know have 2 dimensions or more. I have been mostly solving elliptic PDEs in Python using iterative methods, specifically Gauss-Seidel or better yet Successive-Over Relaxation to solve the system of equations because I didn't know how to generate the banded, sparse equations efficiently. I wouldn't want to generate them by hand lol. Very tedious and intimidating. So iterative methods has been the way for me ever since I discovered them thanks to Mr P Solver's TH-cam channel. Again, thanks so much for this. Maybe another video about generating the coefficient matrix next? 😁
I am glad that you liked the video :) Unfortunately I won't make another video on finite differences, since I am not using this method. Instead I am using the Finite Element Method (FEM; see my other video) on a daily basis. In my opinion to see results quickly the Finite Difference Method is convenient, but to deal with complicated boundary conditions FEM is more straightforward. When it comes to solving the linear equation system you have two classes of solvers: direct and iterative solvers. For sparse matrices (from 2D problems) it is sufficient to use direct solvers, which are e.g. based on the LU decomposition, when you have less than 1 million unknowns. If you have more equations you might need to use iterative solvers with appropriate preconditioners, since direct solvers don't work anymore. As a first step I would advise you to try using a direct solver and only if that is infeasible to then use iterative solvers. But if you have an iterative solver that works this is obviously fine as well.
@@numericalanalysisbyjulianr4242 indeed, fair enough. Sad that it seems like FDM's use is simply as an introductory bridging tool for FEM since even FEM can be applied for 1-D problems. I just feel like it's kinda elegant the algebraic equations spring up from the differential operators. For 2D onwards, especially 3D and with complicated boundaries and heterogeneous material, FEM is the way to go. I've been intending on learning FEM too and demystifying this seemingly daunting topic. FEM is usually not taught in undergrad courses, but is often mentioned enough that one gets the importance and utility of it.
You can check out my online explanation of multigrid for the Finite Element Method at julianroth.org/documentation/multigrid/index.html. The code for this is also on GitHub
Yes, I did my master in 1 year, since I wanted to get my current PhD position. This was certainly very stressfull, but I managed to do it somehow and now it is worth it :)
@@numericalanalysisbyjulianr4242 I guess you still have excellent grades 😅 I study at TU Berlin and can't even imagine taking 60 ECTS per semester. Maybe 45 would be possible, but 60 is incredible.
When learning about Finite Elements or Finite Differences, you should at least have a basic understanding of calculus and linear algebra. You should know e.g. how to compute derivatives and integrals or how to work with vectors and matrices. To learn these topics, I recommend the playlists from 3blue1brown on these topics: www.3blue1brown.com/#lessons
Schade das ich Numerik schon fertig hat. Den Dreck hätte ich mir 100x lieber von dir angeschaut :P ! Hat mir aber leider keiner gesagt, dass du Videos dazu machst :/ ... Aber war ein sehr schöne Erklärung :D !
There is for example the area of optimal control of partial differential equations, where you try to minimize some goal functional J(y,u) such that that y solves a PDE that also involves the control u. If you want to learn more about this, check out the book "Optimal Control of Partial Differential Equations: Theory, Methods, and Applications" by Fredi Tröltzsch
That depends on the problem that you are solving. For example, if you have a uniform gravitational force pushing down you could have something like f(x, y) = -1 and thus f(-0.75, -0.75) = -1.
3blue1brown created a Python based animation library called manim (github.com/3b1b/manim), which he uses to create his videos. More recently, there has been a fork of manim, called manim community (www.manim.community/), which introduces some additional new features and quite significantly diverged from the original library from 3blue1brown. I used the community version of manim to create my videos.
Brilliant, haven't seen such a good explanation of finite difference method anywhere.
can you please tell me how the f(-0.75,-0.75) comes?
This is phenomenal. I have 5 pages of script that do nothing but confuse me, this gives me a step by step guide and something I can implement in a few hours.
These videos bring much needed clarity to these methods for me, thank you!
Thank you so much for this! Saved me a night of sleep
Thank you for this explanation. I've tried to learn this from books but i cant understand them very well.
Very helpful and clear explanation. I am taking FEM, CFD and numerical methods course. Hoping to see more videos from you, subscribed !! Thanks !!
Awesome video! Thank you! Love your explaining the five-point stencil. Very timely as I was curious about it. I watched a 1-hour lecture about the finite difference method for boundary value problems this week and they used differential operators to neatly and efficiently generate the sparse tridiagonal matrix equation for the ODE. That made me curious how that could be applied for elliptic PDEs since you know have 2 dimensions or more.
I have been mostly solving elliptic PDEs in Python using iterative methods, specifically Gauss-Seidel or better yet Successive-Over Relaxation to solve the system of equations because I didn't know how to generate the banded, sparse equations efficiently. I wouldn't want to generate them by hand lol. Very tedious and intimidating. So iterative methods has been the way for me ever since I discovered them thanks to Mr P Solver's TH-cam channel.
Again, thanks so much for this. Maybe another video about generating the coefficient matrix next? 😁
I am glad that you liked the video :)
Unfortunately I won't make another video on finite differences, since I am not using this method. Instead I am using the Finite Element Method (FEM; see my other video) on a daily basis. In my opinion to see results quickly the Finite Difference Method is convenient, but to deal with complicated boundary conditions FEM is more straightforward.
When it comes to solving the linear equation system you have two classes of solvers: direct and iterative solvers.
For sparse matrices (from 2D problems) it is sufficient to use direct solvers, which are e.g. based on the LU decomposition, when you have less than 1 million unknowns. If you have more equations you might need to use iterative solvers with appropriate preconditioners, since direct solvers don't work anymore. As a first step I would advise you to try using a direct solver and only if that is infeasible to then use iterative solvers. But if you have an iterative solver that works this is obviously fine as well.
@@numericalanalysisbyjulianr4242 indeed, fair enough. Sad that it seems like FDM's use is simply as an introductory bridging tool for FEM since even FEM can be applied for 1-D problems. I just feel like it's kinda elegant the algebraic equations spring up from the differential operators. For 2D onwards, especially 3D and with complicated boundaries and heterogeneous material, FEM is the way to go. I've been intending on learning FEM too and demystifying this seemingly daunting topic. FEM is usually not taught in undergrad courses, but is often mentioned enough that one gets the importance and utility of it.
excellent explaination! easy to understand in just one-time watch
Underrated. Thank you so much !
This helped a lot! Great visualisation :)
Finally, the vacuum on TH-cam is fulfilled now!
Wonderful
This is so valuable. Thank you.
Richtig stark!!! 🙏🏻
Thanks very much for your explanation. Is ther more videos explain more for further FD-Methodes like time-depend problems
For time-dependent problems you can take a look at chapter 12 and especially section 12.3.2 in the lecture notes doi.org/10.15488/11709
This is so cool, thank you very much!
Brilliant explanation, thank you.
Need help in Implementing the Multigrid Cycle.
Kindly, suggest. I am not able to understand from Multigrid literature.
You can check out my online explanation of multigrid for the Finite Element Method at julianroth.org/documentation/multigrid/index.html. The code for this is also on GitHub
Did you really do your Master's degree within 1 year? That's insane! Great video!
Yes, I did my master in 1 year, since I wanted to get my current PhD position. This was certainly very stressfull, but I managed to do it somehow and now it is worth it :)
@@numericalanalysisbyjulianr4242 I guess you still have excellent grades 😅 I study at TU Berlin and can't even imagine taking 60 ECTS per semester. Maybe 45 would be possible, but 60 is incredible.
Klasse Julian, Danke. Weiter so !
very clearly explained. Thank you :)
thank you so much for the explanation
didn't expect my university to do this video haha
Fantastic channel.
Great help!
very good explanation, thank you
Man this is so helpful, thank you so much!
Pl tell me how to start learning fet
Which type of maths is required to learn it Or which maths is used in fet
When learning about Finite Elements or Finite Differences, you should at least have a basic understanding of calculus and linear algebra. You should know e.g. how to compute derivatives and integrals or how to work with vectors and matrices. To learn these topics, I recommend the playlists from 3blue1brown on these topics: www.3blue1brown.com/#lessons
I am so grateful for your video, thank you very much! Liked and subescribed =D
Schade das ich Numerik schon fertig hat. Den Dreck hätte ich mir 100x lieber von dir angeschaut :P ! Hat mir aber leider keiner gesagt, dass du Videos dazu machst :/ ... Aber war ein sehr schöne Erklärung :D !
great lecture thank you
Appreciate you sir.👍
very helpful. Thank you.
Thank you man.
How this is applied in optimization ?
There is for example the area of optimal control of partial differential equations, where you try to minimize some goal functional J(y,u) such that that y solves a PDE that also involves the control u. If you want to learn more about this, check out the book "Optimal Control of Partial Differential Equations: Theory, Methods, and Applications" by Fredi Tröltzsch
thanks sir!!
Wonderful
some one please tell me how the f(-0.75,-0.75) comes? i'm waiting from yesterday i stop my work 😞
That depends on the problem that you are solving. For example, if you have a uniform gravitational force pushing down you could have something like f(x, y) = -1 and thus f(-0.75, -0.75) = -1.
Thank you so much got it ❤
th-cam.com/video/XR578io_3eg/w-d-xo.html to get the analytical and numerical solutions of a Laplace/Poisson equation with MATLAB
3blue1brown ripoff?
3blue1brown created a Python based animation library called manim (github.com/3b1b/manim), which he uses to create his videos. More recently, there has been a fork of manim, called manim community (www.manim.community/), which introduces some additional new features and quite significantly diverged from the original library from 3blue1brown. I used the community version of manim to create my videos.
@@numericalanalysisbyjulianr4242 sir please answer my question?
@@numericalanalysisbyjulianr4242 don't worry about this troll. Thanks so much for the video! Was very helpful for me :)