Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Slides:



Advertisements
Similar presentations
Section 3-5: Projectile Motion
Advertisements

Kinematics of Particles
Chapter 4 Two-Dimensional Kinematics PowerPoint presentations are compiled from Walker 3 rd Edition Instructor CD-ROM and Dr. Daniel Bullock’s own resources.
Projectiles Chapter 5. If we ignore the effects of air resistance an object in the air has a horizontal acceleration of ax = 0 m/s 2 and a vertical acceleration.
Warm - up Problem: A sprinter accelerates from rest to 10.0 m/s in 1.35s. a.) What is her acceleration? b.) How far has she traveled in 1.35 seconds?
Physics Kinematics: Projectile Motion Science and Mathematics Education Research Group Supported by UBC Teaching and Learning Enhancement Fund
Ideal Projectile Motion
Projectile Motion.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Parametric Equations Here are some examples of trigonometric functions used in parametric equations.
ActivPhysics OnLine Problem 3.3: Changing the x-velocity Choose xy coordinates in the usual way. y x upwards : + y downwards: - y In these questions we.
Motion Along a Straight Line
Physics 121 Topics: Course announcements Quiz
Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required.
Non-Linear Simultaneous Equations
Unit 8 POE Ballistic Device
What is Projectile Motion?
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
AIM: How can we describe the path of an object fired horizontally from a height above the ground? DO NOW: A ball rolls off a table top with an initial.
SACE Stage 2 Physics Motion in 2 Dimensions.
Chapter 9 Numerical Integration Flow Charts, Loop Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 6 Finding the Roots of Equations
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
Projectile Motion Horizontally Launched Projectiles Projectiles Launched at an Angle A.S – Due Friday, 11/14 Text Reference: chapter 3.
Kinematics in 2-D Concept Map
Vector-Valued Functions 12 Copyright © Cengage Learning. All rights reserved.
10.4 Projectile Motion Greg Kelly, Hanford High School, Richland, Washington Photo by Vickie Kelly, 2002 Fort Pulaski, GA.
Introduction to Projectile Motion
College Physics, 7th Edition
Chapter 3 Motion in Two or Three Dimensions. Position Consider the following position vector expressed in Cartesian coordinates. This vector defines the.
Physics - Chapter 3.
Physics Lesson 6 Projectile Motion Eleanor Roosevelt High School Mr. Chin-Sung Lin.
Physics Lesson 6 Projectile Motion
10.4 Projectile Motion Fort Pulaski, GA. One early use of calculus was to study projectile motion. In this section we assume ideal projectile motion:
Introduction to Engineering Systems Copyright ©2000, University of Notre Dame Module 1: Mechanical Systems Professor Flint O. Thomas Department of Aerospace.
Copyright Sautter Motion in Two Dimension - Projectiles Projectile motion involves object that move up or down and right or left simultaneously.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © 2007 Pearson Education, Inc. Slide 3-1.
CHAPTER 6 MOTION IN 2 DIMENSIONS.
Motion in Two Dimensions. Projectile Motion A projectile is an object moving in two dimensions under the influence of Earth's gravity; its path is a parabola.
Position and Displacement If we want to locate a point in space we can use a position vector that extends from a reference point to the location we are.
Two Dimensional Motion Two components: Horizontal (x-axis) & Vertical (y-axis)
September 24-25, 2015 So far, we have studied free fall – the vertical (up/down) motion of an object that only experiences force due to gravity. What.
Physics 111 Projectile Motion 2.0.
PHYSICS 103: Lecture 5 Agenda for Today: Review HW Solutions
Physics.  A projectile is any object that has been launched with no means of controlling its own flight…it is in free-fall motion while at the same time.
Projectile Motion.
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Motion in Two and Three Dimensions Chapter 4. Position and Displacement A position vector locates a particle in space o Extends from a reference point.
Physics Lesson 6 Projectile Motion
A ball is rolling along a flat, level desk. The speed of the ball is 0
What is Projectile Motion?
AP Physics I Kinematics in 2D.
Unit 3: Projectile & 2D Motion
King Fahd University of Petroleum & Minerals
Projectile Motion.
Projectile Motion AP Physics C.
Projectile motion Projectile Motion Subject to Gravity Assumptions:
Bellringer What is the difference between the words vertical and horizontal? What does the word projectile mean? How is one dimensional (1D), two dimensional.
Motion in 2D (Projectiles!!) Test Monday October 15th
Projectile Motion AP Physics C.
Chapter 3: Polynomial Functions
A projectile launched at an angle
Chapter 3: Polynomial Functions
Topic 9.2 Space Projectile Motion.
Projectile Motion AP Physics C.
What is Projectile Motion?
Projectile Motion AP Physics C.
College Physics, 7th Edition
Presentation transcript:

Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Computing Proficiency for Engineers Software Helps Engineers Do Their Jobs – Get Information: Web of Science, Google – Present information and Proposals: PowerPoint – Design: Discipline-specific tools, General Computational Tools – Analyze: Computational Tools, Discipline-specific tools Matlab, Excel, Mathematica, MathCad, Finite Element – Test and Implement: Data acquisition: LabView, Basic Stamp, etc. Statistics: SPSS, SAS, MiniTab, S+, R, etc. – Report: Word, Adobe Design Suite, Framemaker, LaTeX, emacs Engineering Computation: An Introduction Using MATLAB and Excel

