Sunteți pe pagina 1din 60

MAE 107:

COMPUTATIONAL METHODS
FOR ENGINEERS
Summer Session II
Sbastien MICHELIN
Mechanical & Aerospace Engineering Department
University of California, San Diego
Teaching staff
! Instructor: Sbastien Michelin
Ofce: EBU2 Room 378
Contact: (858)-534-1466 - smichelin@ucsd.edu
Webpage: http://iacs5.ucsd.edu/~smicheli/
Ofce hours: Mondays and Wednesdays 9a-10a or by appointment
! Teaching Assistants:
- Robert Krohn
Contact: rhkrohn@ucsd.edu
Ofce hours: Thursdays 10a-11a (EBU2 Room 105)
- Krishna Sriram
Contact: ksriram@ucsd.edu
Ofce hours: Tuesdays 3p-4p (EBU2 Room 305)
! Reader: Matthew Frey
Contact: mbfrey@ucsd.edu
Class schedule
! Lectures: Mondays and Wednesdays 2p-4.50p - Center Hall Room 105
! Final Exam: Friday September 4, 2p-5p - Location TBD
! Ofce hours:
Instructor: Mondays & Wednesdays - EBU2 Room 378
TA (R. Krohn): Thursday 10a-11a - EBU2 Room 105
TA (K. Sriram): Tuesdays 3p-4p - EBU2 Room 305
! Matlab & Problem Sessions:
Group assignment: see
class website
Matlab Sessions
Week 1
Problem Sessions -
Weeks 2-5
Group A
Tues. 5p-6.30p
(EBU2 Room 205)
Tues. 2p-3p
(EBU2 Room 305)
Group B
Thurs. 11a-12.30p
(EBU2 Room 205)
Thurs. 11a-12p
(EBU2 Room 105)
Group C
Fri. 2p-3.30p
(EBU2 Room 205)
Fri. 2p-3p
(EBU2 Room 105)
Ressources
! Class website: http://maecourses.ucsd.edu/~smicheli/mae107-s209/
! Required textbook & material:
- Applied Numerical Methods with MATLAB for Engineers and Scientits by S.
C. Chapra, Mc Graw Hill, 2nd edition
! On reserve at the S&E Library:
- Applied Numerical Methods with MATLAB for Engineers and Scientits by S.
C. Chapra, Mc Graw Hill, 2nd edition
- Numerical Computation in Science & Engineering, by C. Pozrikidis, Oxford
University Press, 1998
- MATLAB: An introduction with Applications, by A. Gilat, Wiley, 2rd edition
MATLAB
! This class will require the use of the MATLAB software to program
short routines and programs.
! You need to have access to MATLAB as soon as possible!
! MATLAB is installed on ACS machines that you can access with your
student accounts in the ACS labs (e.g. EBU2 Rooms 203, 205, 239)
! You can also purchase the student version of MATLAB to install on
your personal laptop/desktop (on sale at the UCSD bookstore ~$100)
Scope and objectives of the class
! Introduction to scientic computing and programming with MATLAB
! Numerical solution of engineering and physical problems.
! The following topics and fundamental numerical techniques will be covered:
1. Introduction to scientic computing and MATLAB
2. Systems of linear equations
3. Root-nding and solution of non-linear equations
4. Function interpolation
5. Numerical integration & differentiation
6. Solution of Ordinary Differential Equations
7. Numerical regression of data sets
! Prerequisites: Engineering majors and grade of C- (or better) in MAE 9 and
Math 20F
General lecture schedule
& required reading
! Week 1: Introduction to Scientic Computing and introduction to MATLAB
Reading: Chapters 1, 2, 3 &4 in textbook
! Week 2: Linear systems of equations & Matrix inversion
Reading: Chapters 8, 9, 10, 11 & 12 in textbook
! Week 3: Root-nding & non-linear equations - Function interpolation
Reading: Chapters 5, 6, 12, 15 & 16 in textbook
! Week 4: Numerical integration & differentiation - ODEs (1)
Reading: Chapters 17, 18 & 19 in textbook
! Week 5: ODEs (II) - Data regression
Reading: Chapters 20, 13 & 14 in textbook
Required work
! Reading assignment:
Required readings assigned in the textbook.
Some optional/recommended readings assigned in the books on reserve.
! Homework problems:
4 homework assignments due on Wednesdays at the end of class.
Format: Questions/Problems on the numerical methods studied in class and
possible extensions + programming short routines in MATLAB.
Turn in a printed version of your codes as well as their output.
! Quizzes:
4 quizzes on Mondays at the beginning of class
Format: Multiple Choice or short questions - no more than 15 min
Goal: allow you to identify the subjects of the previous lectures that require more
study time before moving on to another topic.
! Midterm & Final Exams
- Midterm - Wednesday Aug. 19: 1h30 in class - closed book/notes
(Material: lecture & reading assignments up to Mon Aug. 17 + HW 1&2)
- Final - Friday Sept 4: 3 hours - closed book/notes
(Material: all lecture & reading assignments, all HWs & quizzes)
Assignment & Exam schedule
! Week 1: Introduction to Scientic Computing and introduction to MATLAB
- Monday, Aug. 3:
- Wednesday, Aug. 5:
! Week 2: Linear systems of equations & Matrix inversion
- Monday, Aug. 10: Quizz #1
- Wednesday, Aug. 12: Homework #1 due
! Week 3: Root-nding & non-linear equations - Function interpolation
- Monday, Aug. 17: Quizz #2
- Wednesday, Aug. 19: Homework #2 due - Midterm exam
! Week 4: Numerical integration & differentiation - ODEs (1)
- Monday, Aug. 24: Quizz #3
- Wednesday, Aug. 26: Homework #3 due
! Week 5: ODEs (II) - Data regression
- Monday, Aug. 31: Quizz #4
- Wednesday, Sept. 2: Homework #4 due
- Friday, Sept. 4: Final exam
Grading & evaluation policy
! Final grade: Quizzes (5%), Homeworks (20%), Midterm (30%) and Final (45%).
! Late homeworks: half credit if the homework is turned in late but before
Thursday at 10a in the instructors ofce. Zero grade afterward.
! In homeworks and exams: to obtain full credit, clearly justify your answers. A
result with no proof will only receive partial credit.
! Make-up exam: only for medical reason with proper documentation.
! Regrading: submit a request in writing to the instructor within one week of
getting your assignment back. Include a clear justication of why you think your
work should be regraded.
Also keep in mind that your entire assignment could be re-considered for
regrading and your grade will be modied (up or down) accordingly.
Academic dishonesty
! I remind you the Universitys policy on the matter:
http://www-senate.ucsd.edu/manual/Appendices/app2.html
! Any student caught cheating will have to face the academic consequences.
! Homeworks: you are allowed to discuss the problems among each others but
the work you turn in should be your own.
! Exams: no collaboration or discussion of any kind is allowed. Closed-books and
closed-notes exams.
Some recommendations
! Try not to fall behind in your studying/reading: the Summer Session goes fast!
! If you have questions, seek help from the instructor or the TAs during ofce
hours: do not wait until Finals week!
! Start thinking about the homework problems early!
! Get used to MATLAB as soon as possible (this week).
! When writing a MATLAB code, make a generous use of comments.
! To ensure the proper grading of your assignment or exam: do not forget to
staple all papers and clearly indicate your name on it.
! Please turn off your cellphones and restrict your use of laptop computers to
matters exclusively related to the class.
Questions?
Introduction to scientic computing
in engineering problems
MAE 107: Computational methods in engineering
Lecture Outline
I. Solving an engineering problem
1. Examples of engineering problems and general form
2. Four important steps to model an engineering problem
3. Four possible sources of errors
4. Constraints on scientic computing
II. Numerical methods - importance and overview
1. What are numerical methods?
2. Why should we study numerical methods?
3. Why Matlab?
4. Overview of the numerical methods studied in this class
Engineering problems - Some examples
A single system can correspond to a large variety of
engineering problems:
! Mechanical engineering: lift generation,
trajectory control....
! Chemical engineering: propellant combustion
and temperature control in the reactors...
! Structural engineering: material resistance to
vibrations, heat or shocks,....
! Electrical engineering: design and response of
the ight commands...
Space shuttle launch
Airbus jumbo jet A380
Experiments & numerical simulation
in engineering problems
!
When studying a physical system, experiments can be
performed to obtain some information on its behavior
(wind tunnel, static resistance test, probes, in-ight
measurements...).
!
However not all the systems characteristics can be
studied experimentally (stress distribution,
temperature distribution inside the engine, ow prole
around the wing in in-ight conditions)
!
For some large systems, experiments are also difcult
to perform (e.g. you can not t an A380 in a wind
tunnel! instead use reduced-size models).
Airbus jumbo jet A380
Numerical simulations are useful to access information that is not available from
experiments.
Numerical simulations must be validated against some experimental data.
Engineering problems - General denition
General objective in solving an engineering problem:
Given a physical system on which some measurements can be
performed, nd a model that describes the behavior of the system
and can be validated against some test experiments, and use it to
predict some characteristics of interest.
Why are computers necessary?
Most engineering systems are too complex to be solved by hand, and the
computational power of modern computers is an essential element of an
engineers life.
Simulation of the ow past a sphere (top) and an
airfoil (bottom) (from NCAR website)
Large systems Continuous systems
Viaduc in Millau (France)
Example: structural resistance of a bridge
Measurements:
describe the geometry,
material properties
Finite element
model:
discrete representation of the
bridge
Numerical
algorithm
Stresses
prediction
Numerical solution
Numerical
methods
Physical
validation
Physical description
and modeling
Engineering problems
Data Model
Experimental
expertise
Statistics &
data analysis
Physics &
Mechanics
Mathematics
Numerical
analysis
Computer
programming
Other examples
Americas Cup race boats design
Schooling of shes and collective locomotion
(from National Geographic)
Flying with exible wings
(from Thomas et al., J. Exp. Biol., 2004)
(from Combes & Daniel, J. Exp. Biol., 2003)
Numerical simulation is an important tool to create models of engineering or
biological systems to understand their properties or optimize a design.
Lecture Outline
I. Solving an engineering problem
1. Examples of engineering problems and general form
2. Four important steps to model an engineering problem
3. Four possible sources of errors
4. Constraints on scientic computing
II. Numerical methods - importance and overview
1. What are numerical methods?
2. Why should we study numerical methods?
3. Why Matlab?
4. Overview of the numerical methods studied in this class
Four steps to model an engineering problem
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
A simple example: golf ball trajectory
How far does the golf ball travel before hitting the ground?
Given an initial swing velocity U, what is the optimal angle ! to
maximize this distance?
U

Four steps to model an engineering problem


A. Physical description
- identify the important physical phenomena
- give an accurate description of the system
- make relevant assumptions
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
Golf ball trajectory: physical description

U
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
! Physical description of the problem
Measurements of the ball characteristics: radius, mass M, surface structure...
Approximation: represent the ball as a perfect sphere (only an approximation!)
Swing characteristics: initial velocity U, initial angle !.
! What are the forces applied on the ball after it is hit? How signicant are they?
Weight
Air resistance
Lift force
Coriolis force
Wind effect
Mg ("z<<R
earth
: assume uniform g)
quadratic drag -c|v|v (neglect surface structure effect)
neglect ball spin
neglect Earth rotation on this time-scale
assume no wind
Four steps to model an engineering problem
A. Physical description
B. Mathematical formulation
- translate the physical ideas into mathematical
equations (e.g. write conservation laws)
- use the physical assumptions to simplify the
model as necessary
C. Solution of the mathematical model
D. Interpretation and validation
Golf ball trajectory: mathematical formulation

U
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
! Parameters:
! Variables:
! Physical principle: conservation of momentum (Newton second law)
! Initial conditions:
M
d
2
x
dt
2
=

F
ext
=M
d
2
x
dt
2
= M
dv
dt
= Mg c|v|v
Mass M, radius a, drag coecient c =
a
2
2
C
D
Position x = (x, y), velocity v = ( x, y)
x(t = 0) = (0, 0), v(t = 0) = (U cos , U sin)
Can we neglect the quadratic drag?
?
Simplication: how much is too much?
While modeling a physical system, some assumptions are introduced to
simplify its formulation. How much should the problem be simplied?
!
If the model is too simplied, some of the physics will be lost and the
solution might not be accurate or relevant for the application
considered.
!
If the model is not simplied enough, its solution can be difcult (or
impossible) to obtain, even on a modern computer.
Depending on the application and the computational time we can dedicate
to it, the level of simplication will be varied.
In general, it is a good idea to start with a very simplied model to obtain
a rst idea on the problem and then iterate on more complex
representations to arrive to an accurate description.
Golf ball trajectory: mathematical formulation

U
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
! Parameters:
! Variables:
! Simplied equations of motion
Mass M, radius a, drag coecient c =
a
2
2
C
D
Position x = (x, y), velocity v = ( x, y)

x = 0
y = g

x(t = 0) = 0, x(t = 0) = U cos


y(t = 0) = 0, y(t = 0) = U sin
Four steps to model an engineering problem
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
- analytical solution if the problem is simple
enough (very rare!)
- numerically in most cases.
D. Interpretation and validation

U
Golf ball trajectory: solution
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
Analytical solution
x(t) = Ut cos , y(t) = Ut sin
1
2
gt
2
According to this model, the optimal angle is !=#/2.

x = 0
y = g

x(t = 0) = 0, x(t = 0) = U cos


y(t = 0) = 0, y(t = 0) = U sin

U
D
Maximum distance D (nd t
f
such that y(t
f
)=0; then x(t
f
)=D)
t
f
=
2U sin
g
, D =
U
2
sin 2
g
Four steps to model an engineering problem
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
- check if the result of the model makes sense physically
- identify (and quantify) the possible sources of errors
This step is essential: no matter how elegant the model or the solution
are, they are worthless if they are not a good description of the initial
problem.
Golf ball trajectory: validation

U
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
x(t) = Ut cos , y(t) = Ut sin
1
2
gt
2
t
f
=
2U
2
sin
g
, D =
U
2
sin 2
g
According to this model, the total energy of the ball is conserved (kinetic +
potential): when the ball hits the ground it has the same velocity as initially!!!
Something is wrong in our model: aerodynamic drag can not be neglected at such
high velocities: go back to step B and add the drag!
Golf ball trajectory: solution

