Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf ·...

149
Outlines Intro to Numerical Methods in Mechanical Engineering Mike Renfro August 31, 2004 Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Transcript of Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf ·...

Page 1: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Outlines

Intro to Numerical Methods in MechanicalEngineering

Mike Renfro

August 31, 2004

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 2: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

OutlinesPart I: Course Information, AdministriviaPart II: Overview of Numerical MethodsPart III: Types of Problems Solved with Numerical Methods

Course Information, Administrivia

Course InformationCourse Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 3: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

OutlinesPart I: Course Information, AdministriviaPart II: Overview of Numerical MethodsPart III: Types of Problems Solved with Numerical Methods

Overview of Numerical MethodsRelevance of Numerical Methods

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types and Sources of ErrorMathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Significant Digits

Rounding

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 4: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

OutlinesPart I: Course Information, AdministriviaPart II: Overview of Numerical MethodsPart III: Types of Problems Solved with Numerical Methods

Types of Problems Solved with Numerical Methods

Natural Frequencies of a Vibrating Bar

Static Analysis of a Scaffolding

Critical Loads for Buckling a Column

Realistic Design Properties of Materials

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 5: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Part I

Course Information, Administrivia

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 6: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 1)

Introductory material (1 day)

Solution of nonlinear equations (2 days)

MATLAB programming (3 days)

Matrix algebra, solution of simultaneous linear algebraicequations (4 days)

Test 1 on October 5

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 7: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 1)

Introductory material (1 day)

Solution of nonlinear equations (2 days)

MATLAB programming (3 days)

Matrix algebra, solution of simultaneous linear algebraicequations (4 days)

Test 1 on October 5

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 8: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 1)

Introductory material (1 day)

Solution of nonlinear equations (2 days)

MATLAB programming (3 days)

Matrix algebra, solution of simultaneous linear algebraicequations (4 days)

Test 1 on October 5

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 9: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 1)

Introductory material (1 day)

Solution of nonlinear equations (2 days)

MATLAB programming (3 days)

Matrix algebra, solution of simultaneous linear algebraicequations (4 days)

Test 1 on October 5

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 10: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 1)

Introductory material (1 day)

Solution of nonlinear equations (2 days)

MATLAB programming (3 days)

Matrix algebra, solution of simultaneous linear algebraicequations (4 days)

Test 1 on October 5

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 11: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 2)

Solution of matrix eigenvalue problems (2 days)

Curve fitting and interpolation (2 days)

Technical writing (2 days)

Statistics (2 days)

Test 2 on November 9

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 12: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 2)

Solution of matrix eigenvalue problems (2 days)

Curve fitting and interpolation (2 days)

Technical writing (2 days)

Statistics (2 days)

Test 2 on November 9

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 13: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 2)

Solution of matrix eigenvalue problems (2 days)

Curve fitting and interpolation (2 days)

Technical writing (2 days)

Statistics (2 days)

Test 2 on November 9

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 14: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 2)

Solution of matrix eigenvalue problems (2 days)

Curve fitting and interpolation (2 days)

Technical writing (2 days)

Statistics (2 days)

Test 2 on November 9

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 15: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 2)

Solution of matrix eigenvalue problems (2 days)

Curve fitting and interpolation (2 days)

Technical writing (2 days)

Statistics (2 days)

Test 2 on November 9

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 16: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 3)

Numerical differentiation (2 days)

Numerical integration (2 days)

Solutions to ordinary differential equations (initial valueproblems) (4 days)

Final exam on December 13 (10:30-12:30)

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 17: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 3)

Numerical differentiation (2 days)

Numerical integration (2 days)

Solutions to ordinary differential equations (initial valueproblems) (4 days)

Final exam on December 13 (10:30-12:30)

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 18: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 3)

Numerical differentiation (2 days)

Numerical integration (2 days)

Solutions to ordinary differential equations (initial valueproblems) (4 days)

Final exam on December 13 (10:30-12:30)

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 19: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Course Topics (Part 3)

Numerical differentiation (2 days)

Numerical integration (2 days)

Solutions to ordinary differential equations (initial valueproblems) (4 days)

Final exam on December 13 (10:30-12:30)

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 20: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Grading Percentages

20% Homework, roughly one homework grade per week

20% Test 1: October 5

20% Test 2: November 9

20% Projects: given throughout the semester

20% Final: December 13

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 21: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Grading Percentages

20% Homework, roughly one homework grade per week

20% Test 1: October 5

20% Test 2: November 9

20% Projects: given throughout the semester

20% Final: December 13

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 22: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Grading Percentages

20% Homework, roughly one homework grade per week

20% Test 1: October 5

20% Test 2: November 9

20% Projects: given throughout the semester

20% Final: December 13

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 23: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Grading Percentages

20% Homework, roughly one homework grade per week

20% Test 1: October 5

20% Test 2: November 9

20% Projects: given throughout the semester

20% Final: December 13

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 24: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Grading Percentages

20% Homework, roughly one homework grade per week

20% Test 1: October 5

20% Test 2: November 9

20% Projects: given throughout the semester

20% Final: December 13

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 25: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Mike Renfro ([email protected])Office: Clement Hall 314

Phone: 372-3601Office Hours: 2-5 PM Monday/Wednesday, or by appointment

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 26: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Bring These Items To Class Each Day

Textbook

Scientific calculator, preferably one that can perform basicmatrix algebra

Pencil

Engineering graph paper

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 27: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Bring These Items To Class Each Day

Textbook

Scientific calculator, preferably one that can perform basicmatrix algebra

Pencil

Engineering graph paper

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 28: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Bring These Items To Class Each Day

Textbook

Scientific calculator, preferably one that can perform basicmatrix algebra

Pencil

Engineering graph paper

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 29: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Bring These Items To Class Each Day

Textbook

Scientific calculator, preferably one that can perform basicmatrix algebra

Pencil

Engineering graph paper

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 30: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Homework Style Requirements

Attached to your course syllabus is an example of the homeworkstyle required for the class, including:

Use engineering graph paper, not notebook paper or regulargraph paper

Use a pencil, not ink

Lay out the problem statement and solution legibly, includingany supporting figures or sketches

Show enough work to leave a clear trail, including unitconversions

Highlight your final answers either with double-underlines,boxes, or something similar.

I reserve the right to not grade homework that doesn’t conform tothe above style.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 31: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Homework Style Requirements

Attached to your course syllabus is an example of the homeworkstyle required for the class, including:

Use engineering graph paper, not notebook paper or regulargraph paper

Use a pencil, not ink

Lay out the problem statement and solution legibly, includingany supporting figures or sketches

Show enough work to leave a clear trail, including unitconversions

Highlight your final answers either with double-underlines,boxes, or something similar.

I reserve the right to not grade homework that doesn’t conform tothe above style.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 32: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Homework Style Requirements

Attached to your course syllabus is an example of the homeworkstyle required for the class, including:

Use engineering graph paper, not notebook paper or regulargraph paper

Use a pencil, not ink

Lay out the problem statement and solution legibly, includingany supporting figures or sketches

Show enough work to leave a clear trail, including unitconversions

Highlight your final answers either with double-underlines,boxes, or something similar.

I reserve the right to not grade homework that doesn’t conform tothe above style.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 33: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Homework Style Requirements

Attached to your course syllabus is an example of the homeworkstyle required for the class, including:

Use engineering graph paper, not notebook paper or regulargraph paper

Use a pencil, not ink

Lay out the problem statement and solution legibly, includingany supporting figures or sketches

Show enough work to leave a clear trail, including unitconversions

Highlight your final answers either with double-underlines,boxes, or something similar.

I reserve the right to not grade homework that doesn’t conform tothe above style.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 34: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Homework Style Requirements

Attached to your course syllabus is an example of the homeworkstyle required for the class, including:

Use engineering graph paper, not notebook paper or regulargraph paper

Use a pencil, not ink

Lay out the problem statement and solution legibly, includingany supporting figures or sketches

Show enough work to leave a clear trail, including unitconversions

Highlight your final answers either with double-underlines,boxes, or something similar.

I reserve the right to not grade homework that doesn’t conform tothe above style.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 35: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Homework Style Requirements

Attached to your course syllabus is an example of the homeworkstyle required for the class, including:

Use engineering graph paper, not notebook paper or regulargraph paper

Use a pencil, not ink

Lay out the problem statement and solution legibly, includingany supporting figures or sketches

Show enough work to leave a clear trail, including unitconversions

Highlight your final answers either with double-underlines,boxes, or something similar.

I reserve the right to not grade homework that doesn’t conform tothe above style.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 36: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Programming Requirements

Regardless of the language you write a program in, follow theseguidelines:

Include all code you wrote to solve the problem

Attach any input files you used and all output files created

Attach a log of the program as it was run, regardless of ifanything was read from the keyboard or printed to the screen

Attach any plots or other non-text output generated by theprogram, if any were made

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 37: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Programming Requirements

Regardless of the language you write a program in, follow theseguidelines:

Include all code you wrote to solve the problem

Attach any input files you used and all output files created

Attach a log of the program as it was run, regardless of ifanything was read from the keyboard or printed to the screen

Attach any plots or other non-text output generated by theprogram, if any were made

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 38: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Programming Requirements

Regardless of the language you write a program in, follow theseguidelines:

Include all code you wrote to solve the problem

Attach any input files you used and all output files created

Attach a log of the program as it was run, regardless of ifanything was read from the keyboard or printed to the screen

Attach any plots or other non-text output generated by theprogram, if any were made

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 39: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Course Information

Course Topics and CalendarGradingContact InformationClass, Homework, and Program Requirements

Programming Requirements

Regardless of the language you write a program in, follow theseguidelines:

Include all code you wrote to solve the problem

Attach any input files you used and all output files created

Attach a log of the program as it was run, regardless of ifanything was read from the keyboard or printed to the screen

Attach any plots or other non-text output generated by theprogram, if any were made

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 40: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Part II

Overview of Numerical Methods

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 41: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

EquilibriumNewton’s laws of motionConservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 42: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

EquilibriumNewton’s laws of motionConservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 43: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

Equilibrium

Newton’s laws of motionConservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 44: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

EquilibriumNewton’s laws of motion

Conservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 45: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

EquilibriumNewton’s laws of motionConservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 46: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

EquilibriumNewton’s laws of motionConservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 47: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

4 Steps in Engineering Analysis

1 Development of a mathematical model representing allimportant characteristics of the physical system

2 Derivation of governing equations of the model by applyingphysical laws

EquilibriumNewton’s laws of motionConservation of mass and energy

3 Solution of governing equations

4 Interpretation of the solution

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 48: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 49: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 50: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 51: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 52: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 53: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 54: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Types of Governing Equations

Linear algebraic

Nonlinear algebraic

Transcendental

Ordinary differential equations

Partial differential equations

Homogeneous differential equations

Equation involving integrals or derivatives

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 55: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Benefits

Solutions are exact.

Driving variables are easily visible, leading to easy parametricstudies on the effects of changing those variables.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 56: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Benefits

Solutions are exact.

Driving variables are easily visible, leading to easy parametricstudies on the effects of changing those variables.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 57: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Limitations

The vast majority of real-world problems do not have ananalytical solution of exacting detail.

Finding out whether or not there is an analytical solution to anew type of problem is tedious and time-consuming. Plus, theresult often is “nope, no analytical solution here — I think.”

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 58: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Limitations

The vast majority of real-world problems do not have ananalytical solution of exacting detail.

Finding out whether or not there is an analytical solution to anew type of problem is tedious and time-consuming. Plus, theresult often is “nope, no analytical solution here — I think.”

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 59: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Example

Consider the integral

I1 =

∫ b

axe−x2

dx .

Through calculus, you can calculate this integral exactly as

I1 =

(−1

2e−x2

)∣∣∣∣ba

= −1

2e−b2

+1

2e−a2

=1

2

(e−a2 − e−b2

).

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 60: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Example

Consider the integral

I1 =

∫ b

axe−x2

dx .

Through calculus, you can calculate this integral exactly as

I1 =

(−1

2e−x2

)∣∣∣∣ba

= −1

2e−b2

+1

2e−a2

=1

2

(e−a2 − e−b2

).

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 61: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Example

Consider the integral

I1 =

∫ b

axe−x2

dx .

Through calculus, you can calculate this integral exactly as

I1 =

(−1

2e−x2

)∣∣∣∣ba

= −1

2e−b2

+1

2e−a2

=1

2

(e−a2 − e−b2

).

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 62: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Analytical Solution Example

Consider the integral

I1 =

∫ b

axe−x2

dx .

Through calculus, you can calculate this integral exactly as

I1 =

(−1

2e−x2

)∣∣∣∣ba

= −1

2e−b2

+1

2e−a2

=1

2

(e−a2 − e−b2

).

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 63: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Benefits

A larger number of problems have numerical solutions thananalytical ones.

Assuming the problem is set up correctly, a correct numericalsolution is mostly a matter of patience.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 64: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Benefits

A larger number of problems have numerical solutions thananalytical ones.

Assuming the problem is set up correctly, a correct numericalsolution is mostly a matter of patience.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 65: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Limitations

Solutions are not exact, but can be close enough to do the job.

Parametric studies are more difficult, since driving variablesare hidden.

The speed of finding a numerical solution depends on boththe computing tools on hand, your ability to use them, andyour ability to interpret the results for accuracy.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 66: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Limitations

Solutions are not exact, but can be close enough to do the job.

Parametric studies are more difficult, since driving variablesare hidden.

The speed of finding a numerical solution depends on boththe computing tools on hand, your ability to use them, andyour ability to interpret the results for accuracy.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 67: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Limitations

Solutions are not exact, but can be close enough to do the job.

Parametric studies are more difficult, since driving variablesare hidden.

The speed of finding a numerical solution depends on boththe computing tools on hand, your ability to use them, andyour ability to interpret the results for accuracy.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 68: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Example

Consider the integral

I2 =

∫ b

af (x)dx =

∫ b

ae−x2

dx .

There is no closed-form analytic solution to this integral. How canwe evaluate it?

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 69: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Example

Recall that a the value of a definiteintegral is identical to the areabeneath the curve of the functionbeing integrated.

We can approximate that area byfinding the area of lots of smallrectangles whose height is determinedby the values of f (x) at differentplaces.

The accuracy of this solution is neverperfect, but increases as we increaseamount of computational time.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 70: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Example

Recall that a the value of a definiteintegral is identical to the areabeneath the curve of the functionbeing integrated.

We can approximate that area byfinding the area of lots of smallrectangles whose height is determinedby the values of f (x) at differentplaces.

The accuracy of this solution is neverperfect, but increases as we increaseamount of computational time.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 71: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

4 Steps in Engineering AnalysisEquation TypesAnalytical Solutions: Benefits and LimitationsNumerical Solutions: Benefits and Limitations

Numerical Solution Example

Recall that a the value of a definiteintegral is identical to the areabeneath the curve of the functionbeing integrated.

We can approximate that area byfinding the area of lots of smallrectangles whose height is determinedby the values of f (x) at differentplaces.

The accuracy of this solution is neverperfect, but increases as we increaseamount of computational time.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 72: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Assumptions and Simplifications Change YourResults?

Is gravity really a constant 9.808m/s2?

Not necessarily. It varies with latitude and altitude, and evenchanges depending on the density of the Earth’s soil belowyou.

Why would you care? The ability to detect tiny localvariations in gravity provides a non-invasive method formapping out the area’s subsurface geology, including buriednatural resources, fault lines, etc.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 73: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Assumptions and Simplifications Change YourResults?

Is gravity really a constant 9.808m/s2?

Not necessarily. It varies with latitude and altitude, and evenchanges depending on the density of the Earth’s soil belowyou.

Why would you care? The ability to detect tiny localvariations in gravity provides a non-invasive method formapping out the area’s subsurface geology, including buriednatural resources, fault lines, etc.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 74: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Assumptions and Simplifications Change YourResults?

Is gravity really a constant 9.808m/s2?

Not necessarily. It varies with latitude and altitude, and evenchanges depending on the density of the Earth’s soil belowyou.

Why would you care? The ability to detect tiny localvariations in gravity provides a non-invasive method formapping out the area’s subsurface geology, including buriednatural resources, fault lines, etc.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 75: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Assumptions and Simplifications Change YourResults?

Is Newton’s second law of motion F = ma?

Not as it was originally written. Originally, it was shown asF = d(mv)

dt , which does evaluate down to F = ma as long asmass is constant.

Why would you care? F = ma works fine until you get aproblem where mass changes considerably during the analysis,like a rocket launch. The Space Shuttle’s total weight dropsby 30% while its solid rocket boosters are firing during thefirst two minutes after liftoff.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 76: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Assumptions and Simplifications Change YourResults?

Is Newton’s second law of motion F = ma?

Not as it was originally written. Originally, it was shown asF = d(mv)

dt , which does evaluate down to F = ma as long asmass is constant.

Why would you care? F = ma works fine until you get aproblem where mass changes considerably during the analysis,like a rocket launch. The Space Shuttle’s total weight dropsby 30% while its solid rocket boosters are firing during thefirst two minutes after liftoff.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 77: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Assumptions and Simplifications Change YourResults?

