{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework_2_2011

# Homework_2_2011 - α and the tangential velocity is damped...

This preview shows page 1. Sign up to view the full content.

CS 111 - Introduction to Computational Science Homework 2 The goal of this homework is to simulate the motion of a ball bouncing off the walls of a closed container, as described in class. The main force acting on the ball is the weight ( f w = m g ) so that the equation of motion is given by the ODE: d v /dt = g v (0) = v 0 , (1) where v 0 is the given initial velocity. Note that the solution v is a vector with two components, i.e. v = ( u, v ), where u is the horizontal component of the velocity v and v is the vertical component of the velocity v . When the ball interacts with the walls, friction forces apply. In particular, the normal velocity is damped by a factor
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: α and the tangential velocity is damped by a factor β . 1. Write a code to simulate the problem above. You should use a RK2 or RK4 scheme with Δ t = . 03 to solve (1). Set the size of the closed container to be [0 , 1] × [0 , 1], an initial velocity of v = (0 ,. 3) m.s-1 , the ball radius r = . 05 m , the initial location of the ball at ( x,y ) = ( . 5 , 1-r ) m , α = . 8, β = . 99 and g = . 0981 m.s-2 (That’s right, let’s be on another planet! After all this is simulation.). What to turn in: your codes as well as a movie of the animation should be sent to your TA. 1...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern