You are on page 1of 27

Applications of Numerical Methods in Engineering

CNS 3320
James T. Allison
University of Michigan
Department of Mechanical Engineering
January 10, 2005
University of Michigan Department of Mechanical Engineering
Applications of Numerical Methods in Engineering
Objectives:
Motivate the study of numerical methods through discussion of
engineering applications.
Illustrate the use of Matlab using simple numerical examples.
University of Michigan Department of Mechanical Engineering January 10, 2005
Lecture Overview
Quantitative Engineering Activities: Analysis and Design
Selected Categories of Numerical Methods and Applications
Linearization
Finding Roots of Functions
Solving Systems of Equations
Optimization
Numerical Integration and Dierentiation
Selected Additional Applications
Matlab Example: Fixed Point Iteration
Matlab Example: Numerical Integration
University of Michigan Department of Mechanical Engineering January 10, 2005
Quantitative Engineering Activities: Analysis and Design
Engineering: Solving practical technical problems using scientic and
mathematical tools when available, and using experience and intuition
otherwise.
Mathematical models provide a priori estimates of performance very
desirable when prototypes or experiments are costly.
Engineering problems frequently arise in which exact analytical solutions
are not available.
Approximate solutions are normally sucient for engineering applications,
allowing the use of approximate numerical methods.
University of Michigan Department of Mechanical Engineering January 10, 2005
Quantitative Engineering Activities: Analysis and Design
Analysis Predicting the response of a system given a xed system design and operating
conditions.
060 mph acceleration time of a vehicle (Mechanical Engineering)
Power output of an electric motor (Electrical/Mechanical Engineering)
Gain of an electromagnetic antenna (Electrical Engineering)
Maximum load a bridge can support (Civil Engineering)
Reaction time of a chemical process (Chemical Engineering)
Drag force of an airplane (Aerospace Engineering)
Expected return of a product portfolio (Industrial and Operations Engineering)
Design Determining an ideal system design such that a desired response is achieved.
Maximizing a vehicles fuel economy while maintaining adequate performance levels
by varying vehicle design parameters.
Minimizing the weight of a mountain bike while ensuring it will not fail structurally
by varying frame shape and thickness.
University of Michigan Department of Mechanical Engineering January 10, 2005
Categories of Numerical Methods and Applications
Linearization
Finding Roots of Functions
Solving Systems of Equations
Optimization
Numerical Integration and Dierentiation
University of Michigan Department of Mechanical Engineering January 10, 2005
Linearization
Nonlinear equations can be much more dicult to solve than linear equations.
Taylors series expansion provides a convenient way to approximate a nonlinear equation
or function with a linear equation.
Accurate only near the expansion point a.
f(x) = f(a) + f

(a)(x a) +
f

(a)
2!
(x a)
2
+ . . .
Linear approximation uses rst two terms of the expansion.
University of Michigan Department of Mechanical Engineering January 10, 2005
Linearization Example: Swinging Pendulum
Sum forces in tangential direction:

F
t
= W
t
= mgsin = ma
t
= m
d
2

dt
2
L = m



g
L
sin = 0
Linearize sin:
sin sin(0) +cos(0)( 0) =
Equation of motion valid for small
angles:


g
L
= 0
m
T
W=mg
m
W
t
W
r
University of Michigan Department of Mechanical Engineering January 10, 2005
Finding Roots of Functions
Find the value of x such that f(x) = 0
Frequently cannot be solved analytically in engineering applications.
Transcendental equations
Black-box functions
May have multiple or innite solutions
Example: static equilibrium problems must satisfy

F = 0

M = 0
University of Michigan Department of Mechanical Engineering January 10, 2005
Root Finding Example- Statically Indeterminate Structural Analysis
beam1
beam2
beam3
beamn
b
.
.
.
F
1
rod 1
rod 2
rod n
b
-1
d
nb
d
3
d
2
d
1
d
r(nb-1)
d
r2
d
r1
L
l
r1
l
r2
l
r(nb-1)
.
.
.
University of Michigan Department of Mechanical Engineering January 10, 2005
Root Finding Example- Statically Indeterminate Structural Analysis
Force applied to lower beam known
All other forces and displacements unknown
Solution process:
1. Make a guess for the force on the top beam
2. Calculate the required applied force to generate this top beam force
3. Compare to actual applied force, iterate until they match
Solve:

F
1
(F
3
) F
1
= 0
F
3
3
r2
a d
2
f
F
2
b
r1
e
1
F
1
g c

University of Michigan Department of Mechanical Engineering January 10, 2005


Solving Systems of Equations
Solve for the value of the vector x that satises the given system of equations.
Linear Systems:
a
11
x
1
+ a
12
x
2
= b
1
a
21
x
1
+ a
22
x
2
= b
2

_
a
11
a
12
a
21
a
22
_ _
x
1
x
2
_
=
_
b
1
b
2
_
Ax = b
Non-Linear Systems:
f
1
(x) = b
1
f
2
(x) = b
2
f (x) = b
University of Michigan Department of Mechanical Engineering January 10, 2005
Linear Systems Example: Circuit Analysis
Kirchhos Laws:
1. The sum of all voltage changes around any closed loop is zero:
n
e

i=1
V
i
= 0
2. The sum of all currents at any node is zero.
n
b

i=1
I
i
= 0
Application of these two laws to an electrical circuit facilitates the formulation of a system
of n linear equations when n unknown quantities exist.
University of Michigan Department of Mechanical Engineering January 10, 2005
Linear Systems Example: Circuit Analysis
Given that R
1
= 2, R
2
= 4, R
3
= 1, E
1
= 6V , E
2
= 9V , and using
equations from Loop 1, Loop 2, and Node A we nd:
6 2I
1
I
3
= 0
9 + 4I
2
I
3
= 0
I
1
+ I
2
+ I
3
= 0

_
_
2 0 1
0 4 1
1 1 1
_
_
_
_
_
I
1
I
2
I
3
_
_
_
=
_
_
_
6
9
0
_
_
_
Ax = b
Loop 1 Loop 2
Node A
Node B
R
1
R
3
R
2
I
1
I
3
I
2
1 2
University of Michigan Department of Mechanical Engineering January 10, 2005
Linear Systems Example: Circuit Analysis
Matlab Implementation
University of Michigan Department of Mechanical Engineering January 10, 2005
Nonlinear Systems Example: Turbine Blade Analysis
Turbine blades are components of
gas-turbine engines (used for aircraft
and electricity generation)
Subject to high temperatures, high
inertial forces, and high drag forces.
Commonly constructed of
monocrystalline alloys such as
Inconel.
Structural and thermal analyses
must be performed simultaneously
(coupled non-linear equations).
University of Michigan Department of Mechanical Engineering January 10, 2005
Nonlinear Systems Example: Turbine Blade Analysis
Methods apply to arbitrary non-linear
equations (black-box functions)
T(x) = f
1
(L)
L = f
2
(T(x))
w
t
L
0
x
v
g
, T
g
f
ac
Thermal
Analysis
Structural
Analysis
T(x) (temperature
profile)
L (dilated length)
University of Michigan Department of Mechanical Engineering January 10, 2005
Optimization
Find the values of the input variables to a function such that the function is minimized
(or maximized), possibly subject to constraints.
Negative Null Form:
min
x
f(x)
subject to g(x) 0
h(x) = 0
Applications:
Engineering Design
Regression
Equilibrium in Nature
University of Michigan Department of Mechanical Engineering January 10, 2005
Optimization- Engineering Design
Maximize performance criteria subject to failure constraints:
Minimize bicycle frame weight subject to structural failure constraints by varying frame
shape and thickness.
Minimize cost subject to performance and failure constraints.
Minimize vehicle cost subject to acceleration, top speed, handling, comfort, and safety
constraints by varying vehicle design variables.
University of Michigan Department of Mechanical Engineering January 10, 2005
Optimization- Regression
Regression: technique for approximating an unknown response surface (function).
Sample several points experimentally
Fit an approximating function to the data points, minimizing the error between the
approximating function and the actual data points.
Criteria for best t:
SSE =
n

