Computational Project 5

Similar documents
Ordinary Differential Equations (ODEs) Background. Video 17

16.07 Dynamics. Problem Set 3

Physics 111. Lecture 8 (Walker: 4.3-5) 2D Motion Examples. Projectile - General Launch Angle. In general, v 0x = v 0 cos θ and v 0y = v 0 sin θ

When we throw a ball :

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

Projectile Motion. Chin- Sung Lin STEM GARAGE SCIENCE PHYSICS

PHYS 111 HOMEWORK #5

1 /30. APPM 1235 Final Exam Fall 2014 December 17, /30 3 /25

Planar Motion with Constant Acceleration

AH Mechanics Checklist (Unit 1) AH Mechanics Checklist (Unit 1) Rectilinear Motion

Two-Dimensional Motion Worksheet

INTRODUCTION. 3. Two-Dimensional Kinematics

Physics 202 Laboratory 3. Root-Finding 1. Laboratory 3. Physics 202 Laboratory

Physics 1A, Summer 2011, Summer Session 1 Quiz 3, Version A 1

Score on each problem:

Constants: Acceleration due to gravity = 9.81 m/s 2

Constants: Acceleration due to gravity = 9.81 m/s 2

Chapter 2 One-Dimensional Kinematics. Copyright 2010 Pearson Education, Inc.

MOTION OF A PROJECTILE

Components of a Vector

Arial Bombing Techniques

Problem: Projectile (CM-1998) Justify your answer: Problem: Projectile (CM-1998) 5 10 m/s 3. Show your work: 3 m/s 2

Homework 3: Kinematics and Dynamics of Particles Due Friday Feb 16, 2018

Honors Physics Acceleration and Projectile Review Guide

UNIVERSITY OF MALTA G.F. ABELA JUNIOR COLLEGE