Is Newton’s second law of motion F = ma?

Not as it was originally written. Originally, it was shown asF = d(mv)

dt , which does evaluate down to F = ma as long asmass is constant.

Why would you care? F = ma works fine until you get aproblem where mass changes considerably during the analysis,like a rocket launch. The Space Shuttle’s total weight dropsby 30% while its solid rocket boosters are firing during thefirst two minutes after liftoff.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 78: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Mariner 1 Launch: One Character Can Screw It All Up

Mariner 1 was to be the first spacecraft to fly by Venus. It wasdestroyed during its launch due to the following chain of events:

A hardware failure disabled the rocket’s antenna, breaking itscommunication with ground-based guidance and controlsystems.

An onboard computer took over the guidance and controltasks.

One author of the onboard program mis-transcribed an

averaged derivative of radius Rn as Rn, which was aninstantaneous derivative value.

Since the instantaneous derivative value varied much morequickly than the averaged value, another portion of theprogram thought the rocket had gone out of control anddestroyed it.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 79: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Mariner 1 Launch: One Character Can Screw It All Up

Mariner 1 was to be the first spacecraft to fly by Venus. It wasdestroyed during its launch due to the following chain of events:

A hardware failure disabled the rocket’s antenna, breaking itscommunication with ground-based guidance and controlsystems.

An onboard computer took over the guidance and controltasks.

One author of the onboard program mis-transcribed an

averaged derivative of radius Rn as Rn, which was aninstantaneous derivative value.

Since the instantaneous derivative value varied much morequickly than the averaged value, another portion of theprogram thought the rocket had gone out of control anddestroyed it.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 80: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Mariner 1 Launch: One Character Can Screw It All Up

Mariner 1 was to be the first spacecraft to fly by Venus. It wasdestroyed during its launch due to the following chain of events:

A hardware failure disabled the rocket’s antenna, breaking itscommunication with ground-based guidance and controlsystems.

An onboard computer took over the guidance and controltasks.

One author of the onboard program mis-transcribed an

averaged derivative of radius Rn as Rn, which was aninstantaneous derivative value.

Since the instantaneous derivative value varied much morequickly than the averaged value, another portion of theprogram thought the rocket had gone out of control anddestroyed it.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 81: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Mariner 1 Launch: One Character Can Screw It All Up

Mariner 1 was to be the first spacecraft to fly by Venus. It wasdestroyed during its launch due to the following chain of events:

A hardware failure disabled the rocket’s antenna, breaking itscommunication with ground-based guidance and controlsystems.

An onboard computer took over the guidance and controltasks.

One author of the onboard program mis-transcribed an

averaged derivative of radius Rn as Rn, which was aninstantaneous derivative value.

Since the instantaneous derivative value varied much morequickly than the averaged value, another portion of theprogram thought the rocket had gone out of control anddestroyed it.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 82: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Errors in data transfer

Uncertainties in measurements

Incorrect units

One thermodynamics problem involved calculating the speed ofwater flowing through a pipe using both conservation of energyand conservation of mass relationships. Three students all used theexact same method, but differed in their values for the density ofwater:

One student used a density of 2000 kg/m3, and calculated awater speed of 2 m/s.

The second student used a density of 2 kg/m3, and calculateda water speed of 2000 m/s.

The third student used a density of 0.002 kg/m3, andcalculated a water speed of 2000000 m/s.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 83: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Errors in data transfer

Uncertainties in measurements

Incorrect units

One thermodynamics problem involved calculating the speed ofwater flowing through a pipe using both conservation of energyand conservation of mass relationships. Three students all used theexact same method, but differed in their values for the density ofwater:

One student used a density of 2000 kg/m3, and calculated awater speed of 2 m/s.

The second student used a density of 2 kg/m3, and calculateda water speed of 2000 m/s.

The third student used a density of 0.002 kg/m3, andcalculated a water speed of 2000000 m/s.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 84: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Errors in data transfer

Uncertainties in measurements

Incorrect units

One thermodynamics problem involved calculating the speed ofwater flowing through a pipe using both conservation of energyand conservation of mass relationships. Three students all used theexact same method, but differed in their values for the density ofwater:

One student used a density of 2000 kg/m3, and calculated awater speed of 2 m/s.

The second student used a density of 2 kg/m3, and calculateda water speed of 2000 m/s.

The third student used a density of 0.002 kg/m3, andcalculated a water speed of 2000000 m/s.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 85: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Errors in data transfer

Uncertainties in measurements

Incorrect units

One thermodynamics problem involved calculating the speed ofwater flowing through a pipe using both conservation of energyand conservation of mass relationships. Three students all used theexact same method, but differed in their values for the density ofwater:

One student used a density of 2000 kg/m3, and calculated awater speed of 2 m/s.

The second student used a density of 2 kg/m3, and calculateda water speed of 2000 m/s.

The third student used a density of 0.002 kg/m3, andcalculated a water speed of 2000000 m/s.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 86: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Errors in data transfer

Uncertainties in measurements

Incorrect units

One thermodynamics problem involved calculating the speed ofwater flowing through a pipe using both conservation of energyand conservation of mass relationships. Three students all used theexact same method, but differed in their values for the density ofwater:

One student used a density of 2000 kg/m3, and calculated awater speed of 2 m/s.

The second student used a density of 2 kg/m3, and calculateda water speed of 2000 m/s.

The third student used a density of 0.002 kg/m3, andcalculated a water speed of 2000000 m/s.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 87: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Errors in data transfer

Uncertainties in measurements

Incorrect units

One thermodynamics problem involved calculating the speed ofwater flowing through a pipe using both conservation of energyand conservation of mass relationships. Three students all used theexact same method, but differed in their values for the density ofwater:

One student used a density of 2000 kg/m3, and calculated awater speed of 2 m/s.

The second student used a density of 2 kg/m3, and calculateda water speed of 2000 m/s.

The third student used a density of 0.002 kg/m3, andcalculated a water speed of 2000000 m/s.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 88: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Numbers in a Computer Are Almost Never Exact

What should the following C code do?

#i n c l u d e <s t d i o . h>

i n t main ( vo i d ) {f l o a t y , z ;y =838861.2;z =1.3 ;p r i n t f (” y : %8.1 f \n” , y ) ;p r i n t f (” z : %8.1 f \n” , z ) ;p r i n t f (” y : %18.11 e\n” , y ) ;p r i n t f (” z : %18.11 e\n” , z ) ;r e t u r n 0 ;

}

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 89: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Numbers in a Computer Are Almost Never Exact

You expected:

y : 838861.2z : 1 . 3y : 8 .38861200000 e+05z : 1 .30000000000 e+00

The actual program output:

y : 838861.2z : 1 . 3y : 8 .38861187500 e+05z : 1 .29999995232 e+00

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 90: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Any Way to Avoid This?

Changing languages won’t cure it

Changing compilers won’t, either

Nor will changing computer architectures

It can be mitigated by making each number stored occupymore memory. MATLAB stores real numbers using 64 bits ofdata, compared to the 32 used by default in C or FORTRAN.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 91: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Any Way to Avoid This?

Changing languages won’t cure it

Changing compilers won’t, either

Nor will changing computer architectures

It can be mitigated by making each number stored occupymore memory. MATLAB stores real numbers using 64 bits ofdata, compared to the 32 used by default in C or FORTRAN.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 92: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Any Way to Avoid This?

Changing languages won’t cure it

Changing compilers won’t, either

Nor will changing computer architectures

It can be mitigated by making each number stored occupymore memory. MATLAB stores real numbers using 64 bits ofdata, compared to the 32 used by default in C or FORTRAN.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 93: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Any Way to Avoid This?

Changing languages won’t cure it

Changing compilers won’t, either

Nor will changing computer architectures

It can be mitigated by making each number stored occupymore memory. MATLAB stores real numbers using 64 bits ofdata, compared to the 32 used by default in C or FORTRAN.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 94: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Causes It?

The problem stems from the way computers store numbers assums of various powers of 2. For example:

1.3 =1 +1

4+

1

32+

1

64+

1

512+

1

1024+ · · ·

=1(20) + 0(2−1) + 1(2−2) + 0(2−3) + 0(2−4) + 1(2−5)+

1(2−6) + 0(2−7) + 0(2−8) + 1(2−9) + 1(2−10) + · · ·

There is no finite sum of powers of 2 that adds up exactly to 1.3,therefore there will always be a small amount of error in anycomputer’s storage of that number using that method.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 95: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Causes It?

The problem stems from the way computers store numbers assums of various powers of 2. For example:

1.3 =1 +1

4+

1

32+

1

64+

1

512+

1

1024+ · · ·

=1(20) + 0(2−1) + 1(2−2) + 0(2−3) + 0(2−4) + 1(2−5)+

1(2−6) + 0(2−7) + 0(2−8) + 1(2−9) + 1(2−10) + · · ·

There is no finite sum of powers of 2 that adds up exactly to 1.3,therefore there will always be a small amount of error in anycomputer’s storage of that number using that method.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 96: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

What Causes It?

The problem stems from the way computers store numbers assums of various powers of 2. For example:

1.3 =1 +1

4+

1

32+

1

64+

1

512+

1

1024+ · · ·

=1(20) + 0(2−1) + 1(2−2) + 0(2−3) + 0(2−4) + 1(2−5)+

1(2−6) + 0(2−7) + 0(2−8) + 1(2−9) + 1(2−10) + · · ·

There is no finite sum of powers of 2 that adds up exactly to 1.3,therefore there will always be a small amount of error in anycomputer’s storage of that number using that method.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 97: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Finite Representations of Infinity Are Not Exact

Anytime ∞ shows up in an equation we evaluate numerically, we’llhave errors. Practically, ∞ is approximated as “the largest numberwe get to before we run out of time or motivation”. This shows upboth in infinite series expansions and in open-ended integrals. Forexample:

y(x) = ln (1 + x) =∞∑i=1

(−1)i+1

ix i

= x − 1

2x2 +

1

3x3 − 1

4x4 +

1

5x5 − 1

6x6 + · · ·

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 98: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Mathematical ModelingBlundersInput ErrorsMachine ErrorsTruncation

Effects of Truncation Error

If you take just the first four terms of the approximation toevaluate ln(1 + 1):

ln(1 + 1) = 0.69315

≈ 1− 1

2+

1

3− 1

4= 0.58333

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 99: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Why Significant Digits Matter

Experimental measurements are never exact. Instruments mayvary their readouts as temperatures change, or as they wearout.

Whatever number a measurement has, it is not followed by aninfinite number of zeros.

If you measure something with a millimeter scale, yourprecision may only be ± 0.5 mm.

If you measure two results with different precisions andcombine them mathematically into a final result, the precisionof that result is determined by the measurement with thelower precision.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 100: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Why Significant Digits Matter

Experimental measurements are never exact. Instruments mayvary their readouts as temperatures change, or as they wearout.

Whatever number a measurement has, it is not followed by aninfinite number of zeros.

If you measure something with a millimeter scale, yourprecision may only be ± 0.5 mm.

If you measure two results with different precisions andcombine them mathematically into a final result, the precisionof that result is determined by the measurement with thelower precision.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 101: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Why Significant Digits Matter

Experimental measurements are never exact. Instruments mayvary their readouts as temperatures change, or as they wearout.

Whatever number a measurement has, it is not followed by aninfinite number of zeros.

If you measure something with a millimeter scale, yourprecision may only be ± 0.5 mm.

