Simulation of trajectory of a point on the surface of a rolling sphere

12
Simulation of trajectory of a point on the surface of a rolling sphere An introductory project in computational physics, PHY-105 Instructor: Prof. Tobias Toll C. Rohit Subbarayan [email protected] Shiv Nadar University Siddharth Seetharaman [email protected] Shiv Nadar University Monsoon Semester, 2014 Abstract We wished to determine the trajectory of a point on the circumfer- ence, rather in our case, the surface, of a rolling sphere, on a horizontal plane, and thereby simulate it. During rolling, the point of contact be- tween the sphere and the surface will be at instantaneous rest. By setting up equations of motion and using Newton’s force and torque expressions and using the rolling condition, we obtained the trajectory of our point, which is a cycloid. By running a program in python, we were able to determine the co-ordinates of our point at any instant of time. We managed to run the simulation on Visual Python. The same problem was then extended to a sphere rolling down an inclined plane and we once again obtained the trajectory of our point as a cycloid. 1 Introduction Before we go into the details regarding our project, let us get some concepts clear. First, we need to understand what is meant by ”Rolling”. So, let’s consider a sphere of radius R and mass m, rotating about its center of mass with angular velocity ω 0 . Let this sphere be placed gently on a flat horizontal surface which has co-efficient of kinetic/static friction μ. When the sphere is in contact with the surface, the point of contact will tend to slip to the left as show in Figure 1a, with velocity v = 0 . So, kinetic friction will act in a direction so as to oppose this slipping velocity. Hence, the center of mass of the sphere will start accelerating towards the right direction. 1

Transcript of Simulation of trajectory of a point on the surface of a rolling sphere

Simulation of trajectory of a point on the surface of

a rolling sphereAn introductory project in computational physics, PHY-105

Instructor: Prof. Tobias Toll

C. Rohit [email protected]

Shiv Nadar University

Siddharth [email protected]

Shiv Nadar University

Monsoon Semester, 2014

Abstract

We wished to determine the trajectory of a point on the circumfer-ence, rather in our case, the surface, of a rolling sphere, on a horizontalplane, and thereby simulate it. During rolling, the point of contact be-tween the sphere and the surface will be at instantaneous rest. Bysetting up equations of motion and using Newton’s force and torqueexpressions and using the rolling condition, we obtained the trajectoryof our point, which is a cycloid. By running a program in python, wewere able to determine the co-ordinates of our point at any instant oftime. We managed to run the simulation on Visual Python. The sameproblem was then extended to a sphere rolling down an inclined planeand we once again obtained the trajectory of our point as a cycloid.

1 Introduction

Before we go into the details regarding our project, let us get some conceptsclear. First, we need to understand what is meant by ”Rolling”. So, let’sconsider a sphere of radius R and mass m, rotating about its center of masswith angular velocity ω0. Let this sphere be placed gently on a flat horizontalsurface which has co-efficient of kinetic/static friction µ. When the sphereis in contact with the surface, the point of contact will tend to slip to theleft as show in Figure 1a, with velocity v = Rω0. So, kinetic friction willact in a direction so as to oppose this slipping velocity. Hence, the center ofmass of the sphere will start accelerating towards the right direction.

1

(a) At t=0, when the sphere is just placedon the surface

(b) At t=tr, when the sphere begins toroll

Figure 1: Rolling on a flat horizontal surface

The kinetic frictional force Fk will now cause an opposing torque τ onthe sphere that will slow down its angular velocity and at the same timewill keep increasing the velocity of the center of mass. If we look closely atthe point of contact, its net velocity will have two components- one due toits spin and the other due to the translation of center of mass. The spinvelocity is constantly decreasing from its maximum value and the center ofmass translation velocity keeps increasing from its minimum value. There-fore, there will be an instant at which both these velocities will be equal inmagnitude and opposite in sign. This is when the point of contact comes toinstantaneous rest. At this instant, the slipping velocity becomes 0, whichimplies that kinetic friction will vanish and so does the torque on the sphere!Henceforth, the center of mass will translate with a uniform velocity and thesphere will rotate with a constant angular velocity about the center of mass.The point of contact will remain at instantaneous rest throughout the restof the motion. This situation is what is called as ”Rolling”.(See Figure 1b)

