Lecture01 - Universidad Interamericana de Puerto Rico

Download Report

Transcript Lecture01 - Universidad Interamericana de Puerto Rico

Lecture
1
Numerical Methods for Engineering
MECN 3500
Department of Mechanical Engineering
Inter American University of Puerto Rico
Bayamon Campus
Dr. Omar E. Meza Castillo
[email protected]
http://www.bc.inter.edu/facultad/omeza
Inter - Bayamon
MECN 3500
Syllabus
 Catalog Description: Study of errors in
calculations.
Analysis of the numerical
methods used in engineering problem solving.
Emphasis on the solution of linear and non
linear equation systems, arrangement of
curves,
interpolation,
integration
and
derivation
by
numerical
approximation,
numerical integration of differential equations
and techniques of optimization. Application of
computerized programs for problem solving.
 Prerequisites: MATH 3400 – Differential Equation
MECN 3110 – Fluid Mechanics and Application
MECN 3135 – Solid Mechanics.
 Course Text: Chapra , S and Canale, R, Numerical
Methods For Engineering, 4th. Ed. McGraw-Hill
2002.
2
Lecture 1
Inter - Bayamon
MECN 3500
Syllabus
 Absences: On those days when you will be absent,
find a friend or an acquaintance to take notes for
you or visit Blackboard. Do not call or send an email the instructor and ask what went on in class,
and what the homework assignment is.
 Homework assignments: Homework problems will
be assigned on a regular basis. Problems will be
solved using the Problem-Solving Technique on
any white paper with no more than one problem
written on one sheet of paper. Homework will be
collected when due, with your name written
legibly on the from of the title page. It is graded
on a 0 to 100 points scale. Late homework (any
reason) will not be accepted.
3
Lecture 1
Inter - Bayamon
MECN 3500
Syllabus
 Problem-Solving Technique:
A. Known
B. Find
C. Assumptions
D. Schematic
E. Analysis, and
F. Results
 Quiz : There are four partial quizes during the
semester.
 Partial Exams and Final Exam: There are three
partial exams during the semester, and a final
exam at the end of the semester.
4
Lecture 1
Inter - Bayamon
MECN 3500
Syllabus
 The total course grade is comprised of homework
assignments, quiz, partial exams, final exam, and
design project as follows:
 Homework
10%
 Quiz
10%
 Partial Exam
30%
 Project 1
15%
 Final Project
15%
 Final Exam
20%

100%
 Cheating: You are allowed to cooperate on
homework by sharing ideas and methods. Copying
will not be tolerated. Submitted work copied from
others will be considered academic misconduct
and will get no points.
5
Lecture 1
Inter - Bayamon
Syllabus
 Most Course Material (Power Point
Lectures and homework) will posted every
week or two on Web Page of the course
MECN 3500:
http://facultad.bayamon.inter.edu/omeza/
 Office Hours: F137
 Monday and Wednesday: 11:00-12:00 p.m.
MECN 3500
 Contact Email: [email protected]
6
Lecture 1
Inter - Bayamon
Tentative Lectures Schedule
Topic
Lecture
Mathematical Modeling and Engineering Problem Solving
1
Introduction to Matlab
Numerical Error
Root Finding
System of Linear Equations
Least Square Curve Fitting
Polynomial Interpolation
Numerical Integration
MECN 3500
Ordinary Differential Equations
7
Lecture 1
Inter - Bayamon
Reference



MECN 3500

Rao Singiresu S, Applied Numerical Methods for
Engineers and Scientists, Prentice Hall, 2002.
Fausett, Laurene V, Numerical Methods: Algorithms and
Applications, Prentice Hall, 2003.
John H. M, Kurtis K. F, Numerical Methods Using Matlab,
4th. Ed., Prentice Hall, 2004.
Mathews, J. H., Numerical Methods for Mathematics,
Science, and Engineering, Prentice Hall, 2000.
8
Lecture 1
Inter - Bayamon
"Lo peor es educar por métodos basados
en el temor, la fuerza, la autoridad,
porque se destruye la sinceridad y la
confianza, y sólo se consigue una falsa
sumisión”
Einstein Albert
Mathematical Modeling and
Engineering Problem Solving
MECN 3500
Introduction
9
Lecture 1
Inter -del
Bayamon
Turabo
Universidad
3500
MECN
Systems Design
Thermal
Course Objectives
 To introduce the mathematical modeling