If you measure two results with different precisions andcombine them mathematically into a final result, the precisionof that result is determined by the measurement with thelower precision.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 102: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Why Significant Digits Matter

Experimental measurements are never exact. Instruments mayvary their readouts as temperatures change, or as they wearout.

Whatever number a measurement has, it is not followed by aninfinite number of zeros.

If you measure something with a millimeter scale, yourprecision may only be ± 0.5 mm.

If you measure two results with different precisions andcombine them mathematically into a final result, the precisionof that result is determined by the measurement with thelower precision.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 103: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Working with Significant Digits

If the number is in scientific notation, just count the digits,including any trailing zeros: 2.99792458× 108 m/s → 9significant digits.

If the number is not in scientific notation, converting it beforecounting the significant digits helps.

Trailing zeros can be a problem.

A 10k race route should have a length of 10,000 meters.Realistically, it will not have a length of exactly 10,000,000millimeters, and certainly not 10,000,000,000 microns.

Generally, don’t do any unit conversions before countingsignificant digits. If you do any conversions afterwards, makesure you don’t add any digits that aren’t really there.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 104: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Working with Significant Digits

If the number is in scientific notation, just count the digits,including any trailing zeros: 2.99792458× 108 m/s → 9significant digits.

If the number is not in scientific notation, converting it beforecounting the significant digits helps.

Trailing zeros can be a problem.

A 10k race route should have a length of 10,000 meters.Realistically, it will not have a length of exactly 10,000,000millimeters, and certainly not 10,000,000,000 microns.

Generally, don’t do any unit conversions before countingsignificant digits. If you do any conversions afterwards, makesure you don’t add any digits that aren’t really there.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 105: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Working with Significant Digits

If the number is in scientific notation, just count the digits,including any trailing zeros: 2.99792458× 108 m/s → 9significant digits.

If the number is not in scientific notation, converting it beforecounting the significant digits helps.

Trailing zeros can be a problem.

A 10k race route should have a length of 10,000 meters.Realistically, it will not have a length of exactly 10,000,000millimeters, and certainly not 10,000,000,000 microns.

Generally, don’t do any unit conversions before countingsignificant digits. If you do any conversions afterwards, makesure you don’t add any digits that aren’t really there.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 106: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Working with Significant Digits

If the number is in scientific notation, just count the digits,including any trailing zeros: 2.99792458× 108 m/s → 9significant digits.

If the number is not in scientific notation, converting it beforecounting the significant digits helps.

Trailing zeros can be a problem.

A 10k race route should have a length of 10,000 meters.Realistically, it will not have a length of exactly 10,000,000millimeters, and certainly not 10,000,000,000 microns.

Generally, don’t do any unit conversions before countingsignificant digits. If you do any conversions afterwards, makesure you don’t add any digits that aren’t really there.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 107: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Significant Digits Example

The speed of light in a vacuum is 2.99792458× 108 m/s. Aspacecraft initially at rest accelerates at a rate of 9.808 m/s2.How much time elapses until the spacecraft reaches lightspeed1?

Solve for tf as follows:

tf =vf

a=

2.99792458× 108

9.808= 3.056611521207178× 107 s (says the calculator)

= 3.057× 107 s (says the engineer)

Notice that the final result has only 4 significant digits.

1This is just an example; Newtonian mechanics are not accurate on problemswith speeds this high.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 108: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Significant Digits Example

The speed of light in a vacuum is 2.99792458× 108 m/s. Aspacecraft initially at rest accelerates at a rate of 9.808 m/s2.How much time elapses until the spacecraft reaches lightspeed1?

Solve for tf as follows:

tf =vf

a=

2.99792458× 108

9.808= 3.056611521207178× 107 s (says the calculator)

= 3.057× 107 s (says the engineer)

Notice that the final result has only 4 significant digits.

1This is just an example; Newtonian mechanics are not accurate on problemswith speeds this high.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 109: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Significant Digits Example

The speed of light in a vacuum is 2.99792458× 108 m/s. Aspacecraft initially at rest accelerates at a rate of 9.808 m/s2.How much time elapses until the spacecraft reaches lightspeed1?

Solve for tf as follows:

tf =vf

a=

2.99792458× 108

9.808

= 3.056611521207178× 107 s (says the calculator)

= 3.057× 107 s (says the engineer)

Notice that the final result has only 4 significant digits.

1This is just an example; Newtonian mechanics are not accurate on problemswith speeds this high.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 110: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Significant Digits Example

The speed of light in a vacuum is 2.99792458× 108 m/s. Aspacecraft initially at rest accelerates at a rate of 9.808 m/s2.How much time elapses until the spacecraft reaches lightspeed1?

Solve for tf as follows:

tf =vf

a=

2.99792458× 108

9.808= 3.056611521207178× 107 s (says the calculator)

= 3.057× 107 s (says the engineer)

Notice that the final result has only 4 significant digits.

1This is just an example; Newtonian mechanics are not accurate on problemswith speeds this high.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 111: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Significant Digits Example

The speed of light in a vacuum is 2.99792458× 108 m/s. Aspacecraft initially at rest accelerates at a rate of 9.808 m/s2.How much time elapses until the spacecraft reaches lightspeed1?

Solve for tf as follows:

tf =vf

a=

2.99792458× 108

9.808= 3.056611521207178× 107 s (says the calculator)

= 3.057× 107 s (says the engineer)

Notice that the final result has only 4 significant digits.

1This is just an example; Newtonian mechanics are not accurate on problemswith speeds this high.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 112: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

Significant Digits Example

The speed of light in a vacuum is 2.99792458× 108 m/s. Aspacecraft initially at rest accelerates at a rate of 9.808 m/s2.How much time elapses until the spacecraft reaches lightspeed1?

Solve for tf as follows:

tf =vf

a=

