# Session 16: Numerical Methods of PDEs: Finite Element Method 1

Flash and JavaScript are required for this feature.

Download the video from Internet Archive.

- About this Video
- Playlist
- Transcript
- Lecture Notes
- Download this Video

Description: This abbreviated session begins to introduce the finite element method for 1-dimenional diffusion, including key ideas and its history. Due to technical difficulties, the video ends after the audio fails at around 14:45.

Instructor: Karen Willcox

The recording quality of this video is the best available from the source.

NOTE: Videos for the next several classes, Sessions 17–20, are not available.

Session 1: Course introduct...

Session 2: Numerical Integr...

Session 3: Numerical Integr...

Session 4: Numerical Integr...

Session 5: Numerical Integr...

Session 6: Numerical Integr...

Session 7: Numerical Method...

Session 8: Numerical Method...

Session 10: Numerical Metho...

Session 11: Numerical Metho...

Session 12: Numerical Metho...

Session 15: Numerical Metho...

Now Playing

Session 16: Numerical Metho...

Session 21: Probabilistic M...

Session 23: Probabilistic M...

Session 24: Probabilistic M...

Session 25: Probabilistic M...

- Download English-US transcript (PDF)

The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation or to view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at OCW.MIT.edu.

KAREN WILLCOX: All right. So let's see. I have the graded projects here which maybe you guys can grab after class. Or you can grab them now if you want but it can take a while. Vikram, maybe you want to give the projects back. Just quietly ask people what their names are.

OK. So today, we're going to talk about finite elements. You guys have read a little bit in the reading. I'm going to talk about a couple things first, just go through a couple of the very basic ideas. And then we're going to do it interactively. You're going to actually implement the one 1D finite element codes. We'll do it piece by piece together. So let me just put the topics up over here.

So again we're going to talk about 1D finite elements. We're going to start off just with basically thinking about the key ideas. We'll just look at a very brief history of finite elements. We'll think about what 1D linear elements look like. We'll talk about the nodal bases. And then we will spend most of the session doing the derivation and implementation for the 1D diffusion equation. Same derivation and implementation for 1D diffusion.

OK. So by the end of today, you'll more or less have a basic shell of a code that implements at least the meaty part of the finite element. I'm not quite sure how far we'll get today. Then on Monday, I am unfortunately not going to be here. But Vikram is going to run the class session. And you guys will continue working with that code. Probably Monday you'll implement the boundary condition and implement some quadrature schemes in it. And so then, by the end of class on Monday, you should have a working 1D finite element code which will then hopefully be of help to do the 2D that you have to do for the project. And on Wednesday of next week, Vikram will talk a little bit about 2D finite elements.

So let's just start off with key ideas. I'm just going to write over there for a bit because I want to put something up on the screen in a second. So remember on Monday, we talked about the method of weighted residuals. And again, just to sort of go over what the steps were in the method of weighted residuals. Kind of the fundamental idea is take the solution and to approximate it in a basis. Right? Remember we took the intradimensional PDE and we discretized it. And this is already different to what we do in finite difference or finite volume. We discretized it by saying let's assume that a solution t of x lives in this finite dimensional space described as a weighted sum of basis functions.

Then we said how do we figure out the coefficient of the basis function? And we went through the derivation of choosing weighting functions to be the same functions that we used in the basis to approximate the solution. What was that called? What's it called when you choose the weighting functions to be the same functions that you think [INAUDIBLE]? Galerkin. Yeah. It's the Galerkin method. When we define the residual, multiplying by the weighting function using Galerkin. Integrating over the domain, setting that equal to zero. That's the weighted residual. Those gave us the equations we solve to find the approximation.

So we're more or less going to do the same thing now with finite elements. So what you are going to see today is that a finite element as we're going to view it is based on the method of weighted residuals. But what is different is the first step. Before we start with the approximation of the solution, the very first thing we're going to do is to discretize the domain into small cells. OK? So we're going to divide up our domain-- rather than thinking about the approximation of the solution globally over the whole domain, we're going to discretize our domain into small cells, elements. That's the element of the finite element method. They've been called-- I think you guys called them cells when you talked about finite difference. Is that right? Nodes and cells? And for finite elements, the cells are referred to as elements.

Then once we've discretized the domain into small cells, then we're just going to go and basically do what we did with negative weighted residuals. So now we're going to think about approximating the solution in each element. So in each element, we're going to say let's assume that the solution can be approximated as a linear combination of basis functions. And we're going to use polynomials just like we did on Monday. But now the polynomials are just going to be defined over the little element, the little piece of the domain. Not the whole domain. E.g. Here with polynomial functions. Again, just like we did on Monday but now to serve a small element polynomial function.

And then again, it's going to be the same as what we did on Monday. Once we've done the approximation, we're going to evaluate weighted residuals for each element. We're going to use the Galerkin method to do that, to define the weighted residual. That's going to give us a system of equations. And we're going to solve to determine the weighting coefficient. Weighting coefficients.