and its role in engineering problem
solving.
 To understand the advantages and
disadvantages the numerical methods.
10
Lecture 1
Inter - Bayamon
MECN 3500
Introduction
Why Do We Need Numerical Methods?
 Solution of engineering and scientific
problems can be done by theory or
experiment.
 An important third way is by computation
 There are many problems which simply do
not have analytical solutions, or those
whose exact solution is beyond our current
state of knowledge.
 There are also many problems which are
too long (or tedious) to solve by hand
 When numerical answers are required one
sometimes needs to rely on approximate
methods to obtain useable answers
10
Lecture 1
Inter - Bayamon
MECN 3500
Analytical and Numerical Solutions
 Numerical methods are techniques by
which
mathematical
problems
are
formulated so that they can be solved with
arithmetic operations
Numerical
Analytical
approximate
exact
more intuitive
less intuitive
easily coded
not so easy
easy to get
not so easy
11
Lecture 1
Inter - Bayamon
The Engineering Problem Solving Process
 Requires understanding
engineering systems

MECN 3500

By
observation
experiment
Theoretical
analysis
generalization
of
and
and
 Computers are great tools,
however,
without
fundamental understanding
of
engineering
problems,
they will be useless.
 Simple mathematical models
can be solved with pencil and
paper.
Realistic
models
usually
require
computer
solution.
12
Lecture 1
Inter - Bayamon
A Simple Mathematical Model
 A mathematical model is represented as a
functional relationship of the form
Dependent
Variable
=f


MECN 3500


independent
forcing
variables,
parameters, functions
Dependent variable: Characteristic that usually
reflects the state of the system
Independent variables: Dimensions such as time and
space along which the systems behavior is being
determined
Parameters: reflect the system’s properties or
composition
Forcing functions: external influences acting upon
the system
13
Lecture 1
Inter - Bayamon
Newton’s 2nd Law of Motion
 States that “the time rate change of
momentum of a body is equal to the
resulting force acting on it.”
 The model is formulated as
F=ma
(1.2)
MECN 3500
 F=net force acting on the body (N)
 m=mass of the object (kg)
 a=its acceleration (m/s2)
14
Lecture 1
Inter - Bayamon
MECN 3500
Newton’s 2nd Law of Motion
 Formulation of Newton’s 2nd Law has several
characteristics that are typical of mathematical
models of the physical world:
 It describes a natural process or system
in mathematical terms
 It
represents
an
idealization
and
simplification of reality
 Finally, it yields reproducible results,
consequently, can be used for predictive
purposes.
 Some mathematical models of physical
phenomena may be much more complex.
15
Lecture 1
Inter - Bayamon
Newton’s 2nd Law of Motion
 Complex models may not be solved exactly
or require more sophisticated mathematical
techniques than simple algebra for their
solution
MECN 3500
 Example,
modeling
parachutist:
of
a
falling
Schematic diagram of
the forces acting on a
falling parachutist. FD
is the downward force
due to gravity. FU is
the upward force due
to air resistance
16
Lecture 1
Inter - Bayamon
Newton’s 2nd Law of Motion
dv
F
a

dt
m
F  FD  FU
FD  mg
MECN 3500
FU  cv
dv mg  cv

dt
m
17
Lecture 1
Inter - Bayamon
Newton’s 2nd Law of Motion
dv
c
g v
dt
m
(1.9)
MECN 3500
 This is a differential equation and is written
in terms of the differential rate of change
dv/dt of the variable that we are interested
in predicting.
 If the parachutist is initially at rest (v=0 at
t=0), using calculus
Independent

Dependent
variable
gm
( c / m ) t
v( t ) 
1 e
c
Forcing
function
18

variable
(1.10)
Parameters
Lecture 1
MECN 3500
20
Lecture 1
Inter - Bayamon
Inter - Bayamon
Analytical Solution of the Falling Parachutist Problem
Example 1.1
 Problem Statement: A parachutist of mass
