{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 4: Mechanisms with Lower Pairs" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1, Page 138" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#Variable declaration\n", "rpm=1000\n", "angle=20#degree\n", "\n", "#Calculations&Results\n", "ang=(angle*math.pi)/180\n", "w=2*math.pi*rpm/60\n", "print \"The angular velocity of the driving shaft is %.1f rad/s\"%w\n", "#maximum value of w1=w/cos(angle) and minimum value w2=w*cos(angle)\n", "w1=w/math.cos(ang)\n", "w2=w*math.cos(ang)\n", "print \"\\nExtreme angular velocities :-\"\n", "print \"maximum value of angular velocity w1=%.1f rad/s \\nminimum value of angular velocity w2=%.1f rad/s\"%(w1,w2)\n", "#using equation 4.11, cos(2x)=(2*sin(angle)**2)/(2-sin(angle)**2)\n", "x=math.acos((2*math.sin(ang)**2)/(2-math.sin(ang)**2))*180/(math.pi)\n", "y=360-x#for cosine inverse, angle and 360-angle are same and must be considered\n", "x1=x/2\n", "y1=y/2\n", "print \"The acceleration of driven shaft is a maximum when theta =%.2f or %.2f degrees\"%(x1,y1)\n", "amax=(w**2*math.cos(ang)*(math.sin(ang)**2)*math.sin(x*math.pi/180))/((1-((math.cos(x1*math.pi/180)**2)*(math.sin(ang)**2)))**2)#maximum angular acceleration, numerically\n", "print \"Maximum angular acceleration is %.f rad/s^2\"%amax\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The angular velocity of the driving shaft is 104.7 rad/s\n", "\n", "Extreme angular velocities :-\n", "maximum value of angular velocity w1=111.4 rad/s \n", "minimum value of angular velocity w2=98.4 rad/s\n", "The acceleration of driven shaft is a maximum when theta =41.43 or 138.57 degrees\n", "Maximum angular acceleration is 1370 rad/s^2\n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }