{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter2-FUNDAMENTALS OF STATICS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 2.1 Page number 21" ] }, { "cell_type": "code", "execution_count": 43, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", " Moment is = -9607.41 Nmm clockwise\n" ] } ], "source": [ "import math\n", "#F force \n", "#hd horizontal distance \n", "#vd vertical distance\n", "#O angle\n", "#M moment of force\n", "#Taking clockwise moment as positive\n", "#calculations\n", "F=100.0\n", "hd=400.0\n", "vd=500.0\n", "o=60.0\n", "M=F*(math.cos(o/180.0*3.14)*vd-math.sin(o/180.0*3.14)*hd)\n", "print '%s %.2f %s' %(\"\\n \\n Moment is =\", M ,\" Nmm clockwise\");\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 2.2 Page number 21" ] }, { "cell_type": "code", "execution_count": 44, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", " Distance = 2.00 m\n" ] } ], "source": [ "import math\n", "#F force \n", "#hd horizontal distance \n", "#vd vertical distance\n", "#O angle\n", "#M moment of force\n", "#Taking clockwise moment as positive\n", "#calculations\n", "F=5000.0\n", "o=37\n", "M=8000.0\n", "hd=M/(F*math.cos(o*3.14/180))\n", "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 2.3 Page number 25" ] }, { "cell_type": "code", "execution_count": 45, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", " Distance = 2.00 m\n" ] } ], "source": [ "import math\n", "#F force \n", "#hd horizontal distance \n", "#vd vertical distance\n", "#O angle\n", "#M moment of force\n", "#Taking clockwise moment as positive\n", "#calculations\n", "F=5000.0\n", "o=37\n", "M=8000.0\n", "hd=M/(F*math.cos(o*3.14/180))\n", "print '%s %.2f %s' %(\"\\n \\n Distance =\", hd ,\"m\");\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Example 2.4 Page number 25" ] }, { "cell_type": "code", "execution_count": 46, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", " Resultant Force = 161.52 N\n", "\n", " \n", " Resultant angle = 0.33 radians\n" ] } ], "source": [ "import math\n", "#R resultant force\n", "#Rx resultant horizontal component\n", "#Ry resultant vertical component\n", "#f1 force\n", "#f2 force\n", "#f3 force\n", "#o1 angle with the line \n", "#o2 angle with the line \n", "#o3 angle with the line \n", "#O angle of resultant force with line\n", "f1=70.0\n", "f2=80.0\n", "f3=50.0 \n", "o1=50.0\n", "o2=25.0\n", "o3=-45.0\n", "Rx=(f1*math.cos(o1/180*3.14)+f2*math.cos(o2/180*3.14)+f3*math.cos(o3/180*3.14));\n", "Ry=(f1*math.sin(o1/180*3.14)+f2*math.sin(o2/180*3.14)+f3*math.sin(o3/180*3.14));\n", "R=math.sqrt(Rx**2+Ry**2)\n", "O=math.atan(Ry/Rx)\n", "print '%s %.2f %s' %(\"\\n \\n Resultant Force =\", R ,\"N\");\n", "print '%s %.2f %s' %(\"\\n \\n Resultant angle =\", O ,\"radians\");\n", "\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# Example 2.5 Page number 26" ] }, { "cell_type": "code", "execution_count": 47, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", " Resultant Force along the incline plane = 234.24 N\n", "\n", " \n", " Resultant Force vertical to the incline plane = -0.46 N\n" ] } ], "source": [ "import math\n", "#O angle of inclined plane\n", "#N normal reaction\n", "#W weight\n", "#F,T forces\n", "#Rx resultant horizontal component\n", "#Ry resultant vertical component\n", "o = 60.0 \n", "W = 1000.0\n", "N = 500.0\n", "F = 100.0\n", "T = 1200.0\n", "Rx = T-F-(W*math.sin(o/180*3.14))\n", "Ry = N-(W*math.cos(o/180*3.14))\n", "print '%s %.2f %s' %(\"\\n \\n Resultant Force along the incline plane =\", Rx ,\"N\");\n", "print '%s %.2f %s' %(\"\\n \\n Resultant Force vertical to the incline plane =\", Ry ,\"N\");\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# Example 2.6 Page number 26" ] }, { "cell_type": "code", "execution_count": 48, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Force 467.201871561 N\n", "At an angle 61.0805191269\n" ] } ], "source": [ "import math\n", "R=1000.0 #Resultant force\n", "F1=500.0 #Force \n", "F2=1000.0 #force\n", "o=45.0*3.14/180.0 #angle resultant makes with x axis \n", "o1=30.0*3.14/180.0 #angle F1 makes with x axis \n", "o2=60.0*3.14/180.0 #angle F2 makes with x axis \n", "#F3coso3=Rcoso-F1coso1-F2sino2\n", "#F3sino=Rsino-F1sino1-F2coso2\n", "F3=((R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2))**2+(R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))**2)**0.5\n", "print \"Force\",F3,\"N\"\n", "o3=180/3.14*math.atan((R*math.sin(o)-F1*math.sin(o1)-F2*math.sin(o2))/(R*math.cos(o)-F1*math.cos(o1)-F2*math.cos(o2)))\n", "print \"At an angle\",o3" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# Example 2.7 Page number 27" ] }, { "cell_type": "code", "execution_count": 49, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "theta= 6.32 °\n" ] } ], "source": [ "from math import cos,sin,atan,pi,asin\n", "\n", "#variable declaration\n", "\n", "P1=300.0\n", "P2=500.0\n", "thetaI=30.0*pi/180.0\n", "thetaP2=30.0*pi/180\n", "thetaP1=40.0*pi/180\n", "# Let the x and y axes be If the resultant is directed along the x axis, its component in y direction is zero.\n", "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n", "##sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "F=(P2*sin(thetaP2))/(P1)\n", "theta=(asin((F/(cos(20*pi/180)*2)))*180/pi)-20\n", "\n", "print\"theta=\",round(theta,2),\"°\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example2.8 page number 30\n" ] }, { "cell_type": "code", "execution_count": 50, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 68.0592 KN\n", "alpha= 81.55 °\n", "x= 3.326 m\n" ] } ], "source": [ "from math import cos,sin,atan,sqrt,pi\n", "\n", "#variable declaration\n", "\n", "P1=20.0\n", "P2=30.0\n", "P3=20.0\n", "theta3=60.0*pi/180.0\n", "\n", "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n", "##sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "Fx=20.0*cos(theta3)\n", "Fy=P1+P2+P3*sin(theta3)\n", "\n", "\n", "R=sqrt(pow(Fx,2)+pow(Fy,2))\n", "print \"R=\",round(R,4),\"KN\"\n", "\n", "alpha=atan(Fy/Fx)*180/pi\n", "print\"alpha=\",round(alpha,2),\"°\"\n", "\n", "#moment at A\n", "\n", "MA=P1*1.5+P2*3.0+P3*sin(theta3)*6.0\n", "\n", "#The distance of the resultant from point O is given by:\n", "\n", "d=MA/R\n", "x=d/sin(alpha*pi/180)\n", "print\"x=\",round(x,3),\"m\"" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example2.9 page number 31\n" ] }, { "cell_type": "code", "execution_count": 51, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 91.19 KN\n", "alpha= 35.84 °\n", "x= 317.023 mm\n" ] } ], "source": [ "from math import cos,sin,atan,sqrt\n", "\n", "#variable declaration\n", "\n", "PA=100.0 #inclined up loading at 60° at A, N\n", "PB1=80.0 #Vertical down loading at B,N\n", "PB2=80.0 #Horizontal right loading at at B,N \n", "PC=120.0 #inclined down loading at 30° at C,N\n", "\n", "thetaA=60.0*pi/180.0\n", "thetaB=30.0*pi/180.0\n", "\n", "\n", "\n", "#Taking horizontal direction towards left as x axis and the vertical downward direction as y axis. \n", "##sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "Fx=PB2-PA*cos(thetaA)-PC*cos(thetaB)\n", "Rx=-Fx\n", "\n", "Fy=PB1+PC*sin(thetaB)-PA*sin(thetaA)\n", "Ry=Fy\n", "\n", "\n", "R=sqrt(pow(Rx,2)+pow(Ry,2))\n", "print \"R=\",round(R,2),\"KN\"\n", "\n", "alpha=atan(Fy/Fx)*180/pi\n", "print\"alpha=\",round((-alpha),2),\"°\"\n", "\n", "#Let x be the distance from A at which the resultant cuts AC. Then taking A as moment centre,\n", "\n", "x=(PB1*100*sin(thetaA)+PB2*50+PC*sin(thetaB)*100)/Ry\n", "print\"x=\",round(x,3),\"mm\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.10 page number 32" ] }, { "cell_type": "code", "execution_count": 52, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 565.69 N\n", "theta= 45.0 °\n", "x= 2.5 m\n" ] } ], "source": [ "from math import sqrt,pi,atan\n", "\n", "#variable declaration\n", "\n", "PA=800.0 #Vertical down loading at A,N\n", "PC=400.0 #vertical up loading at B,N\n", "HD=600.0 #Horizontal left loading at A,N\n", "HB=200.0 #Horizontal right loading at B,N\n", "a=1.0 #length of side,m\n", " \n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Fx=HB-HD\n", "Fy=PC-PA\n", "\n", "\n", "R=sqrt(pow(Fx,2)+pow(Fy,2))\n", "print \"R=\",round(R,2),\"N\"\n", "\n", "theta=atan(Fy/Fx)*180/pi\n", "print\"theta=\",round(theta),\"°\"\n", "\n", "#moment at A\n", "\n", "MA=PC*a+HD*a\n", "\n", "#Let x be the distance from A along x axis, where resultant cuts AB.\n", "\n", "x=MA/Fy\n", "\n", "print\"x=\",round((-x),1),\"m\"\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.11 page number 32\n" ] }, { "cell_type": "code", "execution_count": 53, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 10.0 KN\n", "theta= 0.0 ° i.e. , the resultant is in the direction x.\n" ] } ], "source": [ "from math import sqrt,pi,atan,cos,sin\n", "\n", "#variable declaration\n", "\n", "PB=2.0 #loading at B,KN\n", "PC=sqrt(3.0) #loading at C,KN\n", "PD=5.0 #loading at D,KN\n", "PE=PC #loading at E,KN\n", "PF=PB #loading at F,KN\n", "\n", "#Let O be the centre of the encircling circle A, B, C, D, E and F. In regular hexagon each side is equal to the radius AO. Hence OAB is equilateral triangle.\n", "\n", "angleoab=60.0*pi/180\n", "anglecab=angleoab/2.0\n", "theta1=anglecab\n", "theta2=(angleoab-theta1)\n", "theta3=theta1\n", "theta4=theta1\n", "\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Fx=PB*cos(theta1+theta2)+PC*cos(theta2)+PD+PE*cos(theta3)+PF*cos(theta3+theta4)\n", "\n", "Fy=-PB*sin(theta1+theta2)-PC*sin(theta2)+0+PE*sin(theta3)+PF*sin(theta3+theta4)\n", "\n", "R=sqrt(pow(Fx,2)+pow(Fy,2))\n", "print \"R=\",round(R,2),\"KN\"\n", "\n", "theta=atan(Fy/Fx)*180/pi\n", "print\"theta=\",round(theta),\"°\",\"i.e.\",\",\",\"the resultant is in the direction x.\"\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.12 page number 33" ] }, { "cell_type": "code", "execution_count": 54, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 4.66 N\n", "alpha= 28.99 °\n", "d= 42.73 mm\n" ] } ], "source": [ "from math import sqrt,pi,atan\n", "\n", "#variable declaration\n", "\n", "P1=2.0 #loading at 1,KN\n", "P2=1.5 #loading at 2,KN\n", "P3=5.0 #loading at 3,KN\n", "a=10.0 #side length,mm\n", "\n", "# If theta1, theta2 and theta3 are the slopes of the forces 2 kN, 5 kN and 1.5 kN forces with respect to x axis, then \n", "\n", "\n", "theta1=atan(a/a)\n", "theta2=atan((3*a)/(4*a))\n", "theta3=atan((a)/(2*a))\n", "\n", "\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Fx=P1*cos(theta1)+P3*cos(theta2)-P2*cos(theta3)\n", "\n", "Fy=P1*sin(theta1)-P3*sin(theta2)-P2*sin(theta3)\n", "\n", "R=sqrt(pow(Fx,2)+pow(Fy,2))\n", "print \"R=\",round(R,2),\"N\"\n", "\n", "alpha=atan(Fy/Fx)*180/pi\n", "print\"alpha=\",round((-alpha),2),\"°\"\n", "\n", "#Distance d of the resultant from O is given by\n", "#Rd=sum of moment at A\n", "\n", "d=((a*3)*P1*cos(theta1)+(5*a)*P3*sin(theta2)+P2*(a)*sin(theta3))/(4.66)\n", "print\"d=\",round(d,2),\"mm\"\n", "\n", "#Note: To find moment of forces about O, 2 kN force is resolved at it’s intersection with y axis and 5 kN and 1.5 kN forces are resolved at their intersection with x axis, and then Varignon theorem is used\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.13 page number 34" ] }, { "cell_type": "code", "execution_count": 55, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 150.0 KN\n", "MA= 270.0 KN-m\n", "x= 1.8 m\n" ] } ], "source": [ "from math import sqrt,pi,atan,cos,sin\n", "\n", "#variable declaration\n", "\n", "PB=20.0 #loading at B,KN\n", "PC=30.0 #loading at C,KN\n", "PD=40.0 #loading at D,KN\n", "PA=60.0 #loading at E,KN\n", "AB=1.0\n", "BC=2.0\n", "CD=1.0\n", "#length are in m\n", "\n", "# Let x and y axes be selected\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Rx=0\n", "Ry=PA+PB+PC+PD\n", "\n", "R=sqrt(pow(Rx,2)+pow(Ry,2))\n", "print \"R=\",round(R,2),\"KN\"\n", "\n", "\n", "#Taking clockwise moment as positive, \n", "#sum of moment at A\n", "\n", "MA=(0)*PA+(AB)*PB+PC*(AB+BC)+PD*(AB+BC+CD)\n", "print\"MA=\",round(MA,2),\"KN-m\"\n", "\n", "# The distance of resultant from A is,\n", "\n", "x=MA/R\n", "print \"x=\",round(x,1),\"m\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.14 page number 35" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 100.0 KN in y-direction\n", "MA= 300.0 KN-m\n", "x= 3.0 m\n" ] } ], "source": [ "from math import sqrt,pi,atan,cos,sin\n", "\n", "#variable declaration\n", "\n", "PB=30.0 #up loading at B,KN\n", "PC=40.0 #down loading at C,KN\n", "PD=50.0 #up loading at D,KN\n", "PA=80.0 #down loading at A,KN\n", "PE=60.0 #down loading at E,KN\n", "AB=2.0\n", "BC=2.0\n", "CD=4.0\n", "DE=2.0\n", "#length are in m\n", "\n", "# Let x and y axes be selected\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Rx=0\n", "Ry=PA-PB+PC-PD+PE\n", "\n", "R=sqrt(pow(Rx,2)+pow(Ry,2))\n", "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n", "\n", "\n", "#Taking clockwise moment as positive, \n", "#sum of moment at A\n", "\n", "MA=(0)*PA-(AB)*PB+PC*(AB+BC)-PD*(AB+BC+CD)+PE*(AB+BC+CD+DE)\n", "\n", "print\"MA=\",round(MA,2),\"KN-m\"\n", "\n", "# The distance of resultant from A is,\n", "\n", "x=MA/R\n", "print \"x=\",round(x),\"m\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.15 page number 35" ] }, { "cell_type": "code", "execution_count": 57, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 2671.19 KN in y-direction\n", "alpha 80.3 °\n", "x= 141.195 mm\n" ] } ], "source": [ "from math import pi,atan,sin ,cos,sqrt\n", "\n", "#variable declaration\n", "P1=500.0 #Loading at inclined to 60.0°,N\n", "P2=1000.0 #vertical loading at 150 distance from O,N\n", "P3=1200.0 #vertical loading at 150 distance from O,N\n", "H=700.0 #Horizontal loading at 300 ditance from O,N\n", "a=150.0\n", "theta=60.0*pi/180\n", "#assume Resulat R at distance x from O,\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Rx=P1*cos(theta)-H\n", "Ry=-P3-P2-P1*sin(theta)\n", "\n", "R=sqrt(pow(Rx,2)+pow(Ry,2))\n", "print \"R=\",round(R,2),\"KN\",\"in y-direction\"\n", "\n", "alpha=atan(Ry/Rx)*180/pi\n", "print\"alpha\",round(alpha,2),\"°\"\n", " \n", "#Let the point of application of the resultant be at a distance x from the point O along the horizontal arm. Then, \n", "\n", "x=(P1*sin(theta)*(2*a)+P2*a-P3*a*cos(theta)+H*a*2*sin(theta))/(-Ry)\n", "print\"x=\",round(x,3),\"mm\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.16 page number 36" ] }, { "cell_type": "code", "execution_count": 58, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Ry= 1420.0 KN downward\n", "x= 4.127 m\n", "The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\n" ] } ], "source": [ "from math import pi,atan,sin ,cos,sqrt\n", "\n", "#variable declaration\n", "P1=1120.0 #vertical down Loading at 2m distance from O,KN\n", "P2=120.0 #vertical up loading at 4m distance from O,KN\n", "P3=420.0 #vertical downloading at 5m distance from O,KN\n", "H=500.0 #Horizontal loading at 4m ditance from O,KN\n", "ah=4.0\n", "a1=2.0\n", "a2=4.0\n", "a3=5.0\n", "a=7.0\n", "#assume Resulat R at distance x from O,\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Rx=H\n", "Ry=P1-P2+P3\n", "\n", "print \"Ry=\",round(Ry,2),\"KN\",\"downward\"\n", " \n", "#Let x be the distance from O where the resultant cuts the base.\n", "#moment at O\n", "x=(H*ah+P1*a1-P2*a2+P3*a3)/(Ry)\n", "\n", "print\"x=\",round(x,3),\"m\"\n", "\n", "print \"The resultant passes through the middle third of the base i.e., between 7/3m, and 2*7/3 m.Hence, the dam is safe.\"\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.17 page number 37" ] }, { "cell_type": "code", "execution_count": 59, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 42.426 KN\n", "d= 1.5 m Resultant is a horizontal force of magnitude 42.426 at 1.5 m below A.\n" ] } ], "source": [ "from math import pi,atan,sin ,cos,sqrt\n", "\n", "#variable declaration\n", "P1=5.0 #Inclined at 45° down Loading at 3m distance from A,KN\n", "P2=10.0 #Inclined at 45° down Loading at 2m distance from A,KN\n", "P3=10.0 #Inclined at 45° down Loading at 1m distance from A,KN\n", "P4=5.0 #Inclined at 45° down Loading A,KN\n", "P8=5.0 #Inclined at 45° UP Loading at 3m distance from A,KN\n", "P7=10.0 #Inclined at 45° UP Loading at 2m distance from A,KN\n", "P6=10.0 #Inclined at 45° UP Loading at 1m distance from A,KN\n", "P5=5.0 #Inclined at 45° UP Loading A,KN\n", "a=1.0\n", "\n", "theta=45.0*pi/180.0\n", "#The roof is inclined at 45° to horizontal and loads are at 90° to the roof. Hence, the loads are also inclined at 45° to vertical/horizontal. \n", "\n", "#assume Resulat R at distance d from A,\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Rx=(P1+P2+P3+P4+P5+P6+P7+P8)*cos(theta)\n", "Ry=-(P1+P2+P3+P4)*sin(theta)+(P5+P6+P7+P8)*sin(theta)\n", "\n", "print \"R=\",round(Rx,3),\"KN\"\n", "#and its direction is horizontal \n", "#Let R be at a distance d from the ridge A\n", "#moment at A\n", "d=((P1*3*cos(theta)*a+P2*cos(theta)*2*a+P3*cos(theta)*a)*2)/(Rx)\n", "\n", "print\"d=\",round(d,1),\"m\",\" Resultant is a horizontal force of magnitude\",round(Rx,3),\" at\",round(d,1),\" m below A.\"\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.18 page number 37" ] }, { "cell_type": "code", "execution_count": 60, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 116.52 KN\n", "alpha= 76.82 °\n", "x= 1.48 m\n", "The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and x= 1.48 m\n" ] } ], "source": [ "from math import sqrt,pi,atan\n", "\n", "#variable declaration\n", "#The two 40 kN forces acting on the smooth pulley may be replaced by a pair of 40 kN forces acting at centre of pulley C and parallel to the given forces, since the sum of moments of the two given forces about C is zero\n", "\n", "PA=20.0 #inclined at 45° loading at A,KN\n", "PB=30.0 #inclined at 60° loading at B,KN\n", "\n", "PC1=40.0 #inclined at 30° loading at C,KN\n", "PC2=40.0 #inclined at 20° loading at C,KN\n", "PD=50.0 #inclined at 30.0 at distance 2m form A,KN\n", "PE=20.0 #inclined at alpha at distance xm form A,KN\n", "P=20.0 #vertical loading at distance 4m,KN\n", "\n", "\n", "\n", "thetaA=45.0*pi/180.0\n", "thetaB=60.0*pi/180.0\n", "thetaC1=30.0*pi/180.0\n", "thetaC2=20.0*pi/180.0\n", "thetaD=30.0*pi/180.0\n", "AD=2.0\n", "AC=3.0\n", "AB=6.0\n", "\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "Fx=PA*cos(thetaA)-PB*cos(thetaB)-PD*cos(thetaD)-PC1*sin(thetaC1)+PC2*cos(thetaC2)\n", "\n", "Fy=-PA*sin(thetaA)-P+P-PB*sin(thetaB)-PD*sin(thetaD)-PC2*sin(thetaC2)-PC1*cos(thetaC1)\n", "\n", "\n", "R=sqrt(pow(Fx,2)+pow(Fy,2))\n", "print \"R=\",round(R,2),\"KN\"\n", "\n", "alpha=atan(Fy/Fx)*180/pi\n", "print\"alpha=\",round(alpha,2),\"°\"\n", "\n", "#Let the resultant intersect AB at a distance x from A. Then, \n", "\n", "\n", "X=(-P*4+P*4+PB*sin(thetaB)*AB+PD*sin(thetaD)*AD-PD*cos(thetaD)*AD+PC2*AC*cos(thetaC2)-PC1*AC*sin(thetaC1))/R\n", "\n", "print\"x=\",round(X,2),\"m\"\n", "\n", "print\"The equilibriant is equal and opposite to the resultant in which E = 116.515 kN, alpha= 76.82° and \",\"x=\",round(X,2),\"m\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.19 page number 42\n" ] }, { "cell_type": "code", "execution_count": 61, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T= 103.53 N\n", "R= 26.79 N\n" ] } ], "source": [ "from math import sin,cos,pi\n", "\n", "#Free body diagram of the sphere shows all the forces moving away from the centre of the ball. Applying Lami’s theorem to the system of forces.\n", "\n", "#variable declaration\n", "W=100.0 #weight of sphere,N\n", "theta=15.0*pi/180 #angle of inclination of string with wall\n", "\n", "T=(W*sin((pi/2)))/sin((pi/2)+theta)\n", "R=(W*sin((pi-theta)))/sin((pi/2)+theta)\n", "print\"T=\",round(T,2),\"N\"\n", "print\"R=\",round(R,2),\"N\"\n", "\n", "#The above problem may be solved using equations of equilibrium also. Taking horizontal direction as x axis and vertical direction as y axis,\n", "\n", "#Notes: \n", "#1. The string can have only tension in it (it can pull a body), but cannot have compression in it (cannot push a body). \n", "#2. The wall reaction is a push, but cannot be a pull on the body. \n", "#3. If the magnitude of reaction comes out to be negative, then assumed direction of reaction is wrong. It is acting exactly in the opposite to the assumed direction. However, the magnitude will be the same. Hence no further analysis is required. This advantage is not there in using Lami's equation. Hence, it is advisable for beginners to use equations of equilibrium, instead of Lami's theorem even if the body is in equilibrium under the action of only three forces. \n", "\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.20 page number 43" ] }, { "cell_type": "code", "execution_count": 62, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "R= 1732.05 N\n", "P= 866.03 N\n" ] } ], "source": [ "from math import sin,cos,pi\n", "\n", "#The body is in equilibrium under the action of applied force P, self-weight 1500 N and normal reaction R from the plane. Since R, which is normal to the plane, makes 30° with the vertical (or 60° with the horizontal), \n", "\n", "#variable declaration\n", "W=1500.0 #weight of block,N\n", "theta=30.0*pi/180 #angle of inclination \n", "\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "R=W/cos(theta)\n", "print\"R=\",round(R,2),\"N\"\n", "\n", "P=R*sin(theta)\n", "print\"P=\",round(P,2),\"N\"\n", "\n", "#Note: Since the body is in equilibrium under the action of only three forces the above problem can be solved using Lami’s theorem \n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example 2.21 page number 42" ] }, { "cell_type": "code", "execution_count": 63, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "S= -0.058 N\n", "Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude 0.058 kN.\n", "R= 14.979 kN\n" ] } ], "source": [ "from math import sin,cos,pi\n", "\n", "#A bar can develop a tensile force or a compressive force. Let the force developed be a compressive force S (push on the cylinder). \n", "\n", "#variable declaration\n", "W=10.0 #weight of Roller,KN\n", "IL=7.0 #inclined loading at angle of 45°,KN\n", "H=5.0 #Horizontal loading ,KN\n", "\n", "theta=45.0*pi/180 #angle of loading of IL\n", "thetaS=30.0*pi/180.0 \n", "\n", "#Since there are more than three forces in the system, Lami’s equations cannot be applied. Consider the components in horizontal and vertical directions. \n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "S=(-H+IL*cos(theta))/cos(thetaS)\n", "print\"S=\",round(S,3),\"N\"\n", "\n", "print\"Since the value of S is negative the force exerted by the bar is not a push, but it is pull (tensile force in bar) of magnitude\",round(-S,3) ,\"kN.\"\n", " \n", "R=W+IL*sin(theta)-S*sin(thetaS)\n", "print\"R=\",round(R,3),\"kN\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example2.22 page number 44" ] }, { "cell_type": "code", "execution_count": 64, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "x= 1.125 m\n", "T= 125.0 N\n" ] } ], "source": [ "from math import cos,sin,pi,asin\n", "\n", "#The pulley C is in equilibrium under the action of tensile forces in CA and CB and vertical downward load 200 N. The tensile forces in segment CA and CB are the same since the pulley is frictionless. Now consider the equilibrium of pulley C \n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "#variable declaration\n", "L=200.0 #suspended load at C,N\n", "AB=3.0\n", "BI=1.0\n", "ACB=5.0 #Length of cord,m\n", "DE=3.0\n", "BE=4.0\n", "theta=asin(4.0/5.0)\n", "#assume T is tension in string making angle theta1 & theta2,solving horizontal we find theta1=theta2,lets called them theta ,as triangleCFD=triangle=CFA.so, CD=AC\n", "\n", "HI=BI*DE/BE\n", "AH=DE-HI\n", "x=AH/2\n", "print\"x=\",round(x,3),\"m\"\n", "\n", "T=L/(2*sin(theta))\n", "print\"T=\",round(T),\"N\"\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example2.23 page number 45" ] }, { "cell_type": "code", "execution_count": 65, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "P= 1154.7 N\n", "P= 1732.05 N\n" ] } ], "source": [ "from math import sin ,acos, pi\n", "\n", "#When the roller is about to turn over the curb, the contact with the floor is lost and hence there is no reaction from the floor. The reaction R from the curb must pass through the intersection of P and the line of action of self weight, since the body is in equilibrium under the action of only three forces (all the three forces must be concurrent). \n", "\n", "#variable declaration\n", "W=2000.0 #weight of roller,N\n", "r=300.0 #radius of roller,mm\n", "h=150.0 # height of curb,mm\n", "OC=r-h\n", "AO=r\n", "\n", "alpha=acos(OC/AO)\n", "\n", "#angleOAB=angleOBA,Since OA=OB,\n", "angleOBA=(alpha)/2\n", "\n", "#the reaction makes 30° with the vertical\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "R=W/cos(angleOBA)\n", "P=R*sin(angleOBA)\n", "\n", "print\"P=\",round(P,2),\"N\"\n", "\n", "#Least force through the centre of wheel: Now the reaction from the curb must pass through the centre of the wheel since the other two forces pass through that point. Its inclination to vertical is theta = 60°. If the triangle of forces ABC representing selfweight by AB, reaction R by BC and pull P by AC, it may be observed that AC to be least, it should be perpendicular to BC. In other words, P makes 90° with the line of action of R.\n", "#From triangle of forces ABC, we get \n", "P=W*sin(alpha)\n", "print \"P=\",round(P,2),\"N\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.24 page number 47 " ] }, { "cell_type": "code", "execution_count": 66, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T1= 224.14 N\n", "T2= 183.01 N\n", "T3= 336.6 N\n", "T4= 326.79 N\n" ] } ], "source": [ "from math import sin,cos,pi\n", "\n", "#variable declaration\n", "PB=200.0 #Vertical loading at B,N\n", "PD=250.0 #Vertical loading at D,N\n", "thetabc=30.0*pi/180.0\n", "thetabd=60.0*pi/180.0\n", "thetaed=45.0*pi/180.0\n", "#Free body diagrams of points B and D . Let the forces in the members be as shown in the figure. Applying Lami’s theorem to the system of forces at point D,\n", "\n", "T1=PD*sin(pi-thetabd)/sin(thetaed+(pi/2)-thetabd)\n", "T2=PD*sin(pi-thetaed)/sin(thetaed+(pi/2)-thetabd)\n", "\n", "print \"T1=\",round(T1,2),\"N\"\n", "print \"T2=\",round(T2,2),\"N\"\n", "\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "T3=(PB+T2*cos(thetabd))/cos(thetabc)\n", "print \"T3=\",round(T3,2),\"N\"\n", "\n", "T4=(T2*sin(thetabd))+T3*sin(thetabc)\n", "print \"T4=\",round(T4,2),\"N\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.25 page number 47\n" ] }, { "cell_type": "code", "execution_count": 67, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "W= 2863.64 N\n" ] } ], "source": [ "from math import sin,cos,pi,acos,acos\n", "\n", "#variable declaration\n", "\n", "PC=1500.0 #Vertical loading at C,N\n", "CD=2.0 \n", "AC=1.5\n", "BD=1.0\n", "AB=4.0\n", "\n", "x=((pow(AC,2)-pow(BD,2))/4)+1\n", "y=sqrt(pow(AC,2)-pow(x,2))\n", "\n", "alpha=acos(x/AC)\n", "beta=acos((CD-x)/BD)\n", "\n", "#Applying Lami’s theorem to the system of forces acting at point C \n", "\n", "T1=PC*sin(pi/2)/sin(pi-alpha)\n", "T2=PC*sin((pi/2)+alpha)/sin(pi-alpha)\n", "T3=T2*sin(pi/2)/sin((pi/2)+beta)\n", "W=T2*sin(pi-beta)/sin((pi/2)+beta)\n", "\n", "\n", "print \"W=\",round(W,2),\"N\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.26 page number 49" ] }, { "cell_type": "code", "execution_count": 68, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T1= 44.8 KN\n", "T2= 29.24 KN\n", "theta= 63.42 °\n", "T3= 25.04 KN\n" ] } ], "source": [ "from math import sin,cos,pi,atan\n", "\n", "#variable declaration\n", "\n", "PB=20.0 #vertical loadng at point B,KN \n", "PC=30.0 #vertical loadng at point C,KN \n", " \n", "thetaab=30.0 *pi/180.0\n", "thetabc=50.0*pi/180.0\n", "\n", "#applying lami's thereom\n", "\n", "T1=PB*sin(thetabc)/sin(pi-thetabc+thetaab)\n", "T2=PB*sin(pi-thetaab)/sin(pi-thetabc+thetaab)\n", "theta=atan((T2*sin(thetabc))/(PC-T2*cos(thetabc)))*180/pi\n", "\n", "\n", "print \"T1=\",round(T1,2),\"KN\"\n", "\n", "print \"T2=\",round(T2,2),\"KN\"\n", "\n", "#Writing equations of equilibrium for the system of forces at C \n", "\n", "print \"theta=\",round(theta,2),\"°\"\n", "\n", "T3=(PC-T2*cos(thetabc))/cos(theta*pi/180)\n", "print \"T3=\",round(T3,2),\"KN\"\n", "#mistake in book" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.27 page number 49" ] }, { "cell_type": "code", "execution_count": 69, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T3= 22.5 KN\n", "T1= 38.97 KN\n", "theta= 54.79 °\n", "T2= 23.85 KN\n" ] } ], "source": [ "from math import sin,cos,pi,atan\n", "\n", "#variable declaration\n", "\n", "PB=20.0 #vertical loadng at point B,KN \n", " \n", "PC=25.0 #vertical loadng at point C,KN \n", "\n", "thetaab=30.0*pi/180.0\n", "thetadc=60.0*pi/180.0\n", "\n", "#Writing equations of equilibrium for the system of forces at joints B and C \n", "#T1*sin(thetaab)=T3*sin(thetadc)\n", "\n", "T3=(PB+PC)/((sin(thetadc)*cos(thetaab)/sin(thetaab))+cos(thetadc))\n", "print \"T3=\",round(T3,2),\"KN\"\n", "\n", "T1=T3*sin(thetadc)/sin(thetaab)\n", "print \"T1=\",round(T1,2),\"KN\"\n", "\n", "theta=(atan((T3*sin(thetadc))/(PC-T3*cos(thetadc))))*180/pi\n", "print\"theta=\",round(theta,2),\"°\"\n", "\n", "T2=T3*sin(thetadc)/(sin(theta*pi/180))\n", "print \"T2=\",round(T2,2),\"KN\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.28 page number 50" ] }, { "cell_type": "code", "execution_count": 70, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "RB= 600.0 N\n", "alpha= 1.249 °\n", "RD= 632.456 N\n", "RC= 200.0 N\n", "RA= 200.0 N\n" ] } ], "source": [ "from math import sin,cos,atan,pi\n", "\n", "#variable declaration\n", "W=600.0 #weight of cyclinder,N\n", "r=150.0 #radius of cylinder,mm\n", "a=600.0 #mm\n", "b=300.0 #mm\n", "\n", "#Free body diagram of sphere and frame\n", "\n", "##sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "RB=600.0 \n", "#As the frame is in equilibrium under the action of three forces only, they must be concurrent forces. In other words, reaction at D has line of action alone OD. Hence, its inclination to horizontal is given by: \n", "print\"RB=\",round(RB,2),\"N\"\n", "alpha=atan((a-r)/r)\n", "print\"alpha=\",round(alpha,4),\"°\"\n", "\n", "RD=W/sin(alpha)\n", "print\"RD=\",round(RD,3),\"N\"\n", "\n", "RC=RD*cos(alpha)\n", "RA=RC\n", "print\"RC=\",round(RC),\"N\"\n", "print\"RA=\",round(RA),\"N\"\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.29 page number 51" ] }, { "cell_type": "code", "execution_count": 71, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "RB= 166.67 N\n", "RA= 133.33 N\n", "RC= 200.0 N\n", "RD= 133.33 N\n" ] } ], "source": [ "from math import sin,cos,pi,acos,asin\n", "\n", "\n", "# Let O1 and O2 be the centres of the first and second spheres. Drop perpendicular O1P to the horizontal line through O2. show free body diagram of the sphere 1 and 2, respectively. Since the surface of contact are smooth, reaction of B is in the radial direction, i.e., in the direction O1O2. Let it make angle a with the horizontal. Then,\n", "\n", "#Variable declaration\n", "\n", "W=100.0 #weight of spheres,N\n", "\n", "r=100.0 #radius of spheres,mm\n", "\n", "d=360.0 # horizontal channel having vertical walls, the distance b/w,mm\n", "\n", "O1A=100.0\n", "O2D=100.0\n", "O1B=100.0\n", "BO2=100.0\n", "\n", "O2P=360.0-O1A-O2D\n", "O1O2=O1B+BO2\n", "\n", "alpha=acos(O2P/O1O2)\n", "\n", "###sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "RB=W/sin(alpha)\n", "RA=RB*cos(alpha)\n", "print\"RB=\",round(RB,2),\"N\"\n", "print\"RA=\",round(RA,2),\"N\"\n", "\n", "RC=100+RB*sin(alpha)\n", "\n", "RD=RB*cos(alpha)\n", "\n", "print\"RC=\",round(RC),\"N\"\n", "\n", "print\"RD=\",round(RD,2),\"N\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# example2.30 page number 52" ] }, { "cell_type": "code", "execution_count": 72, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "P= 1071.8 N\n" ] } ], "source": [ "from math import sin,cos,pi\n", "\n", "# Two cylinders, A of weight 4000 N and B of weight 2000 N rest on smooth inclines. They are connected by a bar of negligible weight hinged to each cylinder at its geometric centre by smooth pins\n", "\n", "#variable declaration\n", "\n", "WA=4000.0 #weight of cylinder A,N\n", "WB=2000.0 #weight of cylinder B,N\n", "\n", "thetaWA=60.0*pi/180.0 #inclination of wall with cylinderA,°\n", "thetaWB=45.0*pi/180.0 #inclination of wall with cylinderB,°\n", "thetaAb=15.0*pi/180.0 #angle inclination bar with cylinder A ,N\n", "thetaBb=15.0*pi/180.0 #angle inclination bar with cylinder B ,N\n", "\n", "#he free body diagram of the two cylinders. Applying Lami’s theorem to the system of forces on cylinder A, we get\n", "\n", "C=WA*sin(thetaWA)/sin(thetaWA+(pi/2)-thetaAb)\n", "\n", "#Consider cylinder B. Summation of the forces parallel to the inclined plane \n", "P=(-WB*cos(thetaWB)+C*cos(thetaWA))/cos(thetaBb)\n", "print\"P=\",round(P,1),\"N\"\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.31 page number 55" ] }, { "cell_type": "code", "execution_count": 73, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T= 10.0382 KN\n", "RA= 188.56 KN\n", "alpha 32.17 °\n" ] } ], "source": [ "from math import pi,atan,sin ,cos,sqrt\n", "\n", "# The 12 m boom AB weighs 1 kN, the distance of the centre of gravity G being 6 m from A. For the position shown, determine the tension T in the cable and the reaction at B \n", "\n", "#variable declaration\n", "PB=2.5 #vertical Loading at B,KN\n", "WAB=1.0 #vertical loading at G,KN\n", "\n", "theta=15.0*pi/180\n", "AG=6.0 #Length of boom AB is 12m\n", "GB=6.0\n", "thetaAB=30.0*pi/180.0\n", "thetaABC=15.0*pi/180.0\n", "#sum of moment at A\n", "\n", "T=(PB*(AG+GB)*cos(thetaAB)+WAB*AG*cos(thetaAB))/(sin(thetaABC)*12)\n", "print\"T=\",round(T,4),\"KN\"\n", "\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "HA=T*cos(thetaABC)\n", "VA=WAB+PB+T*sin(thetaABC)\n", "\n", "RA=sqrt(pow(RA,2)+pow(RA,2))\n", "print \"RA=\",round(RA,2),\"KN\"\n", "\n", "alpha=atan(VA/HA)*180/pi\n", "print\"alpha\",round(alpha,2),\"°\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example2.32 page number 56" ] }, { "cell_type": "code", "execution_count": 74, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T= 51.9615 KN\n", "R1= 23.6603 KN\n", "R2= 6.3397 KN\n" ] } ], "source": [ "from math import sin,cos,pi\n", "\n", "#variable declaration\n", "\n", "#A cable car used for carrying materials in a hydroelectric project is at rest on a track formed at an angle of 30° with the vertical. The gross weight of the car and its load is 60 kN and its centroid is at a point 800 mm from the track half way between the axles. The car is held by a cable . The axles of the car are at a distance 1.2 m. Find the tension in the cables and reaction at each of the axles neglecting friction of the track.\n", "\n", "W=60.0 #gross weight of car,KN\n", "theta=60.0*pi/180.0\n", " \n", " \n", "T=W*sin(theta)\n", "print\"T=\",round(T,4),\"KN\"\n", "\n", "#Taking moment equilibrium condition about upper axle point on track, we get\n", "\n", "R1=(-T*600.0+W*sin(theta)*800.0+W*cos(theta)*600.0)/1200.0\n", "print\"R1=\",round(R1,4),\"KN\"\n", "\n", "#Sum of forces normal to the plane = 0, gives \n", "R2=W*cos(theta)-R1\n", "print\"R2=\",round(R2,4),\"KN\"\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# example 2.33 page numnber 56" ] }, { "cell_type": "code", "execution_count": 75, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "W= 0.75 KN\n" ] } ], "source": [ "from math import sin,cos,acos,pi\n", "\n", "# A hollow right circular cylinder of radius 800 mm is open at both ends and rests on a smooth horizontal plane. Inside the cylinder there are two spheres having weights 1 kN and 3 kN and radii 400 mm and 600 mm, respectively. The lower sphere also rests on the horizontal plane. \n", "# Join the centres of spheres, O1 and O2 and drop O1D perpendicular to horizontal through O2. \n", "\n", "#variable declaration\n", "R=800.0\n", "W1=1.0\n", "r1=400.0\n", "W2=3.0\n", "r2=600.0\n", "O1O2=1000 #mm\n", "O2D=600 #mm\n", "\n", "#If alpha is the inclination of O2O1 to horizontal\n", "alpha=acos(O2D/O1O2)\n", "\n", "#Free body diagrams of cylinder and spheres are shown. Considering the equilibrium of the spheres.\n", "#Sum of Moment at O2\n", "\n", "R1=W1*O2D/(O1O2*sin(alpha))\n", "#sum of vertical Fy & sum of horizontal forces Fx is zero\n", "#Assume direction of Fx is right\n", "#Assume direction of Fy is up\n", "\n", "R2=R1\n", "R3=W1+W2\n", "#Now consider the equilibrium of cylinder. When it is about to tip over A, there is no reaction from ground at B. The reaction will be only at A. \n", "\n", "#Sum of Moment at A\n", "\n", "W=R1*O1O2*sin(alpha)/R\n", "\n", "print\"W=\",round(W,2),\"KN\"\n", "\n" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python [Root]", "language": "python", "name": "Python [Root]" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 0 }