2: Mechanics of Particles

Example number 1, Page number 75

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration
m=9*10**-28;       #mass(gram)
E=100;             #kinetic energy(eV)
e=1.6*10**-12;     #kinetic energy(erg)
mc=4000;           #mass of car(kg)
mt=10000;          #mass of truck(kg)
vc=30;             #speed of car(m/s)

#Calculation
P=math.sqrt(E*e*2*m);      #momentum of electron(gm cm/sec)
vt=mc*vc/mt;               #velocity of truck in 1st case(m/sec)
v1=math.sqrt(mc*vc**2/mt);      #velocity of truck in 2nd case(m/sec)

#Result
print "momentum of electron is",round(P*10**19,2),"*10**-19 gm cm/sec"
print "velocity of truck in 1st case is",int(vt),"m/sec"
print "velocity of truck in 2nd case is",round(v1,2),"m/sec"
momentum of electron is 5.37 *10**-19 gm cm/sec
velocity of truck in 1st case is 12 m/sec
velocity of truck in 2nd case is 18.97 m/sec

Example number 2, Page number 76

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration
v=30;         #speed(m/sec)
P1=30;        #momentum of 1st part(i)
P2=30;        #momentum of 2nd part(j)
P3=3;         #momentum of 3rd part(v)

#Calculation
#from conservation of momentum, 30i+30j+3v=0. from which we get v=-10(i+j)
i=1;         #coordinate of i
j=1;         #coordinate of j
m=math.sqrt(i**2+j**2);       #magnitude
mv=10*m;                     #magnitude of velocity(m/sec)
vbar=math.acos(-10/mv);       #direction of velocity(rad)      
vbar1=int(vbar*180/math.pi);   #direction of velocity(degrees)
vbar2=360-vbar1;               #direction of velocity(degrees) 

#Result
print "magnitude of velocity is",int(mv/math.sqrt(2)),"*math.sqrt(2) m/sec"
print "direction of velocity is",vbar1,"degrees or",vbar2,"degrees"
magnitude of velocity is 10 *math.sqrt(2) m/sec
direction of velocity is 135 degrees or 225 degrees

Example number 3, Page number 77

In [3]:
#importing modules
import math
from __future__ import division

#Variable declaration
v0=0;      #initial velocity of rocket
vr=1.6;    #velocity of gases(km/sec)
v=11.2;    #final velocity(km/sec)
alphabyM0=1/10;      #fuel burnt rate

#Calculation
#assume x=log(M0/M)
x=(v-v0)/vr;     
M0byM=math.exp(x);    
MfbyMe=M0byM-1;             #ratio of mass of fuel to empty rocket
t=(1-(1/M0byM))*(1/alphabyM0);        #time(sec)

#Result
print "ratio of mass of fuel to empty rocket is",int(MfbyMe)
print "answer given in the book is wrong"
print "time is",round(t,2),"sec"
ratio of mass of fuel to empty rocket is 1095
answer given in the book is wrong
time is 9.99 sec

Example number 4, Page number 78

In [17]:
#importing modules
import math
from __future__ import division

#Variable declaration
m1=300;     #mass in 1st stage(kg)
m2=30;      #mass in 2nd stage(kg)
m3=2400;    #fuel filled(kg)
m4=270;     #fuel filled(kg)
u=2;        #velocity(km/sec)

#Calculation
M0=m1+m2+m3+m4;      #mass(kg)
M=m1+m2+m4;          #mass(kg)
v0=u*math.log(M0/M);      #initial velocity of rocket to the second stage(km/sec)
M01=m2+m4;                #mass(kg)
V=v0+(u*math.log(M01/m2));      #final velocity of rocket(km/sec)

#Result
print "final velocity of rocket is",round(V,2),"km/sec"
final velocity of rocket is 7.82 km/sec

Example number 5, Page number 79

In [19]:
#importing modules
import math
from __future__ import division

#Variable declaration
mr=40;      #mass of rocket(kg)
mf=360;     #mass of fuel(kg)
g=9.8;      #acceleration due to gravity(kg/m**2)
v=2*10**3;  #exhaust velocity(m/sec)
v0=0;       #velocity(m/sec)

#Calculation
M=mr+mf;            #mass(kg)
dmbydt=M*g/v;       #thrust(kg/sec)
t=mf/dmbydt;        #time taken(sec)
Vmax=v0+(v*math.log(M/mr))-(g*t);       #final velocity of rocket(m/sec)

#Result
print "final velocity of rocket is",round(Vmax/10**3,1),"km/sec"
final velocity of rocket is 2.8 km/sec

Example number 6, Page number 80

In [25]:
#importing modules
import math
from __future__ import division