2.99792458× 108

9.808= 3.056611521207178× 107 s (says the calculator)

= 3.057× 107 s (says the engineer)

Notice that the final result has only 4 significant digits.1This is just an example; Newtonian mechanics are not accurate on problems

with speeds this high.Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 113: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 114: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 115: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 116: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 117: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 118: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 119: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 120: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 121: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 122: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Relevance of Numerical MethodsTypes and Sources of Error

Significant DigitsRounding

So You Have a Result With Too Many Significant Digits?

How do you chop off digits that you can’t really back up withdata? Rao overcomplicates things on p.20. Simpler rules:

Round the last retained digit up if your first dropped digit is a6 or higher.

Keep the last retained digit as-is if your first dropped digit is a4 or lower.

If the first dropped digit is a 5, round the last retained digit tothe nearest even number.

Numbers rounded to four significant digits:

9.46932 → 9.469

201.72 → 201.7

200.550 → 200.6

200.650 → 200.6

2.013501 → 2.014Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 123: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Part III

Types of Problems Solved with Numerical Methods

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 124: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Solution of Nonlinear Equations: Natural Frequencies of aVibrating Bar

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 125: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations

Natural frequencies ω of axial vibration of a bar, fixed at one endand carrying a mass M at the other end, satisfy the equation

cot

(ωl√E/ρ

)=

M

ρAl

ωl√E/ρ

where l is the bar’s length, E is the bar’s elastic modulus, ρ is thebar’s density, and A is the bar’s cross-sectional area.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 126: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Solution of Governing Equations

0 1 2 3 4 5 6 7 8 9 10−2

−1

0

1

2

3

4

5

6

7

ω L / c

Frequency Equation Solution −− Intersections Represent Solutions

M/m=0.5cot(ω L / c)

Intersections of the red and bluelines represent values of ωl√

E/ρ

that solve the previous equation:

ω1l√E/ρ

= 1.076

ω2l√E/ρ

= 3.642

ω3l√E/ρ

= 6.579

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 127: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Solution of Simultaneous Linear Algebraic Equations:Static Analysis of a Scaffolding

3 bars supported by 6 cablesform a simple scaffolding. Giventhe positions and magnitudes for3 loads applied to the bars, findthe tension in each cable.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 128: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Bar 1

Force equilibrium ∑Fy = 0

TA + TB − TC − TD − TF − P1 = 0

Moment equilibrium ∑M = 0

−9TB + TC + 4TD + 7TF + 5P1 = 0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 129: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Bar 1

Force equilibrium ∑Fy = 0

TA + TB − TC − TD − TF − P1 = 0

Moment equilibrium ∑M = 0

−9TB + TC + 4TD + 7TF + 5P1 = 0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 130: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Bar 2

Force equilibrium ∑Fy = 0

TC + TD − TE − P2 = 0

Moment equilibrium∑M = 0

−3TD + 2TE + P2 = 0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 131: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Bar 2

Force equilibrium ∑Fy = 0

TC + TD − TE − P2 = 0

Moment equilibrium∑M = 0

−3TD + 2TE + P2 = 0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 132: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Bar 3

Force equilibrium∑Fy = 0

TE + TF − P3 = 0

Moment equilibrium∑M = 0

−4TF + P3 = 0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 133: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Bar 3

Force equilibrium∑Fy = 0

TE + TF − P3 = 0

Moment equilibrium∑M = 0

−4TF + P3 = 0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 134: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Assembling Equations

At this point, we have six independent equations (two for eachbar), and six unknowns (cable tensions). Reformat the sixequilibrium equations to isolate the unknown tensions on theleft-hand side of the equations. Make sure the tension variables arein the same order in each equation:

TA +TB −TC −TD −TF = P1

−9TB +TC +4TD +7TF = −5P1

TC +TD −TE = P2

−3TD +2TE = −P2

TE +TF = P3

−4TF = −P3

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 135: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Solution of Governing Equations

1 1 −1 −1 0 −10 −9 1 4 0 70 0 1 1 −1 00 0 0 −3 2 00 0 0 0 1 10 0 0 0 0 −4

TA

TB

TC

TD

TE

TF

=

P1

−5P1

P2

−P2

P3

−P3

If P1 = 2000 lb, P2 = 1000 lb, P3 = 500 lb, various solutionmethods detailed in Chapter 3 can solve for TA · · ·TF :

TA = 1944.45 lb TB = 1555.55 lbTC = 791.67 lb TD = 583.33 lbTE = 375 lb TF = 125 lb

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 136: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Eigenvalue Problems: Critical Loads for Buckling a Column

A long column with elasticmodulus E and cross-sectionalmoment of inertia I is subjectedto an axial load P. If there is asmall deformity in the columndue to misalignment duringconstruction or some otherreason, its strength isconsiderably reduced. Thedeformity will cause the columnto buckle long before a shortercolumn would have been crushed.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 137: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Governing Equations for Discretized Column

The continuous differentialequation of deflection

d2y

dx2+

P

EIy = 0

can be discretized with thefollowing substitution:

d2y

dx2≈ yi+1 − 2yi + yi−1

(∆x)2

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 138: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Solution of Discretized Equations

At any given point i , the governing equation evaluates to

yi+1 − 2yi + yi+1

(∆x)2+ λyi = 0

where λ = P/(EI ). Dividing the column into 4 segments (a totalof 5 points), evaluating the equation at points 2, 3, and 4 yields:

y1 −(

2− λL2

16

)y2 + y3 =0

y2 −(

2− λL2

16

)y3 + y4 =0

y3 −(

2− λL2

16

)y4 + y5 =0

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 139: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Solution of Discretized Equations

Since the column is pinned on both ends, we assume that thedeflections y1 = y5 = 0. We can then convert the previous threeequations into the matrix form

(2− λL2

16

)1 0

