ENGR20004-程序代写案例-Assignment 3
时间:2021-09-28

The University of Melbourne ENGR20004 Engineering Mechanics Assignment 3 – Grumpy Birds Due date: Monday, 4 October 2021, 09 :00 am (LMS server time) Instructions for Reporting Report submission Each group is to electronically submit the report (in PDF format, a single file, no more than 10 pages, excluding appendix) to LMS. Show all workings where applicable. Make sure to include names and student numbers of all group members in the report. The associated MATLAB codes should be submitted to Canvas, especially your m-file for the function mass ejection for Question 2(c) of the analytical part. No marks will be awarded for Question 2(c) even if the m-file is submitted late. Additional note A short oral test (5 marks) will be conducted before your experiments. You are expected to read the handouts and watch lab videos in advance. Demonstrators will ask you simple questions related to experiments. If you fail to answer, you will be asked to return to your desk and review the lab materials again. The total marks for Assignment 3 is 45 marks ( Reports: 40 marks + oral test: 5 marks). Background After graduating from the University of Melbourne, you got your dream job in a company developing a sequel to the popular Angry Birds game, titled ‘Grumpy Birds’. In this game, players slingshot grumpy birds towards their enemies to destroy them. As your first major project, you are asked to design and implement the physics engine of Grumpy Birds game. The acceleration due to gravity is 9.81m/s2. Experimental part (20 marks) Essential personal protection equipment 1. Enclosed footwear (if not worn, you will not be admitted into the lab). 2. Safety glasses (they will be provided and must be worn at all times). Objective While striving to design the most realistic physics engine for the game, you remember learning about projectile motion in ENGR20004 Engineering Mechanics, and decide to come up with your own model for the projectile motion from the actual experiment. In this experiment, you will apply a working knowledge of kinematics and dynamics to predict the trajectories of a mass in projectile motion with and without aerodynamic drag and compare them with the actual trajectory measured during the experiment. Apparatus 1. Launcher with adjustable launching angle mechanism (Figure 1); 2. Rubber band; 3. A glass marble with the mass of 5.1g and the diameter of 1.5cm; 1 Assignment 3 – Grumpy Birds 4. A styrofoam ball with the mass of 0.2g and the diameter of 2.3cm; 5. Protractor; 6. Tape measure; 7. Weights and a hanger; 8. Calibration paper; 9. iPad mini with a mount. Figure 1: Launcher Calibration of the Rubber Band Before conducting the experiment, we need the relationship between the force applied to stretch the rubber band, F and the extension of the rubber band from its relaxed position, given by l− l0, (Figure 2) so that we can use this information to find out the energy stored in the rubber band at various extensions. The process of determining this relationship is called ‘calibration’. We can do this by applying forces with known magnitude to the rubber band (this can be done by hanging different weights) and recording its displacement. Go through the following steps to find the relationship between hanging weight and rubber band displacement. Figure 2: Measuring rubber band elasticity 1. Set-up the launcher at θ = 90◦; 2. Measure the length of the relaxed rubber band (before hanging any weight); 3. Hang different weights with a hanger and record the stretched length of the rubber band. Page 2 of 8 Assignment 3 – Grumpy Birds Question 1 (2 marks) Plot a graph of force versus displacement for the rubber band and fit a curve to the values that you obtained. You should try to fit curves of different type and find the best as the rubber band may not necessarily behave linearly. How can you determine the strain energy stored in the rubber band with a known value of extension? What is the strain energy stored in the rubber band when it is stretched by 2cm (from its relaxed length)? Hitting Target We now start the fun part, hitting a target (Figure 3). By trying different launch angles and pulling the rubber band to different lengths you can hit a target placed at a certain distance from the launcher. After hitting the target, write down the stretched length of the rubber band (l), launch angle (θ) and height of the launch point (where the marble goes through between the needles) from the ground (h). Follow the below steps: 1. Place a target at your preferred position (make sure that both the launcher and the target are within the field of view of the iPad); 2. Hit the target with the marble by trying different launch angles and pulling the rubber band to different lengths; 3. Once you hit the target, repeat the launch while recording its motion with the iPad (with the calibration paper in place). (a) Place the marble on the rubber band and measure the unstretched length of the rubber band; (b) Set-up an iPad on a mount to record the motion of the marble, making sure that the entire motion is within the field of view of the iPad; (c) Place the calibration paper along the same plane as the marble’s motion; (d) Start recording video using SloPro application on the iPad; (e) Move the calibration paper further away from the iPad so that it won’t interfere with the motion of the marble. (f) Pull the marble down and measure the stretched length of the rubber band; (g) Release the marble and keep recording its motion until the marble hits the ground (or the target); 4. Measure the launch angle, θ, the height of the marble’s launch point (needles) from the ground, h, and the horizontal distance between the target and the marble’s launch point. Figure 3: Hitting Target Extracting Data Procedure The combination of an iPad and SloPro application is able to record the motion of the marble in a video with the frame rate of 60 fps (frames per second). The recorded video will be transferred to the system to be analyzed with provided MATLAB codes. The video output format from iPad is .mov format. However, .mov format can only be read in MATLAB running in Windows 7 or Mac OS. Therefore, if you are running MATLAB in other platforms, you need to convert it to the format supported in your Page 3 of 8 Assignment 3 – Grumpy Birds platform (for the supported formats in each platform, see http://au.mathworks.com/help/matlab/ ref/videoreader-class.html). You can use your preferred video converting tools but if you don’t have access to any, you can use an online tool (http://video.online-convert.com/convert-to-avi). 1. Run trajectory.m and use the command image(read(obj,frame number)) to find the starting and ending frames that capture the whole trajectory of the marble. 2. To check your chosen frames, run showframes.m. 3. Now, run plottrajectory.m and enter the frame number which clearly displays the calibration target. Next, use your data cursor to find the upper left and lower right corners of a section of the calibration paper and enter the corresponding horizontal (x) and vertical (y) distances. The calibration paper serves as a reference to convert distance in pixels to distance in physical units. 4. Ball’s trajectory is now plotted and you can access to X(cm) and Y (cm) from your MATLAB workspace. Tip: When calibrating, you may enlarge the figure window to obtain more accurate positions of the corners. The steps above are also shown in the video tutorial titled TrajectoryTutorial.mp4 on LMS. Question 2 (3 marks) Find the theoretical initial velocity of the marble (i.e., the velocity when it passes the needles) assuming that all of the strain energy stored in the rubber band is transferred to the marble. Estimate the actual initial velocity from the video frames (velocity is defined as the displacement per unit time) and compare them. What is the efficiency of the launcher in the perspective of the actual energy transferred to the marble from the energy stored in the rubber hand? Is it completely efficient? If not, what are the possible sources of the efficiency loss? Question 3 (4 marks) Determine the trajectory of the marble by tracking the position of it in the extracted video frames. Compute the analytical trajectory assuming no aerodynamic drag and compare it with the actual tra- jectory. How well does it predict the actual trajectory of the ball? Note: Use your actual initial velocity determined from the video frames. Also, you should check whether the measured launch angle (θ) is consistent with the actual angle of the marble’s initial velocity as it leaves the launcher in the video. Question 4 (3 marks) Now, consider the effect of aerodynamic drag on the ball (marble). The drag force is given by D = CD 1 2ρairV 2A and is always directed in the direction opposing the instantaneous velocity (Figure 4). CD, is the drag coefficient, ρair, is the air density, A, is the frontal area of the ball, and V is the instantaneous speed of the marble. Find the expression for the instantaneous acceleration of the ball, ax and ay. Figure 4: Schematic of drag force on a moving ball To model a trajectory with drag you can use the following method. First, consider the acceleration on the ball, (ax(t), ay(t)), held constant within the small time interval, (t, t+ ∆t), i.e. piecewise-constant acceleration. This is a good approximation to a continuously variable acceleration, provided ∆t is small. At time t, the ball can be found at location (rx(t), ry(t)) with velocity (vx(t), vy(t)). The position and velocity at the end of the time interval can be given by Page 4 of 8 Assignment 3 – Grumpy Birds vx(t+ ∆t) = vx(t) + ax(t)∆t, vy(t+ ∆t) = vy(t) + ay(t)∆t, rx(t+ ∆t) = rx(t) + vx(t)∆t+ ax(t) 1 2∆t 2, ry(t+ ∆t) = ry(t) + vy(t)∆t+ ay(t) 1 2∆t 2, By modifying the following MATLAB code snippet you can plot the trajectory of the ball with aerodynamic drag. dt = 0.001; % initial conditions t(1) = 0; vx(1) = ...; vy(1) = ...; rx(1) = ...; ry(1) = ...; while ry(i) > 0 ax = ...; % expression for x-component of acceleration ay = ...; % expression for y-component of acceleration t(i+1) = t(i)+dt vx(i+1) = vx(i)+ax*dt; vy(i+1) = vy(i)+ay*dt; rx(i+1) = rx(i)+vx(i)*dt+ax*0.5*dt*dt; ry(i+1) = ry(i)+vy(i)*dt+ay*0.5*dt*dt; end Question 5 (4 marks) Find the value of CD that most closely matches the experimental data. You can do this iteratively by computing trajectories with different values of CD and comparing them with the actual experimental trajectory. Then, using your optimum value of CD, plot the trajectories computed from the models (1) with drag, (2) without drag and (3) the actual experimental trajectory on the same set of axes and discuss results. Testing a different ball Now, the next step is to validate our model by testing it on a different ball. Repeat the experiment using a styrofoam ball. It is suggested that you launch the ball at θ ' 50◦ with the rubber band stretched to about 10cm. Question 6 (4 marks) Plot the trajectories computed from the models (1) with drag, (2) without drag and (3) the actual experimental trajectory on the same set of axes. Use the previously determined value of CD in Question 5. Is the effect of drag different for the marble and the styrofoam ball? Discuss what makes (or doesn’t make) this difference in context of parameters affecting the kinematics of the ball (e.g. acceleration). How would you choose the ball if you want to minimize the effect of aerodynamic drag on the trajectory? Analytical part (20 marks) In the game of Grumpy Birds, players choose the launch angle, θ, measured anticlockwise from the positive x-direction, and how much to pull on the elastic band, l, on the slingshot (Y-shaped frame), see figure 5. The origin (x, y) = (0, 0) is placed at the base of the slingshot and the bird is launched 2 m above ground. Page 5 of 8 Assignment 3 – Grumpy Birds Figure 5: Basic setup showing the coordinate system, pull-back length, l, and launch angle, θ. Taken from Angry birds game. Question 1: Blue bird (10 marks) Figure 6: The blue bird splits into three smaller equal-mass birds, akin to a shotgun. Taken from Angry birds game. Before designing new types of birds for the Grumpy Birds game, you are asked to first verify the design of one of the existing birds in the original Angry Birds game, the blue bird. The blue bird of mass 1.2 kg can split into three smaller equal-mass birds while airborne to increase area of destruction, see figure 6. The bird is released from the slingshot with the initial speed of 10m/s at the angle of θ = 45◦ from the horizontal. 0.5 s after the blue bird is launched, the blue bird splits into the three smaller birds at angles 30◦, 0◦ and −30◦ relative to the instantaneous velocity. The bird at 0◦ relative angle (the middle bird) retains the same velocity as before the split. Neglect aerodynamic drag for simplicity. (a) Considering the normal-and-tangential (nt-) coordinate system attached to the blue bird just prior to the split, find the velocities of smaller birds after the split in nt-coordinates in terms of the velocity prior to the split, (u, 0) vtop(cos(30 ◦), sin(30◦)), vmid(cos(0◦), sin(0◦)), vbot(cos(−30◦), sin(−30◦)), (b) Write the x- and y-velocity components (as opposed to the nt-components) in m/s of each of the three smaller birds to 4 significant figures. (c) Plot the position of the bird(s) before and after the split every 0.1 s with symbols, including start, split and end points. You can terminate the plots when the birds hit the ground at y = 0. Ensure that axes have correct labels and units. (d) What is the energy required to split the birds? Page 6 of 8 Assignment 3 – Grumpy Birds Question 2: Rocket bird (10 marks) We have seen that in reality aerodynamic drag can actually have significant effects on the motion of the bird. Hence, a new type of bird capable of self-propulsion is designed in order to maximise its flying distance in the presence of aerodynamic drag. This new bird, having the initial mass of mo, generates thrust by ejecting 1% of its initial mass (0.01mo) with the velocity of 50m/s in the direction opposite to the bird’s instantaneous velocity relative to the bird every 0.1s (similar to how rockets generate thrust). Hence, this new bird is named a ‘rocket bird’. The mass ejection process is described in figure 7. Figure 7: The rocket bird gains extra momentum by ejecting small mass at a regular interval. vi and vf represent the velocity of the bird before and after the mass ejection, respectively. ve represents the ejection velocity of mass. (a) From the components of instantaneous velocity before ejection vxi and vyi, and the ejection velocity of mass relative to the bird ve/b, find the expression for the magnitude of absolute ejection velocity relative to the stationary reference frame, ve (i.e. with respect to the stationary observer, not the bird) in terms of vxi, vyi and ve/b. (b) Hence, find the expression for the velocity components vxf and vyf after the mass ejection in terms of vxi, vyi, ve, mi and me where mi denotes the mass of bird before ejection and me denotes the ejection mass. You can consider the ejection process like a reverse collision process. Here, two masses separate rather than coming together but the conservation of linear momentum will still hold. (c) Write a function, mass ejection, that computes the velocity components and mass after the mass ejection from the inputs vxi, vyi, ve/b, mi and me. You can use the skeleton of the function given below. Make sure that you submit your m-file for the function. You will not get marks for this part, i.e. Question 2(c), if you do not submit your m-file, even if the m-file is submitted late. function [vx_f,vy_f,m_f] = mass_ejection(vx_i,vy_i,v_eb,m_i,m_e) % Inputs: % vx_i: Velocity component in x direction before ejection % vy_i: Velocity component in y direction before ejection % v_eb: Ejection velocity of the mass relative to the bird % m_i : Mass of the bird before ejection % m_e : Ejection mass % Outputs: % vx_f: Velocity component in x direction after ejection % vy_f: Velocity component in y direction after ejection % m_f : Mass of the bird after ejection (d) Using the function written in part (c), incorporate the mass ejection mechanism into the existing model with drag (remember that you need to run this function every 0.1s and use the output to Page 7 of 8 Assignment 3 – Grumpy Birds update the velocity and mass of the bird). Compute and plot the trajectory of the new bird and compare it with the trajectory of the original bird with the same initial conditions. On your plot, indicate with symbols where mass ejections happen. The bird is launched with the initial velocity of 10m/s at the angle of 50◦ from the horizontal. The initial mass of the bird, mo is 1kg. The release point of the bird is 2m directly above the base of slingshot and the base of slingshot can be considered as the origin (figure 5). The density of air is 1.2 kg/m3 and use CD = 1. The bird can be treated as a sphere with a radius of 0.15 m. END OF ASSIGNMENT 3 Page 8 of 8

essay、essay代写