i=1
(f
i


f
i
(p))
2
min
p
SSE(p)
University of Michigan Department of Mechanical Engineering January 10, 2005
Optimization- Equilibrium in Nature
Gravitational Potential Energy
Objects seek position of minimum gravitational potential energy: V = mgh
Bubbles
Energy associated with surface area.
Bubbles seek to minimize surface area spherical shape.
Many small bubble coalesce to form fewer large bubbles.
Atomic Spacing
Atoms seek positions that minimize elastic potential energy.
At large separation distances attractive forces pull atoms together (depends on
bonding type).
At small separation distances repulsive forces due to positively charged nuclei push
atoms apart.
The net force results in an energy well. The steepness of this well determines
material properties, such as thermal expansion.
University of Michigan Department of Mechanical Engineering January 10, 2005
Numerical Integration and Dierentiation
Solve:
_
b
a
f(x)dx
df(x)
dx
where f(x) is an arbitrary continuous function.
Numerical approaches may be required when:
f(x) is an analytical function that yields the integration unsolvable
f(x) is known only through discretely sampled data points
University of Michigan Department of Mechanical Engineering January 10, 2005
Numerical Integration Example: Falling Climber
Falling rock climber possesses kinetic energy
T (energy of motion) that must be absorbed
by the belay system.
T =
_
Fdr
T at time of impact can be determined
analytically. Since F v = m
dv
dt
v, and
using the product rule
d
dt
(v v) = 2
dv
dt
v
dv v =
1
2
(v v).
Fdr = mdv v =
1
2
md(v v) =
1
2
md
_
v
2
_
T =
_
r
2
r
1
F dr =
_
v
2
2
v
2
1
1
2
md
_
v
2
_
=
1
2
m
_
v
2
2
v
2
1
_
University of Michigan Department of Mechanical Engineering January 10, 2005
Numerical Integration Example: Falling Climber
T can be determined analytically, how
the rope deects requires numerical
methods.
T = V =
_

f
0
Fdr
The rope behaves as a nonlinear spring,
and the force the rope exerts F is an
unknown function of its deection .
F() determined experimentally with
discrete samples.
Approximation of F() necessitates
numerical integration.
Solving for
f
requires a root nding
technique.
V=T
F
f
University of Michigan Department of Mechanical Engineering January 10, 2005
Numerical Integration Example: Position Calculation
Accelerometer: measures second time derivative of position.
Application: determining position from discrete set of acceleration values (robotics).
a = x =
d
2
x
dt
2
=
d x
dt
x = x
0
+
_
t
0
xdt
x = x
0
+
_
t
0
xdt
University of Michigan Department of Mechanical Engineering January 10, 2005
Numerical Dierentiation Example: Solid Mechanics
Objective: Determine stress within a loaded
object to predict failure.
Constitutive Law:
= E = E
du
dx
Photoelasticity Example:
Displacement u determined experimentally at
discrete points, facilitating the calculation of
du
dx
and .
University of Michigan Department of Mechanical Engineering January 10, 2005
Selected Additional Applications
Numerical solutions to dierential
equations
Finite Dierence Method
Computational Fluid Dynamics
(NavierStokes Equations)
Dynamics (Newton-Euler &
Lagranges equations)
Finite Element Method
Solid Mechanics (Elasticity
equations)
Heat Transfer (Heat equation)
Kinematics Simulation
Complex System Optimization
University of Michigan Department of Mechanical Engineering January 10, 2005

You might also like