{
 "metadata": {
  "name": "chapter 2.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2:Coplanar Collinear And Concurrent Forces"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1,Page No.30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Horizontal Forces\n",
      "F1=200 #N\n",
      "F2=100 #N\n",
      "F3=300 #N\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Analytical Method\n",
      "\n",
      "#When all forces are acting in same Direction,resultant is\n",
      "R=F1+F2+F3 #N\n",
      "\n",
      "#When Force 100 N is acting in opposite direction\n",
      "R2=F1-F2+F3 #N\n",
      "\n",
      "#Graphical Method\n",
      "\n",
      "#Let P1,P2,P3 be the forces\n",
      "#Suppose 100 N=1 cm\n",
      "P1=F1*F2**-1 #cm\n",
      "P2=F2*F2**-1 #cm\n",
      "P3=F3*F2**-1 #cm\n",
      "\n",
      "#When All Forces act in same direction \n",
      "ab=2 #cm to represent F1\n",
      "bc=1 #cm to represent F2\n",
      "cd=3 #cm to represent F3\n",
      "\n",
      "#by Measurement \n",
      "ad=6 #cm\n",
      "R3=6*F2 #N\n",
      "\n",
      "#When F2 acts in opposite direction \n",
      "#draw bc in opposite Direction \n",
      "#By Measurement,Length\n",
      "ad=4 #cm\n",
      "\n",
      "R4=4*F2 #N\n",
      "\n",
      "#Result\n",
      "print\"Resultant of forces analytically:When all forces are acting in same Direction\",round(R,2),\"N\"\n",
      "print\"                                :When Force 100 N is acting in opposite direction\",round(R2,2),\"N\"\n",
      "print\"Resultant of forces  Graphically:When All Forces act in same direction\",round(R3,2),\"N\"\n",
      "print\"                                :When Force 100 N is acting in opposite direction\",round(R4,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resultant of forces analytically:When all forces are acting in same Direction 600.0 N\n",
        "                                :When Force 100 N is acting in opposite direction 400.0 N\n",
        "Resultant of forces  Graphically:When All Forces act in same direction 600.0 N\n",
        "                                :When Force 100 N is acting in opposite direction 400.0 N\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2,Page No.34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Forces\n",
      "P=240 #N\n",
      "Q=200 #N\n",
      "alpha=60 #Degrees #Angle Between forces\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Magnitude of Resultant Force is \n",
      "R=(P**2+Q**2+2*P*Q*cos(alpha*pi*180**-1))**0.5 #N\n",
      "\n",
      "#Using sine formula\n",
      "#P*(sin(beta))**-1=Q*(sin(rho))**-1=R*(sin(180-alpha))**-1\n",
      "\n",
      "X=(P*sin((180-alpha)*180**-1*pi)*R**-1)\n",
      "beta=arcsin(X)*(180*pi**-1) #degrees\n",
      "\n",
      "Y=(Q*sin((180-alpha)*180**-1*pi)*R**-1)\n",
      "rho=arcsin(Y)*(180*pi**-1) #degrees\n",
      "\n",
      "#Result\n",
      "print\"Magnitude of Resultant is\",round(R,2),\"N\"\n",
      "print\"angle beta is\",round(beta,2),\"Degrees\"\n",
      "print\"Angle rho is\",round(rho,3),\"Degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnitude of Resultant is 381.58 N\n",
        "angle beta is 33.0 Degrees\n",
        "Angle rho is 26.996 Degrees\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3,Page No.35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "R=400 #N #resultant\n",
      "beta=35 #Degrees\n",
      "rho=25 #Derees\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Angle Between two forces\n",
      "alpha=beta+rho #Degrees\n",
      "\n",
      "#Using sine formula\n",
      "#P*(sin(beta))**-1=Q*(sin(rho))**-1=R*(sin(180-alpha))**-1\n",
      "#After further simplifying we get\n",
      "\n",
      "P=R*sin(beta*180**-1*pi)*(sin((180-alpha)*180**-1*pi))**-1 #N\n",
      "Q=R*sin(rho*180**-1*pi)*(sin((180-alpha)*180**-1*pi))**-1 #N\n",
      "\n",
      "#Result\n",
      "print\"Two forces Are:P\",round(P,2),\"P\"\n",
      "print\"              :Q\",round(Q,3),\"Q\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Two forces Are:P 264.92 P\n",
        "              :Q 195.199 Q\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4,Page No.35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Forces\n",
      "P=240 #N\n",
      "Q=200 #N\n",
      "R=400 #N\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Using Equation of Resultant,we get\n",
      "#R=(P**2+Q**2+2*P*Q*cos(alpha))**0.5\n",
      "#After Further simplifying we get\n",
      "#Let cos(alpha)=X\n",
      "X=(R**2-P**2-Q**2)*(2*P*Q)**-1 \n",
      "alpha=arccos(X)*(180*pi**-1) #Degrees\n",
      "\n",
      "#Using sine formula\n",
      "#P*(sin(beta))**-1=Q*(sin(rho))**-1=R*(sin(180-alpha))**-1\n",
      "#After further simplifying we get\n",
      "X=(P*sin((180-alpha)*180**-1*pi)*R**-1)\n",
      "beta=arcsin(X)*(180*pi**-1) #degrees\n",
      "\n",
      "Y=(Q*sin((180-alpha)*180**-1*pi)*R**-1)\n",
      "rho=arcsin(Y)*(180*pi**-1) #degrees\n",
      "\n",
      "#Result\n",
      "print\"Values of:alpha\",round(alpha,2),\"Degrees\"\n",
      "print\"         :beta\",round(beta,2),\"Degrees\"\n",
      "print\"         :rho\",round(rho,2),\"Degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Values of:alpha 49.46 Degrees\n",
        "         :beta 27.13 Degrees\n",
        "         :rho 22.33 Degrees\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5,Page No.36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "F=100 #N\n",
      "theta=30 #Degrees #Angle made by Force with axis\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Force acting in X-direction \n",
      "F_x=F*cos(theta*180**-1*pi) #N\n",
      "\n",
      "#Force acting in Y-direction \n",
      "F_y=F*sin(theta*180**-1*pi) #N\n",
      "\n",
      "#Result\n",
      "print\"Components of Force along X directions\",round(F_x,2),\"N\"\n",
      "print\"Components Of force along Y direction\",round(F_y,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Components of Force along X directions 86.6 N\n",
        "Components Of force along Y direction 50.0 N\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6,Page No.37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "W=100 #N #Weight\n",
      "theta=30 #Degrees\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Component of weight perpendicular to plane\n",
      "W1=W*cos(theta*180**-1*pi) #N\n",
      "\n",
      "#Component of weight parallel to plane\n",
      "W2=W*sin(theta*180**-1*pi) #N\n",
      "\n",
      "#Result\n",
      "print\"Component of weight:perpendicular to plane\",round(W1,2),\"N\"\n",
      "print\"                   :parallel to plane\",round(W2,2),\"N\"\n",
      "\n",
      "#Answer for Component of weight:perpendicular to plane is incorrect"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Component of weight:perpendicular to plane 86.6 N\n",
        "                   :parallel to plane 50.0 N\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7,Page No.37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Lengths\n",
      "L_BA=50 #cm\n",
      "L_AO=25 #cm\n",
      "\n",
      "theta=45 #Degrees #angle made by crank bith L_BO\n",
      "\n",
      "F1=2500 #N Force ererted on connecting rod\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Let alpha be the angle made by connecting rod with hte perpendicular drawn to L_BO\n",
      "\n",
      "L_AC=L_AO*sin(theta*pi*180**-1)\n",
      "\n",
      "alpha=arcsin(L_AC*L_BA**-1)*(180*pi**-1) #degrees\n",
      "\n",
      "#Horizontal force of connecting rod\n",
      "H_A=F1*cos(round(alpha,2)*pi*180**-1)\n",
      "\n",
      "#Vertical force of connecting rod\n",
      "V_A=F1*sin(round(alpha,2)*pi*180**-1)\n",
      "\n",
      "#Part-2\n",
      "\n",
      "#LEt angle  OAD be beta\n",
      "beta=theta+alpha #Degrees\n",
      "\n",
      "#Component of force AD along AO\n",
      "F_AO1=F1*cos(round(beta,2)*pi*180**-1) #degrees\n",
      "\n",
      "#Component of force AD along AE\n",
      "F_AO2=F1*sin(round(beta,2)*pi*180**-1) #degrees\n",
      "\n",
      "\n",
      "#Result\n",
      "print\"Resolving Forces of connecting rod:H_A\",round(H_A,2),\"KN\"\n",
      "print\"                                  :V_A\",round(V_A,2),\"KN\"\n",
      "print\"Resolving forces of crank:F_AO2\",round(F_AO2,2),\"KN\"\n",
      "print\"                         :F_AO1\",round(F_AO1,2),\"KN\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resolving Forces of connecting rod:H_A 2338.61 KN\n",
        "                                  :V_A 883.69 KN\n",
        "Resolving forces of crank:F_AO2 2278.51 KN\n",
        "                         :F_AO1 1028.79 KN\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8,Page No.38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Forces\n",
      "F1=104 #N\n",
      "F2=156 #N\n",
      "F3=252 #N\n",
      "F4=228 #N\n",
      "\n",
      "#Angles\n",
      "alpha1=10 #Degrees\n",
      "alpha2=24 #Degrees\n",
      "alpha3=3  #Degrees\n",
      "alpha4=9  #Degrees\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Resolving force F1\n",
      "F1_V=F1*sin(alpha1*pi*180**-1) #N\n",
      "F1_H=F1*cos(alpha1*pi*180**-1) #N\n",
      "\n",
      "#Resolving Force F2\n",
      "F2_V=F2*cos(alpha2*pi*180**-1) #N\n",
      "F2_H=-F2*sin(alpha2*pi*180**-1) #N\n",
      "\n",
      "#Resolving Force F3\n",
      "F3_H=-F3*cos(alpha3*pi*180**-1) #N\n",
      "F3_V=F3*sin(alpha3*pi*180**-1) #N\n",
      "\n",
      "#Resolving Force F4\n",
      "F4_H=-F4*sin(alpha4*pi*180**-1) #N\n",
      "F4_V=F4*cos(alpha4*pi*180**-1) #N\n",
      "\n",
      "#Sum of Horizontal Forces\n",
      "H=F1_H+F2_H+F3_H+F4_H #N\n",
      "\n",
      "#Sum of vertical Forces\n",
      "V=F1_V+F2_V-F3_V-F4_V #N\n",
      "\n",
      "#Resultant\n",
      "R=(H**2+V**2)**0.5\n",
      "\n",
      "#Direction\n",
      "theta=arctan(V*H**-1)*(180*pi**-1)\n",
      "\n",
      "#Result\n",
      "print\"Magnitude of Resultant\",round(R,2),\"N\"\n",
      "print\"Direction of Resultant\",round(theta,2),\"Degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnitude of Resultant 260.26 N\n",
        "Direction of Resultant 17.4 Degrees\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.9,Page No.41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Forces\n",
      "F1=10 #KN \n",
      "F3=20 #KN\n",
      "F4=40 #KN\n",
      "\n",
      "#Inclination\n",
      "theta1=30 #Degree\n",
      "theta3=90 #degree\n",
      "theta3=120 #degree\n",
      "\n",
      "R=72 #KN #Resultant\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Sum of horizontal Forces\n",
      "#F2*cos(theta2)=11.34...................1\n",
      "\n",
      "#Sum of vertical Forces\n",
      "#F2*sin(theta2)=12.36.....................2\n",
      "\n",
      "#Dividing equation 2 by 1 and further simplifying we get\n",
      "\n",
      "theta2=arctan(1.0899)*(180*pi**-1)\n",
      "\n",
      "#Force\n",
      "F2=12.36*(sin(theta2*180**-1*pi))**-1 #KN\n",
      "\n",
      "#Result\n",
      "print\"Magnitude of Force is\",round(F2,2),\"KN\"\n",
      "print\"Direction of force is\",round(theta2,2),\"Degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnitude of Force is 16.77 KN\n",
        "Direction of force is 47.46 Degrees\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10,Page No.41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Declaration Of Variables\n",
      "\n",
      "#Lengths\n",
      "L_OC=4 #m \n",
      "L_BC=3 #m\n",
      "\n",
      "#Forces\n",
      "F_O=20 #N\n",
      "F_C=35 #N\n",
      "F_B=25 #N \n",
      "F_A=50 #N\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Resultant Forces\n",
      "R1=(F_A**2+F_O**2)**0.5 #N\n",
      "R2=(F_B**2+F_C**2)**0.5 #N\n",
      "\n",
      "#Angle\n",
      "theta1=arctan(F_O*F_A**-1)*(180*pi**-1) #Degrees\n",
      "theta2=arctan(F_B*F_C**-1)*(180*pi**-1) #Degrees\n",
      "\n",
      "#Angle between these two Forces\n",
      "theta3=theta1+theta2 #Degrees\n",
      "\n",
      "#Resultant of Forces R1 & R2\n",
      "P=(R1**2+R2**2+2*R1*R2*cos(theta3*pi*180**-1))**0.5 #N\n",
      "\n",
      "#Angle made by Resultant P with R1\n",
      "S1=(R2*sin(theta3*pi*180**-1))\n",
      "S2=R1+R2*cos(theta3*pi*180**-1)\n",
      "alpha=arctan(S1*S2**-1)*(180*pi**-1)\n",
      "\n",
      "#Angle made by resultant P with vertical in anticlock wise direction\n",
      "theta4=alpha-theta1 #Degrees\n",
      "\n",
      "#Result\n",
      "print\"Magnitude of Force\",round(P,2),\"N\"\n",
      "print\"Direction of force\",round(theta4,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnitude of Force 85.15 N\n",
        "Direction of force 3.37 N\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}