CS 282.  Last week we dealt with projectile physics ◦ Examined the gravity-only model ◦ Coded drag affecting projectiles  Used Runge-Kutta for approximating.

Slides:



Advertisements
Similar presentations
Human Movement in a Fluid Medium
Advertisements

Physics: Principles with Applications, 6th edition
Motion in Two and Three Dimensions; Vectors
Physics: Principles with Applications, 6th edition
What is Projectile Motion?
Projectile Motion.
CS 282.  Any question about… ◦ SVN  Permissions?  General Usage? ◦ Doxygen  Remember that Project 1 will require it  However, Assignment 2 is good.
Projectile Motion with Wind and Air Resistance
SEHS 4.3..The Fundamentals of Biomechanics III
Mathematics with vectors When dealing with more than one dimension, can have the same equation come up multiple times. Example: Position equation in three.
Projectile Motion.
Displacement and Velocity
CS 282.  Review of projectile physics  Examine gravity projectile model  Examine drag forces ◦ Simulate drag on a projectile  Examine wind forces.
Principles of 2D Motion & An Introduction to Projectiles.
Physics 218: Mechanics Instructor: Dr. Tatiana Erukhimova Sections 801, 802, 803 Lecture 7.
CS 282.  Questions about Assignment 1?  Questions about last week’s lab?  Otherwise, please sit next to your partner (or someone else if your partner.
Motion Measuring Motion Speed – Average Speed = distance covered / time taken v = d/t metric unit of speed: m/s English unit of speed: ft/s –Constant.
Physics 218: Mechanics Instructor: Dr. Tatiana Erukhimova Lectures 6,7.
Circular Motion and Other Applications of Newton’s Laws
Projectile Motion I 11/7/14. Throwing a ball in the air On the way up: At the top of the throw: On the way down: velocity decreases acceleration stays.
Gravitational Potential energy Mr. Burns
Chapter 7: Vectors and the Geometry of Space
Forces, Planes and propellers. Topic 1: Forces A force is any influence that can change the trajectory, speed or shape of a body. Effects produced by.
What is Projectile Motion?
Forces in Two Dimension
MOTION.
ME 2304: 3D Geometry & Vector Calculus
MFMcGraw-PHY 1401Chapter 3b - Revised: 6/7/20101 Motion in a Plane Chapter 3.
Units of Chapter 2 Reference Frames and Displacement (2-1) Average Velocity (2-2) Instantaneous Velocity (2-3) Acceleration (2-4) Motion at Constant Acceleration.
Lecture 9: Problem Solving Review For Test 1. How to identify type of problem? If something is going in a circle: circular motion If the problem mentions.
Projectile Motion.
Chapter 3 Kinematics in Two Dimensions; Vectors. Units of Chapter 3 Vectors and Scalars Addition of Vectors – Graphical Methods Subtraction of Vectors,
AP Physics Monday Standards: 1)a. Students should understand the general relationships between position velocity & acceleration for a particle.
© 2014 Pearson Education, Inc. This work is protected by United States copyright laws and is provided solely for the use of instructors in teaching their.
Physics. Good News/Bad News: These are the same formulas we used for linear motion. Do you know them? If the answer is “NO”, then get familiar with them.
Physics Honors. Good News/Bad News: These are the same formulas we used for linear motion. Do you know them? If the answer is “NO”, then memorize them.
AP Physics.  Think of a curve being traced out over time, sometimes doubling back on itself or crossing itself. Such a curve cannot be described by a.
Chapter 3 Kinematics in Two Dimensions; Vectors. Units of Chapter 3 Vectors and Scalars Addition of Vectors – Graphical Methods Subtraction of Vectors,
One Dimensional Kinematics: Problem Solving Kinematics in Two-Dimensions: Law of Addition of Velocities Projectile Motion 8.01 W02D1.
MFMcGrawChapter 3 - Revised: 2/1/20101 Motion in a Plane Chapter 3.
Chapter 3 Kinematics in Two Dimensions; Vectors. Units of Chapter 3 Projectile Motion Solving Problems Involving Projectile Motion Projectile Motion Is.
Ping Pong Ball Flight Mathematical Modeling
Hooke’s Law: Finding the Spring Constant  Set the ruler so that the wire aligns with 0.  Place different masses onto the holder and measure the extension.
Linear Momentum Impulse & Collisions. What is momentum?  Momentum is a measure of how hard it is to stop or turn a moving object.  What characteristics.
Vector components and motion. There are many different variables that are important in physics. These variables are either vectors or scalars. What makes.
Chapter 4 Two-Dimensional Kinematics. Units of Chapter 4 Motion in Two Dimensions Projectile Motion: Basic Equations Zero Launch Angle General Launch.
Chapter 6 Forces in Motion.
Motion in Two Dimensions Chapter 7.2 Projectile Motion What is the path of a projectile as it moves through the air? Parabolic? Straight up and down?
In chapter 1, we talked about parametric equations. Parametric equations can be used to describe motion that is not a function. If f and g have derivatives.
Two Dimensional Motion Two components: Horizontal (x-axis) & Vertical (y-axis)
© 2005 Pearson Prentice Hall This work is protected by United States copyright laws and is provided solely for the use of instructors in teaching their.
Projectile Motion.
Chapter 3 Kinematics in Two Dimensions; Vectors © 2014 Pearson Education, Inc.
Chapter 3 Kinematics in Two Dimensions; Vectors
Projectile Motion Physics Level.
Skydiver.
What is Projectile Motion?
Chapter 3 Kinematics in Two Dimensions; Vectors
OOP Paradigms There are four main aspects of Object-Orientated Programming Inheritance Polymorphism Abstraction Encapsulation We’ve seen Encapsulation.
Newton’s Laws of Motion
Vectors Scalars and Vectors:
Kinematics in Two Dimensions; Vectors
Kinematics in Two Dimensions
Projectile Motion Physics Honors.
Motion in 2D (Projectiles!!) Test Monday October 15th
Step 1: Get Organized Draw a picture.
Newton’s 3rd Law.
Projectile Motion Physics Honors.
Presentation transcript:

CS 282

 Last week we dealt with projectile physics ◦ Examined the gravity-only model ◦ Coded drag affecting projectiles  Used Runge-Kutta for approximating integration ◦ Coded wind effect  This week we will add the last effect…

 First of all, open up a completed version of last week’s lab ◦ If neither you nor your partner have it, you will have to code it again. Refer to last week’s instructions.  So that we have a common starting ground, set the parameters for the following… ◦ Initial position: (0.0, 0.0, 0.0) ◦ Initial Velocity: (15.0, 20.0, 1.0) ◦ Drag Coefficient: 0.05 Mass: 10.0 Radius: 1.2 ◦ Wind Velocity: (5.0, 2.0, 0.0)

 Compile it and run the following scenarios ◦ IMPORTANT: Limit your simulations by either time (i.e. 5 seconds) or by position (when y position is at 0)  Gravity-only model  Gravity and Drag Model  Gravity, Drag, and Wind Model  Start outputting the magnitude of the velocity to the screen for each model ◦ sqrt (v x 2 + v y 2 + v z 2 )  Capture these outputs in separate files ◦ Use > on the command-line

 Spin is a very common occurrence when dealing with projectile physics. ◦ A bullet leaving a gun will have spin ◦ A golf ball will also have spin when hit by the club  Spinning objects generate force

 First of all, a spinning object generates lift ◦ This is called the Magnus effect (also known as Robin’s effect) ◦ The direction of the force will be perpendicular to the velocity and spin direction  If the object has backspin… ◦ Then the Magnus force will be positive in the vertical direction, propelling the object upwards  On the other hand, if the object has topspin… ◦ The resulting force will be in the opposite direction, thus pushing the object down

 Here we can see all the forces interacting with our ball (minus the wind)  Glossary: ◦ C L (lift coefficient) ◦ p (fluid density)  Greek letter rho ◦ v (velocity magnitude) ◦ A (characteristic area) ◦ R (spin axis vector) ◦ w (rotation velocity)  Greek letter omega

 We need to create some variables in our class ◦ We will need the following doubles…  Spin axis components: X-axis rotation, Y-axis rotation, Z-axis rotation  Angular/Rotational velocity (omega) ◦ And some way of setting/initializing them  You can either have them be public and manually set them, or create get/set functions (better)  Create a spin_wind_drag function ◦ It will need to take delta time as a parameter ◦ HINT: We will be using Runge-Kutta

 For a sphere, the force F M is defined as… ◦ F M = ½ C L * p * v 2 * A  For p and A, you can just use the values calculated in the main driver function ◦ C L = (radius * rotational velocity) / v  Solve the following in terms of acceleration (remember F = ma) and add them to their corresponding acceleration components. ◦ F Mx = - (v y /v) * R y * F M ◦ F My = - (v x /v) * R z * F M ◦ F Mz = 0  Because we will rotate the sphere along the Z-axis, this component will be 0 (e.g. 0,0,1 for the spin axis vector)

 Hopefully, you have now added the acceleration components to each step of Runge-Kutta.  Be sure to add your k’s appropriately to the new accelerations you added.  Let’s set the spin axis to 0,0,1  Add the appropriate line of code to the driver  Compile and run

 What if our spin axis is on a multiple axes? ◦ Let’s get the general form of the Magnus force  F Mx = ((v z / v) * R y – (v y / v) *R z ) * F M  F My = ((v x / v) * R z – (v z / v) *R x ) * F M  F Mz = - ((v x / v) * R y – (v y / v) *R x ) * F M  Use these forces to get your acceleration now instead of the old forces.  Compile and run the with a spin axis of ◦ (0.5,0.5, 0.0)

 Use a spin axis of (0.75, 1.0, 0.0) ◦ Default values on the rest  If you have completed the first exercise, you already have your data for the first three models.  Collect the data for the drag_wind_spin

 Plot a graph showing the differences velocity magnitude vs. time of all four models. ◦ Bonus point(s) for the models not explicitly mentioned  If you wish to use a constant delta time (instead of a timer), you may do so by replacing the measure_reset call with a flat value (i.e. 0.5)