So, we're in the last legs here. Five lectures left.
I know, I know, five episodes. It's kind of like the big countdown to the
grand finale and everyones getting teary-eyed.
Season one is almost over. Okay. So we're moving on to finite
elements now for the last bit of lectures here.
And the way it's going to work is today, Friday, and Monday's lectures basically
are going to sort of outline the theory, the set up, how to think about doing the
stuff. And then,
Wednesday, Friday of next week, I will pop MATLAB up here and I'll just walk you
through demos. How to use finite element method?
Okay? With one specific toolbox, the PDE toolbox
in MatLab, cuz I have that. Okay? But really, at the end of the day,
it's going to be same buttons, just maybe different configurations for different
packages, okay? So, but I think it's important for you to
have the underlying idea of what goes on in these codes,
So that you can sort of be familiar with this.
It's going to be a bit of a change from what we've been doing.
Okay. So, let's talk about what's going to be involved here with finite elements.
One, Always an important step, discretizing the domain.
It's what we've been doing, spectral methods, finite difference.
And always in those, pretty much, we pretty much just said, here's my domain,
just chop it in equally spaced points or with Cheb we did unequally spaced points,
and there was a reason for that, to use these Chebyshev polynomials.
But, you'll see here, this is a little more complicated.
Especially in 2D. Now remember, the only reason we're going
down this road of finite elements is, it's, it's about boundaries.
Okay? This is the one reason you go down this
road, is if you have complicated domains, complicated boundary conditions.
This is your tank. Okay?
This thing can handle anything, pretty much.
Okay? So discretizing, discretizing the domains
are one of the key steps here and you'll see already in this discretization of the
domain, it's kind of a complicated task. Okay,
Two. Once you discretize the domain, we've got
to pick how we want to represent the solution on this domain.
So, we're going to pick interpolating functions.
So, in other words, we're going to break it up.
The solution is known in a finite number of points, but ultimately we may ask, I
want the solution over the whole domain, however I represent that?
So you have to figure out, how do you want to give interpulated values.
So, you obviously have them at the boundary points, how do you do them
elsewhere. Okay?
So that will be important for us to decide.
Three, I Just put, leave it at that.
We discretize, we've held interpolating functions.
What's the Ax = b problem sitting in there?
Remember, it's always going to come down to that.
We've spent a lot of time with the Ax = b, because,
That's what MATLAB is all, that's what it's trained to do.
Ultimately, that's what you're going to train your computer to do,
Is solve large matrix systems. If you've learned nothing else from this,
from me. [LAUGH] Yes, well, you should walk home
with, Hey, matrices.
That's what I got to work with when I'm doing computing.
Big ones, Okay? Alright.
Four, This is actually a big issue that we're going to spend a long time about how
to assemble these. You know?
How do we actually go through then, and build these?
Not just say, what does this thing suppose, what are they supposed to be, but
then, geez, we got to actually build them now.
Okay? Finally,
After you get all that solving it. Good times.
I know, You feeling it?
You feeling the good times? It's like being in a summer.
Okay. Alright.
Alright, so I like to, I like to think this class is a little bit of sunshine in
your life. I know that's not really true, but like I
said, I like to think that. Okay. So don't, don't break my groove.
All right. So here what we're going to cover today.
We're going to talk about, these two things specifically.
And then, Friday, we're going to talk about these things right down here.
Okay, so we're going to break it up into pieces.
Alright. The first thing about discretizing domain
is I'm going to not say much about it. [laugh].
I know, I know. That's, that's, kind of feels cheap.
Right? I know, you, you should just kind of, but
let me, let me show you why. How does this thing discretize a domain?
And that's, that's one of the things that just this alone is actually quite a
difficult task. So, unfortunately the little camera that's
above there doesn't work anymore, but I want to just show you kind of what a
picture of this might look like. There's a figure in there and you say,
well, I'm going to solve on this domain. But the nice thing about finite elements
is, for instance, I might have structures in here.
I might have, you know, This is part of my domain.
And suppose I have something embedded in my computational domain, with this kind of
really awkward shape for instance. Okay?
And what does the discretization do? Now, normally what we've done with
discretization is we've just chopped it up this way, chopped it up this way. Okay?
You could do that. If you're doing finite difference, you
could just chop away. And then you'd say, well, you know, what
happens when I did in here and here's my grid,
And then you'd say, well, I can only have solutions at grid points.
Right? So here's my boundary.
I'm not, I'm not on a grid point so I have to like, pick the nearest thing to it.
Right? So you start seeing how crappy a job this
is going to do in representing this domain.
Right? So you have this complicated domain
immersed in your, in this thing, And you want to say, well, if I chop this
up, this is going to, this is going to be bad.
There's two options to this. I could just keep cutting it finer and
finer and finer. Right?
Make smaller dx's, smaller dy's. And what is that going to cost you?
A lot of your life. Okay? Why?
Because you have to sit and hit run. Their whole point is to big dt's and as
big as delta xs and delta ys so we can get away with and this is just forcing you to
say, if you go with this philosophy of finite differencing this thing,
It would ruin your life forever. Okay. Not quite that bad, but anyway.
It's a bad approach ultimately. By the way, what about spectral methods? I
have this boundary sitting inside of there. What do spectral methods do?
They actually expand in global functions that'll fit on the whole domain, does the
cosine know that there's this giant thing sitting in the middle there? No?
That's a problem. Spectral, says, hey, I'll just take functions that live on the
whole thing, and you say, well, wait a minute, there's a problem, I have this
thing right in the middle. Okay, so both finite difference spectral
suck. .
I don't know what I had here, but okay, drawing on.
So here's what finite element does. It says, give me your,
Poor and weary boundaries. It's kind of almost is it a quote?
I think it is this from Constitution. No, yeah it's, it's the Statue of Liberty,
I knew it was something American. [laugh] Okay and what I'm going to do with
this I'm going to get you your plane I'm going to basically say, I see your
boundary. I see it.
And what I'm going to do is I'm just going to take it exactly right as it is and I'm
going to start drawing triangles on it. Looks like Chinese checkers, doesn't it?
Okay. It sort of is.
You just basically start saying, look, I'm just going to start drawing triangles all
over the place and I'm just going to make a domain made up of triangles,
All the way out to the boundary. By the way, boundary, not much is going
on, So I might be able to take really big
triangles, as long as I connect them right to triangles in here.
That's the idea behind finite element. Give me your really complicated boundary
interior, Whatever you want to do.
And what I'll do is, first, I will essentially, whatever your boundary
happens to d, be, Right?
Whatever happens to be there. Suppose I have a boundary like this,
It's what it's supposed to be. What I'll do first, is I will just
basically fit a bunch of points on it, And then I'll just start drawing triangles
off that point. So in other words, the first thing I do is
try to match your boundary. I don't try to make your boundary fit
within my grid, but I just make my points fit on your boundary and then draw my grid
after it. Okay?
So this discretization process here, you might start drawing triangles off here and
you can see that, you know, and then you start building yourself a grid of points.
Wherever those triangles intersect, This is one of your points of solutions.
U(xi, Yi). Okay? why not?
Okay? Finite element takes a very different
view, then, of everything. It just says, give me the stuff, I'll draw
a triangles. Triangle's not the only option, by the
way. We'll talk about others.
And I will represent now the solution on this big structure here.
And by the way, generating this is in itself a fairly complicated mathematical
exercise. Okay? Couple things about these triangles.
This is why we're not going to talk [laugh] about it.
This is why you go to a commercial package and you put in your domain, say go, and
then it gives it to you. Someone else wrote a nice little algorithm
for you to give you all these triangles. Okay?
If you're doing research in finite elements,
Write your own triangles if you want. If you're not,
It's a lot of work, for you. If your, your ultimate goal is to actually
solve the problem, if that's what you're really interested in.
It's going to cost you more time just to get that triangle grid, write a code for
that, then, then anything else. Right?
So it's, it's, just use it. Even if you were to take this problem and
just say, go ahead, I got my boundaries, triangularize it, now I'm going to take
out the, the grid and then I can do stuff with it as I want.
But there's some really nice algorithms out there,
And we'll play around that with, from the code.
Now, a couple things about the triangles. Width and height should be similar.
Okay? No Kareem Abdul-Jabbar Triangles.
No Fat Albert triangles. You know, they don't have to be equal, but
roughly speaking, the triangle should look fairly,
You know, width and height should be somewhat similar, okay?
For every given triangle, right? Yeah.
For every given triangle. By the way, the triangles can change in
size, So in fact, this is a very nice thing.
One of the things that's nice about triangularizing a grid is, wherever you
have a lot of structure, and we'll see this actually as we do this implementation
in class, it oftentimes puts a lot more triangles near shape, complex shape
structures, And in fact, that's kind of what you need,
right? Near where you have a lot of stuff
happening in corners and edges, you'd want more grid points.
We're way at this edge, where not much is going on,
But I have big triangles. And you'll see, when you build the code,
you can just basically ref, refine this much as much as you want.
Okay? So it automatically does things like that.
Alright. All shapes.
Okay? In the computational domain, it should be
approximated by polygons, All shapes are.
So when you start looking at any shape in here, you want to start thinking about,
okay, I can have a very high degree polygon, but the point is that ultimately,
whatever shape I pick in here, this shape is going be a connect the dots.
So we're never going to get that far away from connect the dots,
Right? So I have a complicated shape. Just a matter of how many points you want to
put on connect the dots. Okay?
Finally, My biggest advice to you, use a commercial
package. This is so unacademic advice, right?
Normally, they'd say up here, well, just for the good of your education, you should
write your own. It's like, yeah, I'm not writing my own.
I'm telling you that right now. Okay.
If your adviser asks, like, what did he say?
Just say oh, no, He says we should write our own, just, you
know, on our free time over Christmas break.
That will make him happy. Oh, okay, that's good academic advice.
All right.