The situation is slightly different when the sphere is placed on an inclinedplane(Figure 2a). Again, the kinetic friction will function so as to producean opposing torque to the angular motion of the sphere wrt to the center ofmass, and along with the component of the weight force, will accelerate thecenter of mass down the incline. So there will again be an instant when thepoint of contact comes to an instantaneous rest.

2

(a) At t=0, when the sphere is just placedon the surface

(b) At t=tr, when the sphere begins toroll

Figure 2: Rolling on an inclined plane

However, at this instant, static friction f will come into play so as tokeep the point of contact always at instantaneous rest i.e., to keep the sphererolling(Figure 2b). It will cause a torque that keeps increasing the angularvelocity of the sphere at the same rate at which its translational velocityincreases1.

Now that we have discussed the motion of the sphere qualitatively, letus try and quantify it.

2 Formulation

2.1 Sphere Rolling on a horizontal plane

Let us first setup Newton’s Force equation.

Fk = ma (1)

µmg = ma (2)

⇒ a = µg (3)

Next we shall setup Newton’s Toque equation.

τ = Iα (4)

FkR = Iα (5)

µmgR = Iα (6)

⇒ α =µmgR

I(7)

1We shall try and prove this at a later stage

3

The following is obtained by setting up the equations of motion under uni-form acceleration,

vcom = atr (8)

vcom = µgtr (9)

ωf = ω0 − αtr (10)

(11)

From equation 7,

ωf = ω0 −µmgR

Itr (12)

Using the rolling condition, vcom = Rωf , we can find out the time taken forrolling to start.

vcom = Rωf (13)

µgtr = R(ω0 −µmgR

Itr) (14)

⇒ tr =Rω0

µg[1 + mR2

I ](15)

By plugging in equation 15 in equation 11, we can determine the final angularvelocity of the sphere i.e., the angular velocity of the sphere once Rollingstarts.

∴ ωf =ω0

(1 + mR2

I )(16)

2.2 Sphere Rolling on an Inclined Plane

For the case of simplicity, let us assume that our sphere is initially at restand then gently placed on the inclined plane. Even now, static friction willact on the sphere and Rolling will take place.

Since the sphere will start Rolling, the point of contact will be at instan-taneous rest and hence the condition vcom = Rω must be satisfied at everyinstant.

By differentiating both sides,

dvcomdt

= Rdω

dt(17)

⇒ acom = Rα (18)

Equation 17 also tells us the following :

dvcom = Rdω (19)

What equation 19 means is that the small change in linear velocity is directlyproportional to the small change in angular velocity. In other words, the

4

linear velocity and angular velocity increase proportionately. This furthershows that the point of contact will remain at instantaneous rest throughoutthe rest of its motion.

Let us now write Newton’s Force equation,

Fnet = ma (20)

mg sin θ − f = ma (21)

Now, writing Newton’s Torque equation,

τnet = Iα (22)

fR = Ia/R (23)

⇒ f = Ia/R2 (24)

Plugging equation 24 in 21,

mg sin θ − Ia

R2= ma (25)

⇒ a =g sin θ

(1 + ImR2 )

(26)

We also analyzed the conditions required for Rolling to take place. Onething we had conveniently assumed was that f < mg sin θ, as the sphere isRolling down the incline. One could ask what would happen if that is nottrue i.e., what happens if f ≥ mg sin θ? In that case the sphere will continueto remain at rest! This is so because, when mg sin θ is not large enough, fwill balance out mg sin θ as f can’t be larger than mg sin θ, or otherwise thesphere will accelerate up the incline! To put it mathematically, the followingcan never happen:

f > mg sin θ (27)

⇒ mg sin θ < µmg cos θ (28)

⇒ tan θ < µ (29)

So for Rolling to happen,tan θ ≥ µ (30)

Therefore, equation 30 gives us the minimum condition for which Rollingcan take place. If θ < arctan(µ), the sphere will remain at rest.

5

We also know that f ≤ µmg cos θ and from equations 24 and 26 we canobtain the following:

f =Img sin θ

(I +mR2)(31)

⇒ Img sin θ

(I +mR2)≤ µmg cos θ (32)

⇒ tan θ ≤ µ(I +mR2

I) (33)

Hence equation 33 gives us the maximum condition for which Rolling cantake place.

For θ > arctan(µ( I+mR2

I )), slipping will take place.The condition for Rolling to take place is therefore:

arctan(µ) ≤ θ ≤ arctan(µ(I +mR2

I))

2.3 Co-ordinates of a point on surface of the sphere

In order to determine the co-ordinates of the point on the surface of oursphere that is rolling, all we require is some elementary geometry.

Figure 3: co-ordinates of a point on a translating sphere

6

Consider a point P on the surface of the sphere (See figure 3). Let θ bethe angle it has traversed in time t. The x co-ordinate of P would then bethe distance moved by the center of mass along X-axis minus the horizontaldistance of P from the center of mass, wrt the origin. Hence, x = R(θ−sin θ).

The y co-ordinate is much simpler to determine as there is no motion ofthe center of mass along the Y-axis. It would simply be equal to the verticaldistance of P from the center of mass wrt the X-axis. Hence, y = R(1−cos θ).

Therefore the co-ordinates of P will be given by (R(θ−sin θ), R(1−cos θ)).

3 Code

3.1 Sphere Rolling on a horizontal plane

The following is the code for finding the co-ordinates of the point:

from math import *

import numpy as np

import pylab as pl

def pos(w, R, t, u, g=9.8):

T=(2*w*R)/(7*u*g)

a=u*g

b=(5*u*g)/(2*R)

if t<=T:

p=w*t-(0.5*b*((t)**2))

y=R-R*cos(p)

x=0.5*a*(t**2)-R*sin(p)

vx=(a*t-R*cos(p)*(w-b*t))

vy=R*sin(p)*(w-b*t)

else:

p=w*T-(0.5*b*((T)**2))+w*(t-T)*2/7.0

v=R*w*2/7.0

y=R-R*cos(p)

x=0.5*a*(T**2)+v*(t-T)-R*sin(p)

vx=v-R*cos(p)*w*2/7.0

vy=R*sin(p)*w*2/7.0

return (x, y,vx,vy)

T=30

t=[]

t=np.arange(0,20,20/2000.0)

xPlot=[]

yPlot=[]

i=0

7

w=float(input("Enter angular velocity"))

R=float(input("Enter radius"))

u=float(input("Enter co-efficient of friction"))

m=len(t)

while i<m:

a,b,c,d=pos(w,R,t[i],u)

xPlot.append(a)

yPlot.append(b)

i+=1

pl.plot(xPlot,yPlot)

pl.show()

The following is the code for simulating the trajectory of the point:

from visual import *

from math import *

scene.width=600

scene.height=700

scene.title=’Sphere Rolling on a horizontal surface’

scene.autoscale=0

scene.range = (100,100,100)

point = sphere(pos=(-90,-4.72,0),radius=(0.1),color=color.red,make_trail=True)

ground = box(pos=(0,-5.5,0),size=(200,1,200),color=color.green)

ball = sphere(pos=(-90.4,-3.0,0),radius=2,color=color.blue,make_trail=True)

t=0

dt=0.1

w1=1.0

u=0.5

g=9.8

R=2

w2=2*w1/7.0

p=w2*t

point.velocity=vector(R*w2*(1-cos(w2*t)),R*w2*(sin(w2*t)),0)

ball.velocity=vector(ball.radius*w2,0,0)

while True:

rate(60)

t+=dt

p+=(w2*dt)

point.velocity.x=R*w2*(1-cos(w2*t))

point.velocity.y=R*w2*(sin(w2*t))

point.pos.x+=point.velocity.x*dt

point.pos.y+=point.velocity.y*dt

ball.pos.x=ball.pos.x+ball.velocity.x*dt

8

if point.pos.x>100:

break

3.2 Sphere Rolling on an Inclined Plane

The following is the code for finding the co-ordinates of the point:

from math import *

def cart_posn(t,R,A,u,h,g=9.8):

a=(5*g*sin(A))/7

T=((2*h)/(a*sin(A)))**(0.5)

if sin(A)<=u*cos(A):

print("The ball will not move at all")

elif tan(A)>3.5*u:

print("Angle is too large: The ball will slip")

elif t<=T:

p=(0.5*a*(t**2))/R

X=0.5*a*(t**2)-R*sin(p)

Y=R-R*cos(p)

P=(0.5*a*(T**2))/R

n=(p/(2*pi))

N=(P/(2*pi))

x=X*cos(A)+Y*sin(A)

y=-X*sin(A)+Y*cos(A)+h