68.1 kg jumps out of a stationary hot air
balloon. Use Eq. (1.10) to compute velocity
prior to opening the chute. The drag
coefficient is equal to 12.5 kg/s.
 Solution: Inserting the parameters into Eq.
(1.10) yields
MECN 3500



(9.8)(68.1)
v( t ) 
1  e (12.5 / 68.1) t  53.39 1  e 0.18355t
12.5
21
Lecture 1

Inter - Bayamon
MECN 3500
Analytical Solution of the Falling Parachutist Problem
 We can use to compute
t,s
v,m/s
0
0.00
2
16.40
4
27.77
6
35.64
8
41.10
10
44.87
12
47.49
Infinite
53.39
Terminal Velocity
The analytical or exact
solution to the falling
parachutist
problem
shows that velocity
increases with time
and
asymptotically
approaches a terminal
velocity.
22
Lecture 1
Inter - Bayamon
MECN 3500
Analytical vs. Numerical Solution
 The previous solution is analytical,
meaning that it is supplied by a single
simple formula
 We
can
solve
this
problem
also
numerically
 Numerical solutions generalize
 What if the drag is not linear in the
velocity?
 As
mentioned
previously,
numerical
methods
are
those
in
which
the
mathematical problem is reformulated so
it can be solved by arithmetic operations.
23
Lecture 1
Inter - Bayamon
Analytical vs. Numerical Solution
vt i 1 
True Slope
dv / dt
v
Approximate Slope
MECN 3500
vt i 
v vt i 1   vt i 

t
t i 1  t i
The use of a finite
difference to approximate
the first derivative of v
with respect to t
t i 1
ti
t
24
Lecture 1
Inter - Bayamon
Analytical vs. Numerical Solution
 The Newton’s second law by realizing that the
time rate of change of velocity can be
approximated by:
dv v vt i 1   vt i 


dt
t
t i 1  t i
(1.11)
dv
v
 lim
 t 0  t
dt
MECN 3500
 The equation (1.11) is called a finite divided
difference approximation of the derivative at
time ti. It can be substituted into Eq. (1.9) to
give
vt i 1   vt i 
c
g
vt i 
t i 1  t i
m
25
Lecture 1
Inter - Bayamon
Analytical vs. Numerical Solution
 This equation can then rearranged to yield
c


vt i 1   vt i   g 
vt i  t i 1  t i  (1.12)
m


MECN 3500
slope
 If you are given an initial value for velocity
at some time ti, you can easily compute
velocity at a later time ti+1. This new value
of velocity at ti+1 can in turn be employed
to extend the computation to velocity at ti+2
and so on. Thus, at any time along the way,
 New value = old value + slope x step size
 This approach is formally called Euler’s
Method
26
Lecture 1
MECN 3500
27
Lecture 1
Inter - Bayamon
Inter - Bayamon
MECN 3500
Numerical Solution of the Falling Parachutist Problem
Example 1.2
 Problem Statement: Perform the same
computation as in Example 1.1 but use Eq.
(1.12) to compute the velocity. Employ a
step size of 2 for the calculation.
 Solution: At the start of computation (ti=0),
the velocity of the parachutist is zero.
Using this information and the parameter
values from example 1.1 , Eq. (1.12) can be
used to compute velocity at ti+1=2s.
12.5

0  2   19.60 m / s
v  0  9.8 
68.1


28
Lecture 1
Inter - Bayamon
Numerical Solution of the Falling Parachutist Problem
 For the next interval (from t=2 to 4s), the
computation is repeated, with the result
12.5

19.60  2   32.00 m / s
v  19.60  9.8 
68.1


MECN 3500
 The calculation is continued in a similar
fashion to obtain additional values:
29
Lecture 1
Comparison Analytical vs. Numerical
60
t,s
v,m/s
0
0.00
2
19.60
4
32.00
6
39.85
8
44.82
10
47.97
12
49.96
Infinite
53.39
Terminal Velocity
50
40
Velocity (m/s)
Inter - Bayamon
MECN 3500
Numerical Solution of the Falling Parachutist Problem
30
Analytical
Numerical
20
10
0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17
Time (s)
30
Lecture 1
Inter - Bayamon
MECN 3500
Homework1  www.bc.inter.edu/facultad/omeza
Omar E. Meza Castillo Ph.D.
31
Lecture 1