lab 6 projectiles n.
Skip this Video
Loading SlideShow in 5 Seconds..
Lab 6: Projectiles PowerPoint Presentation
Download Presentation
Lab 6: Projectiles

Loading in 2 Seconds...

play fullscreen
1 / 24

Lab 6: Projectiles - PowerPoint PPT Presentation

  • Uploaded on

Lab 6: Projectiles. CS 282. Overview. Review of projectile physics Examine gravity projectile model Examine drag forces Simulate drag on a projectile Examine wind forces Simulate wind affecting a projectile. General Concepts. Acceleration F = ma Translational velocity and state

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Lab 6: Projectiles' - doctor

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
  • Review of projectile physics
  • Examine gravity projectile model
  • Examine drag forces
    • Simulate drag on a projectile
  • Examine wind forces
    • Simulate wind affecting a projectile
general concepts
General Concepts
  • Acceleration
    • F = ma
  • Translational velocity and state
    • dv/dt = a , ds/dt = v
  • Rotational acceleration
    • torque = inertia * rotational_acceleration
  • Equations of motion are separated into directional components
reference frame
Reference Frame
  • Let’s use Cartesian Coordinates for simplicity
gravity only projectile model
Gravity-Only Projectile Model
  • Fx = 0
  • Fy = -mg
  • Fz = 0
  • vx = vx0
  • vy = vy0 –gt
  • vz=vz0
  • ax = 0
  • ay = –g
  • az= 0
exercise 1 setting up
Exercise 1: Setting Up
  • Please sit next to your partner (if possible)
  • Download the framework code for today
    • Available on the class website
  • Examine the projectile class
    • Look at the gravity_model function
    • !!!! Fill in the missing update y-position !!!!
  • Compile and run
    • If necessary, WASD2X translates the camera (use at your own risk though  )
    • ENTER toggles the simulation ON/OFF
exercise 1 setting up1
Exercise 1: Setting Up
  • Hopefully, you have come up with something like (without cheating) this…
    • position.y + vy *dt+ 0.5*g*dt2
  • For this lab, let’s just assume there’s a golf club (or something) is hitting that projectile 
  • So, Gravity-Only models are…
    • Really easy to implement
    • Feasible to analytically solve
    • Really unrealistic looking
summary gravity only model
Summary: Gravity-only model
  • The only force on the projectile is gravity
    • Only acts on the vertical (or the y) direction
  • The motion in the three directions is independent.
    • What happens in the y-direction , for example, does not effect the x- or z-directions
  • The velocity in the x- and z-directions is constant throughout the trajectory
  • The shape of the trajectory will always be a parabola
aerodynamic drag
Aerodynamic Drag
  • What is drag?
    • The resistance that air or any other type of gas exerts on a body traveling through it.
  • Drag directly resists velocity
    • X, Y, and Z velocities
drag overview
Drag: Overview
  • Drag has two components
    • Pressure drag: Caused by the differences in pressure between the front and back of the object
    • Skin drag: As the projectile is moving through space, friction is created between it and the gas
drag coefficient
Drag Coefficient
  • The drag coefficient, Cd, is a scalar used to evaluate drag force.
  • The shape of an object greatly affects how much drag affects it.
exercise 2 implementing drag
Exercise 2: Implementing Drag
  • Examine the projectile class
    • You will notice a function called “drag_model”
      • This is where you will drag will be implemented
    • You will also notice several data members in the class that are related to drag.
  • Part of the drag_model function should look suspiciously familiar.
    • Indeed, it is our favorite Runge-Kutta method!
      • Or at least, a fragment of it…
exercise 2 implementing drag1
Exercise 2: Implementing Drag
  • The goal for this exercise is to finish the rest of the Runge-Kutta approximation of drag.
    • The first step of runge-kutta is provided for you
  • Here are some relevant equations:
    • Fx = -Fd (vx/v) Fy = -mg -Fd (vy/v)
    • Fz =- Fd (vz/v)
  • The force due to drag is
    • Fd = ½ p *v2 *A *Cd
    • 0.5 * density * velocity2 * cross-area * drag coeff.
exercise 2 implementing drag2
Exercise 2: Implementing Drag
  • First , finish steps 2 through 4 of the Runge-Kuttaprocces
    • Use step 1 and the equations as a reference
  • Be careful! Because we have more than one velocity (as opposed to just x-velocity last time), you will have k’s for each component
  • Don’t forget to average your k’s before you add it to the velocity, and update your position.
summary aerodynamic drag
Summary: Aerodynamic Drag
  • Drag force acts in the opposite direction to the velocity. The magnitude of the drag force is proportional to the square of the velocity
  • Drag causes the three components of motion to become coupled (i.ex depends on y and z)
  • The drag force is a function of the projectile geometry and is proportional to both the frontal area and drag coefficient of the projectile
summary drag end
Summary: Drag (end)
  • The acceleration due to drag is inversely proportional to the mass of the projectile. Other things being equal, a heavier projectile will show fewer drag effects than a lighter projectile.
  • The drag on an object is proportional to the density of the fluid in which it is traveling.
getting windy
Getting Windy?
  • Now that we have drag, it will be relatively easier to add wind into our simulation.
  • The presence of wind changes the apparent velocity seen by a projectile
  • Tail-wind adds to the velocity of the object.
  • Head-wind subtracts from the velocity
exercise 3 wind
Exercise 3: Wind
  • Luckily for us, since we’ve implemented drag already, it will be easy to add wind.
    • You may have already noticed a function, as well as parameters, hiding in the projectile class relating to wind.
  • First of all, let’s keep all the work we did for drag. Go ahead and copy paste the contents of the function into the blank function “drag_wind_model”
exercise 3 wind1
Exercise 3: Wind
  • Now, all we have to do is subtract the wind’s velocity components from each section of the Runge-Kutta steps
  • Tail-winds will have negative velocity, thus increasing our end velocity
  • The reverse for head-winds
that s all folks
That’s all Folks!
  • Save your finished product somewhere.
    • Perchance commit it to a repository?
  • You will be needing this for next week when we add on…
    • Spin
    • Different shaped objects
    • Mystery?
kind of for next week
(kind of) For next week…
  • Plot the differences between the following combinations on a graph (position vs. time)
    • Gravity only
    • Gravity and drag
    • Gravity and tail-wind
    • Gravity, head-wind, and drag
  • Not due next week, but you will be adding more things to your simulation, so having this done will lesson your workload next week.