Download as pdf or txt
Download as pdf or txt
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:

B Motivate the study of numerical methods through discussion of


engineering applications.

B 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 Differentiation

• 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 scientific and


mathematical tools when available, and using experience and intuition
otherwise.

B Mathematical models provide a priori estimates of performance— very


desirable when prototypes or experiments are costly.

B Engineering problems frequently arise in which exact analytical solutions


are not available.

B Approximate solutions are normally sufficient 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

BAnalysis Predicting the response of a system given a fixed system design and operating
conditions.
• 0–60 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)
BDesign Determining an ideal system design such that a desired response is achieved.
• Maximizing a vehicle’s 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 Differentiation

University of Michigan Department of Mechanical Engineering January 10, 2005


Linearization

• Nonlinear equations can be much more difficult to solve than linear equations.
• Taylor’s series expansion provides a convenient way to approximate a nonlinear equation
or function with a linear equation.
• Accurate only near the expansion point a.

0 f 00(a) 2
f (x) = f (a) + f (a)(x − a) + (x − a) + . . .
2!

• Linear approximation uses first two terms of the expansion.

University of Michigan Department of Mechanical Engineering January 10, 2005


Linearization Example: Swinging Pendulum
Sum forces in tangential direction:
X
Ft = Wt = mgsinθ = mat

d2θ
= m 2 L = mθ̈L
dt
g
⇒ θ̈ − sinθ = 0
L
Linearize sinθ :

sinθ ≈ sin(0) + cos(0)(θ − 0) = θ T

Equation of motion valid for small


angles: m m
g
θ̈ − θ = 0 Wr
L W=mg
Wt

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 infinite solutions

Example: static equilibrium problems must satisfy


X
F =0
X
M =0

University of Michigan Department of Mechanical Engineering January 10, 2005


Root Finding Example- Statically Indeterminate Structural Analysis
L

Ø dnb
beam nb
Ø dr(nb-1)
.
. rod nb-1
. .
. lr(nb-1)
.

Ø d3

beam 3
Ø dr2

rod 2 lr2

Ø d2
beam 2
Ø dr1

rod 1 lr1
Ø d1

beam 1

F1

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(F3) − F1 = 0

F3 3
2 F2 r1 1 Fˆ1
a d r2 f b e 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 satisfies the given system of equations.

Linear Systems:
    
a11x1 + a12x2 = b1 a11 a12 x1 b1
⇒ = ⇒ Ax = b
a21x1 + a22x2 = b2 a21 a22 x2 b2

Non-Linear Systems:

f1(x) = b1
⇒ f (x) = b
f2(x) = b2

University of Michigan Department of Mechanical Engineering January 10, 2005


Linear Systems Example: Circuit Analysis

Kirchhoff’s Laws:

1. The sum of all voltage changes around any closed loop is zero:
ne
X
∆Vi = 0
i=1

2. The sum of all currents at any node is zero.


nb
X
∆Ii = 0
i=1

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 R1 = 2Ω, R2 = 4Ω, R3 = 1Ω, E1 = 6V , E2 = 9V , and using
equations from Loop 1, Loop 2, and Node A we find:
    
6 − 2I1 − I3 = 0 −2 0 −1 I
 1   −6 
9 + 4I2 − I3 = 0 ⇒  0 4 −1  I2 = −9 ⇒ Ax = b
−I1 + I2 + I3 = 0 −1 1 1 I3 0
   

1 2

Node A
I1 I3 I2

R1 R3 R2
Loop 1 Loop 2

Node B

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

vg, Tg
t
fac

Methods apply to arbitrary non-linear x w


equations (black-box functions)
L0

T (x) = f1(L)

L = f2(T (x)) T(x) (temperature


profile)

Thermal Structural
Analysis Analysis

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 f (x)


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 fit:

n
X 2
SSE = (fi − fˆi(p))
i=1

⇒ min SSE(p)
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 Differentiation

Solve:
Z b
f (x)dx
a

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.
Z
T = F·dr

T at time of impact can be determined


analytically. Since F · v = m ddtv ·v, and
d
using the product rule dt (v · v) = 2 ddtv ·v ⇒
dv · v = 12 (v · v).

1 1  
2
F·dr = mdv · v = md(v · v) = md v
2 2
r2 2
v2
1 1  2
Z Z   
2 2
T = F · dr = md v = m v2 − v1
r1 2
v1 2 2

University of Michigan Department of Mechanical Engineering January 10, 2005


Numerical Integration Example: Falling Climber
T can be determined analytically, how
the rope deflects requires numerical
F
methods.
Z δf
T =V = F·dr
0

The rope behaves as a nonlinear spring,


and the force the rope exerts F is an
V=T
unknown function of its deflection δ .
f
• F(δ) determined experimentally with
discrete samples.
• Approximation of F(δ) necessitates
numerical integration.
• Solving for δf requires a root finding
technique.

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).

d2x dẋ
a = ẍ = =
dtZ2 dt
t
ẋ = ẋ0 + ẍdt
Z0 t
x = x0 + ẋdt
0

University of Michigan Department of Mechanical Engineering January 10, 2005


Numerical Differentiation Example: Solid Mechanics

Objective: Determine stress within a loaded


object to predict failure.
Constitutive Law:
du
σ = Eε = E
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 differential
equations
– Finite Difference Method
∗ Computational Fluid Dynamics
(Navier–Stokes Equations)
∗ Dynamics (Newton-Euler &
Lagrange’s 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