print("co-ordinates wrt normal axes :

"+str(x)+","+str(y))

print("co-ordinates wrt axes defined along the inclined plane :

"+str(X)+","+str(Y))

print("number of rotations taken for the ball to

reach the ground : "+str(N))

print("number of rotations completed by

the ball so far : "+str(n))

else:

print("Time too large: Ball has already reached the ground")

The following code is for the simulation of the trajectory of the point:

from visual import *

from math import *

scene.width=600

scene.height=700

scene.autoscale=0

9

scene.range = (100,100,100)

scene.title=’Sphere rolling down an incline’

point = sphere(pos=(-90,-4.72,0),radius=(0.2),color=color.red,make_trail=True)

inclinedPlane = box(pos=(10,-5.5,0),size=(200,1,200),color=color.green)

blah=float(input("enter angle of incline (between 0 and pi/2)"))

theta=-blah

inclinedPlane.rotate(angle = theta, origin = (0, 0, 0), axis = (0,0,1))

point.rotate(angle = theta, origin = (0,0,0), axis = (0,0,1))

ball = sphere(pos=(-90.5,-3.0,0),radius=2,color=color.blue,make_trail=True)

ball.rotate(angle = theta, origin = (0,0,0), axis = (0,0,1))

g=9.8

a=(5*g*sin(abs(theta)))/7.0

u=float(input("enter co-efficient of friction"))

R=2.0

T=sqrt(abs(2*200/a))

t=0

dt=0.01

p=(0.5*a*t**2)/R

vx=(a*t*(1-cos(p))*cos(abs(theta))+a*t*sin(p)*sin(abs(theta)))

vy=(-a*t*(1-cos(p))*sin(abs(theta))+a*t*sin(p)*cos(abs(theta)))

ball.velocity=vector(a*t*cos(abs(theta)),-a*t*sin(abs(theta)),0)

point.velocity=vector(vx,vy,0)

if tan(abs(theta))<=u:

print("Very large co-efficient of friction. The ball will not move at all")

if tan(abs(theta))>3.5*u:

print("Angle is too large: ball will slip")

while t<=T:

rate(20)

t+=dt

if tan(abs(theta))<=u:

break

if tan(abs(theta))>3.5*u:

a=g*(sin(abs(theta))-u*cos(abs(theta)))

T=sqrt(abs(2*200/a))

alpha=5.0*u*g*cos(abs(theta))/2

p=0.5*alpha*t**2

vx=(a*t-R*cos(p)*alpha*t)*cos(abs(theta))-R*sin(p)*alpha*t*sin(abs(theta))

10

vy=(-a*t-R*cos(p)*alpha*t)*sin(abs(theta))+R*sin(p)*alpha*t*cos(abs(theta))

point.velocity=vector(vx,vy,0)

ball.velocity=vector(a*t*cos(abs(theta)),-a*t*sin(abs(theta)),0)

point.pos+=point.velocity*dt

ball.pos+=ball.velocity*dt

elif tan(abs(theta))<=3.5*u:

p=(0.5*a*t**2)/R

vx=(a*t*(1-cos(p))*cos(abs(theta))+a*t*sin(p)*sin(abs(theta)))

vy=(-a*t*(1-cos(p))*sin(abs(theta))+a*t*sin(p)*cos(abs(theta)))

ball.velocity=vector(a*t*cos(abs(theta)),-a*t*sin(abs(theta)),0)

point.velocity=vector(vx,vy,0)

point.pos+=point.velocity*dt

ball.pos+=ball.velocity*dt

4 Screenshots

(a) sphere rolling on a horizontal incline (b) sphere rolling down an incline

Figure 4: Some snaps

11

Figure 5: graph of x vs y coordinates of point on the surface of the sphererolling on a horizontal surface

The screen capture videos of our simulations are given below:

1. https://www.youtube.com/watch?v=FHppIYaLmmE

2. https://www.youtube.com/watch?v=OUozKphUkaI

5 Acknowledgments

We would like to thank Professor Tobias Toll, our course instructor, forhis valuable inputs regarding our project. He has also been very helpfulthroughout the course - giving detailed and in depth lectures which reallyintrigued us and motivated us in doing this project.

6 Bibliography

1. http://vpython.org/contents/docs/VPython_Intro.pdf

2. http://vpython.org/contents/docs/

12