applications of numerical methods in engineering cns 3320

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

Upload: others

Post on 12-Sep-2021

6 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Applications of Numerical Methods in Engineering CNS 3320

Applications of Numerical Methods in EngineeringCNS 3320

James T. Allison

University of Michigan

Department of Mechanical Engineering

January 10, 2005

University of Michigan Department of Mechanical Engineering

Page 2: Applications of Numerical Methods in Engineering CNS 3320

Applications of Numerical Methods in Engineering

Objectives:

B Motivate the study of numerical methods through discussion ofengineering applications.

B Illustrate the use of Matlab using simple numerical examples.

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 3: Applications of Numerical Methods in Engineering CNS 3320

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

Page 4: Applications of Numerical Methods in Engineering CNS 3320

Quantitative Engineering Activities: Analysis and Design

Engineering: Solving practical technical problems using scientific andmathematical tools when available, and using experience and intuitionotherwise.

B Mathematical models provide a priori estimates of performance— verydesirable when prototypes or experiments are costly.

B Engineering problems frequently arise in which exact analytical solutionsare 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

Page 5: Applications of Numerical Methods in Engineering CNS 3320

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

Page 6: Applications of Numerical Methods in Engineering CNS 3320

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

Page 7: Applications of Numerical Methods in Engineering CNS 3320

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.

f(x) = f(a) + f′(a)(x − a) +

f ′′(a)

2!(x − a)

2+ . . .

• Linear approximation uses first two terms of the expansion.

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 8: Applications of Numerical Methods in Engineering CNS 3320

Linearization Example: Swinging PendulumSum forces in tangential direction:∑

Ft = Wt = mgsinθ = mat

= md2θ

dt2L = mθL

⇒ θ −g

Lsinθ = 0

Linearize sinθ:

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

Equation of motion valid for small

angles:

θ −g

Lθ = 0

m

T

W=mg

m

Wt

Wr

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 9: Applications of Numerical Methods in Engineering CNS 3320

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∑F = 0∑M = 0

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 10: Applications of Numerical Methods in Engineering CNS 3320

Root Finding Example- Statically Indeterminate Structural Analysis

beam 1

beam 2

beam 3

beam nb

.

.

.

F1

rod 1

rod 2

rod nb-1

Ø dnb

Ø d3

Ø d2

Ø d1

Ø dr(nb-1)

Ø dr2

Ø dr1

L

lr1

lr2

lr(nb-1)

.

.

.

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 11: Applications of Numerical Methods in Engineering CNS 3320

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

F33

r2a d2

f

F2b

r1e

1 F1g c

ˆ

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 12: Applications of Numerical Methods in Engineering CNS 3320

Solving Systems of Equations

Solve for the value of the vector x that satisfies the given system of equations.

Linear Systems:

a11x1 + a12x2 = b1

a21x1 + a22x2 = b2⇒

[a11 a12

a21 a22

] x1

x2

=

b1

b2

⇒ Ax = b

Non-Linear Systems:

f1(x) = b1

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

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 13: Applications of Numerical Methods in Engineering CNS 3320

Linear Systems Example: Circuit Analysis

Kirchhoff’s Laws:

1. The sum of all voltage changes around any closed loop is zero:

ne∑i=1

∆Vi = 0

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

nb∑i=1

∆Ii = 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

Page 14: Applications of Numerical Methods in Engineering CNS 3320

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

9 + 4I2 − I3 = 0

−I1 + I2 + I3 = 0

−2 0 −1

0 4 −1

−1 1 1

I1

I2

I3

=

−6

−9

0

⇒ Ax = b

Loop 1 Loop 2

Node A

Node B

R1 R3 R2

I1 I3 I2

1 2

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 15: Applications of Numerical Methods in Engineering CNS 3320

Linear Systems Example: Circuit Analysis

Matlab Implementation

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 16: Applications of Numerical Methods in Engineering CNS 3320

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

Page 17: Applications of Numerical Methods in Engineering CNS 3320

Nonlinear Systems Example: Turbine Blade Analysis

Methods apply to arbitrary non-linear

equations (black-box functions)

T (x) = f1(L)

L = f2(T (x))

w

t

L0

x

vg, Tg

fac

ThermalAnalysis

StructuralAnalysis

T(x) (temperatureprofile)

L (dilated length)

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 18: Applications of Numerical Methods in Engineering CNS 3320

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

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

Page 19: Applications of Numerical Methods in Engineering CNS 3320

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

Page 20: Applications of Numerical Methods in Engineering CNS 3320

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:

SSE =

n∑i=1

(fi − fi(p))2

⇒ minp

SSE(p)

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 21: Applications of Numerical Methods in Engineering CNS 3320

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

Page 22: Applications of Numerical Methods in Engineering CNS 3320

Numerical Integration and Differentiation

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

Page 23: Applications of Numerical Methods in Engineering CNS 3320

Numerical Integration Example: Falling Climber

Falling rock climber possesses kinetic energy

T (energy of motion) that must be absorbed

by the belay system.

T =

∫F·dr

T at time of impact can be determined

analytically. Since F · v = mdvdt ·v, and

using the product rule ddt (v · v) = 2dv

dt ·v ⇒dv · v = 1

2(v · v).

F·dr = mdv · v =1

2md(v · v) =

1

2md

(v

2)

T =

∫ r2

r1

F · dr =

∫ v22

v21

1

2md

(v

2)

=1

2m

(v

22 − v

21

)

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 24: Applications of Numerical Methods in Engineering CNS 3320

Numerical Integration Example: Falling Climber

T can be determined analytically, how

the rope deflects requires numerical

methods.

T = V =

∫ δf

0

F·dr

The rope behaves as a nonlinear spring,

and the force the rope exerts F is an

unknown function of its deflection δ.

• F(δ) determined experimentally with

discrete samples.

• Approximation of F(δ) necessitates

numerical integration.

• Solving for δf requires a root finding

technique.

V=T

F

f

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 25: Applications of Numerical Methods in Engineering CNS 3320

Numerical Integration Example: Position Calculation

Accelerometer: measures second time derivative of position.

Application: determining position from discrete set of acceleration values (robotics).

a = x =d2x

dt2=

dx

dt

x = x0 +

∫ t

0

xdt

x = x0 +

∫ t

0

xdt

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 26: Applications of Numerical Methods in Engineering CNS 3320

Numerical Differentiation Example: Solid Mechanics

Objective: Determine stress within a loaded

object to predict failure.

Constitutive Law:

σ = Eε = Edu

dx

Photoelasticity Example:

Displacement u determined experimentally at

discrete points, facilitating the calculation ofdudx and σ.

University of Michigan Department of Mechanical Engineering January 10, 2005

Page 27: Applications of Numerical Methods in Engineering CNS 3320

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