#Variable declaration
g=9.8;      #acceleration due to gravity(kg/m**2)
vr=800;     #exhaust velocity(m/sec)
M=8000;     #mass(kg)
a=30;       #acceleration(m/s**2)

#Calculation
dMbydt=M*g/vr;       #thrust on rocket(kg/sec)
dMbydt1=M*(g+a)/vr;      #thrust on rocket to give acceleration(kg/sec)

#Result
print "thrust on rocket is",int(dMbydt),"kg/sec"
print "thrust on rocket to give acceleration is",int(dMbydt1),"kg/sec"
thrust on rocket is 98 kg/sec
thrust on rocket to give acceleration is 398 kg/sec

Example number 8, Page number 81

In [27]:
#importing modules
import math
from __future__ import division

#Variable declaration
urel=10000;      #exhaust velocity(m/s)
dMbydt=0.02;     #rate of fuel burnt(kg/sec)

#Calculation
Freaction=urel*dMbydt;       #thrust acting on rocket(N)

#Result
print "thrust acting on rocket is",int(Freaction),"N"
thrust acting on rocket is 200 N

Example number 9, Page number 82

In [32]:
#importing modules
import math
from __future__ import division

#Variable declaration
M=5000;      #mass of rocket(kg)
mf=40000;     #mass of fuel(kg)
urel=2*10**3;  #exhaust velocity(m/sec)
v0=0; 

#Calculation
M0=M+mf;            #mass(kg)
V=v0+(urel*math.log(M0/M));       #maximum velocity of rocket(m/sec)

#Result
print "final velocity of rocket is",round(V/10**3,1),"km/sec"
final velocity of rocket is 4.4 km/sec

Example number 10, Page number 82

In [39]:
#importing modules
import math
from __future__ import division

#Variable declaration
P1=9.22*10**-21;     #momentum(kgm/s)
P2=5.33*10**-21;     #momentum(kgm/s)
m=3.9*10**-25;       #mass of nucleus(kg)

#Calculation
P=math.sqrt(P1**2+P2**2);     #momentum(kgm/s)
V=P/m;       #recoil velocity of nucleus(m/s)
theta=math.atan(P2/P1);       #direction of momentum of nucleus(rad)
theta=180-(theta*180/math.pi);      #direction of momentum of nucleus(degrees) 
K=P**2/(2*m);                 #kinetic energy(J)

#Result
print "recoil velocity of nucleus is",round(V/10**5,2),"*10**5 m/s"
print "direction of momentum of nucleus is",round(theta),"degrees"
print "kinetic energy is",round(K*10**15,3),"*10**-15 J"
recoil velocity of nucleus is 0.27 *10**5 m/s
direction of momentum of nucleus is 150.0 degrees
kinetic energy is 0.145 *10**-15 J

Example number 13, Page number 86

In [42]:
#importing modules
import math
from __future__ import division

#Variable declaration
malpha=4;       #kinetic energy of alpha particle(MeV)
mth=234;        #mass of thorium(kg)
valpha=1.5*10**7;      #velocity(m/s)

#Calculation
vth=-malpha*valpha/mth;       #recoil velocity of residual(m/s)
Kalpha=malpha;                #kinetic energy of alpha(MeV)
Kth=malpha*Kalpha/mth;               #kinetic energy of residual(MeV)

#Result
print "recoil velocity of residual is",round(vth/10**5,3),"*10**5 m/s"
print "kinetic energy of residual is",round(Kth,3),"MeV"
recoil velocity of residual is -2.564 *10**5 m/s
kinetic energy of residual is 0.068 MeV

Example number 14, Page number 86

In [53]:
#importing modules
import math
from __future__ import division
from sympy import Symbol

#Variable declaration
u1=9;     #velocity(m/sec)
theta=30*math.pi/180;       #scattering angle(rad)
u2=0;                       #velocity(m/sec)
m=Symbol("m");

#Calculation
v1plusv2=u1/math.cos(theta);      
v1minusv2=u2/math.cos(180-theta);    
v1=(v1plusv2+v1minusv2)/2;           #velocity before collision
v2=(v1plusv2-v1minusv2)/2;           #velocity after collisiovelocity after collision isn,v2
KE1=(m*(u1**2/2))+(m*(u2**2/2));                #kinetic energy before collision
KE2=((m*v1**2)/2)+((m*v2**2)/2);                #kinetic energy before collision

#Result
print "velocity before collision is",round(v1,3)
print "velocity after collision is",round(v2,3)
print "kinetic energy before collision is",KE1
print "kinetic energy before collision is",KE2
print "energy is not conserved"
velocity before collision is 5.196
velocity after collision is 5.196
kinetic energy before collision is 40.5*m
kinetic energy before collision is 27.0*m
energy is not conserved