Sie sind auf Seite 1von 60

Dalhousie University-Mechanical Engineering MECH 4010 Senior Design Project Fall 2011

Term Report
The Canine Ball Thrower

Group Group member names

#2 Canine Ball Thrower Randy Jordan Michael Pyne Corey Stewart Evan Macadam

Submission Date

December 07, 2011

Group #2

Fall Report

Canine Ball Thrower

Executive Summary

The report provides the design requirements, the designs considered, and the final build design selected with detail information, as well as the budget. The calculations which prove the final appendix. The current status of the build process is be stated. The purpose is to design and design selection is viable are shown in the report, and AUTO CAD drawings are attached in the construct a canine tennis ball thrower to launch a tennis ball a distances of at least 50 ft. This device will be powered by an ordinary outlet, be safe for the dog and the surrounding humans, and it must as a major aspect of the design considerations. The budget has been submitted and is $1471.57 for the cost of the unit. be operated by the dog without human interference. The design is focuses on the training of the dog

Dalhousie Univ.-Dept. of Mechanical Eng.

Group #2 1. 2. 3.

Table of contents 2.1. 2.2. 3.1. 3.2. 3.3. 3.4. 3.5.

Introduction ...................................................................................................................................................................1 Design Background .....................................................................................................................................................2 Design Selection............................................................................................................................................................3 Spring loaded .........................................................................................................................................................3 Lever Arm ..............................................................................................................................................................3 Compressed Air ...................................................................................................................................................4 Dual Spinning Disks ...........................................................................................................................................5 Comparison ...........................................................................................................................................................5 Problem Definition.............................................................................................................................................2 Design Requirements........................................................................................................................................2

Fall Report

Canine Ball Thrower

4.

4.1. 4.2. 4.2.1. 4.2.2. 4.3. 4.4. 4.4.1. 4.4.2. 4.5. 5. 6.

Final Design ....................................................................................................................................................................7

Appendix A

Appendix B Budget ............................................................................................................................................................... 20 Appendix C MATLAB for Projectile ................................................................................................................................ 21 Appendix D CAD Drawings ................................................................................................................................................23

Progress Report .........................................................................................................................................................16 Bibliography................................................................................................................................................................ 17 Gantt Chart ..................................................................................................................................................18

Device Operation.................................................................................................................................................8 Launching Mechanism ......................................................................................................................................8 Flywheel Decision.......................................................................................................................................9 Motor Sizing and Justification ............................................................................................................ 10 Treat Dispensing System .............................................................................................................................. 13 Training System................................................................................................................................................14 Sensors......................................................................................................................................................... 14 Arduino Controller Applications ....................................................................................................... 14 Safety Considerations of the Design.........................................................................................................15

Dalhousie Univ.-Dept. of Mechanical Eng.

ii

Group #2

Figure 1 Spring loaded design.............................................................................................................................................3 Figure 2 Lever arm design ....................................................................................................................................................4 Figure 3 Compressed air design .........................................................................................................................................4 Figure 4 Dual spinning disks design .................................................................................................................................5 Figure 5 Full design with all components ......................................................................................................................7 Figure 6 Relation between flywheel characteristics and tennis ball velocity .................................................9 Figure 7 Pneumatic tire from McMaster-Carr ...........................................................................................................10 Figure 8 Theoretical projectile profiles with the desired motor .......................................................................13

List of figures

Fall Report

Canine Ball Thrower

Table 1 Comparison of launcher designs........................................................................................................................6 Table 2 Motor requirements and specifications.......................................................................................................11 Table 3 Proof of Concept Motor Characteristics.......................................................................................................16

List of tables

Dalhousie Univ.-Dept. of Mechanical Eng.

iii

Group #2

Fall Report

Canine Ball Thrower

1.

Introduction

The purpose of this report is to provide a complete description of the work completed by Group #2 during the fall semester. The report provides a problem statement, design requirements, the selection process, the final design and calculations to justify specifications are provided. Final CAD drawings, final budget and the winter Gantt chart are provided in the appendices.

This report includes the design selection, description of parts, detailed build drawings, a winter schedule, work completed thus far and a detailed budget. This report will first detail the design problem and the requirements of the final design. The criteria for design selection are provided and the chosen design includes sizes, materials and testing. A full set of CAD drawings are attached in the appendix and outline work to be completed by the Dalhousie University technical staff and which are off the shelf parts requiring only assembly. The basis of the included information will be used to determine and justify a working budget for this particular design project. The final inclusion within this report will be a schedule that is presented in the form of a Gantt chart.

Dalhousie Univ.-Dept. of Mechanical Eng.

1 of 23

Group #2

Fall Report

Canine Ball Thrower

2.

Design Background

The function of this project is to design an automated device to play fetch with a dog. The design focus is on training the dog, automation and safety to eliminate any required human intervention. The device will be initially loaded by a person. The device will launch a ball using and encourage the dog to retrieve it through various audio queues. An Arduino control system using infrared and ultrasonic sensors will determine which audio queues are used. The device will include safety measures to ensure the user and nearby persons and dogs will not be injured. When the ball is returned, a treat is dispensed while the ball proceeds to the launching mechanisms.

2.1.

Problem Definition

Fetch devices for dogs currently exist which can be used by a dog and are mostly autonomous in that they require limited human interaction. These devices are not completely safe for the dog, require supervision and can only be used by dogs trained to fetch. The devices require that the dog be trained to stand in certain positions and be supervised by a person. The device also does not provide encouragement to return or reward for doing so. The device proposed in this report will alleviate these issues by meeting the design requirements below.

2.2.

Design Requirements

The design must: Be safe for use around dogs and humans Train the dog with minimal human assistance Be operable solely by the dog Be compatible with a regulation size tennis ball Be transportable by one person Throw a tennis ball a distance of at least 50 feet Be robust enough to withstand prolonged operation (dry cycle of two hours) Be powered by a standard outlet

These design requirements were deemed acceptable through a group deliberation. Dalhousie Univ.-Dept. of Mechanical Eng. 2 of 23

Group #2

Fall Report

Canine Ball Thrower

3.

Design Selection

The possible designs for the launching mechanism are provided below. A comparison of the design is provided in Table 1.

3.1.

Spring loaded

A motor compresses a spring to build potential energy. The ball is placed into the barrel and the spring is released, launching the ball. See sketch below. Why it was rejected: this design was rejected because of the low robustness of the spring which would make the final product unreliable.

Figure 1 Spring loaded design

3.2.

Lever Arm

A long arm is bent backwards and the ball is placed at the tip. The arm is released and the ball is launched. See sketch below. Why it was rejected: this design was rejected because of the inherent danger the arm presented when it is released. Dalhousie Univ.-Dept. of Mechanical Eng. 3 of 23

Group #2

Fall Report

Canine Ball Thrower

Figure 2 Lever arm design

3.3.

Compressed Air

An air compressor is used to build pressure behind a piston cylinder arrangement. The piston would be propelled forward using the pressure generated in the air compressor. See sketch below. Why it was rejected: the noise caused by the compressed air may frighten the dog, as well as the potential danger of a pressure vessel.

Figure 3 Compressed air design

Dalhousie Univ.-Dept. of Mechanical Eng.

4 of 23

Group #2

3.4.

Dual Spinning Disks

Fall Report

Canine Ball Thrower

The launching mechanism chosen is a dual rotating disk system. The design consists of two rotating disks that spin in opposing directions at approximately the same speed. Two disks were chosen over a single similarly sized disk to provide a higher exit velocity. This system allows the moving parts to be encased so that there is no potential for contact between the moving parts and the dog or its owner. The spinning disk design is considered to be the most robust because there are fewer moving parts involved in its operation (motor, gears, bearings, and the disks themselves). This also contributes to the reliability of the system. The cost is also considered to be the least compared to the other ideas as there are few intermediary steps/parts between the motor and the disks. The noise generated by this design will be more consistent and less likely to shock the dog than the compressed air or spring design. The figure 4 shows the design.

Figure 4 Dual spinning disks design

3.5.

Comparison

The design selection process was done using a selection matrix. The criteria were ranked in order of best performance to worst performance for the various design possibilities. This makes the higher the score the better option in this matrix.

Dalhousie Univ.-Dept. of Mechanical Eng.

5 of 23

Group #2

Table 1 Comparison of launcher designs Launcher Two Spinning Disks Spring Compressed Air Lever Arm Robustness 4 1 3 2

Fall Report Controllability 4 2 3 1 Cost 2 4 1 3

Canine Ball Thrower Reliability 4 2 3 2 Total 18 12 12 10

Safety 4 3 2 2

Dalhousie Univ.-Dept. of Mechanical Eng.

6 of 23

Group #2

Fall Report

Canine Ball Thrower

4.

Final Design

The following describes the device operation as well as the function of each individual component. The associated CAD drawings can be found in Appendix B. The whole design was broken down into three working systems. These systems are the launching mechanism, treat dispenser, and training system. These are explained at length within their respective sections below. Figure 5 shows a representation of the design. The ball is returned on the right side where a treat is dispensed. The ball is then gravity fed to the launching mechanism.

Figure 5 Full design with all components

Dalhousie Univ.-Dept. of Mechanical Eng.

7 of 23

Group #2

4.1.

Device Operation

Fall Report

Canine Ball Thrower

The device is operated through the following process: 1. 2. 3. 4. 5. 6. 7. The device is connected to an AC outlet. The motor will be turned on and will allow variable distances. The motor will transmit power through a pulley and belt system to two rubber disks. The tennis ball is placed in the receiving area. The ball is gravity fed to the rotating disks. The ball will then be propelled after contact with the disks. The device uses audio queues based on the ball position to encourage the dog to retrieve the ball

(audio queues are pre-recorded by the owner using an onboard microphone). 8. When the dog returns the ball, the process is repeated and should be able to run continuously

without intervention.

4.2.

Launching Mechanism

The launching mechanism uses a dual flywheel system. The two flywheels will be rotating in opposite directions and spaced apart by slightly less than the diameter of a regulation size tennis ball. A space less than that of the tennis balls diameter will reduce slip between the ball and the flywheel. The ball is passed through the space and propelled forward by the rotating disks. Using a basic understanding of rotational mechanics and assuming slip within the system is negligible the following diagram outlines the physical relation of the flywheels geometry and rotation speeds to the output velocity of the tennis ball itself.

Dalhousie Univ.-Dept. of Mechanical Eng.

8 of 23

Group #2

Fall Report

Canine Ball Thrower

Figure 6 Relation between flywheel characteristics and tennis ball velocity The two flywheels will be mounted onto a transmitted from an AC motor to the

shaft via a belt pulley system. The two flywheels will spin in opposite directions because one belt will be crossed and the other will not. This will allow both flywheels to be powered by the same motor and the speeds of the two flywheels will be approximately the same. If the flywheels were not spinning at the same angular velocity the ball would exhibit a characteristic known as spin. Spin is defined as the following equation. =

This is an interesting result and would make the launching mechanism able to throw curve balls but was deemed unnecessary as it makes the system require two motors which would require a controller as well. This would also decrease the horizontal displacement as not all of the components of the velocity vector would be in the forward direction.

4.2.1.

Flywheel Decision

Flywheel designs considered include foam castings, grooved steel wheels, cart wheels, and pneumatic wheels. Pneumatic wheels were found to be the best option. The major factors that affected the decision were traction and survivability. A major benefit for the pneumatic wheels is that they offer some control over the contact pressure that will be exhibited on the tennis ball. This will allow testing to Dalhousie Univ.-Dept. of Mechanical Eng. 9 of 23

Group #2

determine the best air pressure to reduce slip between the tennis ball and the flywheels. Having pneumatic flywheels also increases our tolerance with the spacing associate with them which is a major benefit.