Computational Tools Used for “everyday” tasks of engineering: – Programming for repetitive calculations – Data analysis – Plotting Many choices: – Programming languages such as C++, Fortran, BASIC – Mathematical computational tools such as MATLAB, Mathematica, Mathcad, Maple – Spreadsheets, such as Microsoft Excel Engineering Computation: An Introduction Using MATLAB and Excel

Computational Tools MATLAB – Product of MathWorks, Inc. – Widely used by engineers in academia and in industry – Combines a calculator-type interactive mode and powerful programming tools Excel – Spreadsheet application of Microsoft Office – Originally designed for business use, but now contains many commands and features that are useful for engineering analysis Engineering Computation: An Introduction Using MATLAB and Excel

Analytic and Algorithmic Solutions Analytic: Exact solution, based on the application of mathematics Algorithmic: Approximate solution, based on the application of a computational procedure (the algorithm) Engineering Computation: An Introduction Using MATLAB and Excel

Example Consider this problem of projectile motion: A ball is fired with an initial speed of 10 m/s, at an angle of 35 degrees relative to the ground. We want to find the maximum height, the location at which the ball hits the ground, and the total flight time. Engineering Computation: An Introduction Using MATLAB and Excel

Two ways to find the answers Analytic Solution – Solve calculus problem for motion as a function of time – Analyze the solution to find the point of maximum height – Analyze the solution to find the time the flight ends Algorithmic Solution – Solve calculus problem for motion as a function of time – Evaluate the solution at many time instances – Test each function evaluation for meeting prescribed criteria Engineering Computation: An Introduction Using MATLAB and Excel

The Mathematical Model In physics class, you will learn how formulate the mathematical model – the equations describing the physical behavior Start by examining the forces acting on the ball: Engineering Computation: An Introduction Using MATLAB and Excel Weight

Mathematical Model (cont.) In the y (vertical) direction, the total force is equal to –W (the weight, acting downward) The weight is equal to the mass times the acceleration (F = ma) Since the weight is equal to mass times g (gravitational acceleration), the vertical acceleration a y = -g Engineering Computation: An Introduction Using MATLAB and Excel

Mathematical Model (cont.) Once we know the vertical acceleration, we integrate with respect to time to obtain the vertical velocity: The constant C is a boundary condition (or initial condition). If we evaluate the velocity at time t = 0, we see that C must equal the initial upward velocity Engineering Computation: An Introduction Using MATLAB and Excel

Mathematical Model (cont.) Initial velocities: Engineering Computation: An Introduction Using MATLAB and Excel

Mathematical Model (cont.) So the vertical velocity is: Integrating this expression with respect to time gives us the vertical position (height): Evaluating at time = 0, since the height = 0, the constant C = 0: Engineering Computation: An Introduction Using MATLAB and Excel

Mathematical Model (cont.) Similarly, in the horizontal direction, there are no forces acting on the ball, so Integrating with respect to time gives us the horizontal velocity: When t = 0, we see that C is equal to the initial horizontal velocity Engineering Computation: An Introduction Using MATLAB and Excel

Mathematical Model (cont.) Integrating again, we find that the horizontal position x is When t = 0, x = 0, since we have defined the origin of our coordinate system at the cannon. Therefore, Engineering Computation: An Introduction Using MATLAB and Excel

Mathematical Model (cont.) So we now have equations for the height and the horizontal distance as functions of time: Engineering Computation: An Introduction Using MATLAB and Excel

Assumptions Before proceeding to the solution of the problem, it is important to recognize the assumptions that have been made in the formulation of the mathematical model: 1.There is no air resistance (the weight is the only force considered) 2.The ground if flat and level (the height is measured relative to the initial position) 3.The launch point is even with the ground (the height of the cannon is neglected) Engineering Computation: An Introduction Using MATLAB and Excel