So basically exactly what we did on Monday, except that first step which is discretize the domain to small cells. And then what you're going to see is that idea of breaking the domain up into small cells, we're going to make a very special choice for the polynomial basis functions. It's going to be really neat because when we do the weighted residuals and we do all the integrals-- like we mentioned a little bit, I think, in response to one of [INAUDIBLE] questions-- a whole bunch of integrals are going to fall out. And it'll turn out that everything has got a very special and really efficient and kind of neat structure to it.

AUDIENCE: Did you pick the same basis functions for the entire problem or for each individual cell?

KAREN WILLCOX: Yeah. So the question is do you pick the same basic functions for the entire problem, or for each individual cell? You're going to see it in just a second. There are a lot of different ways to choose the basic function. Today we're going to talk about a special choice that's referred to as the nodal basis. And you'll see exactly what they are.

Before I start, are there any kind of residual questions from method of weighted residuals? Residual questions. Are there any things about method of weighted residuals that is mysterious or uncomfortable? It's pretty straightforward, right?

So just before we start, I want to give you a little bit of a-- I hate this WebEx thing. Because when you try to grab things, it goes down-- little bit of a historical perspective. And actually I went to Wikipedia as you do, which actually doesn't have a bad-- this is the Wikipedia entry for finite element method, which actually surprised me. Look how many sections there are. Vikram, have you contributing to Wikipedia?

AUDIENCE: No.

[LAUGHTER]

KAREN WILLCOX: Aha. There's actually quite a lot here. I didn't read it all. So I can't verify how good it is. Although Wikipedia appears to be pretty good, there's enough of a community of people. So I was going to show you guys the history about technical discussion, general principles of weak formulation, discretization. Then you can see all the different kinds of finite element methods that exist. So that should give you a sense of just how big of a field of study this is. We're going to be just a little tiny bit of it. [INAUDIBLE] for finite difference method application.

I just wanted to mention a little bit just about the history. So like it says here, it's difficult to quote the date of the invention of the finite element method. More or less, its origins are actually from structures in both civil and aerospace aeronautical engineering. So it has roots in aeronautical engineering. And there were three kind of groups where if you trace back, that's where things seem to have really originated. Courant is often the person whose is cited as being, I guess, the father of a lot of theories that led to finite elements. So he was at NYU and then established an Applied Math institute, the Courant Institute which still exists today. It is one of the best Applied Math computational places in the world. And as you can see here, I think this is a German mathematician. And also things were going on in China at the same time.

So there's a little bit here. You can see there Rayleigh, Ritz, and Galerkin. Those are all names of mathematicians that you guys have seen in various methods, things that came up. Really the way the finite element method started to really sort of become like a computational powerhouse, I think, was here in the 60s and 70s. So Agyris at the University of Stuttgart. I think this is pronounced Clough. Is that right, Vikram? Yeah. Clough at UC Berkeley. And Zienkiewicz at University of Swansea. And in fact University of Swansea is where Professor [INAUDIBLE] did his PhD. And he was working with some of the later people there that were at the forefront of finite element methods and their development.

So it's actually a really kind of neat story because it really comes from applied math. And you're not going to see a whole lot of it in class. But there's a lot of incredible analysis and theoretical results that go with finite element methods, a lot of guarantees that can be made. So there's really a hardcore math component. But then it has gone on to be of such practical use. So it started off in structural problems but now is applied to fluid problems, acoustics, all kinds of things. You can see here NASA sponsored the original vision of NASTRAN. I actually didn't know that until I read this. So now there's a lot of software, things like NASTRAN ADINA is Professor Bathe from mechanical engineering package. Professor Strang in the math department also plays a really important role in some of the rigorous results early on. So there's also a lot of connections to MIT.

So we're going to see only just a little piece of the finite element method. But it is certainly, I think, one of the really great examples of where applied methods made enormous impact on real problems and particularly on engineering and engineering design. So let's get into talking about how it works. We're going to talk about 1D linear elements. I'm just going to go over a few things that you guys read about just to make sure that the notation is clear and that the ideas are clear. And then we're going to start together deriving and implementing the methods for the 1D diffusion equation.

So we're at number three. 1D linear elements. OK. So I'm just going to draw a picture. And again this is the picture that was in the online reading. Board is not very clean. All right. So we're thinking in 1D. So draw this line that's going to go in both directions. So this is the x direction. And I'm going to have nodes just like I had in finite difference. So I draw some nodes. This guy here is going to be node i. And this guy here is going to be node i plus one. So node i is located in at position xi. Node i plus one is located at position xi plus one. i minus one to the left and so on.

And then in between xi and xi plus one is element i. OK? So when we talk about element i, we're talking about the region of the domain that lies between xi and xi plus one. And--

Numerical Methods of PDEs: Finite Element Method (PDF - 1.3MB)

## Free Downloads

### Video

- Internet Archive (MP4 - 33MB)

### Caption

- English-US (SRT)