Fall Report

Canine Ball Thrower

Figure 7 Pneumatic tire from McMaster-Carr

An 8 diameter flywheel was selected since its size provides appropriate speeds, is not too large for a motor to accelerate adequately and is available locally.

4.2.2.

Motor Sizing and Justification

The motor size was selected considering the design requirement that the ball reach a distance of 50 ft. Matlab was used to model projectile motion for no drag, constant drag and variable drag. Little difference was found between the two drag models with constant drag providing a slightly smaller maximum distance. One concern was motor slip providing a lower than expected maximum distance so a motor was found that would provide more than 50ft. This led us to motor speeds of approximately 1800 rpm. This rotation speed leads to theoretical values of approximately 85 ft. A major motor sizing consideration for the system is the required torque to accelerate the system adequately. This is done by calculating the inertia of the entire rotational system and defining an adequate time at which the system should reach top speed. This analysis was done using excel and Table 2 below.

Dalhousie Univ.-Dept. of Mechanical Eng.

10 of 23

Group #2

Table 2 Motor requirements and specifications Parameter Mass of Flywheel Diameter of flywheel moment of inertia per number of disks total inertia of flywheels rod Diameter density of rod length of rod mass per rod inertia per rod number of rods Total inertia for rods pulley Diameter mass inertia per pulley number of pulleys total inertia of pulleys system inertia angular velocity Speed up time Angular acceleration Torque power required

Fall Report Units lb in lb-ft2 N.A. lb-ft2 ft lb/ft3 ft lb lb-ft2 N.A. lb-ft2 ft lb lb-ft2 N.A. lb-ft2 lb-ft2 rpm s rad/s2 lbft hp Value 2.27 0.20 0.01 2.00 0.02 0.02 7980.00 0.30 0.15 0.00 3.00 0.00 0.06 0.38 0.00 4.00 0.00 0.02 183.26 1.50 122.17 2.96 361.34

Canine Ball Thrower Units kg m kg-m2 N.A. kg-m2 m kg/m3 m kg kg-m2 N.A. kg-m2 m kg kg-m2 N.A. kg-m2 kg-m2 rad/s s rad/s2 Nm Watts

Value 5.00 8.00 0.28 2.00 0.56 0.05 498.00 1.00 0.34 0.00 3.00 0.00 0.21 0.84 0.00 4.00 0.02 0.57 1750.00 1.50 122.17 2.18 0.48

A motor providing 1 HP, a rotation speed of 1750 rpm and a max torque of 36 lb-in was selected. A locally available 1 HP motor was priced lower than 0.5 HP motors available elsewhere. Using the motor parameters for this particular motor the Matlab simulation file was run and Figure 8 gives the profile with a launch angle of 45 degrees. The following equations are for the horizontal and vertical displacement for projectile motion that is not subjected to air drag. ( )= + 1 2

( )= Dalhousie Univ.-Dept. of Mechanical Eng.

1 2

11 of 23

Group #2

The following equations are for the horizontal and vertical displacement for projectile motion that is subjected to air drag. = =

Fall Report

Canine Ball Thrower

24

24

Defining a constant k allows the differential equations solution to be written as the following: = 24 +

( )=

( )=

Dalhousie Univ.-Dept. of Mechanical Eng.

12 of 23

Group #2
35 30 25 Height 20 (Feet) 15 10 5 0 0 20 40 60

Fall Report

Canine Ball Thrower

No Drag Projectile Profile Drag Projectile Profile

80

100

120

Distance (Feet)

Figure 8 Theoretical projectile profiles with the desired motor Benefits of moving up to the higher motor include less heat generation and more reliability as we intent to run the device for long periods of time (2 hours). If we chose a motor of HP this would likely be running near its max torque and would generate heat at an accelerated rate, this would most likely lead to the eventual overheating/shutdown of the motor which is unacceptable as stated by our design criteria.

4.3.

Treat Dispensing System

