{
"metadata": {
"name": "",
"signature": "sha256:102997571ab69dde264cca49f55aff87dce1c51132ce271fb2095c0f1179d655"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3 : Kinetics of Motion"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1 Page No : 32"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"k = 1. \t\t\t#m\n",
"m = 2500. \t\t\t#kg\n",
"T = 1500. \t\t\t#N-m\n",
"\n",
"#Solution:\n",
"#Calculating the mass moment of inertia of the flywheel\n",
"I = m*k**2 \t\t\t#kg-m**2\n",
"#Calculating the angular acceleration of the flywheel\n",
"alpha = T/I \t\t\t#rad/s**2\n",
"#The angular speed at start\n",
"omega1 = 0\n",
"t = 10. \t\t\t#seconds\n",
"#Calculating the angular speed of the flywheel after t = 10 seconds from start\n",
"omega2 = omega1+alpha*t \t\t\t#rad/s\n",
"#Calculating the kinetic energy of the flywheel after 10 seconds from start\n",
"E = 1./2*I*omega2**2/1000 \t\t\t#kJ\n",
"\n",
"#Results:\n",
"print \" The angular acceleration of the flywheel, alpha = %.1f rad/s**2.\"%(alpha)\n",
"print \" The kinetic energy of the flywheel, E = %d kJ.\"%(E)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The angular acceleration of the flywheel, alpha = 0.6 rad/s**2.\n",
" The kinetic energy of the flywheel, E = 45 kJ.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.2 Page No : 32"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"mC = 500. #kg\n",
"mD = 250. \t\t\t#kg\n",
"s = 100. #m\n",
"r = 0.5 #m\n",
"k = 0.35 \t\t\t#m\n",
"m = 3. \t\t\t#kg/m\n",
"\n",
"#Solution:\n",
"#Velocities of the cage\n",
"u1 = 0.\n",
"v1 = 10.\n",
"v2 = 10.\n",
"u3 = 10.\n",
"v3 = 0. \t\t\t#m/s\n",
"#Accelerations of the cage\n",
"a1 = 1.5\n",
"a3 = -6. \t\t\t#m/s**2\n",
"s = 100. \t\t\t#m\n",
"\n",
"#Calculating the time taken by the cage to reach the top\n",
"t1 = (v1-u1)/a1 \t\t\t#seconds\n",
"#Calculating the dismath.tance moved by the cage during time t1\n",
"s1 = (v1+u1)/2*t1 \t\t\t#m\n",
"#Calculating the time taken for the cage from initial velocity u3 = 10 m/s to final velocity of v3 = 0\n",
"t3 = (v3-u3)/a3 \t\t\t#seconds\n",
"#Calculating the dismath.tance moved by the cage during time t3\n",
"s3 = (v3+u3)/2*t3 \t\t\t#m\n",
"#Calculating the dismath.tance travelled during consmath.tant velocity of v2 = 10 m/s\n",
"s2 = s-s1-s3 \t\t\t#m\n",
"#Calculating the time taken for the cage during consmath.tant velocity\n",
"t2 = s2/v2 \t\t\t#seconds\n",
"#Calculating the time taken for the cage to reach the top\n",
"t = t1+t2+t3 \t\t\t#seconds\n",
"#Calculating the total mass of the rope for 100 metres\n",
"mR = m*s \t\t\t#kg\n",
"#Calculating the force to raise the cage and rope at uniform speed\n",
"F1 = (mC+mR)*9.81 \t\t\t#N\n",
"#Calculating the torque to raise the cage and rope at uniform speed\n",
"T1 = F1*r \t\t\t#N-m\n",
"#Calculating the force to accelerate the cage and rope\n",
"F2 = (mC+mR)*a1 \t\t\t#N\n",
"#Calculating the torque to accelerate the cage and rope\n",
"T2 = F2*r \t\t\t#N-m\n",
"#Calculating the mass moment of inertia of the drum\n",
"I = mD*k**2 \t\t\t#kg-m**2\n",
"#Calculating the angular acceleration of the drum\n",
"alpha = a1/r \t\t\t#rad/s**2\n",
"#Calculating the torque to accelerate the drum\n",
"T3 = I*alpha \t\t\t#N-m\n",
"#Calculating the total torque which must be applied to the drum at starting\n",
"T = T1+T2+T3 \t\t\t#N-m\n",
"#Calculating the mass of 33.35 m rope\n",
"m1 = m*33.35 \t\t\t#kg\n",
"#Calculating the reduction of torque\n",
"T4 = (m1*9.81+m1*a1)*r \t\t\t#N-m\n",
"#Calculating the angular velocity of drum\n",
"omega = v2/(2*math.pi*r) \t\t\t#rad/s\n",
"#Calculating the power\n",
"P = T4*omega/1000 \t\t\t#Power kW\n",
"\n",
"#Results:\n",
"print \" The time taken for the cage to reach the top t = %.2f s.\"%(t)\n",
"print \" The total torque which must be applied to the drum during starting T = %.1f N-m.\"%(T)\n",
"print \" The power required is %.3f kW.\"%(P)\n",
"#Answers differ due to rounding-off values in textbook"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The time taken for the cage to reach the top t = 14.17 s.\n",
" The total torque which must be applied to the drum during starting T = 4615.9 N-m.\n",
" The power required is 1.801 kW.\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3 Page No : 34"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"P = 4.*1000 \t\t\t#W\n",
"I = 140. \t\t\t#kg-m**2\n",
"N1 = 240. \t\t\t#rpm\n",
"\n",
"#Solution:\n",
"#Calculating the angular acceleration at the commencement of operation\n",
"omega1 = 2*math.pi*N1/60 \t\t\t#rad/s\n",
"#Calculating the energy supplied by the motor (E1) and the energy consumed in closing a revet in 1 second\n",
"E1 = 4000.\n",
"E2 = 10000. \t\t\t#N-m\n",
"#Calculating the loss of kinetic energy of the flywheel during the operation\n",
"E = E2-E1 \t\t\t#N-m\n",
"#Calculating the kinetic energy of the flywheel at the commencement of operation\n",
"KEc = 1./2*I*omega1**2 \t\t\t#Kinetic energy at the commencement N-m\n",
"#Calculating the kinetic energy of the flywheel at the end of operation\n",
"KEe = KEc-E \t\t\t#Kinetic energy at the end N-m\n",
"#Calculating the angular speed of the flywheel immediately after closing a revet\n",
"omega2 = math.sqrt(KEe*2/I) \t\t\t#rad/s\n",
"#Calculating the reduction of speed\n",
"ReductionofSpeed = (omega1-omega2)*60/(2*math.pi) \t\t\t#rpm\n",
"#Calculating the maximum rate at which the revets can be closed per minute\n",
"Rate = P*60/E2 \t\t\t#Maximum rate at which the revets can be closed per minute\n",
"\n",
"#Results:\n",
"print \" The reduction of speed is %.1f rpm.\"%(ReductionofSpeed)\n",
"print \" The maximum rate at which rivets can be closed per minute is %d.\"%(Rate)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The reduction of speed is 16.9 rpm.\n",
" The maximum rate at which rivets can be closed per minute is 24.\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.4 Page No : 35"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"m = 14.*1000 #kg\n",
"m1 = 1.25*1000 #kg\n",
"m2 = 110. \t\t\t#kg\n",
"d = 1. #m\n",
"r = d/2 #m\n",
"k1 = 450./1000 #m\n",
"k2 = 125./1000 \t\t#m\n",
"F = 1.2*1000 \t\t#N\n",
"eta = 0.85\n",
"v = 1.8 \t\t\t#m/s\n",
"a = 0.1 \t\t\t#m/s**2\n",
"\n",
"#Solution:\n",
"#Calculating the forces oppomath.sing the motion\n",
"P1 = m*9.81*1/20+m*a+F \t\t\t#N\n",
"#Calculating the torque on the drum shaft to accelerate the load\n",
"T1 = P1*r \t\t\t#N-m\n",
"#Calculating the mass moment of inertia of the drum\n",
"I1 = m1*k1**2 \t\t\t#kg-m**2\n",
"#Calculating the angular acceleration of the drum\n",
"alpha1 = a/r \t\t\t#rad/s\n",
"#Calculating the torque on the drum to accelerate the drum shaft\n",
"T2 = I1*alpha1 \t\t\t#N-m\n",
"#Calculating the torque on the armature to accelerate drum and load\n",
"T3 = (T1+T2)/(40*eta) \t\t\t#N-m\n",
"#Calculating the mass moment of inertia of the armature\n",
"I2 = m2*k2**2 \t\t\t#kg-m**2\n",
"#Calculating the angular acceleration of the armature\n",
"alpha2 = a/r*40 \t\t\t#rad/s**2\n",
"#Calculating the torque on the armature to accelerate armature shaft\n",
"T4 = I2*alpha2 \t\t\t#N-m\n",
"#Calculating the torque on the motor shaft\n",
"T = T3+T4 \t\t\t#N-m\n",
"#Calculating the angular speed of the motor\n",
"omega = v/r*40 \t\t\t#rad/s\n",
"#Calculating the power developed by the motor\n",
"P = T*omega/1000 \t\t\t#Power developed by the motor kW\n",
"\n",
"#Results:\n",
"print \" The torque on the motor shaft T = %.2f N-m.\"%(T)\n",
"print \" The power developed by the motor is %.2f kW.\"%(P)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The torque on the motor shaft T = 154.46 N-m.\n",
" The power developed by the motor is 22.24 kW.\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.5 Page No : 37"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"m = 12.0*1000\n",
"m1 = 2.0*1000\n",
"m2 = 2.5*1000 \t\t\t#kg\n",
"k1 = 0.4\n",
"d1 = 1.2\n",
"r1 = d1/2.0\n",
"k2 = 0.6\n",
"d2 = 1.5\n",
"r2 = d2/2.0\n",
"s = 6.0 \t\t\t#m\n",
"v = 9.0*1000/3600 \t\t\t#m/s\n",
"\n",
"#Solution:\n",
"#Calculating the mass moment of inertia of the front roller\n",
"I1 = m1*k1**2 \t\t\t#kg-m**2\n",
"#Calculating the mass moment of inertia of the rear axle together with its wheels\n",
"I2 = m2*k2**2 \t\t\t#kg-m**2\n",
"#Calculating the angular speed of the front roller\n",
"omega1 = round(v/r1,2) \t\t\t#rad/s\n",
"#Calculating the angular speed of rear wheels\n",
"omega2 = round(v/r2,1) \t\t\t#rad/s\n",
"#Calculating the kinetic energy of rotation of the front roller\n",
"E1 = 1.0/2*I1*4.16**2 \t\t\t#N-m\n",
"#Calculating the kinetic energy of rotation of the rear axle with its wheels\n",
"E2 = 1.0/2*I2*omega2**2 \t\t\t#N-m\n",
"#Calculating the total kinetic energy of rotation of the wheels\n",
"E = round(E1+E2,-1) \t\t\t#N-m\n",
"#Calculating the kinetic energy of translation of the road roller\n",
"E3 = 1.0/2*m*v**2 \t\t\t#N-m\n",
"#Calculating the total kinetic energy of the road roller\n",
"E4 = E3+E \t\t\t#N-m\n",
"#Calculating the braking force to bring the roller to rest\n",
"F = E4/s \t\t\t#N\n",
"\n",
"#Results:\n",
"print \" The total kinetic energy of rotation of the wheels E = %.f N-m.\"%(E)\n",
"print \" The total kinetic energy of the road roller E4 = %d N-m.\"%(E4)\n",
"print \" The braking force required to bring the roller to rest F = %.1f N.\"%(F)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The total kinetic energy of rotation of the wheels E = 7670 N-m.\n",
" The total kinetic energy of the road roller E4 = 45170 N-m.\n",
" The braking force required to bring the roller to rest F = 7528.3 N.\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.6 Page no : 38"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from sympy import Symbol,solve\n",
"import math\n",
"\n",
"# variables\n",
"s = 4. # N/m\n",
"m = 4000. # N/m ; \n",
"x1 = 0.075 # m \n",
"x2 = 0.03 # m;\n",
"m = 5. # kg ; \n",
"R = 70. # N\n",
"g = 9.81\n",
"\n",
"# calculations\n",
"Q = m*(x1 - x)\n",
"P = Q + m*g - R\n",
"x = 0.045\n",
"t = Symbol(\"t\")\n",
"ans = -solve(0.07*(1 - math.cos(math.sqrt(800)) * t) - 0.045)[0]\n",
"a = math.acos(ans)\n",
"t = a/math.sqrt(800)\n",
"\n",
"# result\n",
"print \"t = %.4f s\"%t\n",
"\n",
"# rounding off error"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"t = 0.0426 s\n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.7 Page No : 41"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from numpy import linalg\n",
"\n",
"# Variables:\n",
"r = 500./1000\n",
"k = 450./1000 \t\t\t#m\n",
"m1 = 500.\n",
"m2 = 1250. \t\t\t#kg\n",
"u = 0.75 \t\t\t#m/s\n",
"\n",
"#Solution:\n",
"#Calculating the mass moment of inertia of drum\n",
"I2 = m2*k**2 \t\t\t#kg-m**2\n",
"#Calculating the speed of truck\n",
"#Impulse\n",
"#F = m1*v or\n",
"#F-m1*v = 0 .....(i)\n",
"#Moment of impulse\n",
"#F*r = I2*(omega2-omega2) or\n",
"#F*r = I2*(u-v)/r or\n",
"#F*r+I2*v/r = I2*u/r .....(ii)\n",
"#Solving (i) and (ii)\n",
"A = [[1, -m1],[ r, I2/r]]\n",
"B = [0, I2*u/r]\n",
"V = linalg.solve(A,B)\n",
"v = V[1]\n",
"#Calculating the energy lost to the system\n",
"E = 1./2*I2*(u**2-v**2)/r**2-1./2*m1*v**2 \t\t\t#Energy lost to the system, N-m\n",
"\n",
"#Results:\n",
"print \" The speed of the truck when the motion becomes steady, v = %.3f m/s.\"%(v)\n",
"print \" The energy lost to the system is %d N-m.\"%(E)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The speed of the truck when the motion becomes steady, v = 0.502 m/s.\n",
" The energy lost to the system is 94 N-m.\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.8 Page No : 42"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from scipy.optimize import fsolve \n",
"import math \n",
"\n",
"# Variables:\n",
"s = 0.7*10**6 \t\t\t#N/m\n",
"m1 = 10.*10**3\n",
"m2 = 15.*10**3 \t\t\t#kg\n",
"v1 = 1.8\n",
"v2 = 0.6 \t\t\t#m/s\n",
"\n",
"#Solution:\n",
"#Calculating the common velocity when moving together during impact\n",
"v = (m1*v1+m2*v2)/(m1+m2)\n",
"#Calculating the kinetic energy lost to the system\n",
"E = (1./2*m1*v1**2+1./2*m2*v2**2)-1./2*(m1+m2)*v**2\n",
"#Calculating the compression of each buffer spring\n",
"x = math.sqrt(E/(2*s))\n",
"#Calculating the velocity of each truck on separation\n",
"#Final KE after separation = KE at common velocity+Half of energy stored in springs.\n",
"#And initial and final momentum must be equal.\n",
"#Simplifying the two equations\n",
"# we get\n",
"\n",
"#1/2*m1*v3**2+1/2*m2*v4**2 = 1/2*(m1+m2)*v**2+1/2*E .....(i)\n",
"#m1*v3+m2*v4 = (m1+m2)*v\n",
"def f(x):\n",
" v3 = x[0]\n",
" v4 = x[1]\n",
" y = [0,0]\n",
" y[0] = 1./2*m1*v3**2+1./2*m2*v4**2-1./2*(m1+m2)*v**2-1./2*E\n",
" y[1] = m1*v3+m2*v4-(m1+m2)*v\n",
" return y\n",
" \n",
"z = fsolve(f,[1,1])\n",
"v3 = z[1]\n",
"v4 = z[0]\n",
"\n",
"#Results:\n",
"print \" The common velocity when moving together during impact, v = %.2f m/s.\"%(v)\n",
"print \" The kinetic energy lost to the system is %.2f kN-m.\"%(E/1000.)\n",
"print \" The compression of each buffer spring, x = %.f mm.\"%(x*1000.)\n",
"print \" The velocity of separation for 10 tonnes truck, v3 = %.1f m/s.\"%(v3)\n",
"print \" The velocity of separation for 15 tonnes truck, v4 = %.1f m/s.\"%(v4)\n",
"\n",
"# note : rounding off error"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The common velocity when moving together during impact, v = 1.08 m/s.\n",
" The kinetic energy lost to the system is 4.32 kN-m.\n",
" The compression of each buffer spring, x = 56 mm.\n",
" The velocity of separation for 10 tonnes truck, v3 = 0.7 m/s.\n",
" The velocity of separation for 15 tonnes truck, v4 = 1.6 m/s.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.9 Page No : 43"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"m1 = 300. #kg\n",
"m2 = 500. \t\t\t#kg\n",
"s = 1. #m\n",
"x = 150./1000 \t\t#m\n",
"\n",
"#Solution:\n",
"#Calculating the velocity with which mass m1 hits the pile\n",
"u = 0\n",
"v1 = math.sqrt(2*9.81*s+u**2) \t\t\t#m/s\n",
"#Calculating the common velocity after impact\n",
"v2 = 0\n",
"v = (m1*v1+m2*v2)/(m1+m2) \t\t\t#m/s\n",
"#Calculating the kinetic energy before impact\n",
"KEb = m1*9.81*s \t\t\t#Kinetic energy before impact N-m\n",
"#Calculating the kinetic energy after impact\n",
"KEa = 1./2*(m1+m2)*v**2 \t\t\t#Kinetic energy after impact N-m\n",
"#Calculating the energy lost in the blow\n",
"E = KEb-KEa \t\t\t#Energy lost in the blow N-m\n",
"#Calculating the average resistance against the pile\n",
"R = KEa/x+m1*9.81+m2*9.81\n",
"\n",
"#Results:\n",
"print \" The energy lost in the blow is %d N-m.\"%(E)\n",
"print \" The average resistance against the pile R = %.3f kN.\"%(R/1000)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The energy lost in the blow is 1839 N-m.\n",
" The average resistance against the pile R = 15.206 kN.\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.10 Page No : 44"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from numpy import linalg\n",
"\n",
"# Variables:\n",
"m1 = 0.7\n",
"m2 = 2.4 \t\t\t#kg\n",
"k1 = 270./1000\n",
"k2 = 185./1000\n",
"h1 = 0.25\n",
"DL = 0.2\n",
"CM = 0.275 \t\t\t#m\n",
"\n",
"#Solution:\n",
"#Calculating the angular velocity of hammer just before impact\n",
"h = h1*(1-math.cos(20*math.pi/180))\n",
"omega = math.sqrt(m1*9.81*h*2/(m1*k1**2)) \t\t\t#rad/s\n",
"#Calculating the relative linear velocity\n",
"RLV = 0.8*omega*CM\n",
"#Calculating the values of angular velocities\n",
"#The two equations we get in terms of omegaA and omegaB are\n",
"#DL*omegaA-CM*omegaB = RLV .....(i)\n",
"#m1*k1**2*(omega-omegaB) = .275/.2*m2*k2**2*omegaA or\n",
"#2.21*omegaA+omegaB = 2.01 .....(ii)\n",
"A = [[DL, -CM],[ 2.21, 1]]\n",
"B = [RLV,2.01]\n",
"V = linalg.solve(A,B)\n",
"\n",
"#Results:\n",
"print \" The angular velocity of the anvil A, omegaA = %.2f rad/s.\"%(V[0])\n",
"print \" The angular velocity of the hammer B, omegaB = %.2f rad/s, i.e. %.2f rad/s, in the reverse direction.\"%(V[1],\n",
"V[1]*-1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The angular velocity of the anvil A, omegaA = 1.23 rad/s.\n",
" The angular velocity of the hammer B, omegaB = -0.71 rad/s, i.e. 0.71 rad/s, in the reverse direction.\n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.11 Page No : 46"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import linalg\n",
"import math \n",
"\n",
"# Variables:\n",
"m = 30. \t\t\t#kg\n",
"AG = 1\n",
"GB = 150./1000\n",
"k1 = 1.1\n",
"k2 = 350./1000 \t\t\t#m\n",
"theta = 60.*math.pi/180 \t\t\t#rad\n",
"t = 0.005 \t\t\t#s\n",
"a = AG\n",
"b = GB\n",
"\n",
"#Solution:\n",
"#Calculating the mass moment of inertia of the pendulum about the point of suspension A\n",
"IA = m*k1**2 \t\t\t#kg-m**2\n",
"#Calculating the mass moment of inertia ofthe pendulum about centre of gravity G\n",
"IG = m*k2**2 \t\t\t#kg-m**2\n",
"#Calculating the angular velocity of the pendulum\n",
"h1 = a-a*math.cos(theta)\n",
"omega = math.sqrt(2*m*9.81*h1/IA) \t\t\t#rad/s\n",
"#Calculating the striking velocity of the pendulum\n",
"v = omega*(a+b) \t\t\t#m/s\n",
"#Calculating the angular velocity of the pendulum just after the breakage of the specimen\n",
"omega1 = math.sqrt(omega**2-2*54/IA)\n",
"#Calculating the linear velocity of G just before the breakage of specimen\n",
"vG = omega*AG \t\t\t#m/s\n",
"#Calculating the linear velocity of G just after the breakage of specimen\n",
"vGdash = omega1*AG \t\t\t#m/s\n",
"#Calculating the impulses at pivot A and knife edge B\n",
"#F1+F2 = m*(vG-vGdash) .....(i)\n",
"#b*F2-a*F1 = IG*(omega-omega1) .....(ii)\n",
"A = [[1, 1],[-a, b]]\n",
"B = [[m*(vG-vGdash)], [IG*(omega-omega1)]]\n",
"V = linalg.solve(A,B)\n",
"F1 = V[0]\n",
"F2 = V[1]\n",
"\n",
"#Calculating the angle of swing of the pendulum after impact\n",
"theta1 = math.cos(a-1./2*IA*omega1**2/(m*9.81))/a \t\t\t#radians\n",
"#Calculating the average force exerted at the pivot\n",
"Fp = F1/t \t\t\t#N\n",
"#Calculating the average force exerted at the knife edge\n",
"Fk = F2/t \t\t\t#N\n",
"\n",
"#Results:\n",
"print \" The striking velocity of the pendulum, v = %.2f m/s.\"%(v)\n",
"print \" Impulse at the pivot A, F1 = %.1f N.\"%(F1)\n",
"print \" Impulse at the knife edge B, F2 = %.1f N.\"%(F2)\n",
"print \" Angle of swing of the pendulum after impact, theta = %.2f degree.\"%(theta1*180/math.pi)\n",
"print \" Average force exerted at the pivot is %d N.\"%(round(Fp,-1))\n",
"print \" Average force exerted at the knife edge is %d N.\"%(Fk)\n",
"\n",
"# note : python linalg solve gives slightly different answer but accurate. "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The striking velocity of the pendulum, v = 3.27 m/s.\n",
" Impulse at the pivot A, F1 = 0.4 N.\n",
" Impulse at the knife edge B, F2 = 17.0 N.\n",
" Angle of swing of the pendulum after impact, theta = 44.43 degree.\n",
" Average force exerted at the pivot is 80 N.\n",
" Average force exerted at the knife edge is 3407 N.\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.12 Page No : 47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import linalg\n",
"import math \n",
"\n",
"# Variables:\n",
"T = 150. \t\t\t#N-m\n",
"m1 = 60. #kg\n",
"m2 = 20. \t\t\t#kg\n",
"k1 = 140./1000 #m\n",
"k2 = 80./1000 \t\t#m\n",
"N1 = 750. #rpm\n",
"N2 = 0. \t\t\t#rpm\n",
"\n",
"#Sloution:\n",
"#Calculating the angular speeds\n",
"omega1 = 2*math.pi*N1/60\n",
"omega2 = 0 \t\t\t#rad/s\n",
"#Calculating the mass moment of inertia of the rotor on motor\n",
"I1 = m1*k1**2 \t\t\t#kg-m**2\n",
"#Calculating the mass moment of inertia of the parts attached to machine\n",
"I2 = m2*k2**2 \t\t\t#kg-m**2\n",
"#Calculating the speed after engagement of the clutch and the time taken\n",
"#We know that impulsive torque = change in angular momentum\n",
"#T*t = I1*(omega1-omega) or I1*omega+T*t = I1*omega1 .....(i)\n",
"#T*t = I2*(omega-omega2) or I2*omega-T*t = I2*omega2 .....(ii)\n",
"A = [[I1, T],[ I2, -T]]\n",
"B = [I1*omega1,I2*omega2]\n",
"V = linalg.solve(A,B)\n",
"omega = V[0] \t\t\t#rad/s\n",
"t = V[1] \t\t\t#s\n",
"#Calculating the kinetic energy lost during the operation\n",
"E = I1*I2*(omega1-omega2)**2/(2*(I1+I2)) \t\t\t#N-m\n",
"\n",
"#Results:\n",
"print \" The speed after engagement, omega = %.1f rad/s.\"%(omega)\n",
"print \" The time taken, t = %.2f s.\"%(t)\n",
"print \" The kinetic energy lost during the operation, E = %d N-m.\"%(E)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The speed after engagement, omega = 70.8 rad/s.\n",
" The time taken, t = 0.06 s.\n",
" The kinetic energy lost during the operation, E = 356 N-m.\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.13 Page No : 50"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"M = 75. \t\t\t#kg\n",
"r = 0.3 \t\t\t#m\n",
"G = 6.\n",
"IA = 100. #kg-m**2\n",
"IB = 5. \t\t\t#kg-m**2\n",
"eta = 90./100 \t\t\n",
"\n",
"#Solution:\n",
"#Calculating the equivalent mass of the geared system\n",
"me = 1/r**2*(IA+G**2*IB) \t\t\t#kg\n",
"#Calculating the total equivalent mass to be accelerated\n",
"Me = me+M \t\t\t#kg\n",
"#Calculating the acceleration when it is allowed to fall freely\n",
"F = M*9.81 \t\t\t#Accelerating force provided by the pull of gravity N\n",
"a = F/Me \t\t\t#m/s**2\n",
"#Calculating the equivalent mass of the geared system when the efficiency is 90%\n",
"me1 = 1/r**2*(IA+G**2*IB/eta) \t\t\t#kg\n",
"#Calculating the total equivalent mass to be accelerated\n",
"Me1 = me1+M \t\t\t#kg\n",
"#Calculating the acceleration when the efficiency is 90%\n",
"F1 = M*9.81 \t\t\t#Accelerating force by the pull of gravity N\n",
"a1 = F1/Me1 \t\t\t#m/s**2\n",
"\n",
"#Results:\n",
"print \" The acceleration of the mass M if it is allowed to fall freely, a = %.3f m/s**2.\"%(a)\n",
"print \" The acceleration of the mass M when the efficiency of the gearing system is 0.9, a = %.3f m/s**2.\"%(a1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The acceleration of the mass M if it is allowed to fall freely, a = 0.231 m/s**2.\n",
" The acceleration of the mass M when the efficiency of the gearing system is 0.9, a = 0.216 m/s**2.\n"
]
}
],
"prompt_number": 21
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.14 pageno : 51"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"# variables\n",
"T = 100. #N-m ; \n",
"IA = 2. # kg-m**2 ;\n",
"IB = 32. # kg-m**2\n",
"\n",
"# calculations\n",
"G = math.sqrt(IB/IA)\n",
"alphaB = G*100/(IA*G**2 + 32)\n",
"alphaA = G*alphaB\n",
"\n",
"# results\n",
"print \"G = %.f\"%G\n",
"print \"alpha B = %.2f rad/s**2\"%alphaB\n",
"print \"alpha A = %.f rad/s**2\"%alphaA"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"G = 4\n",
"alpha B = 6.25 rad/s**2\n",
"alpha A = 25 rad/s**2\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.15 page no : 52"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"# variables\n",
"m = 1500. #kg ; \n",
"d = 600. \n",
"mm = 0.6 #m \n",
"r = 0.3 #m ; \n",
"IA = 8. #kg-m 2 ;\n",
"IB = 1. # kg-m 2 ; \n",
"n = 0.85 \n",
"v = 24. #km/h ; \n",
"F = 300. #N ; \n",
"TB = 200. #N-m ; \n",
"sintheta = 0.25\n",
"\n",
"# calculatins\n",
"tW = n * TB\n",
"P = 170./r\n",
"G = round((14 + math.sqrt(14**2 + 4 * 168.4))/2)\n",
"Amax = (P*G - 3980)/ (1590+9.44*G**2)\n",
"v = 6.67 #m/s\n",
"speed = v/r\n",
"W = G*speed\n",
"power = TB*W/1000\n",
"\n",
"#Result\n",
"print \"G = %.f \"%G\n",
"print \"maximum acceleration : %.2f m/s\"%Amax\n",
"print \"speed of the road wheels : %.f rad/s\"%W\n",
"print \"power of the engine : %.1f kW\"%power"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"G = 22 \n",
"maximum acceleration : 1.38 m/s\n",
"speed of the road wheels : 489 rad/s\n",
"power of the engine : 97.8 kW\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.16 page no : 54"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"# variables\n",
"TB = 1000. # N-m ; \n",
"v1 = 27.8 #m/s ; \n",
"v2 = 76.4 #m /s ; \n",
"d = 0.9 # m \n",
"r = 0.45 # m ; \n",
"G = 3.3 ; \n",
"v = 47.2 # m/s ; \n",
"P = 50 * 10**3 # W ;\n",
"M = 1000 #kg ; \n",
"m = 40. # kg ; \n",
"k = 0.25 #m ; \n",
"IB = 1. # kg-m**2\n",
"\n",
"# calculation\n",
"IA = 4 * m* k**2\n",
"F = round(P/v,-1)\n",
"Tw = G*1000\n",
"FT = Tw/r\n",
"C1 = round(-(2325./(2*121.5)*math.log((121.5+v1)/(121.5-v1))),1)\n",
"t = round((2325./(2*121.5)*math.log((121.5+v2)/(121.5-v2)))-4.5,1)\n",
"\n",
"# result\n",
"print \"the time taken for the speed to rise : %.1f s\"%t\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the time taken for the speed to rise : 9.6 s\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.17 pageno : 55"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"# variables\n",
"G = 9\n",
"IA = 0.6 #kg-m2 \n",
"IB = 45. # kg-m 2 ; \n",
"TB = 100. # N-m;\n",
"n = 0.95; \n",
"N = 160. # r.p.m. ; \n",
"N1 = 0 \n",
"N2 = 60. # r.p.m. ; \n",
"TA = 30. # N-m\n",
"W1 = 0\n",
"# calculations\n",
"P = 2*math.pi*N*TB/(60*n)\n",
"\n",
"t = 60. # time\n",
"TA = 30.\n",
"TB1 = G*TA*n\n",
"B = TB1 - TB\n",
"alphaB = B/91.2\n",
"W2 = 2*math.pi*N2/60\n",
"t = (W2 - W1)/alphaB\n",
"G1 = (7.27 + math.sqrt(7.27**2+4*78.95))/2\n",
"\n",
"# result\n",
"print \"the power which the motor must develop : %.f W\"% P\n",
"print \"final angular speed : %.1f s\"%t\n",
"print \"maximum angular acceleration : %.3f \"%G1"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the power which the motor must develop : 1764 W\n",
"final angular speed : 3.7 s\n",
"maximum angular acceleration : 13.235 \n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.18 Page No : 57"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"d = 1.5 # m\n",
"r = d/2 # m\n",
"d1 = 1. # m\n",
"kM = 90./1000\n",
"kI = 225./1000\n",
"kD = 600./1000\n",
"kP = 450./1000 \t\t\t#m\n",
"NM = 900. # rpm\n",
"N1 = 275. # rpm\n",
"ND = 50. \t\t\t #rpm\n",
"mM = 200. # kg\n",
"mI = 375. # kg\n",
"mD = 2250. # kg\n",
"mP = 200. # kg\n",
"m1 = 1150. # kg\n",
"m2 = 650. \t\t\t#kg\n",
"FI = 150. # N-m\n",
"FD = 1125. # N-m\n",
"FP = 150. \t\t\t#N-m\n",
"F1 = 500. # N\n",
"F2 = 350. \t\t\t#N\n",
"a = 0.9 \t\t\t#m/s**2\n",
"\n",
"#Solution:\n",
"#Calculating the speed of guide pulley\n",
"NP = ND*d/d1 \t\t\t#rpm\n",
"#Calculating the gear ratio for intermediate gear and motor\n",
"G1 = N1/NM\n",
"#Calculating the gear ratio for drum and motor\n",
"G2 = round(ND/NM,3)\n",
"#Calculating the gear ratio for the guide pulley and motor\n",
"G3 = NP/NM\n",
"#Calculating the mass moment of inertia of the motor\n",
"IM = mM*kM**2 \t\t\t#kg-m**2\n",
"#Calculating the mass moment of inertia of the intermediate gear\n",
"II = mI*kI**2 \t\t\t#kg-m**2\n",
"#Calculating the mass moment of inertia of the drum and shaft\n",
"ID = mD*kD**2 \t\t\t#kg-m**2\n",
"#Calculating the mass moment of inertia of the guide pulley\n",
"IP = mP*kP**2 \t\t\t#kg-m**2\n",
"#Calculating the angular acceleration of the drum\n",
"alphaD = a/r \t\t\t#rad/s**2\n",
"#Calculating the angular acceleration of the motor\n",
"alphaM = alphaD*NM/ND \t\t\t#rad/s**2\n",
"#Calculating the equivalent mass moment of inertia of the system\n",
"I = IM+G1**2*II+G2**2*ID+2*G3**2*IP \t\t\t#kg-m**2\n",
"#Calculating the torque at motor to accelerate the system\n",
"T1 = round(I*alphaM,1) \t\t\t#N-m\n",
"#Calculating the torque at motor to overcome friction at intermediate gear\n",
"#drum and two guide pulleys\n",
"T2 = round(G1*FI+G2*FD+2*G3*FP,1) \t\t\t#N-m\n",
"#Calculating the tension in the rimath.sing rope between the pulley and drum\n",
"Q1 = m1*9.81+m1*a+F1 \t\t\t#N\n",
"#Calculating the tension in the falling rope between the pulley and drum\n",
"Q2 = m2*9.81-m2*a-F2 \t\t\t#N\n",
"#Calculating the torque at drum\n",
"TD = round((Q1-Q2)*r) \t\t\t#N-m\n",
"#Calculating the torque at motor to raise and lower cages and ropes and to overcome frictional resistance\n",
"T3 = G2*TD \t\t\t#N-m\n",
"#Calculating the total motor torque required\n",
"T = T1+T2+T3 \t\t\t#N-m\n",
"\n",
"#Results:\n",
"print \" The total motor torque required, T = %.1f N-m.\"%(T)\n",
"\n",
"# rounding off error."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The total motor torque required, T = 583.8 N-m.\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.19 Page No : 65"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"m1 = 50. #kg\n",
"m2 = 25. \t\t\t#kg\n",
"u1 = 3. #m/s\n",
"u2 = 1.5 \t\t\t#m/s\n",
"\n",
"#Solution:\n",
"#When the impact is inelastic\n",
"#Calculating the common velocity after impact\n",
"v = (m1*u1+m2*u2)/(m1+m2) \t\t\t#m/s\n",
"#Calculating the loss of kinetic energy during impact\n",
"EL = m1*m2/(2*(m1+m2))*(u1-u2)**2 \t\t\t#N-m\n",
"#When the impact is elastic\n",
"#Calculating the velocity of the first sphere immediately after impact\n",
"v1 = 2*v-u1 \t\t\t#m/s\n",
"#Calculating the velocity of the second sphere immediately after impact\n",
"v2 = 2*v-u2 \t\t\t#m/s\n",
"#Calculating the loss of kinetic energy\n",
"EL1 = 0\n",
"#When the coefficient of restitution e = 0.6\n",
"e = 0.6\n",
"#Calculating the velocity of the first sphere immediately after impact\n",
"v12 = (1+e)*v-e*u1 \t\t\t#m/s\n",
"#Calculating the velocity of the second sphere immediately after impact\n",
"v22 = (1+e)*v-e*u2 \t\t\t#m/s\n",
"#Calculating the loss of kinetic energy\n",
"EL2 = m1*m2/(2*(m1+m2))*(u1-u2)**2*(1-e**2) \t\t\t#N-m\n",
"\n",
"#Results:\n",
"print \" The common velocity after impact when the impact is inelastic, v = %.1f m/s.\"%(v)\n",
"print \" The loss of kinetic energy during impact, EL = %.2f N-m.\"%(EL)\n",
"print \" The velocity of the first sphere immediately after impact when the impact is elastic, v1 = %d m/s.\"%(v1)\n",
"print \" The velocity of the second sphere immediately after impact, v2 = %.1f m/s.\"%(v2)\n",
"print \" The loss of kinetic energy, EL = %d.\"%(EL1)\n",
"print \" The velocity of the first sphere immediately after impact When the coefficient of \\\n",
"restitution is 0.6, v1 = %.1f m/s.\"%(v12)\n",
"print \" The velocity of the second sphere immediately after impact, v2 = %.1f m/s.\"%(v22)\n",
"print \" The loss of kinetic energy during impactm EL = %d N-m.\"%(EL2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The common velocity after impact when the impact is inelastic, v = 2.5 m/s.\n",
" The loss of kinetic energy during impact, EL = 18.75 N-m.\n",
" The velocity of the first sphere immediately after impact when the impact is elastic, v1 = 2 m/s.\n",
" The velocity of the second sphere immediately after impact, v2 = 3.5 m/s.\n",
" The loss of kinetic energy, EL = 0.\n",
" The velocity of the first sphere immediately after impact When the coefficient of restitution is 0.6, v1 = 2.2 m/s.\n",
" The velocity of the second sphere immediately after impact, v2 = 3.1 m/s.\n",
" The loss of kinetic energy during impactm EL = 12 N-m.\n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.20 Page No : 66"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"m1 = 15.*1000 #kg\n",
"m2 = 5.*1000 \t\t\t#kg\n",
"u1 = 20.*1000/3600 #m/s\n",
"u2 = 12.*1000/3600 \t\t#m/s\n",
"s = 1000.*10**3 \t\t#N/m\n",
"e = 0.5\n",
"\n",
"#Solution:\n",
"#Calculating the common speed\n",
"v = (m1*u1+m2*u2)/(m1+m2) \t\t\t#m/s\n",
"#Calculating the difference in kinetic energies before impact and during impact\n",
"d = m1*m2/(2*(m1+m2))*(u1-u2)**2 \t\t\t#Difference in kinetic energies N-m\n",
"#Equating the difference between kinetic energies to the strain energy stored in the springs\n",
"x = math.sqrt(d*2/(4*s))*1000 \t\t\t#mm\n",
"#Calculating the speed of the loaded wagon immediately after impact ends\n",
"v11 = 2*v-u1 \t\t\t#m/s\n",
"#Calculating the speed of the empty wagon immediately after impact ends\n",
"v21 = 2*v-u2 \t\t\t#m/s\n",
"#Calculating the speeds of the wagons taking into account the coefficient of restitution e = 0.5\n",
"v12 = (1+e)*v-e*u1 \t\t\t#m/s\n",
"v22 = (1+e)*v-e*u2 \t\t\t#m/s\n",
"#Calculating the amount of energy dissipated during impact\n",
"EL = m1*m2/(2*(m1+m2))*(u1-u2)**2*(1-e**2) \t\t\t#N-m\n",
"\n",
"#Results:\n",
"print \" The magnitude of common speed v = %d m/s.\"%(v)\n",
"print \" The maximum deflection of each buffer spring during impact x = %d mm.\"%(x)\n",
"print \" The speed of the loaded wagon immediately after the impact ends v1 = %.2f m/s.\"%(v11)\n",
"print \" The speed of the empty wagon immediately after the impact ends v2 = %.2f m/s.\"%(v21)\n",
"print \" When coefficient of restitution is taken into account v1 = %.3f m/s.\"%(v12)\n",
"print \" When coefficient of restitution is taken into account v2 = %.3f m/s.\"%(v22)\n",
"print \" The amount of energy dissipated during impact EL = %d N-m.\"%(EL)\n",
"\n",
"# rounding off error. please check."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The magnitude of common speed v = 5 m/s.\n",
" The maximum deflection of each buffer spring during impact x = 68 mm.\n",
" The speed of the loaded wagon immediately after the impact ends v1 = 4.44 m/s.\n",
" The speed of the empty wagon immediately after the impact ends v2 = 6.67 m/s.\n",
" When coefficient of restitution is taken into account v1 = 4.722 m/s.\n",
" When coefficient of restitution is taken into account v2 = 5.833 m/s.\n",
" The amount of energy dissipated during impact EL = 6944 N-m.\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.21 Page No : 67"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"\n",
"# Variables:\n",
"IA = 22.5 #kg-m**2\n",
"IB = 67.5 \t\t\t#kg-m**2\n",
"q = 225. \t\t\t#N-m/rad\n",
"NA = 150. #rpm\n",
"NB = 0. \t\t\t#rpm\n",
"\n",
"#Calculating the angular speed of the flywheel\n",
"omegaA = 2*math.pi*NA/60 \t\t\t#rad/s\n",
"#Calculating the angular speed of both the flywheels at the instant their speeds are equal\n",
"omega = IA*omegaA/(IA+IB) \t\t\t#rad/s\n",
"#Calculating the kinetic energy of the system at that instant\n",
"E2 = 1./2*(IA+IB)*omega**2 \t\t\t#N-m\n",
"#Calculating the kinetic energy of the flywheel A\n",
"E1 = 1./2*IA*omegaA**2 \t\t\t#N-m\n",
"#Calculating the strain energy stored in the spring\n",
"E = E1-E2 \t\t\t#Strain energy stored in the spring N-m\n",
"#Calculating the maximum twist of the spring\n",
"theta = math.sqrt(E*2/q) \t\t\t#radians\n",
"thetad = theta*180/math.pi \t\t\t#Maximum twist degrees\n",
"#Calculating the speed of each flywheel when the spring regains its initial unstrained condition\n",
"N = 60*omega/(2*math.pi)\n",
"NA1 = 2*N-NA \t\t\t#rpm\n",
"NB1 = 2*N-NB \t\t\t#rpm\n",
"\n",
"#Results:\n",
"print \" The strain energy stored in the spring is %d N-m.\"%(E)\n",
"print \" The maximum twist of the spring theta = %.1f degrees.\"%(thetad)\n",
"print \" The speed of flywheel A when the spring regains its initial unstrained condition NA1 = %d rpm \\\n",
" \\ni.e. %d rpm in the opposite direction.\"%(NA1,-NA1)\n",
"print \" The speed of flywheel B when the spring regains its initial unstrained condition NB1 = %d rpm.\"%(NB1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The strain energy stored in the spring is 2081 N-m.\n",
" The maximum twist of the spring theta = 246.5 degrees.\n",
" The speed of flywheel A when the spring regains its initial unstrained condition NA1 = -75 rpm \n",
"i.e. 75 rpm in the opposite direction.\n",
" The speed of flywheel B when the spring regains its initial unstrained condition NB1 = 75 rpm.\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}