{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 21 Kinematics of rigid body" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.1 Linear and angular velocity linear and angular acceleration in rotation" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(a) The no of revolutions the unit turns to attain the rated speed is 75.000000\n", "(b) The no of revolutions the unit turns to come to rest is 1350.000000\n" ] } ], "source": [ "import math\n", "#Initilization of variables\n", "N=1800 # r.p.m # Speed of the shaft\n", "t=5 # seconds # time taken to attain the rated speed # case (a)\n", "T=90 # seconds # time taken by the unit to come to rest # case (b)\n", "# Calculations\n", "omega=(2*math.pi*N)/(60)\n", "# (a)\n", "# we take alpha_1,theta_1 & n_1 for case (a)\n", "alpha_1=omega/t # rad/s**2 #\n", "theta_1=(omega**2)/(2*alpha_1) # radian\n", "# Let n_1 be the number of revolutions turned,\n", "n_1=theta_1*(1/(2*math.pi))\n", "# (b)\n", "# similarly we take alpha_1,theta_1 & n_1 for case (b)\n", "alpha_2=(omega/T) # rad/s**2 # However here alpha_2 is -ve\n", "theta_2=(omega**2)/(2*alpha_2) # radians\n", "# Let n_2 be the number of revolutions turned,\n", "n_2=theta_2*(1/(2*math.pi))\n", "# Results\n", "print('(a) The no of revolutions the unit turns to attain the rated speed is %f'%n_1)\n", "print('(b) The no of revolutions the unit turns to come to rest is %f'%n_2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.2 Absolute and relative velocity in plane motion" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The velocity of point E is 28.284271 m/s\n", "The velocity of point F is 40.000000 m/s\n" ] } ], "source": [ "# Initilization of variables\n", "r=1 # m # radius of the cylinder\n", "v_c=20 # m/s # velocity of the cylinder at its centre\n", "# Calculations\n", "# The velocity of point E is given by using the triangle law as,\n", "v_e=math.sqrt(2)*v_c # m/s \n", "# Similarly the velocity at point F is given as,\n", "v_f=2*v_c # m/s \n", "# Results\n", "print('The velocity of point E is %f m/s'%v_e)\n", "print('The velocity of point F is %f m/s'%v_f)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.3 Absolute and relative velocity in plane motion" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The linear velocity (v_c) at point C is 2.500000 m/s\n", "The angular velocity at point C is 1.250000 radian/seconds\n" ] } ], "source": [ "import numpy\n", "# Initilization of Variables\n", "v_1=3 # m/s # uniform speed of the belt at top\n", "v_2=2 # m/s # uniform speed of the belt at the bottom\n", "r=0.4 # m # radius of the roller\n", "# Calculations\n", "# equating eq'ns 2 & 4 and solving for v_c & theta' (angular velocity). We use matrix to solve the eqn's\n", "A=numpy.matrix([[1,r],[1,-r]])\n", "B=numpy.matrix([[v_1],[v_2]])\n", "C=numpy.linalg.inv(A)*B\n", "# Results\n", "print('The linear velocity (v_c) at point C is %f m/s'%C[0])\n", "print('The angular velocity at point C is %f radian/seconds'%C[1])\n", "# The answer of angular velocity is incorrect in the book" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.4 Absolute and relative velocity in plane motion" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(a) The angular velocity of the bar is 10.000000 radian/second\n", "(b) The velocity of end B is 8.660254 m/s\n", "(c) The velocity of mid point C is 5.000000 m/s\n" ] } ], "source": [ "# Initilization of Variables\n", "l=1 # m # length of bar AB\n", "v_a=5 # m/s # velocity of A\n", "theta=30 # degree # angle made by the bar with the horizontal\n", "# Calculations\n", "# From the vector diagram linear velocity of end B is given as,\n", "v_b=v_a/math.tan(theta*math.pi/180) # m/s \n", "# Now let the relative velocity be v_ba which is given as,\n", "v_ba=v_a/math.sin(theta*math.pi/180) # m/s\n", "# Now let the angular velocity of the bar be theta_a which is given as,\n", "theta_a=(v_ba)/l # radian/second\n", "# Velocity of point A\n", "v_a=(l/2)*theta_a # m/s\n", "# Magnitude of velocity at point C is,\n", "v_c=v_a # m/s # from the vector diagram\n", "# Results\n", "print('(a) The angular velocity of the bar is %f radian/second'%theta_a)\n", "print('(b) The velocity of end B is %f m/s'%v_b)\n", "print('(c) The velocity of mid point C is %f m/s'%v_c)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.5 Absolute and relative velocity in plane motion" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(a) The angular velocity of the connecting rod is 5.468436 radian/second\n", "(b) The velocity of the piston when the crank makes an angle of 30 degree is 2.210830 m/s\n" ] } ], "source": [ "# Initilization of Variables\n", "r=0.12 # m # length of the crank\n", "l=0.6 # m # length of the connecting rod\n", "N=300 # r.p.m # angular velocity of the crank\n", "theta=30 # degree # angle made by the crank with the horizontal\n", "# Calculations\n", "# Now let the angle between the connecting rod and the horizontal rod be phi\n", "phi=math.asin(((r*math.sin(theta*math.pi/180))/(l))*math.pi/180) # degree\n", "# Now let the angular velocity of crank OA be omega_oa, which is given by eq'n\n", "omega_oa=(2*math.pi*N)/(60) # radian/second\n", "# Linear velocity at A is given as,\n", "v_a=r*omega_oa # m/s\n", "# Now using the sine rule linear velocity at B can be given as,\n", "v_b=(v_a*math.sin(35.7*math.pi/180))/(math.sin(84.3*math.pi/180)) # m/s\n", "# Similarly the relative velocity (assume v_ba) is given as,\n", "v_ba=(v_a*math.sin(60*math.pi/180))/(math.sin(84.3*math.pi/180))\n", "# Angular velocity (omega_ab) is given as,\n", "omega_ab=v_ba/l # radian/second\n", "# Results\n", "print('(a) The angular velocity of the connecting rod is %f radian/second'%omega_ab)\n", "print('(b) The velocity of the piston when the crank makes an angle of 30 degree is %f m/s'%v_b)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.6 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The velocity at point D is 28.284271 m/s\n", "The velocity at point E is 40.000000 m/s\n" ] } ], "source": [ "# Initiization of variables\n", "r=1 # m # radius of the cylinder\n", "v_c=20 # m/s # velocity at the centre\n", "# Calculations\n", "# Angular velocity is given as,\n", "omega=v_c/r # radian/second\n", "# Velocity at point D is\n", "v_d=omega*math.sqrt(2)*r # m/s # from eq'n 1\n", "# Now, the velocity at point E is,\n", "v_e=omega*2*r # m/s \n", "# Results\n", "print('The velocity at point D is %f m/s'%v_d)\n", "print('The velocity at point E is %f m/s'%v_e)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.7 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The distance d when the bars move in the opposite directions are 4.000000 cm\n", "The distance d when the bars move in the same directions are 20.000000 cm\n" ] } ], "source": [ "import numpy\n", "# Initilization of Variables\n", "r=5 # cm # radius of the roller\n", "AB=0.1 # m\n", "v_a=3 # m/s # velocity at A\n", "v_b=2 # m/s # velocity at B\n", "# Calculations\n", "# Solving eqn's 1 & 2 using matrix for IA & IB we get,\n", "A=([[-2,3],[1,1]])\n", "B=numpy.matrix([[0],[AB]])\n", "C=numpy.linalg.inv(A)*B\n", "d1=C[1]*10**2 # cm # assume d1 for case 1\n", "# Similary solving eqn's 3 & 4 again for IA & IB we get,\n", "P=numpy.matrix([[-v_b,v_a],[1,-1]])\n", "Q=numpy.matrix([[0],[AB]])\n", "R=numpy.linalg.inv(P)*Q\n", "d2=R[1]*10**2 # cm # assume d2 for case 2\n", "# Results\n", "print('The distance d when the bars move in the opposite directions are %f cm'%d1)\n", "print('The distance d when the bars move in the same directions are %f cm'%d2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.8 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The velocity at point A is 3.000000 m/s\n", "The velocity at point B is 1.000000 m/s\n", "The velocity at point D is 2.236068 m/s\n" ] } ], "source": [ "# Initilization of Variables\n", "v_c=1 # m/s # velocity t the centre\n", "r1=0.1 # m \n", "r2=0.20 # m\n", "EB=0.1 # m\n", "EA=0.3 # m\n", "ED=math.sqrt(r1**2+r2**2) # m\n", "# Calculations\n", "# angular velocity is given as,\n", "omega=v_c/r1 # radian/seconds\n", "# Velocit at point B\n", "v_b=omega*EB # m/s \n", "# Velocity at point A\n", "v_a=omega*EA # m/s\n", "# Velocity at point D\n", "v_d=omega*ED # m/s\n", "# Results\n", "print('The velocity at point A is %f m/s'%v_a)\n", "print('The velocity at point B is %f m/s'%v_b)\n", "print('The velocity at point D is %f m/s'%v_d)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.9 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The velocity at point B is 8.660254 m/s\n", "The velocity at point C is 5.000000 m/s\n" ] } ], "source": [ "# Initilization of variables\n", "l=1 # m # length of bar AB\n", "v_a=5 # m/s # velocity at A\n", "theta=30 # degree # angle made by the bar with the horizontal\n", "# Calculations\n", "IA=l*math.sin(theta*math.pi/180) # m\n", "IB=l*math.cos(theta*math.pi/180) # m\n", "IC=0.5 # m # from triangle IAC\n", "# Angular veocity is given as,\n", "omega=v_a/(IA) # radian/second\n", "v_b=omega*IB # m/s\n", "v_c=omega*IC # m/s\n", "# Results\n", "print('The velocity at point B is %f m/s'%v_b)\n", "print('The velocity at point C is %f m/s'%v_c)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.11 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The anguar veocity of the bar is 11.547005 radian/second\n" ] } ], "source": [ "# Initilization of variables\n", "v_a=2 # m/s # velocity at end A\n", "r=0.05 # m # radius of the disc\n", "alpha=30 # degree # angle made by the bar with the horizontal\n", "# Calculations \n", "# Soving eqn's 1 & 2 and substuting eqn 1 in it we get eq'n for omega as,\n", "omega=(v_a*(math.sin(alpha*math.pi/180))**2)/(r*math.cos(alpha*math.pi/180)) # radian/second\n", "# Results\n", "print('The anguar veocity of the bar is %f radian/second'%omega)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.12 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The velocity at B is 2.213062 m/s\n", "The angular velocity of the connecting rod is 5.468436 radian/second\n" ] } ], "source": [ "# Initilization of variables\n", "l=0.6 # m \n", "r=0.12 # m \n", "theta=30 # degree # angle made by OA with the horizontal\n", "phi=5.7 # degree # from EX 21.5\n", "N=300\n", "# Calculations\n", "# Let the angular velocity of the connecting rod be (omega_ab) which is given from eqn's 1 & 4 as,\n", "omega_oa=(2*math.pi*N)/(60) # radian/ second\n", "# Now,in triangle IBO.\n", "IB=(l*math.cos(phi*math.pi/180)*math.tan(theta*math.pi/180))+(r*math.sin(theta*math.pi/180)) # m\n", "IA=(l*math.cos(phi*math.pi/180))/(math.cos(theta*math.pi/180)) # m\n", "# from eq'n 5\n", "v_b=(r*omega_oa*IB)/(IA) # m/s\n", "# From eq'n 6\n", "omega_ab=(r*omega_oa)/(IA) # radian/second\n", "# Results\n", "print('The velocity at B is %f m/s'%v_b)\n", "print('The angular velocity of the connecting rod is %f radian/second'%omega_ab)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 21.13 Instantaneous Centre of rotation in plane motion" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The angular velocity of bar BC is 7.698004 rad/s\n", "The angular velocity of bar CD is 1.924501 rad/s\n" ] } ], "source": [ "# Initilization of variables\n", "omega_ab=5 # rad/s # angular veocity of the bar\n", "AB=0.20 # m\n", "BC=0.15 # m\n", "CD=0.3 # m\n", "theta=30 # degree # where theta= angle made by AB with the horizontal\n", "alpha=60 # degree # where alpha=angle made by CD with the horizontal\n", "# Calculations\n", "# Consider triangle BIC\n", "IB=math.sin(alpha*math.pi/180)*BC*1 # m\n", "IC=math.sin(theta*math.pi/180)*BC*1 # m\n", "v_b=omega_ab*AB # m/s\n", "# let the angular velocity of the bar BC be omega_bc\n", "omega_bc=v_b/IB # radian/second\n", "v_c=omega_bc*IC # m/s\n", "# let the angular velocity of bar DC be omega_dc\n", "omega_dc=v_c/CD # radian/second\n", "# Results\n", "print('The angular velocity of bar BC is %f rad/s'%omega_bc)\n", "print('The angular velocity of bar CD is %f rad/s'%omega_dc)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.1" }, "widgets": { "state": {}, "version": "1.1.2" } }, "nbformat": 4, "nbformat_minor": 0 }