The dispenser activates when the dog retrieves the ball. A treat is released as positive reinforcement and to encourage the dog to stay beside the machine away from the launching mechanism. The treats will be loaded into a hopper and moved along with a circular conveyor (see attached AutoCAD drawing of treat dispensing mechanism). The amount of turn required to drop the desired amount of kibble is 60 degrees. The kibble that was measured had a maximum dimension of approximately 13 mm so a hole that is one inch in diameter should be sufficient to ensure that at least one treat is dispensed and that no blockages occur. A statistical analysis was done on the dimensions of a sample of kibble to determine what size of a hole was required in the treat dispenser for dispensing the kibble. The average size of kibble found was 12 mm +- 0.45mm, however the maximum size in the sample was 13 mm wide. It was decided to use a hole larger than the maximum size of kibble found and therefore a diameter of one inch was chosen. This also allows the option of using a treat of a slightly larger size in the treat dispenser without major modification of the unit. Dalhousie Univ.-Dept. of Mechanical Eng. 13 of 23

Group #2

4.4.

Training System

Fall Report

Canine Ball Thrower

Audio queues will be provided to the dog to encourage and reward it when retrieving the ball. The owners voice will be recorded with various the commands the dog is familiar with or will become familiar with. Alternatively a bell or clicker may be found to be more appropriate. The final decision will depend on testing with a dog.

4.4.1.

Sensors

Multiple sensors will be used in this project in various applications. These sensors will include an ultrasonic sensors and a simple infrared detector for detecting the ball. The ultrasonic sensor will be used in multiple ways including safety and training. The sensor will be attached to the front of the launcher where the barrel of the launcher is located. This sensors purpose will be to detect for objects in the firing path of the launcher. The sensor will be mounted at the height of the exit of the barrel and will be mounted to detect horizontally straight out from the end of the barrel. The sensor to be used for this application will be a Parallax PING Ultrasonic Sensor. The choice of this sensor is twofold, first is for the 3.3m range of the sensor, and second is the ability to detect distance to an object and to determine is an object is approaching the sensor. The 3.3 meter range of the sensor will provide adequate distance to protect from any animal or person from being struck by a launched ball, by actuating the safety mechanism in the barrel. The ball will be detected by the infrared sensor when it has been returned; this way the dog can be rewarded for successfully fetching the ball. This will be accomplished by using an infrared detector where the ball will pass through the detector blocking the infrared light from entering the sensor and signalling that the ball has been returned. This will be a cost effective solution and will be more than adequate for this situation.

4.4.2.

Arduino Controller Applications

The control system for the ball thrower will operate on an Arduino controller. The components consist of an infrared sensor, an ultrasonic sensor, two servo motors, a microphone and a sound board. These components act together to control the training apparatus and the safety measures. A program that encompasses all features of the design has not yet been created however code is readily available for each individual part. Dalhousie Univ.-Dept. of Mechanical Eng. 14 of 23

Group #2

4.5.

Safety Considerations of the Design

Fall Report

Canine Ball Thrower

A major consideration for any design project is the safety associated with its operation. Our design project is no exception to the consideration of safety if anything our safety requirements should be more stringent as we are dealing with the use of projectiles. When dealing with a projectile the best safety mechanism that we could think of was stopping the act of firing. To do this a sensor will be used to detect if there is any movement within the devices launching direction. In the event that something could be within this area, the launcher is blocked by a flat plate which is mounted on a servo motor attached to the end of the exit barrel. This would eliminate any opportunity for a person or dog to be subject to being impacted by the projectile. The ultrasonic sensor operates at 40 KHz which is in the hearing range of the dog. Ultrasonic sensors outside this range are not available at a reasonable cost. The frequency of 40 KHz will not damage the dogs hearing but could be irritating. For this reason the ultrasonic sensor will be activated by the Arduino for a time period after the IR sensor is triggered. This should only irritate the dog enough to move out of the path of the ball. Another major safety concern is that there are moving parts associated with the system. These parts will be subjected to fairly high rotational speeds so it is deemed necessary to remove any possible contact with the contents of the launching mechanism. This requires that we actually completely incase the launching mechanism assembly within a solid structure. This completely eliminates any possible interaction between the moving parts and a human or dog. The final foreseeable safety concern was the possibility of the dog jumping on or around the device. This would mean that the dog could hit itself off of the casing. With the understanding that this is a possibility the corners of the casing will be required to be foamed over so that there is no possibility of harm to the dog if it becomes over excited within the devices vicinity.

