Download presentation
Presentation is loading. Please wait.
Published byJulian Banks Modified over 9 years ago
1
MATH 212 NE 217 Douglas Wilhelm Harder Department of Electrical and Computer Engineering University of Waterloo Waterloo, Ontario, Canada Copyright © 2011 by Douglas Wilhelm Harder. All rights reserved. Advanced Calculus 2 for Electrical Engineering Advanced Calculus 2 for Nanotechnology Engineering Finite-Element Methods in One Dimension
2
Finite-element Methods in One Dimension 2 Outline This topic discusses an introduction to finite-element methods –Background –Justification –Uniform test functions On equally spaced points On unequally spaced points
3
Finite-element Methods in One Dimension 3 Outcomes Based Learning Objectives By the end of this laboratory, you will: –The concept of a test function –How we can approximate Laplace’s equation on unequally spaced points
4
Finite-element Methods in One Dimension 4 Background The most significant problem with finite differences: –Seldom does nature line up on a grid In 1d, finite differences form equally spaced points on a line: We need to be able to move the points around so that: –The points will match the geometry of the actual shape, and –We can add more points in areas of interest
5
Finite-element Methods in One Dimension 5 Justification In higher dimensions, examples from mechanical engineering quickly spring to mind: –The crumple zones of a car User:MrMambo
6
Finite-element Methods in One Dimension 6 Justification However, we may need this flexibility even in one dimension –Consider heat diffusion along a rod containing three regions Copper A transition from copper to aluminium Aluminium The points do not even line up with the transitions in the materials
7
Finite-element Methods in One Dimension 7 Justification We could add more points: Now we are solving a system of 41 equations and unknowns…
8
Finite-element Methods in One Dimension 8 Justification What we really want: –More points close to and in the transition Such a system is much simpler than the previous idea…
9
Finite-element Methods in One Dimension 9 Test Functions We will look at a solution that produces the same result as finite differences; however, we will be able to generalize it –The generalization can be extended to higher dimensions, too
10
Finite-element Methods in One Dimension 10 Test Functions Starting with the equally spaced intervals, define a point a piecewise constant test function for each interval:
11
Finite-element Methods in One Dimension 11 Test Functions Starting with the equally spaced intervals, define a point a piecewise constant test function for each interval:
12
Finite-element Methods in One Dimension 12 The Unknown Solution We know the solution passes through unknown points with the constraints: u(a) = u a = u 1 u(b) = u b = u 2
13
Finite-element Methods in One Dimension 13 Piecewise Linear Approximations We will approximation the solution through piecewise linear functions:
14
Finite-element Methods in One Dimension 14 Piecewise Linear Approximations We will approximation the solution through piecewise linear functions: At x 1 : 1 0
15
Finite-element Methods in One Dimension 15 Piecewise Linear Approximations We will approximation the solution through piecewise linear functions: At x 2 : 0 1
16
Finite-element Methods in One Dimension 16 Piecewise Linear Approximations We can write a similar piecewise-linear on each interval
17
Finite-element Methods in One Dimension 17 The Target Equation Next, we have Laplace’s equation in one dimension: Define: we have the equation
18
Finite-element Methods in One Dimension 18 The Integral If, it follows that for any test function (x) and therefore In this case, however, we defined and thus
19
Finite-element Methods in One Dimension 19 The Integral Consider the first test function 1 (x) :
20
Finite-element Methods in One Dimension 20 The Integral If, however, we approximate u(x) on that interval by the piecewise constant function we already have that We get no additional information!
21
Finite-element Methods in One Dimension 21 The System of Linear Equations Thus, we approximate the function u(x) by where we define on
22
Finite-element Methods in One Dimension 22 Integration by Parts However, take and performing integration by parts, we have
23
Finite-element Methods in One Dimension 23 Integration by Parts First, substituting in the first test function: which yields 11
24
Finite-element Methods in One Dimension 24 Integration by Parts Now, given substitute our approximation: Remember that on the interval of interest,
25
Finite-element Methods in One Dimension 25 Integration by Parts Differentiating and substituting in the two approximations yields but as the denominators are equal (equal width intervals), this simplifies to This is the exact same linear equation we got from Laplace’s equation using finite differences
26
Finite-element Methods in One Dimension 26 The System of Linear Equations If we were to repeat this at each interval, we would have: This has the regular solution which is a straight line…
27
Finite-element Methods in One Dimension 27 Unequally Spaced Points What this tells us, however, is that we have a method that can allow us to use arbitrary sized intervals:
28
Finite-element Methods in One Dimension 28 The Test Functions The most obvious generalization is to use similar test functions:
29
Finite-element Methods in One Dimension 29 The Equations The most obvious generalization is to use similar test functions:
30
Finite-element Methods in One Dimension 30 The Equations Assuming the width of the intervals are either h or 2h, we get:
31
Finite-element Methods in One Dimension 31 The Equations Multiply by h :
32
Finite-element Methods in One Dimension 32 The Equations This gives us the system of linear equations
33
Finite-element Methods in One Dimension 33 The Equations Solving this yields points on a straight line
34
Finite-element Methods in One Dimension 34 Summary We have looked an alternate approach to approximating solutions to partial differential equations –Used test functions –Used integration by parts –The result gave us a system of linear equations –The solution was an approximation In this case, with Laplace’s equation in one dimension, it was exact
35
Finite-element Methods in One Dimension 35 What’s Next? We will next consider –Replacing Laplace’s equation with Poisson’s equation –Use non-uniform test functions Tent functions
36
Finite-element Methods in One Dimension 36 References [1]Glyn James, Advanced Modern Engineering Mathematics, 4 th Ed., Prentice Hall, 2011, §§9.2-3.
37
Finite-element Methods in One Dimension 37 Usage Notes These slides are made publicly available on the web for anyone to use If you choose to use them, or a part thereof, for a course at another institution, I ask only three things: –that you inform me that you are using the slides, –that you acknowledge my work, and –that you alert me of any mistakes which I made or changes which you make, and allow me the option of incorporating such changes (with an acknowledgment) in my set of slides Sincerely, Douglas Wilhelm Harder, MMath dwharder@alumni.uwaterloo.ca
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.