Analytic Solution This solution requires calculus (as did the formulation of the mathematical model) To find an extreme value of the height, we differentiate the expression for height with respect to time: Of course this rate of change of height is the vertical velocity, and is equal to zero when an extreme value is reached Engineering Computation: An Introduction Using MATLAB and Excel

Analytic Solution (cont.) Setting the rate of change of height equal to zero, we get the value of time for which the height is maximized: Substituting the values of the constants, Engineering Computation: An Introduction Using MATLAB and Excel

Analytic Solution (cont.) To find the maximum height, we substitute the time t = seconds into the equation for height: So h max = 1.68 meters Engineering Computation: An Introduction Using MATLAB and Excel

Analytic Solution (cont.) To find the total time of the flight, set the height equal to zero (since the height will be zero when the ball lands): There are two solutions to this equation: t = 0 (the starting point) and t = 1.17 seconds (the landing point) Engineering Computation: An Introduction Using MATLAB and Excel

Analytic Solution (cont.) To find the location where the ball hits the ground, we substitute the time t = 1.17 seconds into the equation for horizontal position x: So x max = 9.58 meters Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution For the algorithmic solution, we will numerically evaluate the equations at different values of time until we find the approximate answer Let’s consider the maximum height, using the equation Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution (cont.) Here is our solution algorithm for finding the maximum height, written in pseudocode: Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution (cont.) How do we determine what value of time interval to use? We make an initial guess, realizing that we may need to repeat the analysis with a different value. Smaller intervals = better accuracy but more calculation steps, larger intervals = less accuracy but fewer steps. Solution with time intervals of 0.1 seconds: Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution (cont.) Here is the algorithm for finding the total flight time and distance travelled: Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution (cont.) Solution with time intervals of 0.1 seconds: Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution (cont.) Based on the solution for total flight time, calculate the total distance travelled from the equation: Solution: Engineering Computation: An Introduction Using MATLAB and Excel

Algorithmic Solution (cont.) Results with different values of time intervals: Compare to exact solution: Engineering Computation: An Introduction Using MATLAB and Excel Time Interval, seconds Peak Height, meters Distance Travelled, meters Total Flight Time, seconds Number of Loops Calculated

Comparison of Solutions Note that the algorithmic solution converges to the exact solution as the time interval is decreased How many intervals should be used? Depends on how accurate the solution needs to be – we will discuss this further when we address accuracy and precision Engineering Computation: An Introduction Using MATLAB and Excel

Why Use an Algorithmic Solution? If we can find an exact solution, why use an algorithm? There are many problems faced by engineers in which an exact solution does not exist, or may be very difficult to obtain In other cases, an algorithmic solution provides a check to ensure that the exact solution is correct Engineering Computation: An Introduction Using MATLAB and Excel

A Note About the Analytic Solution Remember that what we call the “exact” analytic solution is the exact solution of the mathematical model – not of the physical problem In the case of the cannon ball, recall that we made several assumptions, such as neglecting air resistance The actual flight of the cannon ball may be very close to or very different from the results of the mathematical model, depending on the validity of the assumptions Engineering Computation: An Introduction Using MATLAB and Excel

In-Class Exercise Using only the equation for distance Develop an algorithm for finding the launch angle θ that maximizes the distance traveled, given a constant value of initial velocity v Engineering Computation: An Introduction Using MATLAB and Excel

Solution In the previous example, there was only one variable: time. For this exercise, there are two variables: time and angle We can use our previously created algorithm for finding the distance traveled: Engineering Computation: An Introduction Using MATLAB and Excel

Solution (cont): Define the limits of possible angles: 0 deg < θ < 90 deg Step 1: Set the angle theta, the max distance x_max, and the angle associated to the maximum distance theta_opt equal to zero Step 2: Set the angle theta equal to theta plus a chosen angle increment t_inc (for example, 5 degrees) Step 3: For a chosen initial velocity and time increment, calculate the distance traveled x using the algorithm previously developed Step 4: If x > x_max, set x_max equal to x and theta_opt equal to theta Step 5: Repeat steps 2-4 until theta is greater than or equal to 90 degrees Step 6: Report the value of theta_opt Engineering Computation: An Introduction Using MATLAB and Excel

Notes About This Exercise Using a spreadsheet to solve this problem is tedious: requires inputting new data repeatedly A programming language such as MATLAB allows the loops to be automated Engineering Computation: An Introduction Using MATLAB and Excel

Solution 45 degrees is the launch angle that results in the greatest distance travelled Engineering Computation: An Introduction Using MATLAB and Excel