Dalhousie Univ.-Dept. of Mechanical Eng.

15 of 23

Group #2

Fall Report

Canine Ball Thrower

5.

Progress Report

A prototype was constructed. The prototype was mounted on a plywood sheet base for easy transportation and disassembly. Table 3 shows the proof of concept motor characteristics. The prototype spun a small cart wheel as a flywheel using a small 1/5 Hp motor. The motor was run through a dimmer switch so it could be turned on and off and so that we knew it was possible to vary the motor speed using a dimmer switch. In the final design it is desired that a dimmer switch be included. This motor did not have sufficient torque to rotate a two flywheel system so one was deemed sufficient to proof the functionality of our launching mechanism. The single flywheel prototype showed very high expectations for our proposed design. Through testing we were able to reach a distance of 51 ft at an angle of approximately 20 degrees and the system was subject to large amounts of slip because the ball was being fed through both wheels one of which had power transmission and was not rigidly connected. This proof of concept at 3420 rpm with a flywheel size of 7 seemed an accurate representation for our proposed design as the motor we have chosen has 1750 rpm but will be powering two 8 flywheels which would give similar results as the prototype except there would be much less slip associated with the final assembly. Our final design will require a high amount of precision to maintain a balanced operation during flywheel rotation. Table 3 Proof of Concept Motor Characteristics Characteristics Value Units

Power

0.20

Hp

speed

3420

rpm

Voltage

120.00 Volts

Current

3.80

Amps

Dalhousie Univ.-Dept. of Mechanical Eng.

16 of 23

Group #2

Fall Report

Canine Ball Thrower

6.

S. Mish, M. Hubbard. (2001). Design of a Full Degree-of-Freedom Baseball Pitching Machine. California: Davis N. Basset, M. Bower, S. Michel, M. Shinew. (2005). Golf Ball Projectile Motion

Bibliography

Dalhousie Univ.-Dept. of Mechanical Eng.

17 of 23

Group #2

Appendix A

Gantt Chart

Fall Report

Canine Ball Thrower

Dalhousie Univ.-Dept. of Mechanical Eng.

18 of 23

Group #2

Fall Report

Canine Ball Thrower

Dalhousie Univ.-Dept. of Mechanical Eng.

19 of 23

Group #2

Appendix B Budget
Item 1hp treadmill motor flywheel V belt Flange bearing Pulley Shaft 5/8" 3/8" bolt Mounting bolts Speakers Tennis Balls Treats Arduino Voice Recording Chip Microphone Wiring Power converter Motor Bracketing Lexan Housing ultrasonic sensor Treat container Servo motor 1000 W dimmer Steel frame 2"X2"X0.125" 6ft IR detector treat conveyor Ball Return Railing

Fall Report

Canine Ball Thrower

Cost/Unit # Units 39.99 30.00 3.99 11.99 8.49 16.99 0.43 0.13 20.00 3.50 10.00 35.00 20.00 8.00 10.00 50.00 80.00 126.00 40.00 30.00 55.00 40 47.1 15

1 2 2 4 4 1 24 24 2 2 2 1 1 1 1 1 1 1 1 1 2 1 4 1

Cost 39.99 60.00 7.98 47.96 33.96 16.99 10.32 3.12 40.00 7.00 20.00 35.00 20.00 8.00 10.00 50.00 80.00 126.00 40.00 30.00 110.00 40

Vendor Princess Auto Princess Auto Princess Auto Princess Auto Princess Auto Princess Auto Princess Auto Princess Auto Princess Auto Wal-mart Wal-mart Robotshop.ca Robotshop.ca Tigerdirect.ca Princess Auto Princess Auto Princess Auto Mcmaster-Carr Robotshop.ca Mcmaster-Carr Robotshop.ca Mcmaster-Carr