Physics 111. Lecture 8 (Walker: 5.1-3) Force (F) Mass (m) Newton s 2 nd Law: F = ma. Summary - 2D Kinematics. = (20.0 m/s)(6.

Exam 1 Practice SOLUTIONS Physics 111Q.B

Kinematics in Two Dimensions; Vectors

PHYSICS 221, FALL 2009 EXAM #1 SOLUTIONS WEDNESDAY, SEPTEMBER 30, 2009

Projectile motion. Objectives. Assessment. Assessment. Equations. Physics terms 5/20/14. Identify examples of projectile motion.

v 1 parabolic orbit v 3 m 2 m 3

The Shooting Method for Boundary Value Problems

Break problems down into 1-d components

Physics 351, Spring 2017, Homework #2. Due at start of class, Friday, January 27, 2017

Lab 5: Projectile Motion

3 Vectors and Two- Dimensional Motion

34.3. Resisted Motion. Introduction. Prerequisites. Learning Outcomes

Chapter 3 Kinematics in Two Dimensions; Vectors

Example force problems

Vectors and Scalars. Scalar: A quantity specified by its magnitude only Vector: A quantity specified both by its magnitude and direction.

University of Alabama Department of Physics and Astronomy. PH 105 LeClair Summer Problem Set 3 Solutions

PHYS 1114, Lecture 10, February 8 Contents:

Physics Mechanics. Lecture 8 2D Motion Basics

Two Dimensional Kinematics. Pre-Test

AP Physics First Nine Weeks Review

PHY 1114: Physics I. Quick Question 1. Quick Question 2. Quick Question 3. Quick Question 4. Lecture 5: Motion in 2D

SAMPLE. paper provided. Each question carries 2 marks. Marks will not be. from any one option. Write your answers on the answer paper provided.

AP Physics 1 Multiple Choice Questions - Chapter 4

PHY 141 Midterm 1 Oct 2, 2014 Version A

Lab 1: Jumping Right In

Chapter 3 2-D Motion

Chapter 3 Kinematics in Two Dimensions; Vectors

Computational Methods of Scientific Programming. Lecturers Thomas A Herring Chris Hill

Announcements. Unit 1 homework due tomorrow 11:59 PM Quiz 1 on 3:00P Unit 1. Units 2 & 3 homework sets due 11:59 PM

Physics 8 Friday, October 21, 2011

5 Projectile Motion. Projectile motion can be described by the horizontal and vertical components of motion.

Vocabulary Preview. Oct 21 9:53 AM. Projectile Motion. An object shot through the air is called a projectile.

PS 11 GeneralPhysics I for the Life Sciences

[1] (b) State one difference and one similarity between the electric field of a point charge and the gravitational field of a point mass....

Problem: Projectile (CM-1998)

Chapter 8. Centripetal Force and The Law of Gravity

PHYSICS 231 INTRODUCTORY PHYSICS I

Announcement. Quiz on Friday (Graphing and Projectile Motion) No HW due Wednesday

Motion with Constant Acceleration

Projectile Motion with Air Resistance (Numerical Modeling, Euler s Method)

Progressive Science Initiative. Click to go to website:

3 TWO-DIMENSIONAL KINEMATICS

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

Physics 8 Friday, October 2, 2015

P442 Analytical Mechanics - II

Experiment 4: Projectile Motion

Algorithm evaluation: Figure 1:

AP Calculus (BC) Chapter 10 Test No Calculator Section. Name: Date: Period:

4 MOTION IN TWO AND THREE DIMENSIONS

Dynamic equilibrium: object moves with constant velocity in a straight line. = 0, a x = i

Lab 4: Projectile Motion

Chapter 3: Kinematics in Two Dimensions

Physics 151 Homework Assignment #3 Due June 20

Chapter 3. Table of Contents. Section 1 Introduction to Vectors. Section 2 Vector Operations. Section 3 Projectile Motion. Section 4 Relative Motion

Department of Natural Sciences Clayton College & State University. Physics 1111 Quiz 3

Projectile motion. Solution: Observation:

Graphical Vector Addition

Physics 101 Fall 2005: Test 1 Free Response and Instructions

Lecture 3 - Pull! A Puzzle... m g. m g. = d Sin[θ] F μ N 1 (2)

Wallace Hall Academy

Modeling with differential equations

Exam 2--PHYS 101--F17

Physics 207 Lecture 7. Lecture 7

Multiple-Choice Questions

Optimal Control - Homework Exercise 3

Newton s First Law and IRFs

Isaac Newton ( ) 1687 Published Principia Invented Calculus 3 Laws of Motion Universal Law of Gravity

XXIX Applications of Differential Equations


Physics 20 Practice Problems for Exam 1 Fall 2014

Chapter 3 Motion in two or three dimensions

Test Wed, Feb 8 th 7pm, G20 MING HSIEH Bring your calculator and #2 pencil with a good eraser! 20 Multiple choice questions from:

Chapter 4: Newton s First Law

Differential and Difference LTI systems

Physics I (Navitas) EXAM #2 Spring 2015

Transcription:

Last updated December 5, 2017. Computational Project 5 due: 12/07/2017, beginning of class 1. You are playing a game of angry birds. In order to hit the pig you need to first shoot your bird through a gap in a pillar. This problem focuses on this first step; hitting the pig is question 2. The equations governing the trajectory of a bird after launch are dy 2 2 = mg c (1) m d2 x dx 2 2 = c (2) where x is horizontal position, y is altitude, m is the bird s mass = 1.5 kg, g is the acceleration of gravity = 9.8 m/s 2, and c is a drag coefficient = 0.5 kg m 1. The 1

launching coordinate is at zero elevation, zero distance, i.e., y(0) = x(0) = 0. The bird is launched with a speed equal to v 0 at angle θ (in degrees) relative to the ground. Thus the initial x and y velocities are 2πθ v y (t = 0) = v 0 sin v x (t = 0) = v 0 cos 360 ) ( 2πθ 360 From trial and error, you have determined that the most plausible way of beating this level is to fly the bird through the gap exactly at the apex of its trajectory. Use this information to find v 0 and θ using the shooting method. The maximum value of θ allowed is 80 and the maximum speed is v 0 = 10. The wall is located at x = 0.9 m, and the gap is between 1.25 < y < 1.5 m. (a) First, write MATLAB code that solves for the bird s trajectory. Use MATLAB s internal ODE solvers for this part. Your code should make a plot of the bird s trajectory, y(t) vs x(t), for y(t) > 0. Set the plot range to be axis([0 5 0 3]). Experiment with different values of θ, m, c, and v 0 to convince yourself that the code is working properly. (b) Compute the vertical height (y(t w )) at the time (t w ) at which the bird will be passing through the wall, (i.e., when x(t w ) = 0.9). Since MATLAB will not necessarily include this exact point in its solution to the ODEs, you will need to use interpolation to arrive at a precise estimate of y(t w ), or force MATLAB to return a finely resolved solution vector using tspan. Also compute v y (t w ). (c) Transform your code from parts (a) and (b) into a function that takes as input z = [v 0, θ] and outputs a vector f containing two elements: the difference between the target height and computed height at t w and the difference between the target vertical velocity and computed vertical velocity at t w. (d) Use the function from part (c) to find reasonable values of v 0 and θ, and plot your solution from t = 0 to t = t w. Some experimentation may be required. You may refer to HW03, problem # 5 for use of the fsolve routine. Alternatively, the fminsearch routine can work well for this problem (it only requires that you modify part (d) such that the function returns a scalar norm of the output vector, f ). You may find MATLAB displaying some annoying warning messages encountered if/when y(t) < 0. Since we are not interested in this part of the solution, you can surppress these using warning( off, MATLAB:ode45:IntegrationTolNotMet ) 2

2. The pig is located at x = 4 m, and the parabolic trajectory computed in part 1 will pass through the gap in the wall but will not hit the pig. Fortunately, you have a yellow bird which you can activate with a boost of acceleration in the x direction. The equations governing the trajectory of a bird including this boost are dy 2 2 = mg c (3) m d2 x dx 2 2 = c + u(t, t b )b (4) (5) where b is a boost of force = 380 kg m s 2 activated at time t b. u(t, t b ) is a step function, whose value is 0 for t < t b and 1 for t t b. The pig will be hit if the horizontal distance traveled when the bird impacts the ground is at 4 ± 0.1 m. Use the shooting method to find the value of t b such that the bird hits the pig. (a) First, write MATLAB code that solves for the bird s trajectory using MATLAB s internal ODE solvers. For the step function, use stepfun. Your code should also make a plot of the bird s trajectory, y(t) vs x(t), for y(t) > 0. (b) Compute the horizontal d traveled between the launch point and impact, where impact occurs when y(t) = 0 for t > 0. (c) Transform your code from parts (a) and (b) into function that takes as input a value of the boost time, t b, and outputs the difference between d and the pig s location. (d) Use a numerical root finding method (either written yourself, provided in class, or use MATLAB internal functions) to calculate and display the desired boost time such that the pig is hit. 3

3. In the next level, we are introduced to the exploding birds, which have a fuse to automaticlaly detonate in 3 s. The goal is to detonate the bomb exactly at the time it impacts the beam holding up the pig, with a maximum hang time in the air. Otherwise, it will get wet and diffuse. In other words, it is desired to find the initial vertical velocity such that y(3) = 0. For this problem we will ignore drag in the x-direction and directly solve the following ODE in the y-direction using the finite differences method 2 = mg c dy (6) subject to y(0) = 0, y(3) = 0. aerodynamic, c = 0.75 kg s 1. These birds are lighter, m = 0.5 kg, but not as (a) Include the following written (or typed) steps with the hard copy of your solution. Begin by sketching a picture of the discretized problem using 11 evenly spaced nodes ( t = 0.3 s). Next, write down the finite difference representations of the derivative terms in the governing equation; use expressions that 4

are second order accurate in t. Then use these to derive a discrete governing equation. Apply this discrete governing equation at each of the internal nodes of your domain (or at least enough to see the pattern) you should end up with 9 equations. Incorporate the boundary conditions into these equations. (b) Use MATLAB to solve the resulting system of linear equations for the vertical trajectory, y(t), and plot the solution. (c) From the computed trajectory, calculate and display the initial vertical velocity, v y (0), required to keep the bird a loft for 3 s. Is this solution approach feasible, given that the maximum initial speed is 10 m/s, and maximum angle is 80? If not, approximately what is the longest fuse time that would be feasible? 5