{ "metadata": { "name": "chapter_1.ipynb" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 1:Fundamental Of Engineering Mechanics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.1,Page No.8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "\n", "#Declaration of Variables\n", "\n", "P=10 #N #Force1\n", "Q=8 #N #Force2\n", "alpha=60 #Degrees #Angle Between Two Forces\n", "\n", "#Calculations\n", "\n", "#Magnitude of Resultant Force \n", "R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N\n", " \n", "#Result\n", "print\"Magnitude of Resultant Force\",round(R,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Resultant Force 15.62 N\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.2,Page No.8" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#Declaration of Variables\n", "\n", "alpha=60 #Degrees #Angle between Forces\n", "R=20*(3)**0.5\n", "\n", "#Let P & Q be the Two forces\n", "#As Two Forces are equal i.e P=Q\n", "\n", "#Magnitude of Resultant Force \n", "#R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N\n", "#After Sub values and Furhter simplifying above equations we get\n", "#R=2*P*cos(alpha*2**-1*pi*180**-1)\n", "\n", "#Further on Simplifying we get\n", "P=R*((3)**0.5)**-1 #N\n", "\n", "#Result\n", "print\"Magnitude of Force is\",round(P,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Force is 20.0 N\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.3,Page No.9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "\n", "#Case-1\n", "R1=14 #N #Resultant1\n", "alpha1=60 #Degrees #Angle between two forces\n", "\n", "#Case-2\n", "R2=(136)**0.5\n", "alpha2=90 #Degrees #Angle between two Forces\n", "\n", "#Let P And Q be the two forces\n", "#R=(P**2+Q**2+2*P*Q**cos(alpha))\n", "\n", "#Now For case-1,we get Resultant as\n", "#P**2+Q**2+P*Q=196 ............................(1)\n", "\n", "#For case-2,we get Resultant as\n", "#P**2+Q**2=136 ...................................(2)\n", "\n", "#Subtracting Equation 2 from equation 1 we get\n", "#P*Q=60 .........................................(3)\n", "\n", "#Multiplying abovw equation by 2 we get\n", "#2*P*Q=120 .......................................(4)\n", "\n", "#Adding equation 4 to equation 2 we get\n", "#P**2+Q**2+2*P*Q=256\n", "#After Further simplifying we get\n", "#P=16-Q ..........................(5)\n", "\n", "#Sub value of P in equation 3 we get\n", "#Q**2-16*Q+60=0\n", "a=1\n", "b=-16\n", "c=60\n", "\n", "X=b**2-4*a*c\n", "\n", "Q1=(-b+X**0.5)*(2*a)**-1\n", "Q2=(-b-X**0.5)*(2*a)**-1\n", "\n", "#Now sub value of Q in equation 5 we get\n", "P1=16-Q1\n", "P2=16-Q2\n", "\n", "\n", "#Result\n", "print\"Magnitude of two Forces is:P2\",round(P2,2),\"N\"\n", "print\" :Q1\",round(Q2,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of two Forces is:P2 10.0 N\n", " :Q1 6.0 N\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.4,Page No.10 " ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "P=50 #N #Force acting at pt O\n", "Q=100 #N #force acting at pt O\n", "alpha=30 #DEgree #Angle Between Two Forces\n", "\n", "#Calculations\n", "\n", "#MAgnitude of Resultant\n", "R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N\n", "\n", "#Angle Made by resultant with the direction of P\n", "X=(Q*sin(alpha*180**-1*pi)*(P+(Q*cos(alpha*pi*180**-1)))**-1)\n", "theta=np.arctan(X)*(180*pi**-1) #Degrees\n", "\n", "#Angle made by resultant with x-axis is\n", "Y=theta+alpha*2**-1 #Degrees\n", "\n", "#Result\n", "print\"Resultant in the Magnitude is\",round(R,2),\"N\"\n", "print\"Resultant in the Direction is\",round(Y,2),\"Degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Resultant in the Magnitude is 145.47 N\n", "Resultant in the Direction is 35.1 Degrees\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.5,Page No.10 " ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#Declaration of Variables\n", "\n", "R=1500 #N #REsultant of two Forces\n", "alpha=90 #Degrees #Angle between two Forces\n", "theta=36 #Degrees #Angle Made by Resultant with one Force\n", "\n", "#Calculations\n", "\n", "#Now From Equation of Direction of Resultant,we get\n", "#tan(theta)=(Q*sin(alpha))*(P+Q*sin(alpha))**-1\n", "#After Further sub values and simplifying we get\n", "#Q=0.726*P .......................................(1)\n", "\n", "#Now From Equation of Resultant\n", "#R=(P**2+Q**2+2*P*Q*cos(alpha))\n", "#After sub values and further simplifying we get\n", "#R=1.527*P**2 \n", "#Therefore,we get value of P After simplifying above equation\n", "P=(R**2*(1.527)**-1)**0.5\n", "\n", "#Sub value of P in equation 1 we get\n", "Q=0.726*P \n", "\n", "#Result\n", "print\"Magnitude Of Forces:P\",round(P,2),\"N\"\n", "print\" :Q\",round(Q,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude Of Forces:P 1213.87 N\n", " :Q 881.27 N\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.6,Page No.11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "#P+Q=120\n", "R=180 #N #Resultant of two Forces\n", "theta=90 #Degrees #Angle between force and Resultant\n", "\n", "#Calculations\n", "\n", "#Now From Equation of Direction of Resultant,we get\n", "#Tan(theta)=Q*sin(alpha)*(P+Q*sin(alpha))**-1\n", "#After Further ssub values a in above equation and further simplifying we get\n", "#P=-Q*cos(alpha) ..........(1)\n", "\n", "#Now From equation of Resultant we get\n", "#R=(P**2++Q**2+2*P*Q*cos(alpha))**0.5\n", "#After sub values and further simplifying\n", "#Q-P=120 ......................................(1)\n", "#P+Q=270 ......................................(2)\n", "\n", "#After Adding above equations i.e equations 1 and 2 we get\n", "Q=390*2**-1 #N\n", "\n", "P=270-Q #N\n", "\n", "#Value of angle alpha\n", "alpha=np.arccos(-P*Q**-1)*(180*pi**-1) #Degrees\n", "\n", "#Result\n", "print\"Magnitude of Each Force:P\",round(P,2),\"N\"\n", "print\" :Q\",round(Q,2),\"N\"\n", "print\"Angle between Two Forces\",round(alpha,2),\"Degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Each Force:P 75.0 N\n", " :Q 195.0 N\n", "Angle between Two Forces 112.62 Degrees\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.7,Page No.13" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "\n", "#Declaration of Variables\n", "\n", "W=1000 #N #Weight\n", "#Angles\n", "CAB=30 #Degrees\n", "CBA=CBD=60 #Degrees\n", "ACB=90 #Degrees\n", "\n", "#Calculations\n", "#Angle\n", "CAD=30 #Degrees\n", "\n", "#In Right-Angle Triangle,Angle ADC\n", "ACD=90-CAD #Degrees\n", "\n", "#In Right-Angle Triangle,Angle BDC\n", "#Angle\n", "BCD=90-CBD #Degrees\n", "ACE=180-ACB-90-60 #DEgrees\n", "BCE=180-ACE-ACB #DEGrees\n", "\n", "#Applying LAmi's Theorem at Point C\n", "#T1*(sin150)**-1=T2*(sin(120)**-1=1000*sin(90)**-1\n", "\n", "#After Further simp;ifying we get\n", "T1=W*sin(150*pi*180**-1) #N\n", "T2=W*sin(120*pi*180**-1) #N\n", "\n", "#Result\n", "print\"Tension in Chain is:T1\",round(T1,2),\"N\"\n", "print\" :T2\",round(T2,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tension in Chain is:T1 500.0 N\n", " :T2 866.03 N\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.8,Page No.18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "W=900 #N #Weight at C\n", "#Length\n", "AC=4 #m \n", "BC=3 #m\n", "AB=5 #m\n", "\n", "\n", "#Calculations\n", "\n", "#In Triangle ABC\n", "X=AC**2+BC**2 \n", "Y=AB**2 \n", "\n", "#Therefore,\n", "#X=Y\n", "\n", "#Therefore,\n", "#Triangle ABC is Right Angle Triangle,In Which Angle ACB=90 Degrees\n", "alpha=np.arcsin(BC*AB**-1)*(180*pi**-1)\n", "Beta=90-alpha\n", "\n", "#In Right Angle Triangle ADC,\n", "theta1=90-alpha\n", "\n", "#In Right Angle Triangle BDC,\n", "theta2=90-Beta\n", "\n", "#Now,Angles\n", "ACE=180-theta1\n", "BCE=180-theta2\n", "\n", "#Now applying ami's Theorem\n", "#T1*(sin(BCE))**-1=T2*(sin(ACE))**-1=W*(sin(90))**-1\n", "\n", "#Tensions in chains \n", "T1=W*sin(BCE*180**-1*pi) #N\n", "T2=W*sin(ACE*180**-1*pi) #N\n", "\n", "#Result\n", "print\"Tension in Chains are:T1\",round(T1,2),\"N\"\n", "print\" :T2\",round(T2,2),\"N\"\n", "\n", "#Answer in hte book For T2 is incorrect" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tension in Chains are:T1 540.0 N\n", " :T2 720.0 N\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.9,Page No.18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "\n", "#Declaration of Variables\n", "\n", "W=15 #N #Weight at Pt C\n", "OAC=FAC=60 #Degrees\n", "CBD=BCF=45 #Degrees\n", "FCA=90-FAC #Degrees\n", "\n", "#Calculations\n", "\n", "#Using Lami's theorem,\n", "#W*(sin(BCA))**-1=T1*(sin(ACE))**-1=T2*(sin(ACE))**-1\n", "\n", "#Angles\n", "BCA=BCF+FCA #Degrees\n", "ACE=180-FCA #Degrees\n", "BCE=180-BCF #Degrees\n", "\n", "#Force's in the string AC\n", "T1=W*sin(ACE*180**-1*pi)*(sin(BCA*180**-1*pi))**-1 #N\n", "T2=W*sin(BCE*180**-1*pi)*(sin(BCA*180**-1*pi))**-1 #N\n", "\n", "#Result\n", "print\"Force's in the string:T1\",round(T1,2),\"N\"\n", "print\" :T2\",round(T2,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Force's in the string:T1 7.76 N\n", " :T2 10.98 N\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.10,Page No.16" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "\n", "#Forces\n", "P=50 #N\n", "Q=100 #N\n", "alpha=30 #Angle Between Two Forces\n", "theta=15 #Degrees #Angle Made By Force P with x-axis\n", "theta2=alpha+theta #Degrees\n", "\n", "#Calculations\n", "\n", "#Sum Of COmponents of forces along X-Axis is\n", "H=P*cos(theta*pi*180**-1)+Q*cos(theta2*pi*180**-1) #N\n", "\n", "#Sum Of COmponents of forces along Y-Axis is\n", "V=P*sin(theta*pi*180**-1)+Q*sin(theta2*pi*180**-1) #N\n", "\n", "#MAgnitude Of Resultant Force is\n", "R=(H**2+V**2)**0.5 #N\n", "\n", "#Let Direction Of Resultant Force be beta\n", "#Direction Of Resultant Force is\n", "beta=np.arctan(V*H**-1)*(180*pi**-1) #Degrees\n", "\n", "#Result\n", "print\"Magnitude of Resultant Force is\",round(R,2),\"N\"\n", "print\"Direction of Resultant Force is\",round(beta,2),\"Degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Resultant Force is 145.47 N\n", "Direction of Resultant Force is 35.1 Degrees\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.11,Page No.17" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "\n", "#Let 3Forces Be\n", "R1=40 #KN\n", "R2=15 #KN\n", "R3=20 #KN\n", "\n", "#Angles Made by respective forces with X-Axis\n", "theta1=60 #Degrees\n", "theta2=120 #Degrees\n", "theta3=240 #Degrees\n", "\n", "#Calculations\n", "\n", "#Now sum of components of all forces along X-Axis\n", "H=R1*cos(theta1*pi*180**-1)+R2*cos(theta2*pi*180**-1)+R3*cos(theta3*pi*180**-1)\n", "\n", "#Now sum of components of all forces along Y-Axis\n", "V=R1*sin(theta1*pi*180**-1)+R2*sin(theta2*pi*180**-1)+R3*sin(theta3*pi*180**-1)\n", "\n", "#MAgnitude of Resultant Force is\n", "R=(H**2+V**2)**0.5 #N\n", "\n", "#Direction of Resultant Force is\n", "theta=np.arctan(V*H**-1)*(pi**-1*180)\n", "\n", "#Result\n", "print\"Magnitude of Resultant Force is\",round(R,2),\"KN\"\n", "print\"Direction of Resultant Force is\",round(theta,2),\"Degrees\"\n", "\n", "#Declaration of Variables\n", "\n", "#Let 3Forces Be\n", "R1=40 #KN\n", "R2=15 #KN\n", "R3=20 #KN\n", "\n", "#Angles Made by respective forces with X-Axis\n", "theta1=60 #Degrees\n", "theta2=120 #Degrees\n", "theta3=240 #Degrees\n", "\n", "#Calculations\n", "\n", "#Now sum of components of all forces along X-Axis\n", "H=R1*cos(theta1*pi*180**-1)+R2*cos(theta2*pi*180**-1)+R3*cos(theta3*pi*180**-1)\n", "\n", "#Now sum of components of all forces along Y-Axis\n", "V=R1*sin(theta1*pi*180**-1)+R2*sin(theta2*pi*180**-1)+R3*sin(theta3*pi*180**-1)\n", "\n", "#MAgnitude of Resultant Force is\n", "R=(H**2+V**2)**0.5 #N\n", "\n", "#Direction of Resultant Force is\n", "theta=np.arctan(V*H**-1)*(pi**-1*180)\n", "\n", "#Result\n", "print\"Magnitude of Resultant Force is\",round(R,2),\"KN\"\n", "print\"Direction of Resultant Force is\",round(theta,2),\"Degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Resultant Force is 30.41 KN\n", "Direction of Resultant Force is 85.28 Degrees\n", "Magnitude of Resultant Force is 30.41 KN\n", "Direction of Resultant Force is 85.28 Degrees\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.12,Page No.18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "\n", "#Let 4 Forces Be\n", "R1=10 #KN\n", "R2=15 #KN\n", "R3=20 #KN\n", "R4=40 #KN\n", "\n", "#Angles Made by respective forces with X-Axis\n", "theta1=30 #Degrees\n", "theta2=60 #Degrees\n", "theta3=90 #Degree\n", "theta4=120 #Degrees\n", "\n", "#Calculations\n", "\n", "#Now sum of components of all forces along X-Axis\n", "H=R1*cos(theta1*pi*180**-1)+R2*cos(theta2*pi*180**-1)+R3*cos(theta3*pi*180**-1)+R4*cos(theta4*pi*180**-1)\n", "\n", "#Now sum of components of all forces along Y-Axis\n", "V=R1*sin(theta1*pi*180**-1)+R2*sin(theta2*pi*180**-1)+R3*sin(theta3*pi*180**-1)+R4*sin(theta4*pi*180**-1)\n", "\n", "#MAgnitude of Resultant Force is\n", "R=(H**2+V**2)**0.5 #N\n", "\n", "#Direction of Resultant Force is\n", "theta4=np.arctan(V*H**-1)*(pi**-1*180)\n", "theta=180+theta4 #Degrees\n", "\n", "#Result\n", "print\"Magnitude of Resultant Force is\",round(R,2),\"KN\"\n", "print\"Direction of Resultant Force is\",round(theta,2),\"Degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Resultant Force is 72.73 KN\n", "Direction of Resultant Force is 93.03 Degrees\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.13,Page No.19" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "#Declaration of Variables\n", "\n", "L=10 #m #Length of beam\n", "W=200 #N #Pt Load\n", "\n", "#Distances\n", "L_AC=4 #m\n", "L_CB=6 #m\n", "\n", "#Calculations\n", "\n", "#Let R_A & R_B be the forces acting at A & B\n", "#Taking Moment at A\n", "R_B=(W*L_CB)*L**-1 #N\n", "R_A=W-R_B #N\n", "\n", "#Result\n", "print\"Beam Reactions are:R_A\",round(R_A,2),\"N\"\n", "print\" :R_B\",round(R_B,2),\"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Beam Reactions are:R_A 80.0 N\n", " :R_B 120.0 N\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 1.14,Page No.20" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "from math import sin, cos, tan, radians, pi\n", "import numpy as np\n", "\n", "#Declaration of Variables\n", "\n", "#Let 4 Forces be\n", "F1=10 #N\n", "F2=20 #N\n", "F3=30 #N\n", "F4=40 #N\n", "\n", "#Calculations\n", "\n", "#Net Forces in Horizontal direction is\n", "H=F1-F3 #N\n", "\n", "#Net Forces in Vertical direction is\n", "V=F2-F4 #N\n", "\n", "#Resultant Force is given by\n", "R=(H**2+V**2)**0.5 #N\n", "\n", "#Direction of resultant Forces\n", "theta=np.arctan(V*H**-1)*(pi**-1*180) #Degrees\n", "\n", "#Since H & V are negative theta lies between 180 & 270\n", "theta2=180+theta #Degrees\n", "\n", "#Result\n", "print\"Magnitude of Force is\",round(R,2),\"N\"\n", "print\"Direction of Force is\",round(theta2,2),\"Degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Magnitude of Force is 28.28 N\n", "Direction of Force is 225.0 Degrees\n" ] } ], "prompt_number": 15 } ], "metadata": {} } ] }