THANK YOU! THANK YOU! THANK YOU! I'm taking Engineering Methods which I was told was supposed to be a "learn Python" course. As I already know Python, it's supposed to be my easy A course (currently at a C with two weeks to go). It is the hardest course I've ever taken as I don't know heat transfer, linear algebra (70% of the course), my diff-eq is 10yrs old, and the HW due dates are are extremely short with limited and not clear information. A 2-4hr HW assignment is taking me and the other students 10-15hrs almost every assignment (3 assignments/week). I wish I'd found this video a month ago. The first 18 minutes explained EVERYTHING I needed to know for everything assigned for the last three weeks. Within minutes I had scripted and running my current HW assignment that after 12 hours of looking through text books, online sites, etc, between yesterday and today, I was stuck. I proofed my code, I understand what is going on, and when I go to take linear algebra and heat trans next year...I'm now legs up. Thank you for showing each step as well as the results and being very clear about what is going on and why!
I can relate with you. This is the best lecture I ever watched. I considered watching the entire series to better my understanding. This is a golden lecture. Already recommended it to my pals
Awesome video sir! THank you! Very insightful and interesting take on this lecture sir. I followed and coded the 1-d finite-difference method in Python for ODE BVPs using a kinda different approach and formulation for the system of linear equations --- and which has worked enormously well for me --- but I really like this take on it where the derivatives are difference operators and so from it you can neatly and elegantly construct your coefficient A matrix. Just beautiful. Thank you so much for this sir. Now I'm hooked and interested in your other vids for the finite-difference method seeing that this is just Topic 7a.
That is awesome to hear! Incase you are not aware, let me point you to the official course website. I recommend using this as your main portal to the course. You can download the latest version of the notes, get links to the latest version of the videos, and get access to other learning resources. empossible.net/academics/emp4301_5301/ Enjoy!
Thanks so much Professor . My professor asked me to learn to use an open source program "Sundials" especially for solving ODE's. i have been facing some challenges. This lecture really consolidated my understanding on FDM. I just can't wait to imbibe more knowledge from the rest of the course, Since i am interested in solving nonlinear IVP's using LMM...Thanks so much again
@@prreettz To do FEM any sort of justice, it really needs to be a semester long course. That would be great! I found the same thing about finite-difference time-domain and I did develop a semester course for it.
What a great presentation! Thanks so much for putting this together. Very helpful both in terms of the ideas behind method and a practical implementation. Does this video belong to a playlist? I couldn't find it in any of the playlists on your channel.
It does belong to a playlist, but I actually recommend accessing the videos and other resources through the official course website. Here is the link: empossible.net/academics/emp4301_5301/
This operator matrix approach makes it really amazingly clear. Are there any drawbacks to using this? Would it be possible to connect multiple 1D domains to each other at different nodes using this approach? For example, in the context of a pipe network.
Drawbacks -- I would say first the finite-difference method is less efficient than other numerical methods. Second, in principle, it would be more efficient to build the [A] directly so that derivative matrices do not have the be stored in memory. For very large problems that may become an issue. It is possible to connect multiple domains. That is called domain decomposition.
So when dealing with the heat equation, its described by a PDE with neumann boundary conditions? In 3Blue1Browns video about it, its shown as the slope at the boundaries as being always horizontal
I suppose Neuman could be used. The BC needs to be consistent with the physics of the problem. For example, if the boundary is being held at a constant temperature, Neumann would be incorrect.
Thank you for your presentation! May I ask you a question regarding this lecture? So why do we need different types of boundary conditions to modify Dx and Dx^2 matrices? (i.e. dirichlet, periodic, etc.) because we need to incorporate given boundary values at the end anyway?
Many problems do not have boundary values so the function values at the edge of the grid are not known. In this case, the differential equation must be enforced at the edge of the grid and the finite-difference equations have to be modified to not use values from outside of the grid. The specific application of each type of boundary condition can vary wildly. Dirichlet BC is common for waveguide problems where the mode is confined to the waveguide and approaches zero far from the waveguide. Periodic boundary conditions come up when simulating periodic structures like frequency selective surfaces, metamaterials, photonic crystals, diffraction gratings, etc.
A course on FEA is on my to-do list. The problem is that I have a long to-do list and my time is consumed by being heavily involved in research. I wish I had more time and I would definitely develop such a course and more!
Comming from FEM, I love this explanation! =) I would prefer to apply Neumann boundary condition on the system matrix A just before solving the system. Is there any reason not to do this?
Thank you!! I cannot think of a good reason not to do it this way, but I can think of ways to not do it. For example, you could build the boundary conditions into each of the simpler matrices that eventually build the final matrix. Maybe somebody has a reason, but incorporating them as the last step seems simpler.
I just don't friggn get why every time I actually solve the matrix on matlab, my solution just never makes sense. I UNDERSTAND this method, I DO this method, it all looks PERFECT. BUT, when I go ahead and solve... BAM, solution does not make physical sense. It's almost as if the universe is broken...
Welcome to computation! This happens to all of us and is very frustrating. Don't give up and seek help. When your code finally works, you will feel like you have super powers because you can do something that not many other people can do. Keep at it!
A question: At 6:35, isn't the matrix we obtained symmetric? If so, then how we can develop a solution with a symmetric matrix since det(A)=0 and you need the inverse to calculate a solution? Cheers.
I don't think det(A)=0 is a property of symmetric matrices. For example A = [ 1 2 ; 2 1 ] has det(A)=-3. You are right that if det(A)=0 there would be no solution, but that is not a problem here.
@@empossible1577 Oh, thanks for fast reply. I am so new at CFD, however, whenever I wrote down a stiffness matrix those were always symmetric and determinant was always equal to 0. Don't know why exactly, but it is good to know that it is not the case here.
Sir , what if we have some term of x in the differential equation. Like here f is function of x and we only have f(x) and derivatives of f(x) in the example we have taken. What if our differential equation was f"(x) +5f'(x)+6f(x)=x(x-2) . How should we change our code then ? While changing into matrix form how will the term x(x-2) should be written ?
And what if our differential equation is f''(x)+(1/x)f'(x)+f(x)? The value of x will also comes into play in calculating finite differences. and it will change at every node x_i, x_i+1 and so on
The values of x will be known so they will either end up as diagonal matrices or column vectors, depending on how they are being used in the differential equation.
If formulated correctly, you should not have to modify the matrix to handle material interfaces. If some strange situation arises where you do, you would probably have to modify all rows that correspond to points at that interface.
A quick explanation was in this video, but more detailed explanation appears in the videos that follow this. Let me point you to the official course website at the link below. It organizes all of the content and provides links to the latest versions of all the videos, allows you to download the notes, and has many other learning resources for you. empossible.net/academics/emp4301_5301/ I also recommend working through numerical differentiation in Topic 6 at the same link before working through Topic 7. I am confident that all of this will clear up any misunderstandings you may have.
See Lectures 6b and 6c from the previous topic. Here is a link to the official course website. I recommend that be your main portal. empossible.net/academics/emp4301_5301/
Amazing presentation. What is fdderld fiction? I m running this code in matlab 2008 but it stops working. The error is invalid function (fdderld)!! To compare with closed form solution I guss f(2) must be 0.02 ,f(2)=0.02 ! Thank for great technic
fdder1d() is a function that builds the derivative matrices. It is not a built-in function in MATLAB. Instead, it is one that you have to write. It is not provided in the notes because it is a homework assignment for the class. If you send me an e-mail, I can send you the homework. rcrumpf(at)utep.edu.
That should not be too hard to do given the technique taught in this lecture. Here is a link to a book that covers a time-domain finite-difference solution for acoustics in Chapter 6. www.astrosen.unam.mx/~aceves/Fisica_Computacional/ebooks/sullivan_emsimulation_fdtd.pdf
There is a homework assignment or two that steps you through how to write this and how to verify that is working correctly. I removed the homework from the course website because another instructor was teaching the class. E-mail me directly and I can send you those. My e-mail is rcrumpf(at)utep.edu.
Can anyone share me the code for fdder1d function? I cannot process payment for the full course for Matlab implementation because my country limits such online payment and transfer and it usually cause a lot more than its price.
Hi prof, Thank you so much for these wonderful online materials. They are really of tremendous help. On your course website, Lecture 27 -- Finite Element Method, Lecture 29 -- Method of Moments with RWG Edge Elements and Lecture 30 -- Spectral Domain Method over here emlab.utep.edu/ee5390cem.htm dont seem to be hyperlinked. I'd be glad if you could please resolve this.