16.90 lecture 16 - 18 the finite element method for 1d ... · mit 16.90 spring 2014 the finite...

17
16.90 Lecture 16 - 18: The Finite Element Method for 1D Diffusion Today’s Topics 1. Key ideas 2. Brief history 3. 1D linear elements 4. The nodal basis 5. FEM derivation and implementation for 1D diffusion

Upload: others

Post on 18-Jul-2020

29 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

16.90 Lecture 16 - 18:The Finite Element Method for 1D Diffusion

Today’s Topics

1. Key ideas

2. Brief history

3. 1D linear elements

4. The nodal basis

5. FEM derivation and implementation for 1D diffusion

Page 2: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

1. Key Ideas

Page 3: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

4. The Nodal Basis

Page 4: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem
Page 5: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

4. The Nodal Basis

Page 6: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

4. The Nodal Basis

Page 7: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem
Page 8: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem
Page 9: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem
Page 10: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem
Page 11: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

MIT 16.90 Spring 2014The Finite Element Method for 1D Diffusion

In-class exercise, April 9 2014

Recall our model problem of steady heat diffusion in a rod. We model this problem asa one-dimensional PDE for the temperature, T :

(kTx)x = −f, (1)

where k = 1 is the thermal conductivity of the material and f(x) = 50ex is the heatsource per unit length. The physical domain for the problem is from x = −1 to x = 1.The boundary conditions specify that the temperatures at the ends of the rod are to bemaintained at T (±1) = 100.

The exact solution for this problem is

T = −50ex + 50x sinh(1) + 100 + 50 cosh(1). (2)

1 The solution approximation

Let’s discretize the domain into Ne elements. What is the approximation of the solutionusing the nodal basis?

1

Page 12: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

2 Derive the weighted residual

First, write down the expression for the residual:

Now, let’s derive the weighted residual:

2

Page 13: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

3 Evaluate the entries in the stiffness matrix

Let’s evaluate the term ∫ L/2

−L/2φjx kT̃x dx

3

Page 14: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

4 Form the stiffness matrix

Sketch out the form of the stiffness matrix for the case Ne = 5:

4

Page 15: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

5 Evaluate the forcing term

Evaluate the term in the residual that involves the heat source f(x).

5

Page 16: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

6 Implement the code

Download the shell code fem dif1d shell.m from Hint: The most efficient way toform the stiffness matrix is to loop over elements. If we loop over elements, what is thepattern we need to fill in on each loop?

6

Course Website.

Page 17: 16.90 Lecture 16 - 18 The Finite Element Method for 1D ... · MIT 16.90 Spring 2014 The Finite Element Method for 1D Di usion In-class exercise, April 9 2014 Recall our model problem

MIT OpenCourseWarehttp://ocw.mit.edu

16.90 Computational Methods in Aerospace EngineeringSpring 2014

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.