188.4 Mcmaster-Carr 15 Robotshop.ca Rapid 50 1 50 Prototype 23 1 23 Mcmaster-Carr Total 1112.72 Total after tax 1279.63 Shipping Cost 191.94 Budget Proposal 1471.57

Dalhousie Univ.-Dept. of Mechanical Eng.

20 of 23

Group #2

Appendix C MATLAB for Projectile

Fall Report

Canine Ball Thrower

i=1; t=[]; t(i)=0; x=[]; y=[]; x(i)=0; y(i)=0; dt=.01; g=9.81; theta=pi/4; rpm=1750; omega=rpm*2*pi/60; r=.1016; Vo=r*omega; Vx=Vo*cos(theta); Vy=Vo*sin(theta); while ((y(i)>0)|(i==1)) i=i+1; t(i)=t(i-1)+dt; x(i)=Vx*t(i); y(i)=Vy*t(i) - .5*g*(t(i))^2; end hold on plot(x,y) title('ball path with air drag') axis([0,160,0,30]) xlabel('Distance (meters)') ylabel('Height (meters)') fprintf('Max Distance = %-5.1f m\n',max(x)); fprintf('Max Height = %-5.1f m\n',max(y)); i = 1; Cdh = 0.47; Cdl = 0.1; g = 9.81; dt = 0.01; d = .0635; p = 1.205; mu = .00001511; m = .057; tau = m/(3*mu*pi*d); y1max = 0; x1max = 0; theta=pi/4; rpm=1750; omega=rpm*2*pi/60; r=.1016; Vo=r*omega; Vx=Vo*cos(theta); Vy=Vo*sin(theta); x1 = []; y1 = []; u1 = []; v1 = []; t = []; x1(i) = eps;

Dalhousie Univ.-Dept. of Mechanical Eng.

21 of 23

Group #2

y1(i) = eps; u1(i) = Vx; v1(i) = Vy; Reu = eps; Rev = eps; t(i) = eps; while y1(i)>=eps i = i+1; Reu = (p*d*u1(i-1))/(mu); Rev = (p*d*v1(i-1))/(mu);

Fall Report

Canine Ball Thrower

if Reu > (90000) u1(i)=((u1(i-1))*((48*tau)-(Cdl*Reu*dt)))/((48*tau)+(Cdl*Reu*dt)); else u1(i)=((u1(i-1))*((48*tau)-(Cdh*Reu*dt)))/((48*tau)+(Cdh*Reu*dt)); end if Rev > (90000) v1(i)=((v1(i-1)*(48*tau-Cdl*Rev*dt))-(48*tau*g*dt))/(48*tau+Cdl*Rev*dt); else v1(i)=((v1(i-1)*(48*tau-Cdh*Rev*dt))-(48*tau*g*dt))/(48*tau+Cdh*Rev*dt); end x1(i) = x1(i-1)+(dt/2)*(u1(i-1)+u1(i)); y1(i) = y1(i-1)+(dt/2)*(v1(i-1)+v1(i)); t(i) =(i-1)*dt; if y1(i)>y1max y1max = y1(i); end if x1(i)>x1max x1max = x1(i); end end fprintf('Max Distance with non-constant drag = %-5.2f m\n', x1max); fprintf('Max Height with non-constant drag = %-5.2f m\n', y1max); plot(x1,y1,'g'); Title('Plot of Trajectory'); axis([0,40,0,20]); xlabel('Horizontal Distance (m)'); ylabel('Vertical Distance (m)'); legend('no drag', 'variable drag');

Dalhousie Univ.-Dept. of Mechanical Eng.

22 of 23

Group #2

Appendix D CAD Drawings

Fall Report

Canine Ball Thrower

Dalhousie Univ.-Dept. of Mechanical Eng.

23 of 23

Das könnte Ihnen auch gefallen