U
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
There is no analytical solution, we need to solve this equation
numerically (see section on ODE later in the class)

M
d
2
x
dt
2
= c

x
2
+ y
2
x
M
d
2
y
dt
2
= Mg c

x
2
+ y
2
y

x(t = 0) = 0, x(t = 0) = U cos


y(t = 0) = 0, y(t = 0) = U sin
Results with friction
Without any air friction, the ball would travel 490 m before hitting the ground!
Including a quadratic drag to represent the effect from the air, this distance is
reduced to ~ 223 m
m = 46 g, a = 2.1 cm, c = 0.25
U = 70 ms
1
, = 45

,
g = 9.8 ms
2
, = 1kg m
3
0 50 100 150 200 250
!50
0
50
100
150
x
y


with friction
no friction
Optimal angle
The optimal angle for maximum distance has changed: the golfer should give
the ball an initial angle lower than 45
o
(about 38
o
in this case)
0 20 40 60 80
0
0.2
0.4
0.6
0.8
1
1.2
! (degrees)
D
/
D
m
a
x


with friction
no friction
Possible improvements on this model
If a more precise answer is needed or to validate our simplications, it is
important to understand the approximations that we made here:
!
we neglected rotation: an additional lift is present due to Magnus
effect.
!
we neglected the structured surface of the ball
!
we neglected the wind
!
we neglected the variations of the drag coefcient in time (the ball
slows down)
!
we neglected the variations of g with height
!
we neglected Coriolis effects....

U
A. Physical description
B. Mathematical formulation
C. Solution of the mathematical model
D. Interpretation and validation
It is important to keep in mind the different sources of errors in the
problem and the reason why the different assumptions were made.
Lecture Outline
I. Solving an engineering problem
1. Examples of engineering problems and general form
2. Four important steps to model an engineering problem
3. Four possible sources of errors
4. Constraints on scientic computing
II. Numerical methods - importance and overview
1. What are numerical methods?
2. Why should we study numerical methods?
3. Why Matlab?
4. Overview of the numerical methods studied in this class
Four possible sources of errors
Measurements: Finite element
model
Numerical algorithm
Stresses
prediction
Numerical solution
Numerical
methods
Physical
validation
Physical description
and modeling
!
Measurement error
!
Modeling error
!
Truncation error
!
Round-off error
Four possible sources of errors
A. Measurement error
!
Any instrument has a limit on its precision, and an experimental result is
always obtained with a tolerance: e.g. 20.2 0.1 cm
B. Modeling error
!
Difference between the real system and the simplied description used.
!
Example of the bridge: representing the elements as homogeneous or
with a simplied geometry.
!
Example of the golf ball: neglecting the aerodynamic drag
Four possible sources of errors
C. Truncation error (see lecture on Wednesday)
!
This error arises due to the discrete or iterative nature of the numerical
methods used.
!
For example, an iterative scheme can be developed to obtain the physical
quantity G.
-
If the scheme is well-designed then G(n) approaches the true
value of G
0
when n!$.
-
However, we always have to stop at a nite value of n=N.
The truncation error is the difference between G(N) and G($).
!
A truncation error also arises when approximating a continuous quantity
by a discrete form or a derivative by a discrete limit:
D. Round-off error (see lecture on Wednesday)
!
This error is intrinsic to the use of a computer.
!
A computer does not use the real number but nite-precision numbers
(e.g. some decimals are discarded.)
df
dx

f(x +x) f(x)
x
Constraints on scientic computing
! In a modern computer, the numerical computations are done in binary
form and the actual calculation takes place in the processor.
! Before the operation can be performed, the data on which the
operation is performed must be transmitted to the processor from its
storage location.
! The cost (in time) of a computation is the result of two limitations:
- the power of the processor measured by its clock time in
operations per second
- the busing of data from the memory to the processor
Constraints on scientic computing
! There are several types of memory: they differ by their size and their
access time (time it takes to load it to the processor)
! The further from the processor, the longer the access time and the
larger the memory space.
! Large numerical codes must be optimized to minimize the time lost in
data transfer from the memory to the processor.
Processor
Cache
RAM
Secondary Memory (hard-drive)
Lecture Outline
I. Solving an engineering problem
1. Examples of engineering problems and general form
2. Four important steps to model an engineering problem
3. Four possible sources of errors
4. Constraints on scientic computing
II. Numerical methods - importance and overview
1. What are numerical methods?
2. Why should we study numerical methods?
3. Why Matlab?
4. Overview of the numerical methods studied in this class
What are numerical methods?
! A numerical method provides an approximation for a mathematical
problem using a nite number of simple arithmetic or logical
operations.
! For engineers and scientists, numerical methods are a set of recipes
to be used and combined to solve a larger problem.
! Numerical methods are very old (more than 2000 years!)
! Computers have just made them much more popular and easier to use
as computers are well designed to execute a large number of repetitive
and simple operations.
Why should we study numerical methods?
! They provide an approximation to the solutions of problems that can
not be solved analytically (i.e. most mathematical problems).
! Most (~ all) engineering problems have to be solved numerically.
! Numerical methods are the elementary pieces of any simulation
software.
! Understanding these elementary steps of a larger numerical simulation
is useful:
to understand the way computers work and how they can be used to
solve problems efciently.
to be able to modify/create your own routines.
to understand the errors generated by a code you didnt write and
its limits.
Goal of the class
! The goal of this class is
- to provide you with an introduction to a set of fundamental recipes,
- to enable you to choose the right techniques when facing a
particular mathematical equation to solve.
! The goal of the class is not to have you write a long code for a
particular engineering problem.
! Instead, the routines you will write will be direct applications of the
fundamental concepts studied in class.
Why MATLAB?
! MATLAB is a convenient and user-friendly software compared to
other scientic programming languages (C++, Fortran,...)
! MATLAB has good graphic capabilities.
! MATLAB has a lot of pre-optimized built-in functions for numerical
methods.
- In this class, we will write short routines to apply the numerical
methods well study.
- Some routines that well write already exist in MATLAB.
- The goal of the class is to understand how it works, so in general, we
wont use these built-in MATLAB functions unless specied
otherwise (e.g. validate our result).
The numerical methods we will study
! We will introduce the following fundamental techniques:
-
Systems of linear equations
-
Solution of non-linear equations
-
Data regression
-
Function interpolation
-
Numerical integration
-
Numerical differentiation
-
Solution of Ordinary Differential Equations
! These techniques are found in engineering applications by themselves
or through more elaborate numerical methods that are built on these
fundamental ones.
Systems of linear equations
What is the electric current inside resistor R
2
?
In general, we will have to solve systems of equations of the form:
_

_
a
11
x
1
+a
12
x
2
+. . . +a
1n
x
n
= b
1
a
21
x
1
+a
22
x
2
+. . . +a
2n
x
n
= b
2
.
.
.
.
.
.
a
m1
x
1
+a
m2
x
2
+. . . +a
mn
x
n
= b
m
A x = b with A =
_
_
_
_
_
a
11
a
12
. . . a
1n
a
21
a
22
. . . a
2n
.
.
.
.
.
.
a
m1
a
m2
. . . a
mn
_
_
_
_
_
, x =
_
_
_
_
_
x
1
x
2
.
.
.
x
n
_
_
_
_
_
and b =
_
_
_
_
_
b
1
b
2
.
.
.
b
n
_
_
_
_
_
i
1
i
2
i
3

2R
1
i
1
R
2
i
2
=
1

2
R
2
i
2
2R
1
i
3
=
2

3
i
1
+ i
2
+ i
3
= 0
Non-linear equations
Given the geometry and the density of the ball
relative to the water, what is the immersed
height?
In general, we will learn how to solve numerically equations of the form f(x)=0 when f is not
linear.
!! !"#$ " "#$ !
!$
"
$
!"
!$
%"
f(x) = x
6
7x
5
+ 9x
2
1
Find x such that f(x) = 0?
x
2
(3R x) =
4
ball
R
3

water
150 200 250 300
0
50
100
150
Price (in thousands $)
N
e
w

h
o
m
e

s
a
l
e
s
Data regression
How to represent the general trend
of the data?
What is the best linear t?
150 200 250 300
0
50
100
150
Price (in thousands $)
N
e
w

h
o
m
e

s
a
l
e
s
In general, experimental measurements include some noise (due to the
precision of the instruments, ...).
Data regression allows to extract from the data the general behavior by offering
an approximation of the data set.
!! !"#$ " "#$ !
!%
!!
"
!
%
&
'
!! !"#$ " "#$ !
!%
!!
"
!
%
&
'
Interpolation
In contrary to the regression problems, we are looking here for a function that
ts exactly the given points.
Interpolation is particularly useful to understand and compute integrals.
How can you t the data exactly by
a polynomial?
How to determine the value of the
function at x=0.15 for example?
0 2 4 6 8 10
0
5
10
15
20
days
P
o
w
e
r

u
s
a
g
e
Integration
Knowing the instantaneous power consumption of a household, how can you
nd the total power consumption?
E =

t
0
P(t

)dt

0 2 4 6 8 10
0
5
10
15
20
days
P
o
w
e
r

u
s
a
g
e
Differentiation
From its GPS system, an aircraft is able to determine its instantaneous
position. From this data, how can you compute numerically its velocity
(relative to the ground)?
v =
dx
dt

x(t +t) x(t)
t
Ordinary Differential Equations
dx
dt
= f (x, t), x(t = 0) = x
0
In general, we will learn how to solve numerically equations of the form:
Prey-predator system:
the populations of rabbits (x) and foxes (y) follow the following equations:
dx
dt
=
1
x
1
xy
dy
dt
=
2
y +
2
xy
Natural
Death/Birth
Prey/Predator
encounters
0 2 4 6 8 10
0
10
20
30
40
Time
P
o
p
u
l
a
t
i
o
n


Rabbit
Foxes
Other numerical methods...
Below are some examples of other numerical methods that we wont have
time to study in this class.
Partial Differential Equations
!
A generalization of ODEs to multiple dimensions (time and space)
!
Example: heat equation in 1D
Eigenvalues and eigenvectors
!
Compute the eigenvectors and eigenvalues of a matrix.
!
The solution is based on an iterative process.
!
If needed in this class, we will just use the Matlab built-in function eig.
T
t
=

2
T
x
2
Conclusions
! Numerical methods are an essential part of an engineers life.
! They allow to solve a much wider range of physical/engineering
problems than analytical methods do.
! Numerical methods are however only one part of the solution: a good
physical understanding of the problem is essential.
! Numerical methods are the elementary pieces of more complex codes
and software used for scientic simulation.
! Studying numerical methods allows one to
- understand how more complex codes work
- be able to modify an existing code or create a new one
- understand the errors/limits introduced by the numerical simulation

S-ar putea să vă placă și