1(2− λL2

16

)1

0 1(2− λL2

16

)

y2

y3

y4

=

000

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 140: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Statistics: Realistic Design Properties of Materials

A shipment of AISI 1020 hot-rolled steel your company bought hasa textbook yield strength of 29700 psi. Upon testing 50 samples ofthe material, you notice that almost no samples measured a yieldstrength of 29700 psi. Assuming these samples are typical, whatstrength should your designers assume as a minimum, so that 95%of the time, the material they use will meet or exceed thatminimum?

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 141: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Yield Strength Data (in ksi)

# Sy # Sy # Sy # Sy # Sy

1 29.4 11 29.3 21 28.9 31 31.3 41 29.72 30.5 12 29.8 22 31.2 32 30.4 42 29.23 30.5 13 30.3 23 29.3 33 31.9 43 27.84 28.3 14 28.1 24 28.8 34 31.2 44 31.75 33.0 15 30.7 25 31.2 35 27.6 45 30.66 28.2 16 32.8 26 32.1 36 29.5 46 29.17 31.4 17 29.4 27 30.1 37 28.4 47 30.28 29.7 18 31.6 28 32.2 38 31.3 48 29.49 29.9 19 30.8 29 29.3 39 32.3 49 30.310 30.9 20 29.8 30 30.1 40 29.9 50 27.2

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 142: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Statistical Characteristics of Samples

One basic statistical characteristic is the mean or average,indicating the central tendency of the data. Add up all the yieldstrength measurements and divide by the number of samples tocalculate it:

X =1

n

n∑i=1

xi = 30.1

Another characteristic is the sample standard deviation, indicatingthe predictability of the data. Small standard deviations come fromdata that is predominantly clustered around the mean; largestandard deviations come from data that is more scattered.

s =

√√√√ 1

n − 1

n∑i=1

(xi − X

)2= 1.36

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 143: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Statistical Characteristics of Samples

One basic statistical characteristic is the mean or average,indicating the central tendency of the data. Add up all the yieldstrength measurements and divide by the number of samples tocalculate it:

X =1

n

n∑i=1

xi = 30.1

Another characteristic is the sample standard deviation, indicatingthe predictability of the data. Small standard deviations come fromdata that is predominantly clustered around the mean; largestandard deviations come from data that is more scattered.

s =

√√√√ 1

n − 1

n∑i=1

(xi − X

)2= 1.36

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 144: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Predictions From a Normal Distribution

We assume that the processes controlling the steel’s yield strengthare random, even if they’re well controlled. Many randomphenomena in engineering follow a normal or Gaussian probabilitydistribution.

Standard tables exist that allow us to predict probabilities offinding a particular range of results from a set of randommeasurements, or to take a particular probability and convert itback to a range of results.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 145: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Predictions From a Normal Distribution

We assume that the processes controlling the steel’s yield strengthare random, even if they’re well controlled. Many randomphenomena in engineering follow a normal or Gaussian probabilitydistribution.Standard tables exist that allow us to predict probabilities offinding a particular range of results from a set of randommeasurements, or to take a particular probability and convert itback to a range of results.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 146: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Using Statistical Tables

The usual set of statistical tables show relationships between avariable z and a definite integral Φ(z). Without going into toomuch detail, z is a function of the measured variable (x in thegeneral case, Sy in ours) and the variable’s mean and standarddeviation.

Our 95% success requirement corresponds to a Φ(z) value of 0.05,which is attached to a z value of -1.64. If z = −1.64, then the Sy

corresponding to that z is 27.9 ksi.If your designers work off an expected yield strength of 27.9 ksi,your supplier will be able to meet that requirement 95% of thetime.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 147: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Using Statistical Tables

The usual set of statistical tables show relationships between avariable z and a definite integral Φ(z). Without going into toomuch detail, z is a function of the measured variable (x in thegeneral case, Sy in ours) and the variable’s mean and standarddeviation.Our 95% success requirement corresponds to a Φ(z) value of 0.05,which is attached to a z value of -1.64. If z = −1.64, then the Sy

corresponding to that z is 27.9 ksi.

If your designers work off an expected yield strength of 27.9 ksi,your supplier will be able to meet that requirement 95% of thetime.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 148: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Using Statistical Tables

The usual set of statistical tables show relationships between avariable z and a definite integral Φ(z). Without going into toomuch detail, z is a function of the measured variable (x in thegeneral case, Sy in ours) and the variable’s mean and standarddeviation.Our 95% success requirement corresponds to a Φ(z) value of 0.05,which is attached to a z value of -1.64. If z = −1.64, then the Sy

corresponding to that z is 27.9 ksi.If your designers work off an expected yield strength of 27.9 ksi,your supplier will be able to meet that requirement 95% of thetime.

Mike Renfro Intro to Numerical Methods in Mechanical Engineering

Page 149: Intro to Numerical Methods in Mechanical Engineeringmwr/Lecture 2004-08-31/2004-08-31_slides.pdf · Overview of Numerical Methods Relevance of Numerical Methods ... Introductory material

Natural Frequencies of a Vibrating BarStatic Analysis of a Scaffolding

Critical Loads for Buckling a ColumnRealistic Design Properties of Materials

Homework

Read Chapter 1, complete problems 1.4, 1.5, and 1.9

Write a short C or FORTRAN program to do the following:

s e t the r e a l−va l u ed v a r i a b l e ’ r e s u l t ’ to 9 .0l oop 100000 t imes :

add ( 1 . 0 / 3 . 0 ) to ’ r e s u l t ’l oop 100000 t imes :

s u b t r a c t ( 1 . 0 / 3 . 0 ) from ’ r e s u l t ’p r i n t the v a l u e o f ’ r e s u l t ’

What do you predict the output of the program will be?

What is the actual output?

Mike Renfro Intro to Numerical Methods in Mechanical Engineering