diff options
107 files changed, 82546 insertions, 0 deletions
diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11.ipynb new file mode 100644 index 00000000..2b1e5d27 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter11.ipynb @@ -0,0 +1,268 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Measurement of Voltages and Currents" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1, Page 209" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import math\n", + "#Initialisation\n", + "t=0.02 #time period in seconds from diagram\n", + "v1=7 #peak voltage from diagram\n", + "\n", + "\n", + "#Calculation\n", + "f=1*t**-1 #frequency in Hz\n", + "v2=2*v1 # Peak to Peak Voltage\n", + "\n", + "#Result\n", + "print'Frequency = %d Hz\\n'%f\n", + "print'Peak to Peak Voltage = %d V\\n'%v2\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2, Page 210" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import math\n", + "#Initialisation\n", + "t=0.05 #time period in seconds from diagram\n", + "v1=10 #peak voltage from diagram\n", + "\n", + "\n", + "#Calculation\n", + "f1=1*t**-1 #frequency in Hz\n", + "w1=2*math.pi*f1 #Angular velocity\n", + "\n", + "#Result\n", + "print'%d sin %.1ft Hz\\n'%(v1,w1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3, Page 211" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "phi = -90 degree\n", + "10 sin 63t-90 Hz\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "t=0.1 #time period in seconds from diagram\n", + "v1=10 #peak voltage from diagram\n", + "t1=25*10**-3\n", + "\n", + "#Calculation\n", + "f1=1*t**-1 #frequency in Hz\n", + "w1=2*math.pi*f1 #Angular velocity\n", + "phi=-(t1*t**-1)*360 #phase angle\n", + "\n", + "#Result\n", + "print'phi = %d degree'%phi\n", + "print'%d sin %dt%d Hz\\n'%(v1,round(w1),phi)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4, Page 215" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(1) P = 2.5 W\n", + "\n", + "(2) Pav = 2.5 W\n", + "\n", + "(3) Pav = 1.25 W\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "v1=5 #constant 5V\n", + "r=10 #resistance in Ohm\n", + "vrms=5 #sine wave of 5 V r.m.s\n", + "vp=5 #5 V peak\n", + "\n", + "#Calculation\n", + "p=(v1**2)*r**-1 #Power in watts\n", + "p2=(vrms**2)*r**-1 #Power avarage in watts\n", + "a=(vp*math.sqrt(2)**-1)**2\n", + "p3=a*r**-1 #Power avarage in watts \n", + "\n", + "#Result\n", + "print'(1) P = %.1f W\\n'%p\n", + "print'(2) Pav = %.1f W\\n'%p2\n", + "print'(3) Pav = %.2f W\\n'%p3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5, Page 220" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, Resistor = 510 mOhm\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "fsd1=50*10**-3 #full scale defelction of ammeter in Ampere\n", + "fsd2=1*10**-3 #full scale defelction of moving coil meter in Ampere\n", + "Rm=25 #resistance of moving coil meter in Ohms\n", + "\n", + "#Calculation\n", + "Rsm=fsd1*fsd2**-1 #sensitivity factor\n", + "Rsh=Rm*49**-1 #shunt resistor\n", + "\n", + "#Result\n", + "print'Therefore, Resistor = %d mOhm\\n'%round(Rsh*10**3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6, Page 222" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rse = 49.975 KOhm\n", + "\n", + "Therefore, Resistor ~ 50 KOhm\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "fsd1=50 #full scale defelction of voltmeter in Volts\n", + "fsd2=1*10**-3 #full scale defelction of moving coil meter in Ampere\n", + "Rm=25 #resistance of moving coil meter in Ohms\n", + "\n", + "#Calculation\n", + "Rsm=fsd1*fsd2**-1\n", + "Rse=Rsm-Rm\n", + "\n", + "#Result\n", + "print'Rse = %.3f KOhm\\n'%(Rse*10**-3)\n", + "print'Therefore, Resistor ~ %d KOhm\\n'%round(Rse*10**-3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12.ipynb new file mode 100644 index 00000000..86488f4d --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter12.ipynb @@ -0,0 +1,321 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Resistance and DC Circuits" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1, Page 237" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnitude, I4 = -3 A\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "i1=8 #current in Amp\n", + "i2=1 #current in Amp\n", + "i3=4 #current in Amp\n", + "\n", + "#Calculation\n", + "i4=i2+i3-i1 #current in Amp\n", + "\n", + "#Results\n", + "print'Magnitude, I4 = %d A'%i4" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2, Page 239" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import math\n", + "#Initialization\n", + "e=12 #EMF source in volt\n", + "v1=3 #node voltage\n", + "v3=3 #node voltage\n", + "\n", + "#Calculation\n", + "v2=v1+v3-e #node voltage\n", + "\n", + "#Results\n", + "print'V2 = %d V'%v2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4, Page 242" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voc = 10 V\n", + "R = 100 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "#We have used method II for solving our problem by using simultaneous equations\n", + "\n", + "a = np.array([[25,-2],[400,-8]]) \n", + "b = np.array([[50],[3200]])\n", + "c=np.linalg.solve(a,b)\n", + "\n", + "print'Voc = %d V'%c[0]\n", + "print'R = %d ohm'%c[1]\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5, Page 244" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage, V = 7.14\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "r1=100 #Resistance in Ohm\n", + "r2=200 #Resistance in Ohm\n", + "r3=50 #Resistance in Ohm\n", + "v1=15 #voltage source\n", + "v2=20 #voltage source\n", + "\n", + "#Calculation\n", + "#Considering 15 V as a source & replace the other voltage source by its internal resistance,\n", + "r11=(r2*r3)*(r2+r3)**-1 #resistance in parallel\n", + "v11=v1*(r11/(r1+r11)) #voltage\n", + "#Considering 20 V as a source & replace the other voltage source by its internal resistance,\n", + "r22=(r1*r3)*(r1+r3)**-1 #resistance in parallel\n", + "v22=v2*(r22/(r2+r22)) #voltage\n", + "\n", + "#output of the original circuit\n", + "v33=v11+v22\n", + "\n", + "\n", + "\n", + "#Results\n", + "print'Voltage, V = %.2f'%v33" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6, Page 246" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Current, I = 1.67 A\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "r1=10 #Resistance in Ohm\n", + "r2=5 #Resistance in Ohm\n", + "v2=5 #voltage source\n", + "i=2 #current in Amp\n", + "\n", + "#Calculation\n", + "#Considering 5 V as a source & replace the current source by its internal resistance,\n", + "i1=v2*(r1+r2)**-1 #current using Ohms law\n", + "#Considering current source & replace the voltage source by its internal resistance,\n", + "r3=(r1*r2)*(r1+r2)**-1 #resistance in parallel\n", + "v3=i*r3 #voltage using Ohms law\n", + "i2=v3*r2**-1 #current using Ohms law\n", + "i3=i1+i2 #total current\n", + "\n", + "#Results\n", + "print'Output Current, I = %.2f A'%i3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8, Page 251" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V2 = 33.04 V\n", + "V3 = 43.15 V\n", + "Current, I1 = 1.73 A\n" + ] + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "r=25 #resistance in ohm\n", + "\n", + "#We have used for solving our problem by using simultaneous equations\n", + "\n", + "a = np.array([[(-13*60**-1),(1*20**-1)],[(1*60**-1),(-9*100**-1)]]) \n", + "b = np.array([[-5],[-100*30**-1]])\n", + "c=np.linalg.solve(a,b)\n", + "i1=c[1]/r #required current\n", + "\n", + "print'V2 = %.2f V'%c[0] #wrong answer in textbook\n", + "print'V3 = %.2f V'%c[1] #wrong answer in textbook\n", + "print'Current, I1 = %.2f A'%i1\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9, Page 253" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I1 = 326 mA\n", + "I2 = 33 mA\n", + "I3 = 53 mA\n", + "Voltage, Ve = 0.197 V\n" + ] + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "re=10 #resistance in ohm\n", + "\n", + "#We have used for solving our problem by using simultaneous equations\n", + "\n", + "a = np.array([[(-160),(20), (30)],[(20),(-210), (10)], [(30),(10), (-190)]]) \n", + "b = np.array([[-50],[0],[0]])\n", + "c=np.linalg.solve(a,b)\n", + "ve=re*(c[2]-c[1])\n", + "\n", + "print'I1 = %d mA'%(c[0]*10**3) #current I1\n", + "print'I2 = %d mA'%(c[1]*10**3) #current I2\n", + "print'I3 = %d mA'%(c[2]*10**3) #current I3\n", + "print'Voltage, Ve = %.3f V'%ve\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13.ipynb new file mode 100644 index 00000000..1fa2be09 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter13.ipynb @@ -0,0 +1,290 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Capacitance and Electric Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1, Page 264" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Charge, q = 100.0 uC\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "c=10*10**-6 #capacitance in Farad\n", + "v=10 #voltage\n", + "\n", + "#Calculation\n", + "q=c*v #charge in coulomb\n", + "\n", + "#Results\n", + "print'Charge, q = %.1f uC'%(q*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2, Page 264" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Capacitance, C = 31.6 nF\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialization\n", + "l=25*10**-3 #length in meter\n", + "b=10*10**-3 #breadth in meter\n", + "d=7*10**-6 #distance between plates in meter\n", + "e=100 #dielectric constant of material\n", + "e0=8.85*10**-12 #dielectric constant of air \n", + "\n", + "#Calculation\n", + "c=(e0*e*l*b)*d**-1 #Capacitance\n", + "#Results\n", + "print'Capacitance, C = %.1f nF'%(c*10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.3, Page 268" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electric Field Strength, E = 10 ^7 V/m\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "v=100 #voltage\n", + "d=10**-5 #distance in meter\n", + "\n", + "#Calculation\n", + "e=v*d**-1 #Electric Field Strength\n", + "\n", + "#Results\n", + "print'Electric Field Strength, E = %d ^7 V/m'%round(e*10**-6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4, Page 268" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "D = 75 mC/m^2\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "q=15*10**-6 #charge in coulomb\n", + "a=200*10**-6 #area\n", + "\n", + "#Calculation\n", + "d=q/a #electric flux density\n", + "\n", + "#Results\n", + "print'D = %d mC/m^2'%(d*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.5, Page 270" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C = 35 uF\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "C1=10*10**-6 #capacitance in Farad\n", + "C2=25*10**-6 #capacitance in Farad\n", + "\n", + "#Calculation\n", + "C=C1+C2 #capacitance in Farad\n", + "\n", + "#Results\n", + "print'C = %d uF'%(C*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.6, Page 271" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "C = 7.14 uF\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "C1=10*10**-6 #capacitance in Farad\n", + "C2=25*10**-6 #capacitance in Farad\n", + "\n", + "#Calculation\n", + "C=(C1*C2)/(C1+C2) #capacitance in Farad\n", + "\n", + "#Results\n", + "print'C = %.2f uF'%(C*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.7, Page 275" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E = 50.0 mJ\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "C1=10*10**-6 #capacitance in Farad\n", + "V=100 #voltage\n", + "\n", + "#Calculation\n", + "E=(0.5)*(C1*V**2) #Energy stored\n", + "\n", + "#Results\n", + "print'E = %.1f mJ'%(E*10**3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14.ipynb new file mode 100644 index 00000000..09afa64e --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter14.ipynb @@ -0,0 +1,270 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Inductance and Magnetic Fields" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1, Page 280" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetic Field Strength, H = 7.96 A/m\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "i=5 #current in ampere\n", + "l=0.628 #circumference\n", + "\n", + "\n", + "#Calculation\n", + "h=i/l #magnetic field strength\n", + "\n", + "#Results\n", + "print'Magnetic Field Strength, H = %.2f A/m'%h" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2, Page 283" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Magnetomotive Force, H = 3000.00 ampere-turns\n", + "(b) Magnetic Field Strength, H = 7500.00 A/m\n", + "(c) B = 9.42 mT\n", + "(d) Toal Flux, phi = 2.83 uWb\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "i=6 #current in ampere\n", + "n=500 #turns\n", + "l=0.4 #circumference\n", + "uo=4*math.pi*10**-7 #epsilon zero constant\n", + "a=300*10**-6 #area\n", + "\n", + "#Calculation\n", + "f=n*i #Magnetomotive Force\n", + "h=f/l #magnetic field strength\n", + "b=uo*h #magnetic induction\n", + "phi=b*a #flux\n", + "\n", + "#Results\n", + "print'(a) Magnetomotive Force, H = %.2f ampere-turns'%f\n", + "print'(b) Magnetic Field Strength, H = %.2f A/m'%h\n", + "print'(c) B = %.2f mT'%(b*10**3)\n", + "print'(d) Toal Flux, phi = %.2f uWb'%(phi*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3, Page 285" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage, V = 30 mV\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "l=10*10**-3 #inductance in henry\n", + "di=3\n", + "\n", + "\n", + "#Calculation\n", + "v=l*di #voltage \n", + "\n", + "#Results\n", + "print'Voltage, V = %d mV'%(v*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4, Page 287" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Inductance,L = 30 uH\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "n=400 #turns\n", + "l=200*10**-3 #circumference\n", + "uo=4*math.pi*10**-7 #epsilon zero constant\n", + "a=30*10**-6 #area\n", + "\n", + "#Calculation\n", + "L=(uo*a*n**2)/l #Inductance in henry \n", + "\n", + "#Results\n", + "print'Inductance,L = %d uH'%(L*10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5, Page 289" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Inductance in series,L = 30 uH\n", + "(b) Inductance in parallel,L = 6.67 uH\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "l1=10 #Inductance in henry \n", + "l2=20 #Inductance in henry \n", + "\n", + "#Calculation\n", + "ls=l1+l2 #Inductance in henry \n", + "lp=((l1*l2)*(l1+l2)**-1) #Inductance in henry \n", + "#Results\n", + "print'(a) Inductance in series,L = %d uH'%ls\n", + "print'(b) Inductance in parallel,L = %.2f uH'%lp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6, Page 293" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stored Energy = 125 mJ\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "l=10**-2 #Inductance in henry \n", + "i=5 #current in ampere \n", + "\n", + "#Calculation\n", + "s=0.5*l*i**2 #stored energy\n", + "\n", + "#Results\n", + "print'Stored Energy = %d mJ'%(s*10**3)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15.ipynb new file mode 100644 index 00000000..427f3ec3 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter15.ipynb @@ -0,0 +1,371 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Alternating Voltages and Currents" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1, Page 305" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reactance, Xl = 1 Ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "w=1000 #Angular Frequency \n", + "L=10**-3 #Inductance\n", + "\n", + "#Calculation\n", + "Xl=w*L #Reactance\n", + "\n", + "#Result\n", + "print'Reactance, Xl = %d Ohm'%Xl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2, Page 305" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reactance, Xl = 1.59 KOhm\n" + ] + } + ], + "source": [ + "import math\n", + "import math\n", + "\n", + "#Initialisation\n", + "f=50 #frequency\n", + "C=2*10**-6 #Capacitance\n", + "\n", + "#Calculation\n", + "w=2*math.pi*f #Angular Frequency \n", + "Xc=1/(w*C) #Reactance\n", + "\n", + "#Result\n", + "print'Reactance, Xl = %.2f KOhm'%(Xc/1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3, Page 306" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Peak Current, IL = 318 mA\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "f=100 #frequency\n", + "l=25*10**-3 #Inductance\n", + "Vl=5 #AC Voltage (Sine)\n", + "\n", + "#Calculation\n", + "w=2*math.pi*f #Angular Frequency \n", + "Xl=w*l #Reactance\n", + "Il=Vl*Xl**-1\n", + "\n", + "#Result\n", + "print'Peak Current, IL = %d mA'%(Il*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4, Page 306" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage appear across the capacitor, V = 8 V r.m.s\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "Ic=2 #sinusoidal Current\n", + "C=10*10**-3 #Capacitance\n", + "w=25 #Angular Frequency \n", + "\n", + "\n", + "\n", + "#Calculation \n", + "Xc=1/(w*C) #Reactance\n", + "Vc= Ic*Xc #Voltage\n", + "\n", + "#Result\n", + "print'Voltage appear across the capacitor, V = %d V r.m.s'%(Vc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5, Page 309" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) V = 63.6 V\n", + "(b) V = 38.15 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "I=5 #sinusoidal Current\n", + "R=10 #Resistance in Ohm\n", + "f=50 #Frequency in Hertz\n", + "L=0.025 #Inductancec in Henry\n", + " \n", + "\n", + "#Calculation \n", + "Vr=I*R #Voltage across resistor\n", + "Xl=2*math.pi*f*L #Reactance\n", + "VL= I*Xl #Voltage across inductor\n", + "V=math.sqrt((Vr**2)+(VL**2)) #total voltage\n", + "phi=math.atan(VL*Vr**-1) #Phase Angle in radians\n", + "\n", + "#Result\n", + "print'(a) V = %.1f V'%(V)\n", + "print'(b) V = %.2f V'%(phi*180/math.pi) #phase angle in degree" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6, Page 311" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Current, I = 884 uA\n", + "(b) V = -27.95 V\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "R=10**4 #Resistance in Ohm\n", + "f=10**3 #Frequency in Hertz\n", + "C=3*10**-8 #Capacitance in Farad\n", + "V=10 #Voltage\n", + "\n", + "#Calculation \n", + "Xc=1/(2*math.pi*f*C) #Reactance\n", + "a=((10**4)**2)+(5.3*10**3)**2\n", + "I=math.sqrt((V**2)/a) #Current in Amp\n", + "Vr=I*R #Voltage\n", + "Vc=Xc*I #Voltage\n", + "phi=math.atan(Vc/Vr) #Phase Angle in radians\n", + "\n", + "#Result\n", + "print'(a) Current, I = %d uA'%round(I*10**6)\n", + "print'(b) V = %.2f V'%(-phi*180/math.pi) #phase angle in degree" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.7, Page 317" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Z = 200 + j 62 Ohms\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "I=5 #sinusoidal Current\n", + "R=200 #Resistance in Ohm\n", + "f=50 #Frequency in Hertz\n", + "L=400*10**-3 #Inductancec in Henry\n", + "C=50*10**-6 #Capacitance in Henry \n", + "\n", + "#Calculation \n", + "Vr=I*R #Voltage across resistor\n", + "Xl=2*math.pi*f*L #Reactance\n", + "Xc=1/(2*math.pi*f*C) #Reactance\n", + "i=Xl-Xc\n", + "\n", + "#Result\n", + "print'Z = %d + j %d Ohms'%(R,i)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8, Page 320" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "vo = 12.4 < 29.7\n", + "Therefore\n", + "vo = 12.4 sin(500 t + 29.7)\n" + ] + } + ], + "source": [ + "import math\n", + "from numpy import ones\n", + "\n", + "#Initialisation\n", + "R1=5 #Resistance in Ohm\n", + "R2=50 #Resistance in Ohm\n", + "w=500 #rad/s\n", + "L=50*10**-3 #Inductancec in Henry\n", + "C=200*10**-6 #Capacitance in Henry \n", + "v=10\n", + "\n", + "#Calculation\n", + "Xc=1/(w*C) #Reactance\n", + "Z1=complex(R1,-Xc) #taking in complex form\n", + "a=(R2*w**2*L**2)/(R2**2+(w**2*L**2))\n", + "b=(R2**2*w*L)/(R2**2+(w**2*L**2))\n", + "Z2=complex(a,b) #taking in complex form\n", + "Z3=(Z1+Z2)\n", + "Z=Z2/Z3\n", + "r=math.sqrt((Z.real)**2 + (Z.imag)**2) #converting in polar (absolute)\n", + "r1=v*r \n", + "phi=math.atan(Z.imag/Z.real) #converting in polar (phase)\n", + "\n", + "#Result\n", + "print'vo = %.1f < %.1f'%(r1,(phi*180/math.pi))\n", + "print'Therefore'\n", + "print'vo = %.1f sin(%d t + %.1f)'%(r1,w,(phi*180/math.pi))" + ] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb new file mode 100644 index 00000000..2c7bf154 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter16.ipynb @@ -0,0 +1,216 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Power in AC Circuits" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1, Page 329" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Apparent power, S = 250 VA\n", + "(b) Power Factor = 0.866\n", + "(c) Active Power, P = 216.5\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "V=50 #Voltage\n", + "I=5 #Current in Ampere r.m.s\n", + "phase=30 #in degrees\n", + "\n", + "#Calculation \n", + "S=V*I #apparent power\n", + "pf=math.cos(phase*math.pi/180) #power factor\n", + "apf=S*pf #active power\n", + "\n", + "#Result\n", + "print'(a) Apparent power, S = %d VA'%S\n", + "print'(b) Power Factor = %.3f'%pf\n", + "print'(c) Active Power, P = %.1f'%apf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2, Page 331" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Apparent Power, P = 2000 W\n", + " Active Power, P = 1500 W\n", + " Reactive Power, Q = 1322 var\n", + " Current I = 8.33 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "pf=0.75 #power factor\n", + "S=2000 #apparent power in VA\n", + "V=240 #Voltage in volts\n", + "\n", + "#Calculation \n", + "apf=S*pf #active power\n", + "sin=math.sqrt(1-(pf**2)) \n", + "Q=S*sin #Reactive Power\n", + "I=S*V**-1 #Current\n", + "#Result\n", + "print' Apparent Power, P = %d W'%S\n", + "print' Active Power, P = %d W'%apf\n", + "print' Reactive Power, Q = %d var'%Q\n", + "print' Current I = %.2f A'%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3, Page 333" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Apparent Power, S = 1500 W\n", + " Active Power, P = 1500 W\n", + " Reactive Power, Q = 1322 var\n", + " Current I = 6.25 A\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "pf=0.75 #power factor\n", + "S=1500 #apparent power in W\n", + "V=240 #Voltage in volts\n", + "P1 = 2000 #apparent power\n", + "P2 = 1500 #active power\n", + "Q = 1322 #reactive power\n", + "I = 8.33 #current in amp\n", + "f=50 #frequency in hertz\n", + "\n", + "#Calculation \n", + "Xc=V**2/Q #reactive capacitance\n", + "C=1/(Xc*2*math.pi*f) #capacitance\n", + "I=S*V**-1 #current\n", + "\n", + "#Result\n", + "print' Apparent Power, S = %d W'%S\n", + "print' Active Power, P = %d W'%apf\n", + "print' Reactive Power, Q = %d var'%Q\n", + "print' Current I = %.2f A'%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4, Page 335" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Zl = (50+20j)\n" + ] + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "\n", + "#Initialisation\n", + "Zo=complex(50,-20) #complex form of output impedance\n", + "\n", + "#Calculation \n", + "Zl=np.conjugate(Zo) #complex form of Load impedance\n", + "\n", + "#Result\n", + "print'Zl = %s'%Zl" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18.ipynb new file mode 100644 index 00000000..1f880cd1 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter18.ipynb @@ -0,0 +1,160 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 18: Transient Behaviour" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.1, Page 376" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v = 18.36 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "c=100*10**-6 #capacitance in farad\n", + "r=100*10**3 #resistance in ohm\n", + "v=20 #volt\n", + "t=25 #time in seconds\n", + "e=2.71828 #mathematical constant\n", + "\n", + "#Calculation\n", + "T=c*r #time in seconds\n", + "v1=v*(1-e**(-t*T**-1)) #volt\n", + "\n", + "#Result\n", + "print'v = %.2f V'%v1\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.2, Page 378" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t = 10.2 mSec\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "l=400*10**-3 #inductance in henry\n", + "i1=300 #current in milliamp\n", + "r=20 #resistance in ohm\n", + "v=15 #volt\n", + "t=25 #time in seconds\n", + "e=2.71828 #mathematical constant\n", + "\n", + "#Calculation\n", + "T=l/r #time in seconds\n", + "i=(v*r**-1)*10**3 #current in amp\n", + "t=((math.log(i/(i-i1)))/(math.log(e)))*0.02 #expression to find time t\n", + "\n", + "#Result\n", + "print't = %.1f mSec'%(t*10**3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 18.3, Page 382" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v = 10 - 5 e^( -t/0.2 ) V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "c=20*10**-6 #capacitance in farad\n", + "r=10*10**3 #resistance in ohm\n", + "v=5 #volt\n", + "v2=10 #volt\n", + "\n", + "#Calculation\n", + "T=c*r #time in seconds\n", + "\n", + "#Result\n", + "print'v = %d - %d e^( -t/%.1f ) V'%(v2,v,T)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19.ipynb new file mode 100644 index 00000000..3e221bbb --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter19.ipynb @@ -0,0 +1,116 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 19: Semiconductor Diodes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.1, Page 392" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Peak Ripple Voltage = 0.4 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Introduction\n", + "i=0.2 #current in amp\n", + "C=0.01 #Capacitance in farad\n", + "t=20*10**-3 #time in sec\n", + "\n", + "#Calculation\n", + "dv=i/C #change in voltage w.r.t time\n", + "v=dv*t #peak ripple voltage\n", + "\n", + "#Result\n", + "print'Peak Ripple Voltage = %.1f V'%v\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 19.2, Page 406" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Peak Ripple Voltage = 0.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Introduction\n", + "i=0.2 #current in amp\n", + "C=0.01 #Capacitance in farad\n", + "t=10*10**-3 #time in sec\n", + "\n", + "#Calculation\n", + "dv=i/C #change in voltage w.r.t time\n", + "v=dv*t #peak ripple voltage\n", + "\n", + "#Result\n", + "print'Peak Ripple Voltage = %.1f V'%v\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2.ipynb new file mode 100644 index 00000000..6a7bb2a7 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter2.ipynb @@ -0,0 +1,372 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Basic Electric Circuits and Components" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1, Page 23" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current, I = 15.9 mA\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "v1=15.8 #voltage across r1\n", + "v2=12.3 #voltage across r2\n", + "r2=220 #resistance R2 in ohm\n", + "\n", + "#Calculation\n", + "v=v1-v2 #voltage difference across the resistor\n", + "i=v/r2 #current in ampere\n", + "\n", + "#Result\n", + "print'Current, I = %.1f mA'%(i*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2, Page 24" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I2 = 7 A\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "i1=10; #current in amp\n", + "i3=3; #current in amp\n", + "\n", + "\n", + "#Calculation\n", + "i2=i1-i3 #current in amp\n", + "\n", + "#Result\n", + "print'I2 = %d A'%i2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3, Page 25" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V1 = 5 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "E=12 #EMF in volt\n", + "v2=7 #volt\n", + "\n", + "\n", + "#Calculation\n", + "v1=E-v2 #volt\n", + "\n", + "#Result\n", + "print'V1 = %d V'%v1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4, Page 25" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P = 450 W\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "i=3 #current in amp\n", + "r=50 #resistance in ohm\n", + "\n", + "\n", + "#Calculation\n", + "p=(i**2)*r #power in watt\n", + "\n", + "#Result\n", + "print'P = %d W'%p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5, Page 26" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R = 70 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "r1=10 #resistance in ohm\n", + "r2=20 #resistance in ohm\n", + "r3=15 #resistance in ohm\n", + "r4=25 #resistance in ohm\n", + "\n", + "\n", + "#Calculation\n", + "r=r1+r2+r3+r4 #series resistance in ohm\n", + "\n", + "#Result\n", + "print'R = %d ohm'%r\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6, Page 27" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R = 6.67 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "r1=10 #resistance in ohm\n", + "r2=20 #resistance in ohm\n", + "\n", + "\n", + "\n", + "#Calculation\n", + "r=(r1*r2)*(r1+r2)**-1 #parallel resistance in ohm\n", + "\n", + "#Result\n", + "print'R = %.2f ohm'%r\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7, Page 28" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V = 6 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "r1=200 #resistance in ohm\n", + "r2=300 #resistance in ohm\n", + "\n", + "\n", + "#Calculation\n", + "v=(10*r2)/(r1+r2) #resistance in ohm\n", + "\n", + "#Result\n", + "print'V = %d V'%v" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8, Page 29" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V = 7 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "r1=1*10**3 #resistance in ohm\n", + "r2=500 #resistance in ohm\n", + "v1=15 #voltage\n", + "v2=3 #voltage\n", + "\n", + "#Calculation\n", + "v=v2+((v1-v2)*((r2)*(r1+r2)**-1)) #resistance in ohm\n", + "\n", + "#Result\n", + "print'V = %d V'%v\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9, Page 30" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "T = 20 ms\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "f=50 #frequency in herts\n", + "\n", + "\n", + "#Calculation\n", + "t=(1*f**-1) #time period\n", + "\n", + "\n", + "#Result\n", + "print'T = %d ms'%(t*10**3)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20.ipynb new file mode 100644 index 00000000..960e2bde --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter20.ipynb @@ -0,0 +1,121 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 20: Field-effect Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.1, Page" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Small signal voltage gain = -4 \n", + "Low frequency cut off = 0.16 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Introduction\n", + "gm=2*10**-3\n", + "rd=2*10**3 #resistance in ohm\n", + "C=10**-6 #capacitance in farad\n", + "R=10**6 #resistance in ohm\n", + "\n", + "\n", + "#Calculation\n", + "G=-gm*rd #Small signal voltage gain\n", + "fc=1/(2*math.pi*C*R) #frequency in Hz\n", + "\n", + "#Result\n", + "print'Small signal voltage gain = %d '%G\n", + "print'Low frequency cut off = %.2f Hz'%fc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.2, Page" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rd = 0.67 kOhm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Introduction\n", + "idd=4*10**-3 #current in ampere\n", + "vo=8 #voltage\n", + "vdd=12 #voltage\n", + "\n", + "#Calculation\n", + "Rd=vo*(vdd-idd)**-1\n", + "\n", + "#Result\n", + "print'Rd = %.2f kOhm'%Rd #wrong answer in textbook" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21.ipynb new file mode 100644 index 00000000..88157a22 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter21.ipynb @@ -0,0 +1,232 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 21: Bipolar Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.1, Page 445" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Current, I = 2.04 mA\n", + "Output Voltage, V = 4.5 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "vcc=10 #voltage\n", + "vbe=0.7 #voltage, base-to-emitter junction\n", + "rb=910*10**3 #resistance in ohm\n", + "hfe=200\n", + "rc=2.7*10**3 #resistance in ohm\n", + "\n", + "#Calculation\n", + "ib=(vcc-vbe)/rb #base current in ampere\n", + "ic=hfe*ib #collector in current in ampere\n", + "vo=vcc-(ic*rc) #output voltage\n", + "\n", + "#Result\n", + "print'Output Current, I = %.2f mA'%(ic*10**3)\n", + "print'Output Voltage, V = %.1f V'%vo" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.2, Page 445" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Quiescent Output Voltage, V = 5.6 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "vcc=10 #voltage\n", + "r2=10*10**3 #resistance in ohm\n", + "r1=27*10**3 #resistance in ohm\n", + "vbe=0.7 #voltage, base-to-emitter junction\n", + "re=10**3 #resistance in ohm\n", + "rc=2.2*10**3 #resistance in ohm\n", + "\n", + "#Calculation\n", + "vb=vcc*(r2*(r1+r2)**-1) # base voltage\n", + "ve=vb-vbe #emitter voltage\n", + "ie=ve/re #emitter current\n", + "ic=ie #collector current\n", + "vo=vcc-(ic*rc) #output voltage\n", + "\n", + "#Result\n", + "print'Quiescent Output Voltage, V = %.1f V'%vo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.3, Page 448" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Gain = -2.2 mA\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "re=10**3 #resistance in ohm\n", + "rc=2.2*10**3 #resistance in ohm\n", + "\n", + "#Calculation\n", + "gain=-rc/re #voltage gain\n", + "\n", + "#Result\n", + "print'Voltage Gain = %.1f mA'%gain\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.4, Page 451" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Gain = 64 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "r1=15*10**3 #resistance in ohm\n", + "r2=47*10**3 #resistance in ohm\n", + "C=220*10**-9 #capacitance in farad\n", + "\n", + "#Calculation\n", + "ri=(r1*r2)/(r1+r2) #resistance in paraller\n", + "fco=1/(2*math.pi*C*ri) #frequency in Hz\n", + "\n", + "\n", + "#Result\n", + "print'Voltage Gain = %d Hz'%round(fco)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 21.5, Page 453" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Quiescent Output Voltage, V = 2.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "vcc=10 #voltage\n", + "r2=10*10**3 #resistance in ohm\n", + "r1=27*10**3 #resistance in ohm\n", + "vbe=0.7 #voltage, base-to-emitter junction\n", + "re=10**3 #resistance in ohm\n", + "rc=2.2*10**3 #resistance in ohm\n", + "\n", + "#Calculation\n", + "vb=vcc*(r2*(r1+r2)**-1) # base voltage\n", + "ve=vb-vbe #emitter voltage\n", + "\n", + "\n", + "#Result\n", + "print'Quiescent Output Voltage, V = %.1f V'%ve\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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22.ipynb new file mode 100644 index 00000000..b477d5ec --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter22.ipynb @@ -0,0 +1,123 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 22: Power Electronics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.1, Page 475" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Output Voltage, V = 12.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "vz=4.7 #voltage\n", + "r3=1.222*10**3 #resistance in ohm\n", + "r4=10**3 #resistance in ohm\n", + "\n", + "\n", + "#Calculation\n", + "Vo=(vz+0.7)*((r3+r4)*r4**-1) #output voltage\n", + "\n", + "\n", + "#Result\n", + "print' Output Voltage, V = %.1f V'%Vo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 22.2, Page 476" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power delivered to the load, P = 5 W\n", + "Power dissipated in the output transistor, P = 10 W\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "vo=10 #voltage\n", + "rl=5 #resistance in ohm\n", + "vi=15 #voltage\n", + "\n", + "\n", + "#Calculation\n", + "io=vo*rl**-1 #current in ampere\n", + "po=vo*io**-1 #power delivered to the load in watt\n", + "pt=(vi-vo)*io #power dissipated in the output transistor in watt\n", + "\n", + "\n", + "\n", + "#Result\n", + "print'Power delivered to the load, P = %d W'%po\n", + "print'Power dissipated in the output transistor, P = %d W'%pt\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23.ipynb new file mode 100644 index 00000000..0e995fd4 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter23.ipynb @@ -0,0 +1,154 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 23: Electric Motors and Generators" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.1, Page 483" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Sinusoidal Voltage with Peak value = 8.4 V\n" + ] + } + ], + "source": [ + "import math\n", + "#initialization\n", + "n=100 #no of turns\n", + "b=400*10**-3 #magnetic field\n", + "a=20*10**-4 #area in cm^2\n", + "w=105 #angular frequency\n", + "\n", + "#calculation\n", + "v=n*b*a*w #voltage\n", + "\n", + "#result\n", + "print'Sinusoidal Voltage with Peak value = %.1f V'%v" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.2, Page 488" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation Speed = 1800 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "#initialization\n", + "f=60 #frequency in Hz\n", + "a=60 #seconds\n", + "\n", + "#calculation\n", + "f1=f/2 #required rotation speed\n", + "f2=f1*a #equivalent rotation speed\n", + "\n", + "\n", + "#result\n", + "print'Rotation Speed = %d rpm'%f2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 23.3, Page 490" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rotation Speed = 12000 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "#initialization\n", + "f=50 #frequency in Hz\n", + "p=4 #four times magnetic field for 8 pole motor\n", + "a=60 #seconds\n", + "\n", + "#calculation\n", + "f1=f*p #required rotation speed\n", + "f2=f1*a #equivalent rotation speed\n", + "\n", + "\n", + "#result\n", + "print'Rotation Speed = %d rpm'%f2" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5.ipynb new file mode 100644 index 00000000..03d91695 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter5.ipynb @@ -0,0 +1,258 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Signals and Data Transmission" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1, Page 71" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "An 8-bit word can take 2^8 = 256 values\n", + "\n", + "An 16-bit word can take 2^16 = 65536 values\n", + "\n", + "An 32-bit word can take 2^32 = 4.000000 x 10^9 values\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "n=8 #8 bit\n", + "n2=16 #16 bit\n", + "n3=32 #32 bit\n", + "\n", + "#Calculation\n", + "c=2**n #value for 8 bit\n", + "c2=2**n2 #value for 16 bit\n", + "c3=2**n3 #value for 32 bit\n", + "\n", + "#Result\n", + "print'An 8-bit word can take 2^8 = %d values\\n'%c\n", + "print'An 16-bit word can take 2^16 = %d values\\n'%c2\n", + "print'An 32-bit word can take 2^32 = %f x 10^9 values\\n'%(c3/10**9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2, Page 71" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "An 8-bit word resolution = 0.39 percent\n", + "\n", + "An 16-bit word resolution = 0.0015 percent\n", + "\n", + "An 32-bit word resolution = 0.000000023 percent\n", + "\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "n=8 #8 bit\n", + "n2=16 #16 bit\n", + "n3=32 #32 bit\n", + "\n", + "\n", + "#Calculation\n", + "c=2**n #value for 8 bit\n", + "p=(1*c**-1)*100 #percent\n", + "c2=2**n2 #value for 16 bit\n", + "p2=(1*c2**-1)*100 #percent\n", + "c3=2**n3 #value for 32 bit\n", + "p3=(1*c3**-1)*100 #percent\n", + "\n", + "#Result\n", + "print'An 8-bit word resolution = %.2f percent\\n'%p\n", + "print'An 16-bit word resolution = %.4f percent\\n'%p2\n", + "print'An 32-bit word resolution = %.9f percent\\n'%p3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3, Page 73" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEZCAYAAACNebLAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG4pJREFUeJzt3X2UXXV97/H3J4RHUxhFGyGQzDINZqHQATSEgs1YCybI\ng7flQaqFgduWpahUdClFbS7qur3Lem2gQBEEQlAKiEpQoMUKU5CHoAlzSZ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+ "source": [ + "import math\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "#data\n", + "x = np.linspace(0, 3, 1)\n", + "y=2\n", + "\n", + "#plotting\n", + "\n", + "plt.bar(1, y, 0.001*max(x))\n", + "\n", + "\n", + "xlabel(\"Frequency in kHz\")\n", + "ylabel(\"Voltage\")\n", + "title(\"Frequency Spectrum\")\n", + "plt.axis([0, 2, 0, 3])\n", + "plt.grid()\n", + "plt.show()\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4, Page 73" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEZCAYAAACNebLAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAG21JREFUeJzt3Xu0ZGV55/HvD9oLymB7G0SQ7hWCslBJK4oYdLqNUcGo\nOImIjgZbJwnL+0RdalDT42UlaxnHIFFjULSBSLwrKJJolBPwBgr0QBRQglxVvCByaYZweeaP2t0U\nxT7n1Dm965zd53w/a9Wi9t5v7XrqZXc99b7P3vukqpAkadQOix2AJKmfTBCSpFYmCElSKxOEJKmV\nCUKS1MoEIUlqZYKQJLUyQahTSS5LsjnJ9UluaP77kMWOazEkOTTJeUmuS/LzJP+aZNWE3/OOJL81\nyffQ8rFisQPQklPAH1TV6TM1SrJjVd2+QDEtuCR7AccDz62qqST3BZ4OTPozz3jl61Lvd3XLEYQm\nIXdbkaxqft2+LMnlwNea9Qcm+WaSXze/ttcOvWZ1kqkkv0nyL0n+LsmJzba1Sa4ceY8fJ/m95nmS\nvDnJJUl+keQTSVaOxHJEksubX/dHDe1nhyRHNa+9Psl3k+ye5P1J3jPynicneW1LH6wBLq2qKYCq\nuqmqPl9VVzWv25Dk001c1yf5XpL9hva7W5LPNLH9R5JXzxLfHkn+ren785v1h23ppyRvTPJT4KNJ\nXpLkz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wK8LMl9AZI8NMmDgTOA5ya5V5L/Ajx76DWXAY9rnh82sq9XNPfVJ8ne\nSe4zw3tfDDwkyf5N+52TbPk3dRxwDIORx2+m28EcFYMRyT5J3ji0froaxArgU8Cbquo/OopBy4gj\nCPXZrGfnVNVXk+wDfHtQguAG4MVVdV6STwHnA9cAZw+97D3Ap5oi9KlD6z/CYOro3Kae8XMGo4DW\nuKrq1iSHA+9PshODusfvM5gaOzfJ9cDH5vKBh/ff/nGrkrwQOLnZ/2kztP9dBqOXtyd5R9PumVX1\ns3nEpGXI231rWWjm5W+oqvcu0Ps9FPh6Ve2zEO8nTYJTTFLHkvwx8G0Gf7BF2m45gpAktXIEIUlq\nZYKQJLUyQUiSWpkgJEmtTBCSpFYmCElSq/8PK/+gYIz8oXAAAAAASUVORK5CYII=\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x8b6bd30>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "#data\n", + "x = np.linspace(0, 3, 1)\n", + "y=2\n", + "y1=1\n", + "\n", + "#plotting\n", + "plt.bar(1, y, 0.001*max(x))\n", + "plt.bar(1.5, y1, 0.001*max(x))\n", + "\n", + "\n", + "xlabel(\"Frequency in kHz\")\n", + "ylabel(\"Voltage\")\n", + "title(\"Frequency Spectrum\")\n", + "plt.axis([0, 2, 0, 3])\n", + "plt.grid()\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5, Page 74" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Bandwidth = 7.0 kHz\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "f1=7000 #Human Speech Frequency Upper limit in HZ\n", + "f2=50 #Human Speech Frequency Lower limit in Hz\n", + "\n", + "#Calculation\n", + "B=f1-f2 #Bandwidth in Hz\n", + "\n", + "#Result\n", + "print'Bandwidth = %.1f kHz'%(B*1000**-1)" + ] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6.ipynb new file mode 100644 index 00000000..cedf5209 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter6.ipynb @@ -0,0 +1,266 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Amplification" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1, Page 92" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ouput voltage of and amplifier = 15.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "Ri=1000 #Input Resistance of amplifier in Ohm\n", + "Rs=100 #Output Resistance of sensor in Ohm\n", + "Rl=50 #Load Resistance\n", + "Ro=10 #Output Resistance of amplifier in Ohm\n", + "Av=10 #Voltage gain\n", + "Vs=2 #Sensor voltage\n", + "\n", + "#Calculation\n", + "Vi=Ri*Vs*(Rs+Ri)**-1 #Input Voltage of Amplifier\n", + "Vo=Av*Vi*Rl*(Ro+Rl)**-1 #Output Voltage of Amplifier\n", + "\n", + "#Result\n", + "print'Ouput voltage of and amplifier = %.1f V'%Vo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2, Page 93" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Gain, Av = 8.35\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "Vo=15.2 #Output Voltage of Amplifier\n", + "Vi=1.82 #Input Voltage of Amplifier\n", + "\n", + "#Calculation\n", + "Av=Vo/Vi #Voltage gain\n", + "\n", + "#Result\n", + "print'Voltage Gain, Av = %.2f'%Av\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3, Page 94" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ouput voltage of and amplifier = 20.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "Av=10 #Voltage gain\n", + "Vi=2 #Input Voltage of Amplifier\n", + "Rl=50 #Load Resistance\n", + "Ro=0 #Output Resistance of amplifier in Ohm\n", + "\n", + "\n", + "#Calculation\n", + "Vo=Av*Vi*Rl/(Ro+Rl) #Output Voltage of Amplifier\n", + "\n", + "#Result\n", + "print'Ouput voltage of and amplifier = %.1f V'%Vo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4, Page 96" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Power, Po = 4.6 W\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "Vo=15.2 #Output Voltage\n", + "Rl=50 #Load Resistance\n", + "\n", + "#Calculation \n", + "Po=(Vo**2)/Rl #Output Power\n", + "\n", + "#Result\n", + "print'Output Power, Po = %.1f W'%Po" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5, Page 98" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power Gain, Ap = 1395\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "Vi=1.82 #Input Voltage of Amplifier\n", + "Ri=1000 #Input Resistance of amplifier in Ohm\n", + "Vo=15.2 #Output Voltage of Amplifier\n", + "Rl=50 #Load Resistance\n", + "\n", + "\n", + "#Calculation\n", + "Pi=(Vi**2)*Ri**-1 #Input Power in Watt\n", + "Po=(Vo**2)*Rl**-1 #Output Power in Watt\n", + "Ap=Po/Pi #Power Gain\n", + " \n", + "\n", + "#Result\n", + "print'Power Gain, Ap = %d'%Ap #wrong answer in textbook \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6, Page 99" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power Gain (dB) = 31.5 dB\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "P=1400 #Power gain\n", + "\n", + "#Calculation\n", + "pdb=10*math.log10(P) #Power Gain in dB\n", + "\n", + "#Result\n", + "print'Power Gain (dB) = %.1f dB'%pdb\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8.ipynb new file mode 100644 index 00000000..6b4d69e1 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter8.ipynb @@ -0,0 +1,206 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Operational Amplifier" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3, Page 148" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gain = 50\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "f=20*10**3 #bandwidth frequency in KHz\n", + "\n", + "#Calculation\n", + "gain=(10**6)/(f) #gain\n", + "\n", + "#Result\n", + "print'Gain = %d'%gain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4, Page 150" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Resistance = 7.5 mOhm\n", + "\n", + "Input Resistance = 20 GOhm\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#Initialisation\n", + "og=2*10**5 #Open Loop Gain\n", + "cg=20 #Closed Loop Gain\n", + "or1=75 #Output Resistance\n", + "ir1=2*10**6 #Input Resistance\n", + "\n", + "#Calculation\n", + "ab=og*cg**-1 #factor (1+AB)\n", + "or2=or1/ab #Output Resistance\n", + "ir2=ir1*ab #Input Resistance\n", + "\n", + "#Result\n", + "print'Output Resistance = %.1f mOhm\\n'%(or2*1000)\n", + "print'Input Resistance = %d GOhm'%(ir2*10**-9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5, Page 150" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Resistance = 7.5 mOhm\n", + "\n", + "Input Resistance = 1 KOhm\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "og=2*10**5 #Open Loop Gain\n", + "cg=20 #Closed Loop Gain\n", + "or1=75 #Output Resistance\n", + "ir1=2*10**6 #Input Resistance\n", + "r1=20*10**3 #Resistnce in Ohm\n", + "r2=10**3 #Resistnce in Ohm\n", + "\n", + "#Calculation\n", + "ab=og*cg**-1 #factor (1+AB)\n", + "or2=or1*ab**-1 #Output Resistance\n", + "#the input is connected to a virtual earth point by the resistance R2, \n", + "#so the input resistance is equal to R 2 ,\n", + "ir2=r2 #Input Resistance\n", + "\n", + "#Result\n", + "print'Output Resistance = %.1f mOhm\\n'%(or2*1000)\n", + "print'Input Resistance = %d KOhm'%(ir2*10**-3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6, Page 151" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Resistance = 375 uOhm\n", + "\n", + "Input Resistance = 400 GOhm\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "og=2*10**5 #Open Loop Gain\n", + "cg=1 #Closed Loop Gain\n", + "or1=75 #Output Resistance\n", + "ir1=2*10**6 #Input Resistance\n", + "\n", + "#Calculation\n", + "ab=og*cg**-1 #factor (1+AB)\n", + "or2=or1*ab**-1 #Output Resistance\n", + "ir2=ir1*ab #Input Resistance\n", + "\n", + "#Result\n", + "print'Output Resistance = %d uOhm\\n'%(or2*10**6) #wrong answer in the textbook\n", + "print'Input Resistance = %d GOhm'%(ir2*10**-9)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9.ipynb b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9.ipynb new file mode 100644 index 00000000..0d5a873d --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/Chapter9.ipynb @@ -0,0 +1,426 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Digital Electronics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8, Page 176" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decimal Equivalent = 26.000000\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "ni1=11010 #binary number\n", + "\n", + "#Calculation\n", + "def binary_decimal(ni): # Function to convert binary to decimal\n", + " deci = 0;\n", + " i = 0;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/10.)*10\n", + " ni = int(ni/10.);\n", + " deci = deci + rem*2**i;\n", + " i = i + 1;\n", + " return deci\n", + "\n", + "w=binary_decimal(ni1) #calling the function\n", + "\n", + "#Declaration\n", + "print'Decimal Equivalent = %f'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9, Page 176" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binary Equivalent = 11010\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialization\n", + "ni1=26 #Decimal number\n", + "\n", + "#Calculation\n", + "def decimal_binary(ni): # Function to convert decimal to binary\n", + " bini = 0;\n", + " i = 1;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/2)*2; \n", + " ni = int(ni/2);\n", + " bini = bini + rem*i;\n", + " i = i * 10;\n", + " return bini\n", + "\n", + "w=decimal_binary(ni1) #calling the function\n", + "\n", + "#Declaration\n", + "print'Binary Equivalent = %d'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10, Page 177" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decimal equivalent of 34.6875 = 100010.1011\n" + ] + } + ], + "source": [ + "import math\n", + "#Initializaton\n", + "\n", + "no=34.6875 #decimal number\n", + "n_int = int(no); # Extract the integral part\n", + "n_frac = no-n_int; # Extract the fractional part\n", + "\n", + "#Calculation\n", + "\n", + "def decimal_binary(ni): # Function to convert decimal to binary\n", + " bini = 0;\n", + " i = 1;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/2)*2; \n", + " ni = int(ni/2);\n", + " bini = bini + rem*i;\n", + " i = i * 10;\n", + " return bini\n", + "\n", + "def decifrac_binfrac(nf): # Function to convert binary fraction to decimal fraction\n", + " binf = 0; i = 0.1;\n", + " while (nf != 0):\n", + " nf = nf*2;\n", + " rem = int(nf); \n", + " nf = nf-rem;\n", + " binf = binf + rem*i;\n", + " i = i/10;\n", + " return binf\n", + "\n", + "\n", + "\n", + "#Result\n", + "print \"Decimal equivalent of 34.6875 = %.4f\"%(decimal_binary(n_int)+decifrac_binfrac(n_frac))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11, Page 177" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "W = 40979\n" + ] + } + ], + "source": [ + "import math\n", + "#initialization\n", + "n='A013' #Hex number \n", + "\n", + "#Calculation\n", + "w=int(n, 16) #Hex to Decimal Coversion\n", + "\n", + "\n", + "#Result\n", + "print'W = %d'%w" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12, Page 178" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The hexadecimal equivalent of 7046 is 0x1b86\n" + ] + } + ], + "source": [ + "import math\n", + "#Variable declaration\n", + "n=7046 #Hex number \n", + "\n", + "#Calculations\n", + "h = hex(n) #decimal to hex conversion\n", + "\n", + "#Result\n", + "print \"The hexadecimal equivalent of 7046 is\",h" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.13, Page 178" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decimal equivalent of 34.6875 = 1111100001010001\n" + ] + } + ], + "source": [ + "import math\n", + "#Initializaton\n", + "\n", + "n='f851' #Hex Number\n", + "\n", + "#Calculation\n", + "\n", + "w=int(n, 16) #Hex to Decimal Coversion\n", + "\n", + "def decimal_binary(ni): # Function to convert decimal to binary\n", + " bini = 0;\n", + " i = 1;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/2)*2; \n", + " ni = int(ni/2);\n", + " bini = bini + rem*i;\n", + " i = i * 10;\n", + " return bini\n", + "\n", + "\n", + "w1=decimal_binary(w) #calling the function\n", + "\n", + "\n", + "#Result\n", + "print \"Decimal equivalent of 34.6875 = %.d\"%(w1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.14, Page 179" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The hexadecimal equivalent of 111011011000100 is 0x76c4\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialiation\n", + "ni1=111011011000100 #binary number\n", + "\n", + "#Calculation\n", + "def binary_decimal(ni): # Function to convert binary to decimal\n", + " deci = 0;\n", + " i = 0;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/10.)*10\n", + " ni = int(ni/10.);\n", + " deci = deci + rem*2**i;\n", + " i = i + 1;\n", + " return deci\n", + "\n", + "w=binary_decimal(ni1) #calling the function\n", + "h = hex(w) #decimal to hex conversion\n", + "\n", + "#Result\n", + "print \"The hexadecimal equivalent of 111011011000100 is\",h" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "## Example 9.15, Page 182" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Eqivalent BCD of 72 = 1001010001010000\n" + ] + } + ], + "source": [ + "import math\n", + "#initialisation\n", + "x='9450' #decimal number to be convert\n", + "\n", + "#calculation\n", + "digits = [int(c) for c in x]\n", + "zero_padded_BCD_digits = [format(d, '04b') for d in digits]\n", + "\n", + "#results\n", + "print \"Eqivalent BCD of 72 = \",\n", + "print ''.join(zero_padded_BCD_digits)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.16, Page 182" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The equivalent decimal =3876.\n" + ] + } + ], + "source": [ + "import math\n", + "#Initialisation\n", + "BCD=\"0011 1000 0111 0110\" #Given BCD string\n", + "BCD_split=BCD.split(\" \"); #Splitting th binary string into individual BCD \n", + "d=0;\n", + "for i in range(len(BCD_split),0,-1):\n", + " d+=int(BCD_split[len(BCD_split)-i],2)*10**(i-1);\n", + "\n", + "#Result\n", + "print(\"The equivalent decimal = %d.\"%d);\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "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 +} diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1.png b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1.png Binary files differnew file mode 100644 index 00000000..1e4ff4d3 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic1.png diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2.png b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2.png Binary files differnew file mode 100644 index 00000000..8cdd1ca3 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic2.png diff --git a/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3.png b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3.png Binary files differnew file mode 100644 index 00000000..30eb3a12 --- /dev/null +++ b/Electrical_&_Electronic_Systems_by_Neil_Storey/screenshots/pic3.png diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_67BmtXx.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_67BmtXx.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_67BmtXx.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_LGPoR7F.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_LGPoR7F.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_LGPoR7F.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_PDCS2qh.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_PDCS2qh.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_PDCS2qh.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_lNjLAte.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_lNjLAte.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_lNjLAte.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_n5s4jXl.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_n5s4jXl.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_n5s4jXl.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_npy5vv0.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_npy5vv0.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_npy5vv0.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_pjpRgex.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_pjpRgex.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_pjpRgex.ipynb @@ -0,0 +1,571 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter10-STRESSES IN BEAMS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.1 page number 319\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) w= 5.76 KN/m\n", + "(ii) P= 9.72 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A simply supported beam of span 3.0 m has a cross-section 120 mm × 180 mm. If the permissible stress in the material of the beam is 10 N/mm^2\n", + "\n", + "b=float(120) \n", + "d=float(180) \n", + "\n", + "#I=(b*d^3)/12,Ymax=d/2\n", + "\n", + "Z=(b*pow(d,2))/6 \n", + "fper=float(10)\n", + "\n", + "L=3\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum udl beam can carry be w/metre length \n", + "#In this case, we know that maximum moment occurs at mid span and is equal to Mmax = (wL^2)/8\n", + "\n", + "w=(Mmax*8)/(pow(L,2)*1000000)\n", + "\n", + "print \"(i) w=\",round(w,2),\"KN/m\"\n", + "\n", + "# Concentrated load at distance 1 m from the support be P kN.\n", + "\n", + "a=float(1) #distance of point at which load is applied from left,m\n", + "b=float(2) #distance of point at which load is applied from right,m\n", + "\n", + "P=(L*Mmax)/(a*b*1000000)\n", + "\n", + "print \"(ii) P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.2 page number 320" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " P= 4.52 KN\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "#A circular steel pipe of external diameter 60 mm and thickness 8 mm is used as a simply supported beam over an effective span of 2 m. If permissible stress in steel is 150 N/mm^2, \n", + "\n", + "D=float(60) #external diameter,mm\n", + "d=float(44) #Thickness,mm\n", + "\n", + "I=(pi*(pow(D,4)-pow(d,4)))/64 #Area moment of inertia,mm^4\n", + "Ymax=float(30) #extreme fibre distance,mm\n", + "\n", + "Z=I/Ymax \n", + "fper=float(150)\n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#Let maximum load it can carry be P kN.\n", + "L=float(2)\n", + "P=(4*Mmax)/(L*1000000)\n", + "\n", + "print \" P=\",round(P,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.3 page number 321" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 68.49 KN/m\n" + ] + } + ], + "source": [ + "\n", + "#the cross-section of a cantilever beam of 2.5 m span. Material used is steel for which maximum permissible stress is 150 N/mm^2\n", + " \n", + "#variable declaration\n", + "\n", + "A=float(180) #width of I-beam,mm\n", + "H=float(400) #height of I-beam,mm\n", + "a=float(170) #width of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "h=float(380) #Height of inter rectancle if I-beam consider as Rectangle with width 10,mm\n", + "\n", + "I=((A*pow(H,3))/12)-((a*pow(h,3))/12)\n", + "ymax=float(200) #extreme fibre,mm\n", + "\n", + "Z=I/ymax\n", + "fper=float(150) \n", + "\n", + "Mmax=fper*Z\n", + "\n", + "#If udl is w kN/m, maximum moment in cantilever\n", + "\n", + "L=2 #m\n", + "\n", + "w=Mmax/(L*1000000)\n", + "print \"w=\",round(w,2),\"KN/m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.4 page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 8.608\n", + "(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection= 6.087\n", + "(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection= 10.171\n" + ] + } + ], + "source": [ + "#Compare the moment carrying capacity of the section given in example 10.3 with equivalent section of the same area but (i) square section (ii) rectangular section with depth twice the width and (iii) a circular section.\n", + "\n", + "from math import sqrt,pi\n", + "#variable declaration\n", + "\n", + "A=180.0*10.0+380.0*10.0+180.0*10.0\n", + "\n", + "#If ‘a’ is the size of the equivalent square section, \n", + "\n", + "a=float(sqrt(A)) #mm\n", + "\n", + "I=(a*pow(a,3))/12 #Moment of inertia of this section, mm^4\n", + "\n", + "ymax=a/2\n", + "\n", + "Z=I/ymax\n", + "\n", + "f=150.0 \n", + "\n", + "Mcc=f*Z #Moment carrying capacity\n", + "\n", + "MccI=136985000.0\n", + "\n", + "Ratio=MccI/Mcc\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "\n", + "#Equivalent rectangular section of depth twice the width. Let b be the width,Depth d = 2b. Equating its area to area of I-section,we get\n", + "b=sqrt(7400/2)\n", + "\n", + "ymax=b\n", + "\n", + "I=b*(pow((2*b),3))/12\n", + " \n", + "M=f*I/ymax\n", + "\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(ii) Moment carryingcapacity of I-section/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n", + "\n", + "#Equivalent circular section. Let diameter be d.\n", + "\n", + "d=sqrt(7400*4/pi)\n", + "\n", + "I=(pi*pow(d,4))/64\n", + "ymax=d/2\n", + "Z=I/ymax\n", + "fper=float(150)\n", + "M=fper*Z\n", + "\n", + "MccI=136985000\n", + "\n", + "Ratio=MccI/M\n", + "print \"(i) Moment carryingcapacity of Isection/ Moment carryingcapacityof equivalent squaresection=\",round(Ratio,3)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.5 page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 127.632 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#A symmetric I-section of size 180 mm × 40 mm, 8 mm thick is strengthened with 240 mm × 10 mm rectangular plate on top flange. If permissible stress in the material is 150 N/mm^2, determine how much concentrated load the beam of this section can carry at centre of 4 m span. \n", + "\n", + "b1=float(240)\n", + "b=float(180)\n", + "t=float(10)\n", + "h=float(400)\n", + "w=float(8)\n", + " \n", + "A=float(240*10+180*8+384*8+180*8) #Area of section,A\n", + "\n", + "Y=(240*10*405+180*8*(400-4)+384*8*200+180*8*4)/A\n", + "\n", + "I=(b1*pow(t,3)/12)+(b1*t*(pow(((h+5)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow(((h-4)-Y),2)))+(w*pow((h-16),3)/12)+((h-16)*w*(pow(((h/2)-Y),2)))+(b*pow(w,3)/12)+(b*w*(pow((4-Y),2)))\n", + "\n", + "ytop=(h+t/2)-Y\n", + "ybottom=Y\n", + "ymax=Y\n", + "\n", + "Z=I/ymax\n", + "fper=150\n", + "M=fper*Z/1000000 #Momnent carrying capacity of the section\n", + "\n", + "#Let P kN be the central concentrated load the simply supported beam can carry. Then max bending movement in the beam\n", + "\n", + "P=M*4/(w/2)\n", + "\n", + "print \"P=\",round(P,3),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.6 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "w= 2.734 KN/m\n", + "calculation mistake in book\n" + ] + } + ], + "source": [ + "#The cross-section of a cast iron beam. The top flange is in compression and bottom flange is in tension. Permissible stress in tension is 30 N/mm^2 and its value in compression is 90 N/mm^2\n", + "#variable declaration\n", + "from math import sqrt\n", + "b1=float(75)\n", + "h1=50\n", + "h2=50\n", + "b2=float(150)\n", + "t=float(25)\n", + "h=float(200)\n", + "\n", + " \n", + "A=float(75*50+25*100+150*50) #Area of section,A\n", + "\n", + "Y=(75*50*175+25*100*100+150*50*25)/A\n", + "\n", + "I=(b1*pow(h1,3)/12)+(b1*h1*(pow(((h-(h1/2))-Y),2)))+(t*pow((h-h1-h2),3)/12)+(t*(h-h1-h2)*(pow(((h/2)-Y),2)))+(b2*pow(h2,3)/12)+(b2*h2*(pow(((h2/2)-Y),2)))\n", + "\n", + "\n", + "\n", + "ytop=(h-Y)\n", + "ybottom=Y\n", + "\n", + "\n", + "Z1=I/ytop\n", + "fperc=90\n", + "#Top fibres are in compression. Hence from consideration of compression strength, moment carrying capacity of the beam is given by\n", + "\n", + "M1=fperc*Z1/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "#Bottom fibres are in tension. Hence from consideration of tension, moment carrying capacity of the section is given by\n", + "\n", + "Z2=I/ybottom\n", + "\n", + "fpert=30 \n", + "\n", + "M2=fpert*Z2/1000000 #Momnent carrying capacity of the section,KN-m.\n", + "\n", + "\n", + "#Actual moment carrying capacity is the lower value of the above two values. Hence moment carrying capacity of the section is \n", + "Mmax=min(M1,M2)\n", + "\n", + "L=float(5)\n", + "w=sqrt(Mmax*8/pow(L,2))\n", + "\n", + "print\"w=\",round(w,3),\"KN/m\"\n", + "print\"calculation mistake in book\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example10.7 page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "y= 5.0 m\n", + "f= 5.24 N/mm^2\n" + ] + } + ], + "source": [ + "#The diameter of a concrete flag post varies from 240 mm at base to 120 mm at top. The height of the post is 10 m. If the post is subjected to a horizontal force of 600 N at top\n", + "#Consider a section y metres from top. Diameter at this section is d.\n", + "#d=120+12*y\n", + "#I=pi*pow(d,4)/64\n", + "#Z=I*2/d=pi*pow(d,3)/32\n", + "#variable declaration \n", + "#M=600*1000*y #moment,N-mm\n", + "#f*Z=M,f is extreme fibre stress.\n", + "y=float(5) \n", + "print \"y=\",round(y,2),\"m\"\n", + "\n", + "#Stress at this section f is given by\n", + "P=600\n", + "M=P*y*1000\n", + "d=120+12*y\n", + "I=pi*pow(d,4)/64\n", + "Z=I*2/d\n", + "\n", + "f=M/Z\n", + "\n", + "print \"f=\",round(f,3),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.9 page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b= 150.0 mm\n", + "d= 300.0 mm\n" + ] + } + ], + "source": [ + "#Design a timber beam is to carry a load of 5 kN/m over a simply supported span of 6 m. Permissible stress in timber is 10 N/mm2. Keep depth twice the width.\n", + "\n", + "#variable declaration\n", + "w=float(5) #KN/m\n", + "L=float(6) #m \n", + "\n", + "M=w*1000000*pow(L,2)/8 #Maximum bending moment,N-mm\n", + "\n", + "#Let b be the width and d the depth. Then in this problem d = 2b.\n", + "#Z=b*pow(d,2)/6=2*(b**3)/3\n", + "f=10 #N/mm^2\n", + "#f*Z=M\n", + "b=float(((M*3)/(2*f))**(0.3333))\n", + "print \"b=\",round(b),\"mm\"\n", + "\n", + "d=2*b\n", + "print \"d=\",round(d),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.10 page number 329\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 164.3 mm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "#A cantilever of 3 m span, carrying uniformly distributed load of 3 kN/m is to be designed using cast iron rectangular section. Permissible stresses in cast iron are f = 30 N/mm^2 in tension and fc = 90 N/mm^2 in compression\n", + "\n", + "L=float(3) #Span of cantilever,m\n", + "w=float(3) #uniformly distributed load,KN/m\n", + "\n", + "M=w*1000000*pow(L,2)/2 #Maximum moment,N-mm\n", + "#let b be the width and d the depth\n", + "#Z=b*pow(d,2)/6\n", + "\n", + "#Since it is rectangular section, N-A lies at mid-depth, and stresses at top and bottom are same. Hence, permissible tensile stress value is reached earlier and it governs the design.\n", + "fper=30 #N/mm^2\n", + "b=100 #mm\n", + "f=30 \n", + "\n", + "#f*Z=M\n", + "\n", + "d=sqrt((M*6)/(b*f))\n", + "\n", + "print \"d=\",round(d,1),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 10.11 page number 330" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d= 23.11 mm\n", + "select 25mm bar \n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the diameter of the bar be ‘d’. Now, W = 800 N L = 1 m = 1000 mm\n", + "L=1000\n", + "W=800\n", + "M=W*L/4 #Maximum moment,N-mm\n", + "f=150 #permissible stress,N/mm^2\n", + "\n", + "d=float((((M*32)/(pi*f)))**(0.33))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "print \"select 25mm bar \"\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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_IE4byFL.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_IE4byFL.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_IE4byFL.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_RAQoou9.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_RAQoou9.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_RAQoou9.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_VcicGy5.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_VcicGy5.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_VcicGy5.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_hoqMFBX.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_hoqMFBX.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_hoqMFBX.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_iBTGbp8.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_iBTGbp8.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_iBTGbp8.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_k1rTVhh.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_k1rTVhh.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_k1rTVhh.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_nGrFEGY.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_nGrFEGY.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_nGrFEGY.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_pfzLlc6.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_pfzLlc6.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_pfzLlc6.ipynb @@ -0,0 +1,654 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter11-PRINCIPAL STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.2 page number 352" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) P= 14726.22 N\n", + "(b) P= -44178.65 N compressive\n", + "Material fails because of maximum shear and not by axial compression.\n", + "P= 24544.0 N\n", + "The plane of qmax is at 45° to the plane of px. \n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "\n", + "#A material has strength in tension, compression and shear as 30N/mm2, 90 N/mm2 and 25 N/mm2, respectively. If a specimen of diameter 25 mm is tested in tension and compression identity the failure surfaces and loads. \n", + "\n", + "#variable declaration\n", + "\n", + "#In tension: Let axial direction be x direction. Since it is uniaxial loading, py = 0, q = 0 and only px exists.when the material is subjected to full tensile stress, px = 30 N/mm^2.\n", + "\n", + "pt=float(30)\n", + "pc=float(90)\n", + "ps=float(25)\n", + "\n", + "d=float(25)\n", + "px=float(30) #N/mm^2\n", + "py=0\n", + "q=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "qmax=(px-py)/2\n", + "\n", + "#Hence failure criteria is normal stress p1\n", + "\n", + "A=pi*pow(d,2)/4\n", + "\n", + "#Corresponding load P is obtained by\n", + "p=p1\n", + "P=p1*A\n", + "\n", + "print \"(a) P=\",round(P,2),\"N\"\n", + "\n", + "#In case of compression test,\n", + "\n", + "px=-pc\n", + "py=q=0\n", + "\n", + "P=-px*A\n", + "\n", + "print \"(b) P=\",round((-P),2),\"N compressive\"\n", + "\n", + "#at this stage\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print \"Material fails because of maximum shear and not by axial compression.\"\n", + "qmax=25\n", + "px=2*qmax\n", + "\n", + "P=px*A\n", + "print\"P=\",round(P),\"N\"\n", + "print \"The plane of qmax is at 45° to the plane of px. \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.3 page number 354" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pn= 30.0 N/mm^2\n", + "pt= 86.6 N/mm^2\n", + "p= 91.65 N/mm^2\n", + "alpha= 19.1 °\n" + ] + } + ], + "source": [ + "#The direct stresses at a point in the strained material are 120 N/mm2 compressive and 80 N/mm2 tensile. There is no shear stress.\n", + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "\n", + "#The plane AC makes 30° (anticlockwise) to the plane of px (y-axis). Hence theta= 30°. px = 80 N/mm^2 py = – 120 N/mm^2 ,q = 0\n", + "\n", + "px=float(80)\n", + "py=float(-120)\n", + "q=float(0)\n", + "theta=30\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta*pi/180)+q*sin(2*theta*pi/180)\n", + "\n", + "print\"pn=\",round(pn),\"N/mm^2\"\n", + "\n", + "pt=((px-py)/2)*sin(2*theta*pi/180)-q*cos(2*theta*pi/180)\n", + "\n", + "print\"pt=\",round(pt,1),\"N/mm^2\"\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print\"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "alpha=atan(pn/pt)*180/pi\n", + "\n", + "print \"alpha=\", round(alpha,1),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.4 page number 355" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 37.98 ° and 127.98 °\n", + "p1= 278.08 N/mm^2\n", + "p2= 71.92 N/mm^2\n", + "qmax= 103.08 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(200) #N/mm^2\n", + "py=float(150) #N/mm^2\n", + "q=float(100) #N/mm^2\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.5 page number 356" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= 82.8 N/mm^2\n", + "p2= -62.8 N/mm^2\n", + "qmax= 72.8 N/mm^2\n", + "theta= 7.97 ° and 97.97 °\n", + "theta'= 37.03 ° and= 52.97 °\n", + "answer in book is wrong\n" + ] + } + ], + "source": [ + "\n", + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(80) #N/mm^2\n", + "py=float(-60) #N/mm^2\n", + "q=float(20) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n", + "\n", + "#Planes of maximum shear make 45° to the above planes.\n", + "theta11=45-theta1\n", + "theta22=theta2-45\n", + "print\"theta'=\",round(theta11,2),\"°\",\"and=\",round(theta22,2),\"°\"\n", + "\n", + "print\"answer in book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.6 page number 357" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1= -35.96 N/mm^2\n", + "p2= -139.04 N/mm^2\n", + "qmax= 51.54 N/mm^2\n", + "theta= 37.98 ° and 127.98 °\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-100) #N/mm^2\n", + "py=float(-75) #N/mm^2\n", + "q=float(-50) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "theta2=90+theta1\n", + "print\"theta=\",round(theta1,2),\"°\" \" and \",round(theta2,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.7 page number 358" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 131.07 N/mm^2\n", + "p2= -81.07 N/mm^2\n", + "(ii) qmax= 106.07 N/mm^2\n", + "theta= -22.5 ° clockwise\n", + "theta2= 22.5 °\n", + "p= 108.97 N/mm^2\n", + "phi= 13.3 °\n", + "mitake in book answer is wrong\n" + ] + } + ], + "source": [ + "from math import sqrt,cos,sin,atan,pi\n", + "#variable declaration\n", + "#Let the principal plane make anticlockwise angle theta with the plane of px with y-axis. Then\n", + "\n", + "px=float(-50) #N/mm^2\n", + "py=float(100) #N/mm^2\n", + "q=float(75) #N/mm^2\n", + "\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"(i) p1=\",round(p1,2),\"N/mm^2\"\n", + "\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "\n", + "print \"p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"(ii) qmax=\",round(qmax,2),\"N/mm^2\"\n", + "\n", + "#let theta be the inclination of principal stress to the plane of px.\n", + "\n", + "\n", + "theta1=(atan((2*q)/(px-py))*180)/(pi*2) \n", + "\n", + "print\"theta=\",round(theta1,2),\"°\" \" clockwise\"\n", + "\n", + "#Plane of maximum shear makes 45° to it \n", + "\n", + "theta2=theta1+45\n", + "print\"theta2=\",round(theta2,2),\"°\" \n", + "\n", + "#Normal stress on this plane is given by\n", + "\n", + "pn=((px+py)/2)+((px-py)/2)*cos(2*theta2*pi/180)+q*sin(2*theta2*pi/180)\n", + "\n", + "pt=qmax\n", + "\n", + "#Resultant stress\n", + "p=sqrt(pow(pn,2)+pow(pt,2))\n", + "\n", + "print \"p=\",round(p,2),\"N/mm^2\"\n", + "\n", + "#Let ‘p’ make angle phi to tangential stress (maximum shear stress plane). \n", + "\n", + "phi=atan(pn/pt)*180/pi\n", + "\n", + "print \"phi=\",round(phi,1),\"°\"\n", + "\n", + "#there is mistake in book\n", + "print\"mitake in book answer is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.9 page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 0.17 N/mm^2\n", + " p2= -84.17 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "w=float(100) #wide of rectangular beam,mm\n", + "h=float(200) #height or rectangular beam dude,mm\n", + "\n", + "I=w*pow(h,3)/12\n", + "\n", + "#At point A, which is at 30 mm below top fibre \n", + "y=100-30\n", + "M=float(80*1000000) #sagging moment,KN-m\n", + "\n", + "fx=M*y/I\n", + "\n", + "px=-fx\n", + "F=float(100*1000 ) #shear force,N\n", + "b=float(100)\n", + "A=b*30\n", + "y1=100-15\n", + "\n", + "q=(F*(A*y1))/(b*I) #shearing stress,N/mm^2\n", + "\n", + "py=0\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.10 page number 362\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) p1= 0.8333 N/mm^2\n", + " p2= -0.8333 N/mm^2\n", + "theta= 45.0 ° and 135.0 °\n", + "(ii) p1= 0.0122 N/mm^2\n", + " p2= -32.4196 N/mm^2\n", + "theta= -1.0 ° and 89.0 °\n", + "mistake in book\n", + "(iii) p1= 0.0 N/mm^2\n", + " p2= -64.8148 N/mm^2\n", + "theta= -0.0 ° and 90.0 °\n" + ] + } + ], + "source": [ + "from math import sqrt,atan\n", + "\n", + "P1=float(20) #vertical loading from A at distance of 1m,KN.\n", + "P2=float(20) #vertical loading from A at distance of 2m,KN.\n", + "P3=float(20) #vertical loading from A at distance of 3m,KN.\n", + "Ra=(P1+P2+P3)/2 #Due to symmetry\n", + "\n", + "Rb=Ra \n", + "#At section 1.5 m from A\n", + "F=(Ra-P1)*1000\n", + "M=float((Ra*1.5-P1*0.5)*1000000)\n", + "b=float(100)\n", + "h=float(180)\n", + "\n", + "I=float((b*pow(h,3))/12)\n", + "\n", + "# Bending stress \n", + "#f=M*y/I\n", + "y11=0\n", + "f1=(-1)*M*y11/I\n", + "y22=45\n", + "f2=(-1)*M*y22/I\n", + "y33=90\n", + "f3=(-1)*M*y33/I\n", + "#Shearing stress at a fibre ‘y’ above N–A is\n", + "#q=(F/(b*I))*(A*y1)\n", + "#at y=0,\n", + "y1=45\n", + "A1=b*90\n", + "q1=(F/(b*I))*(A1*y1)\n", + "#at y=45\n", + "y2=float(90-45/2)\n", + "A2=b*45\n", + "q2=(F/(b*I))*(A2*y2)\n", + "#at y=90\n", + "q3=0\n", + "\n", + "#(a) At neutral axis (y = 0) : The element is under pure shear \n", + "\n", + "py=0\n", + "\n", + "p1=(f1+py)/2+sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "\n", + "p2=(f1+py)/2-sqrt(pow(((f1-py)/2),2)+pow(q1,2))\n", + "print \"(i) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "theta1=45\n", + "theta2=theta1+90\n", + "print\"theta=\",round(theta1),\"°\",\" and \",round(theta2),\"°\"\n", + "\n", + "#(b) At (y = 45)\n", + "py=0 \n", + "\n", + "p1=(f2+py)/2+sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "\n", + "p2=(f2+py)/2-sqrt(pow(((f2-py)/2),2)+pow(q2,2))\n", + "print \"(ii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetab1=(atan((2*q2)/(f2-py))*180)/(pi*2)\n", + "thetab2=thetab1+90\n", + "print\"theta=\",round(thetab1),\"°\",\" and \",round(thetab2),\"°\"\n", + "#mistake in book\n", + "print\"mistake in book\"\n", + "\n", + "#(c) At Y=90\n", + "\n", + "py=0\n", + "\n", + "p1=(f3+py)/2+sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "\n", + "p2=(f3+py)/2-sqrt(pow(((f3-py)/2),2)+pow(q3,2))\n", + "print \"(iii) p1=\",round(p1,4),\"N/mm^2\"\n", + "print \" p2=\",round(p2,4),\"N/mm^2\"\n", + "\n", + "thetac1=(atan((2*q3)/(f3-py))*180)/(pi*2)\n", + "thetac2=thetac1+90\n", + "print\"theta=\",round(thetac1),\"°\",\" and \",round(thetac2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 11.11 page number 364\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " p1= 5.21 N/mm^2\n", + " p2= -107.56 N/mm^2\n", + "qmax= 56.38 N/mm^2\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "L=float(6) #m\n", + "w=float(60) #uniformly distributed load,KN/m\n", + "Rs=L*w/2 #Reaction at support,KN\n", + "\n", + "#Moment at 1.5 m from support\n", + "M =float( Rs*1.5-(w*pow(1.5,2)/2))\n", + "#Shear force at 1.5 m from support \n", + "F=Rs-1.5*w\n", + "\n", + "B=float(200) #width of I-beam,mm\n", + "H=float(400) #height or I-beam,mm\n", + "b=float(190)\n", + "h=float(380)\n", + "I= (B*pow(H,3)/12)-(b*pow(h,3)/12)\n", + "\n", + "#Bending stress at 100 mm above N–A\n", + "y=100\n", + "\n", + "f=M*1000000*y/I\n", + "\n", + "#Thus the state of stress on an element at y = 100 mm, as px = f,py=0\n", + "px=-f\n", + "py=0\n", + "A=200*10*195+10*90*145\n", + "q=(F*1000*(A))/(10*I) #shearing stress,N/mm^2\n", + "\n", + "p1=(px+py)/2+sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "p2=(px+py)/2-sqrt(pow(((px-py)/2),2)+pow(q,2))\n", + "print \" p1=\",round(p1,2),\"N/mm^2\"\n", + "print \" p2=\",round(p2,2),\"N/mm^2\"\n", + "\n", + "\n", + "qmax=sqrt((pow((px-py)/2,2))+pow(q,2))\n", + "\n", + "print\"qmax=\",round(qmax,2),\"N/mm^2\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_1FJHa67.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_1FJHa67.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_1FJHa67.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_2wryDDQ.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_2wryDDQ.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_2wryDDQ.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_BuZVTIP.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_BuZVTIP.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_BuZVTIP.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_UCsno1y.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_UCsno1y.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_UCsno1y.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Yd7uN6t.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Yd7uN6t.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_Yd7uN6t.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_bGP3Wsd.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_bGP3Wsd.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_bGP3Wsd.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_pFJzyF5.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_pFJzyF5.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_pFJzyF5.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1-INTRODUCTION TO MECHANICS OF SOLIDS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example1.1 Page number 10\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The resultant velocity : 21.54 km/hour\n", + "68.2 °\n" + ] + } + ], + "source": [ + "#downstream direction as x\n", + "#direction across river as y\n", + "\n", + "from math import sqrt,atan,pi\n", + "\n", + "#variable declaration\n", + "\n", + "Vx= 8 #velocity of stream, km/hour\n", + "Vy=float(20) #velocity of boat,km/hour\n", + "\n", + "V=sqrt(pow(Vx,2)+pow(Vy,2)) #resultant velocity, km/hour\n", + "theta=Vy/Vx\n", + "\n", + "alpha= atan(theta)*180/pi #angle, degrees \n", + "\n", + "print \" The resultant velocity :\",round(V,2),\"km/hour\"\n", + "print round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.2 Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10.0 KN (to the left)\n", + "17.32 KN (downward)\n" + ] + } + ], + "source": [ + "\n", + "\n", + "\n", + "#components of force in horizontal and vertical components. \n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "\n", + "F= 20 #force in wire, KN\n", + "\n", + "#calculations\n", + "Fx= F*cos(60*pi/180) \n", + "Fy= F*sin(60*pi/180)\n", + "\n", + "print round(Fx,2),\"KN\" ,\"(to the left)\"\n", + "print round(Fy,2), \"KN\" ,\"(downward)\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.3 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Component normal to the plane : 9.4 KN\n", + "Component parallel to the plane : 3.42 KN\n" + ] + } + ], + "source": [ + "\n", + "\n", + " #The plane makes an angle of 20° to the horizontal. Hence the normal to the plane makes an angles of 70° to the horizontal i.e., 20° to the vertical\n", + "from math import cos,sin,pi\n", + "#variable declaration\n", + "W= 10 # black weighing, KN\n", + "\n", + "#calculations\n", + "\n", + "Nor= W*cos(20*pi/180) #Component normal to the plane\n", + "para= W*sin(20*pi/180) #Component parallel to the plane\n", + "\n", + "print \"Component normal to the plane :\",round(Nor,2),\"KN\"\n", + "print \"Component parallel to the plane :\",round(para,2) , \"KN\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.4 Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 100.0 N\n", + "F2= 200.0 N\n", + "theta= 63.9 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let the magnitude of the smaller force be F. Hence the magnitude of the larger force is 2F\n", + "\n", + "from math import pi,sqrt, acos\n", + "#variable declaration\n", + "R1=260 #resultant of two forces,N\n", + "R2=float(180) #resultant of two forces if larger force is reversed,N\n", + "\n", + "\n", + "\n", + "#calculations\n", + "\n", + "F=sqrt((pow(R1,2)+pow(R2,2))/10)\n", + "F1=F\n", + "F2=2*F\n", + "theta=acos((pow(R1,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*180/pi\n", + "\n", + "print \"F1=\",F1,\"N\"\n", + "print \"F2=\",F2,\"N\"\n", + "print \"theta=\",round(theta,1),\"°\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.5 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "F1= 326.35 N\n", + "F2= 223.24 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ?ABC be the triangle of forces drawn to some scale\n", + "#Two forces F1 and F2 are acting at point A\n", + "#angle in degrees '°'\n", + "\n", + "from math import sin,pi\n", + " \n", + "#variabble declaration\n", + "cnv=pi/180\n", + "\n", + "BAC = 20*cnv #Resultant R makes angle with F1 \n", + " \n", + "ABC = 130*cnv \n", + "\n", + "ACB = 30*cnv \n", + "\n", + "R = 500 #resultant force,N\n", + "\n", + "#calculations\n", + "#sinerule\n", + "\n", + "F1=R*sin(ACB)/sin(ABC)\n", + "F2=R*sin(BAC)/sin(ABC)\n", + "\n", + "print \"F1=\",round(F1,2),\"N\"\n", + "print \"F2=\",round(F2,2),\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.6 Page number 12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 78.13 °\n", + "alpha= 29.29 °\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#Let ABC be the triangle of forces,'theta' be the angle between F1 and F2, and 'alpha' be the angle between resultant and F1 \n", + "\n", + "from math import sin,acos,asin,pi\n", + "\n", + "#variable declaration\n", + "cnv= 180/pi\n", + "F1=float(400) #all forces are in newtons,'N'\n", + "F2=float(260)\n", + "R=float(520)\n", + "\n", + "#calculations\n", + "\n", + "theta=acos((pow(R,2)-pow(F1,2)-pow(F2,2))/(2*F1*F2))*cnv\n", + "\n", + "alpha=asin(F2*sin(theta*pi/180)/R)*cnv\n", + "\n", + "print\"theta=\",round(theta,2),\"°\"\n", + "print \"alpha=\",round(alpha,2),\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 1.7 Page number 13" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "horizontal component= 2814.2 N\n", + "Vertical component = 1039.2 N\n", + "Component along crank = 507.1 N\n", + "Component normal to crank= 2956.8 N\n" + ] + } + ], + "source": [ + "\n", + "\n", + "#The force of 3000 N acts along line AB. Let AB make angle alpha with horizontal.\n", + "\n", + "from math import cos,sin,pi,asin,acos\n", + "\n", + "#variable declaration\n", + "F=3000 #force in newtons,'N'\n", + "BC=80 #length of crank BC, 'mm'\n", + "AB=200 #length of connecting rod AB ,'mm'\n", + "theta=60*pi/180 #angle b/w BC & AC\n", + "\n", + "#calculations\n", + "\n", + "alpha=asin(BC*sin(theta)/200)*180/pi\n", + "\n", + "HC=F*cos(alpha*pi/180) #Horizontal component \n", + "VC= F*sin(alpha*pi/180) #Vertical component \n", + "\n", + "#Components along and normal to crank\n", + "#The force makes angle alpha + 60 with crank.\n", + "alpha2=alpha+60\n", + "CAC=F*cos(alpha2*pi/180) # Component along crank \n", + "CNC= F*sin(alpha2*pi/180) #Component normal to crank \n", + "\n", + "\n", + "print \"horizontal component=\",round(HC,1),\"N\"\n", + "print \"Vertical component = \",round(VC,1),\"N\"\n", + "print \"Component along crank =\",round(CAC,1),\"N\"\n", + "print \"Component normal to crank=\",round(CNC,1),\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_242icmu.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_242icmu.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_242icmu.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_Rcy1wii.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_Rcy1wii.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_Rcy1wii.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_TvxYpxT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_TvxYpxT.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_TvxYpxT.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_VU0Vuul.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_VU0Vuul.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_VU0Vuul.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_Xiz19Ms.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_Xiz19Ms.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_Xiz19Ms.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_rAG8C10.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_rAG8C10.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_rAG8C10.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xUN650b.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xUN650b.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_xUN650b.ipynb @@ -0,0 +1,1857 @@ +{ + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_0WKL8dM.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_0WKL8dM.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_0WKL8dM.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_BsRbQCe.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_BsRbQCe.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_BsRbQCe.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_IF7BAbT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_IF7BAbT.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_IF7BAbT.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_Qh2uphO.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_Qh2uphO.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_Qh2uphO.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_WS64jkH.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_WS64jkH.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_WS64jkH.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_aM1BqRM.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_aM1BqRM.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_aM1BqRM.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_tEQK8Lr.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_tEQK8Lr.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_tEQK8Lr.ipynb @@ -0,0 +1,1030 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter3-TRUSSES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.1 Page number68" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 45.0 °\n", + "FCB= 56.57 KN\n", + "FCD= 40.0 KN\n", + "FDB= 40.0 KN\n", + "FDE= 40.0 KN\n", + "FBE= 113.14 KN\n", + "FBA= 120.0 KN\n", + "Member , Magnitude of Force in KN , Nature\n", + "AB , 120.0 , Tension\n", + "BC , 56.57 , Tension\n", + "CD , 40.0 , Compresion\n", + "DE , 40.0 , Compresion\n", + "BE , 113.14 , Compresion\n", + "BD , 40.0 , Tension\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "#Determine the inclinations of all inclined members\n", + "\n", + "theta=atan(1)*180/pi\n", + "\n", + "print \"theta=\",round(theta,2),\"°\"\n", + "\n", + "#Now at joints C, there are only two unknowns,forces in members CB and CD, say FCB and FCD.\n", + "#Now there are two equations of equilibrium for the forces meeting at the joint and two unknown forces. Hence, the unknown forces can be determined. At joint C sum V= 0 condition shows that the force FCB should act away from the joint C so that its vertical component balances the vertical downward load at C.\n", + " \n", + "P=40.0\n", + "FCB=P/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\"\n", + "\n", + "#Now sum H=0 indicates that FCD should act towards C.\n", + "\n", + "FCD=FCB*cos(theta*pi/180)\n", + "\n", + "print \"FCD=\",round(FCD,2),\"KN\"\n", + "\n", + "#In the present case, near the joint C, the arrows are marked on the members CB and CD to indicate forces FCB and FCD directions as found in the analysis of joint C. Then reversed directions are marked in the members CB and CD near joints B and D, respectively.\n", + "\n", + "FDB=40.0\n", + "FDE=40.0\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\"\n", + "\n", + "print \"FDE=\",round(FDE,2),\"KN\"\n", + "\n", + "#In the present case, after marking the forces in the members DB and DE, we find that analysis of joint B can be taken up.\n", + "\n", + "FBE=(FCB*sin(theta*pi/180)+P)/(sin(theta*pi/180))\n", + "\n", + "FBA=FCB*cos(theta*pi/180)+FBE*cos(theta*pi/180)\n", + "\n", + "print \"FBE=\", round(FBE,2),\"KN\"\n", + "print \"FBA=\", round(FBA,2),\"KN\"\n", + "#Determine the nature of forces in each member and tabulate the results. Note that if the arrow marks on a member are towards each other, then the member is in tension and if the arrow marks are away from each other, the member is in compression.\n", + "\n", + "print \"Member\",\",\",\"Magnitude of Force in KN\",\",\",\"Nature\"\n", + "print \"AB\",\",\", round(FBA,2) ,\",\",\"Tension\"\n", + "print \"BC\",\",\", round(FCB,2) ,\",\",\"Tension\"\n", + "print \"CD\",\",\", round(FCD,2) ,\",\",\"Compresion\"\n", + "print \"DE\",\",\", round(FDE,2) ,\",\",\"Compresion\"\n", + "print \"BE\",\",\", round(FBE,2) ,\",\",\"Compresion\"\n", + "print \"BD\",\",\", round(P,2) ,\",\",\"Tension\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.2 Page number70" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 83.7158 KN (Comp.)\n", + "FAE= 41.8579 KN (Tension)\n", + "FDC= 89.4893 KN (Comp.)\n", + "FDE= 44.7446 KN (Tension)\n", + "FBC= 60.6218 KN (Comp.)\n", + "FCE= 31.7543 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=40.0\n", + "PC=50.0\n", + "PE=60.0\n", + "\n", + "theta=60.0\n", + "\n", + "RD=(PC*3+PE*2+PB*1)/(4.0)\n", + "\n", + "RA=PB+PC+PE-RD\n", + "\n", + "FAB=RA/sin(theta*pi/180)\n", + "\n", + "print\"FAB=\",round(FAB,4),\"KN\" ,\"(Comp.)\"\n", + "\n", + "FAE=FAB*cos(theta*pi/180)\n", + "\n", + "print\"FAE=\",round(FAE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FDC=RD/sin(theta*pi/180)\n", + "\n", + "print\"FDC=\",round(FDC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FDE=FDC*cos(theta*pi/180)\n", + "\n", + "print\"FDE=\",round(FDE,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBE=(FAB*sin(theta*pi/180)-PB)/sin(theta*pi/180)\n", + "\n", + "FBC=(FAB+FBE)*(0.5)\n", + "print\"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "FCE=(FDC*sin(theta*pi/180)-PC)/(sin(theta*pi/180))\n", + "print\"FCE=\",round(FCE,4),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.3 Page number72" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAB= 23.09 KN [Comp.]\n", + "FAC= 11.55 KN [Tensile]\n", + "FDB= 20.0 KN [Comp.]\n", + "FDC= 17.32 KN [Tensile]\n", + "FCB= 11.55 KN FCB= 11.55 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#variable declaration\n", + "\n", + "PB=20.0 #Load at point B,KN\n", + "PC=10.0 #Load at point C,KN \n", + "thetaA=60.0 #angleBAC\n", + "thetaD=30.0 #angleBDC\n", + "\n", + "AC=3.0 #length,m\n", + "CD=3.0 #length,m\n", + "\n", + "AB=(AC+CD)*cos(thetaA*pi/180)\n", + "BD=(AC+CD)*cos(thetaD*pi/180)\n", + "#mistake in book\n", + "#angleBCA=angleABC=theta\n", + "\n", + "theta=(180.0-thetaA)/(2.0) \n", + "\n", + "#Taking moment about A, we get\n", + "\n", + "RD=(PC*AC+PB*AC*cos(thetaA*pi/180))/(AC+CD)\n", + "\n", + "RA=PC+PB-RD\n", + "#Joint A\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FAB=RA/sin(thetaA*pi/180)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"[Comp.]\"\n", + "FAC=FAB*cos(thetaA*pi/180)\n", + "print \"FAC=\",round(FAC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint D\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FDB=RD/sin(thetaD*pi/180)\n", + "\n", + "print \"FDB=\",round(FDB,2),\"KN\",\"[Comp.]\"\n", + "FDC=FDB*cos(thetaD*pi/180)\n", + "print \"FDC=\",round(FDC,2),\"KN\",\"[Tensile]\"\n", + "\n", + "#Joint C\n", + "#vertical & horizontal forces sum to zero\n", + "\n", + "FCB=PC/sin(theta*pi/180)\n", + "\n", + "print \"FCB=\",round(FCB,2),\"KN\",\n", + "\n", + "#CHECK\n", + "\n", + "FCB=(FDC-FAC)/cos(theta*pi/180)\n", + "print \"FCB=\",round(FCB,2),\"KN\",\"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.4 Page number74\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FBF= 42.4264 KN (Tension)\n", + "FBC= 30.0 KN (Comp.)\n", + "FCF= 50.0 KN (Comp.)\n", + "FCD= 30.0 KN (Comp.)\n", + "FDF= 70.7107 KN (Tensile)\n", + "FDF= 70.7107 KN Checked\n" + ] + } + ], + "source": [ + "from math import sqrt,atan,pi,sin,cos\n", + "\n", + "#Now, we cannot find a joint with only two unknown forces without finding reactions.\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=30.0 #vertical load at point B,KN\n", + "PC=50.0 #vertical load at point C,KN \n", + "PDv=40.0 #vertical load at point D,KN\n", + "PDh=20.0 #Horizontal load at point D,KN\n", + "PF=30.0 #vertical load at point F,KN\n", + "HA=PDh\n", + "\n", + "RE=(PC*4+PDv*8+PDh*4+PF*4)/(8.0)\n", + "\n", + "VA=PB+PC+PDv+PF-RE\n", + "\n", + "#joint A\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FAB=VA\n", + "FAF=HA\n", + "\n", + "#joint E\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "FED=RE\n", + "FEF=0\n", + "\n", + "#Joint B: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FBF=(VA-PB)/sin(theta*pi/180)\n", + "\n", + "print\"FBF=\",round(FBF,4),\"KN\" , \"(Tension)\"\n", + "\n", + "FBC=FBF*cos(theta*pi/180)\n", + "\n", + "print\"FBC=\",round(FBC,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint C: \n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "\n", + "FCF=PC\n", + "\n", + "print\"FCF=\",round(FCF,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "FCD=FBC\n", + "\n", + "print\"FCD=\",round(FCD,4),\"KN\" , \"(Comp.)\"\n", + "\n", + "#Joint D: Noting that inclined member is at 45°\n", + "#sum of vertical & sum of horizontal forces is zero.\n", + "\n", + "theta=45.0\n", + "FDF=(RE-PDv)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"(Tensile)\"\n", + "\n", + "#check\n", + "\n", + "FDF=(FCD+PDh)/cos(theta*pi/180)\n", + "\n", + "print\"FDF=\",round(FDF,4),\"KN\" , \"Checked\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example3.5 Page number75" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FED= 25.0 KN (Tension)\n", + "FEF= 15.0 KN (Comp.)\n", + "FAB= 20.0 KN (Comp.)\n", + "FAF= 15.0 KN (Comp.)\n", + "FCB= 25.0 KN (Comp.)\n", + "FCD= 20.0 KN (Tension)\n", + "FBF= 0.0\n", + "FBD= 15.0 KN (Tension)\n", + "FFD= 0.0\n" + ] + } + ], + "source": [ + "from math import sqrt,asin,pi,sin,cos\n", + "\n", + "#All inclined members have the same inclination to horizontal. Now, length of an inclined member is BF\n", + "\n", + "#variable declaration\n", + "\n", + "PE=20.0\n", + "AF=3.0\n", + "FE=3.0\n", + "AB=4.0\n", + "FD=4.0\n", + "BD=3.0\n", + "CD=4.0\n", + "\n", + "BF=sqrt(pow(AF,2)+pow(AB,2))\n", + "DE=BF\n", + "BC=DE\n", + "\n", + "#sin(theta)=AB/BF\n", + "#cos(theta)=AF/BF\n", + "\n", + "theta=asin(AB/BF)\n", + "#As soon as a joint is analysed the forces on the joint are marked on members \n", + "\n", + "#Joint E\n", + "#Consider the equilibrium of the entire frame,Sum of moments about A is zero,Horizontal forces & Vertical forces is zero.\n", + "\n", + "FED=PE/sin(theta)\n", + "print\"FED=\",round(FED),\"KN\",\"(Tension)\"\n", + "\n", + "FEF=FED*cos(theta)\n", + "print\"FEF=\",round(FEF),\"KN\",\"(Comp.)\"\n", + "\n", + "#At this stage as no other joint is having only two unknowns, no further progress is possible. Let us find the reactions at the supports considering the whole structure. Let the reaction be RC HORIZONTAL at point C,VA,HA at point A Vertically & Horizontally respectively.\n", + "#Taking moment at point A,\n", + "\n", + "RC=PE*6/8 \n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "VA=PE\n", + "HA=RC\n", + "\n", + "#Joint A\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FAB=VA\n", + "print\"FAB=\",round(FAB),\"KN\",\"(Comp.)\"\n", + "\n", + "FAF=HA\n", + "print\"FAF=\",round(FAF),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint C\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "FCB=RC/cos(theta)\n", + "print\"FCB=\",round(FCB),\"KN\",\"(Comp.)\"\n", + "\n", + "FCD=FCB*sin(theta)\n", + "print\"FCD=\",round(FCD),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint B\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FBF=(FCB*sin(theta)-FAB)/sin(theta)\n", + "\n", + "print\"FBF=\",round(FBF)\n", + "\n", + "FBD=FCB*cos(theta)\n", + "print\"FBD=\",round(FBD),\"KN\",\"(Tension)\"\n", + "\n", + "#joint F\n", + "#sum of vertical & sun of horizontal forces is zero.\n", + "\n", + "FFD=FBF\n", + "print\"FFD=\",round(FFD)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3.6 page number 78" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FHG= 25.0 KN (Comp.)\n", + "FHF= 15.0 KN (Tension)\n", + "FAC= 18.0278 KN (Comp.)\n", + "FAB= 15.0 KN (Tension)\n", + "FBC= 0.0\n", + "FBD=FBA 15.0 KN (Tension)\n", + "FCE=FCA 18.0278 KN (Comp.)\n", + "FDE= 0.0\n", + "FDF=FDB 15.0 KN (Tension)\n", + "FEF= 0\n", + "FEG=FCE= 18.0278 KN (Comp.)\n", + "FFG= 12.0 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan, cos , sin, pi\n", + "\n", + "#variable declaration\n", + "\n", + "AB=2.0 #length of beam AB,m\n", + "BD=2.0 #length of beam BD,m\n", + "DF=2.0 #length of beam DF,m\n", + "FH=3.0 #length of beam FH,m\n", + "FG=4.0 #length of beam FG,m\n", + "PF=12.0 #Vertical Load at point F,KN\n", + "PH=20.0 #Vertical Load at point H,KN\n", + "\n", + "#mistake in book FG=4.0 , given FG=2.0 \n", + "\n", + "theta1=atan(FG/(AB+BD+DF))\n", + "theta3=atan(FG/FH)\n", + "theta2=theta3\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "#joint H\n", + "\n", + "FHG=PH/sin(theta3)\n", + "print \"FHG=\",round(FHG),\"KN\",\"(Comp.)\" \n", + "\n", + "FHF=FHG*cos(theta2)\n", + "print \"FHF=\",round(FHF),\"KN\",\"(Tension)\"\n", + "\n", + "#taking moment at G\n", + "\n", + "RA=PH*FH/(AB+BD+DF)\n", + "\n", + "RG=RA+PF+PH\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAC=RA/sin(theta1)\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Comp.)\" \n", + "\n", + "FAB=FAC*cos(theta1)\n", + "print \"FAB=\",round(FAB),\"KN\",\"(Tension)\"\n", + " \n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=0\n", + "print \"FBC=\",round(FBC) \n", + "FBA=FAB\n", + "FBD=FBA\n", + "print \"FBD=FBA\",round(FBD),\"KN\",\"(Tension)\"\n", + " \n", + "#Joint C: Sum of Forces normal to AC = 0, gives FCD =0 since FBC = 0 ,sum of Forces parallel to CE =0 \n", + "\n", + "FCA=FAC\n", + "FCE=FCA\n", + "print \"FCE=FCA\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=0\n", + "print \"FDE=\",round(FDE) \n", + "\n", + "FDB=FBD\n", + "FDF=FDB\n", + "\n", + "print \"FDF=FDB\",round(FDF),\"KN\",\"(Tension)\"\n", + "\n", + "#Joint E: sum of Forces normal to CG = 0, gives FEF = 0 and sum of Forces in the direction of CG = 0, gives \n", + "\n", + "FEF=0\n", + "\n", + "print \"FEF=\",FEF\n", + "\n", + "FEG=FCE\n", + "\n", + "print \"FEG=FCE=\", round(FEG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#Joint F:\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=PF\n", + "\n", + "print \"FFG=\",round(FFG),\"KN\",\"(Tension)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.7 page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FGF= 23.094 KN (Tension)\n", + "FGE= 11.547 KN (Comp.)\n", + "FFG= 23.094 KN (Comp.)\n", + "FFD= 13.094 KN (Tension)\n", + "FAB= 36.7543 KN (Comp.)\n", + "FAC= 8.3771 KN (Tension)\n", + "FBC= 9.4338 KN (Comp.)\n", + "FBD= 13.6603 KN (Comp.)\n", + "FCD= 9.4338 KN (Tension)\n", + "FCE= 1.0566 KN (Comp.)\n", + "FDE= 44.0748 KN (Comp.)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "# Since all members are 3 m long, all triangles are equilateral and hence all inclined members are at 60° to horizontal. Joint-by-joint analysis is carried out . Then nature of the force is determined. \n", + "\n", + "#variable declaration\n", + "\n", + "AB=3.0\n", + "BC=AB\n", + "AC=AB\n", + "BD=BC\n", + "CD=BD\n", + "CE=CD\n", + "DE=CE\n", + "EF=DE\n", + "DF=DE\n", + "EG=DE\n", + "FG=DF\n", + "\n", + "theta=60.0*pi/180 #angles BAC,BCA,DCE,DEC,FEG,FGE,°\n", + "\n", + "PB=40.0 #Vertical Loading at point B,KN\n", + "PD=30.0 #Vertical Loading at point D,KN\n", + "HF=10.0 #Horizontal Loading at point F,KN\n", + "PG=20.0 #Vertical Loading at point G,KN\n", + "\n", + "#joint G\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGF=PG/sin(theta)\n", + "\n", + "print \"FGF=\",round(FGF,4),\"KN\",\"(Tension)\"\n", + "\n", + "FGE=FGF*cos(theta)\n", + "\n", + "print \"FGE=\",round(FGE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint F\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FFG=FGF\n", + "\n", + "print \"FFG=\",round(FFG,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FFE=FGF\n", + "FFD=FGF*cos(theta)+FFE*cos(theta)-HF\n", + "print \"FFD=\",round(FFD,4),\"KN\",\"(Tension)\"\n", + "\n", + "#Now, without finding reaction we cannot proceed. Hence, consider equilibrium of the entire truss\n", + "#moment about point A\n", + "\n", + "RE=((PB*AC/2)-(HF*EF*sin(theta))+(PD*(AC+CE/2))+(PG*(AC+CE+EG)))/(AC+CE)\n", + "\n", + "VA=PB+PD+PG-RE\n", + "\n", + "HA=HF\n", + "\n", + "#joint A\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FAB=VA/sin(theta)\n", + "\n", + "print \"FAB=\",round(FAB,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FAC=FAB*cos(theta)-HF\n", + "\n", + "print \"FAC=\",round(FAC,4),\"KN\",\"(Tension)\"\n", + "\n", + "\n", + "#joint B\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FBC=(PB-FAB*sin(theta))/sin(theta)\n", + "\n", + "print \"FBC=\",round(FBC,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FBA=FAB\n", + "FBD=-FBC*cos(theta)+FBA*cos(theta)\n", + "\n", + "print \"FBD=\",round(FBD,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint C\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FCD=FBC*sin(theta)/sin(theta)\n", + "\n", + "print \"FCD=\",round(FCD,4),\"KN\",\"(Tension)\"\n", + "\n", + "FCE=FCD*cos(theta)+FBC*cos(theta)-FAC\n", + "\n", + "print \"FCE=\",round(FCE,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#joint D\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FDE=(PD+FCD*sin(theta))/sin(theta)\n", + "\n", + "print \"FDE=\",round(FDE,4),\"KN\",\"(Comp.)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.8 page number82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FFH= 69.282 KN (Comp.)\n", + "FGH= 5.7735 KN (Comp.)\n", + "FGI= 72.1688 KN (Tensile)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi\n", + "\n", + "#Each load is 10 kN and all triangles are equilateral with sides 4 m.\n", + "\n", + "#variable declaration\n", + "\n", + "PB=10.0\n", + "PD=PB\n", + "PF=PD\n", + "AB=4.0\n", + "BC=AB\n", + "AC=BC\n", + "BD=BC\n", + "CD=BC\n", + "DE=CD\n", + "CE=CD\n", + "DF=DE\n", + "EF=DE\n", + "EG=DE\n", + "FG=EF\n", + "#Take section (A)–(A), which cuts the members FH, GH and GI and separates the truss into two parts. \n", + "AG=AC+CE+EG\n", + "BG=CE+EG+AC/2\n", + "DG=EG+CE/2\n", + "FG1=EG/2\n", + "RA=PB*7/2\n", + "RO=RA\n", + "theta=60.0*pi/180\n", + "#moment at point G\n", + "FFH=(RA*AG-PB*BG-PD*DG-PF*FG1)/(FG*sin(theta))\n", + "print \"FFH=\",round(FFH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "\n", + "FGH=(RA-PB-PD-PF)/(sin(theta))\n", + "print \"FGH=\",round(FGH,4),\"KN\",\"(Comp.)\"\n", + "\n", + "FGI=FFH+FGH*cos(theta)\n", + "print \"FGI=\",round(FGI,4),\"KN\",\"(Tensile)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.9 page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FL3L4= 412.5 KN (Tension)\n", + "FU4U3= 456.2 KN (Comp.)\n", + "FU4L3= 62.5 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import asin,acos,sin,cos,sqrt\n", + "\n", + "#To determine reactions, consider equilibrium equations\n", + "\n", + "#variable declaration\n", + " #all Vertical loading are in KN\n", + "PL1=200.0 \n", + "PL2=200.0\n", + "PL3=150.0\n", + "PL4=100.0\n", + "PL5=100.0\n", + "\n", + "#length in m\n", + "UL1=6.0\n", + "UL2=8.0\n", + "UL3=9.0\n", + "UL4=UL2\n", + "UL5=UL1\n", + "\n", + "L1=6.0\n", + "L2=6.0\n", + "L3=6.0\n", + "L4=6.0\n", + "L5=6.0\n", + "L6=6.0\n", + "\n", + "#moment at point LO\n", + "\n", + "R2=(PL1*L1+PL2*(L1+L2)+PL3*(L1+L2+L3)+PL4*(L1+L2+L3+L4)+PL5*(L1+L2+L3+L4+L5))/(L1+L2+L3+L4+L5+L6)\n", + "\n", + "R1=PL1+PL2+PL3+PL4+PL5-R2\n", + "\n", + "#Take the section (1)–(1) and consider the right hand side part.\n", + "\n", + "U3U4=sqrt(pow(1,2)+pow(UL1,2))\n", + "theta1=asin(1/U3U4)\n", + "\n", + "L3U4=sqrt(pow(UL1,2)+pow(UL2,2))\n", + "theta2=asin(6/L3U4)\n", + "\n", + "#moment at U4\n", + "\n", + "FL3L4=(R2*(L5+L6)-PL4*L4)/UL4\n", + "\n", + "print \"FL3L4=\", round(FL3L4,1),\"KN\",\"(Tension)\"\n", + "\n", + "#moment at L3\n", + "FU4U3=(-PL4*L4-PL5*(L4+L5)+R2*(L4+L5+L6))/(cos(theta1)*UL3)\n", + "print \"FU4U3=\", round(FU4U3,1),\"KN\",\"(Comp.)\"\n", + "\n", + "#sum of horizontal forces \n", + "FL4L3=FL3L4\n", + "FU4L3=(-FL4L3+FU4U3*cos(theta1))/sin(theta2)\n", + "print \"FU4L3=\", round(FU4L3,1),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.10 page number84" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "theta= 60.0 °\n", + "F2= 51.9615 KN (Tension)\n", + "F1= 110.0 KN (Comp.)\n", + "F3= 69.282 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import atan,tan,sin,cos,pi\n", + "\n", + "#Each load is 20 kN.\n", + "\n", + "#variable declaration\n", + "\n", + "P=20.0\n", + "AB=18.0\n", + "A=3.0\n", + "\n", + "RA=P*7/2\n", + "RB=RA\n", + "\n", + "theta1=30.0*pi/180\n", + "a=(3*A)/(4*cos(theta1))\n", + "#Take Section (A)–(A) and consider the equilibrium of left hand side part of the French Truss\n", + "#Drop perpendicular CE on AB. \n", + "\n", + "CE=3*A*tan(theta1)\n", + "DE=A\n", + "\n", + "theta=atan(CE/DE)*180/pi\n", + "print \"theta=\",round(theta),\"°\"\n", + "\n", + "#moment at point A\n", + "\n", + "F2=(P*a*cos(theta1)*6)/(A*2*sin(theta*pi/180))\n", + "print \"F2=\",round(F2,4),\"KN\",\"(Tension)\"\n", + "\n", + "#sum of all vertical forces & sum of all horizotal forces is zero\n", + "F1=(F2*sin(theta*pi/180)+RA-P*3)/(sin(theta1))\n", + "print \"F1=\",round(F1,4),\"KN\",\"(Comp.)\"\n", + "\n", + "F3=F1*cos(theta1)-F2*cos(theta*pi/180)\n", + "print \"F3=\",round(F3,4),\"KN\",\"(Tension)\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 3.11 page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "FAE= 30.0 KN (Tension)\n", + "FBC= 71.4 KN (Comp.)\n", + "FFC= 40.98 KN (Tension)\n", + "FAB= 92.62 KN (Comp.)\n", + "FAF= 40.98 KN (Tension)\n" + ] + } + ], + "source": [ + "from math import sin,cos,pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "PA=15.0 #vertical loading at point A,KN\n", + "PB=30.0 #vertical loading at point B,KN\n", + "PC=30.0 #vertical loading at point C,KN\n", + "PD=30.0 #vertical loading at point D,KN\n", + "PE=15.0 #vertical loading at point E,KN\n", + "\n", + "#Due to symmetry, the reactions are equal\n", + "RA=(PA+PB+PC+PD+PE)/2\n", + "RB=RA\n", + "#Drop perpendicular CH on AF. \n", + "#in traingle ACH\n", + "\n", + "angleACH=45.0*pi/180 #angleACH,°\n", + "angleFCV=30.0*pi/180 # FC is inclined at 30° to vertical i.e., 60° to horizontal and CH = 5 m \n", + "CH=5.0\n", + "angleFCH=60.0*pi/180\n", + "\n", + "#It is not possible to find a joint where there are only two unknowns. Hence, consider section (1)–(1). \n", + "#For left hand side part of the frame\n", + "#moment at C\n", + "\n", + "FAE=(RA*CH-PA*CH-PB*CH/2)/(CH)\n", + "print \"FAE=\",round(FAE),\"KN\",\"(Tension)\"\n", + "\n", + "#Assuming the directions for FFC and FBC \n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "#FFC=FBC*sqrt(2)-RA\n", + "\n", + "FBC=(RA*sin(angleFCH)-PA)/(sqrt(2)*sin(angleFCH)-(1/sqrt(2)))\n", + "print \"FBC=\",round(FBC,2),\"KN\",\"(Comp.)\"\n", + "\n", + "FFC=FBC*sqrt(2)-RA\n", + "print \"FFC=\",round(FFC,2),\"KN\",\"(Tension)\"\n", + "\n", + "#Assumed directions of FBC and FFC are correct. Therefore, FBC is in compression and FFC is in tension. Now we can proceed with method of joints to find the forces in other members. Since it is a symmetric truss, analysis of half the truss is sufficient. Other values may be written down by making use of symmetrry.\n", + "\n", + "#Joint B: sum of forces normal to AC = 0, gives \n", + "\n", + "FBF=PC*cos(angleACH)\n", + "\n", + "#sum of forces parallel to AC = 0, gives \n", + "\n", + "FAB=FBC+PC*sin(angleACH)\n", + "\n", + "print \"FAB=\",round(FAB,2),\"KN\",\"(Comp.)\"\n", + "\n", + "\n", + "\n", + "#JOINT A\n", + "#sum of vertical & sum of horizontal forces is zero\n", + "\n", + "FAF=(FAB*sin(angleACH)+PA-RA)/sin(angleFCV)\n", + "\n", + "print \"FAF=\",round(FAF,2),\"KN\",\"(Tension)\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_0E18xYL.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_0E18xYL.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_0E18xYL.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_4P7HQZZ.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_4P7HQZZ.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_4P7HQZZ.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_8GR2j3i.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_8GR2j3i.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_8GR2j3i.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_KE5ki12.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_KE5ki12.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_KE5ki12.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_LmrwpIC.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_LmrwpIC.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_LmrwpIC.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_ZuWrQKN.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_ZuWrQKN.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_ZuWrQKN.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_wUtoaip.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_wUtoaip.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_wUtoaip.ipynb @@ -0,0 +1,1403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter4-DISTRIBUTED FORCES, CENTRE OF GRAVITY AND MOMENT OF INERTIA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.1 page number 102\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 407.44 mm\n", + "yc= 101.65 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#variable declaration\n", + "\n", + "L1=600.0 #length of wire AB,mm\n", + "L2=200.0 #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "\n", + "X1=300.0\n", + "X2=600.0\n", + "X3=600.0-150*cos(theta)\n", + "Y1=0\n", + "Y2=100\n", + "Y3=200+150*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.2 page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 451.2 mm\n", + "yc= 54.07 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "\n", + "#The composite figure is divided into three simple figures and taking A as origin coordinates of their centroids \n", + "\n", + "#variable declaration\n", + "\n", + "L1=400.0 #length of wire AB,mm\n", + "L2=150.0*pi #length of wire BC,mm\n", + "L3=250.0 #length of wire CD,mm\n", + "theta=30*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=200.0\n", + "X2=475.0\n", + "X3=400+300.0+250*cos(theta)/2\n", + "\n", + "Y1=0\n", + "Y2=2*150/pi\n", + "Y3=125*sin(theta)\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.3 page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.19 mm\n", + "yc= 198.5 mm\n", + "zc= 56.17 mm\n" + ] + } + ], + "source": [ + "from math import cos,sin,pi\n", + "# The length and the centroid of portions AB, BC and CD \n", + "# portion AB is in x-z plane, BC in y-z plane and CD in x-y plane. AB and BC are semi circular in shape\n", + "\n", + "#variable declaration\n", + "\n", + "L1=100.0*pi #length of wire AB,mm\n", + "L2=140.0*pi #length of wire BC,mm\n", + "L3=300.0 #length of wire CD,mm\n", + "theta=45*pi/180\n", + "\n", + "#The wire is divided into three segments AB, BC and CD. Taking A as origin the coordinates of the centroids of AB, BC and CD are (X1,Y1),(X2,Y2),(X3,Y3)\n", + "X1=100.0\n", + "X2=0\n", + "X3=300*sin(theta)\n", + "\n", + "Y1=0\n", + "Y2=140\n", + "Y3=280+300*cos(theta)\n", + "Z1=2*100/pi\n", + "Z2=2*140/pi\n", + "Z3=0\n", + "\n", + "L=L1+L2+L3 #Total length,mm\n", + "\n", + "xc=(L1*X1+L2*X2+L3*X3)/L\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "\n", + "yc=(L1*Y1+L2*Y2+L3*Y3)/L\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "zc=(L1*Z1+L2*Z2+L3*Z3)/L\n", + "\n", + "print \"zc=\",round(zc,2),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.4 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 0.0\n", + "yc= 40.0 mm\n", + "Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20.0 #Area of 1 ,mm^2\n", + "A2=20.0*100.0 #Area of 2,mm^2\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=10\n", + "Y2=70\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "print \"Hence, centroid of T-section is on the symmetric axis at a distance 40 mm from the top\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.5 page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 36.62\n", + "yc= 61.62 mm\n", + "Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=150.0*12.0 #Area of 1 ,mm^2\n", + "A2=(200.0-12.0)*12.0 #Area of 2,mm^2\n", + "\n", + "X1=75\n", + "X2=6\n", + "\n", + "Y1=6\n", + "Y2=12+(200-12)/2\n", + "\n", + "A=A1+A2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "print \"xc=\",round(xc,2)\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is at x = 36.62 mm and y = 61.62 mm \"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.6 page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 59.71 mm\n", + "Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "A1=100.0*20 #Area of 1 ,mm^2\n", + "A2=100.0*20.0 #Area of 2,mm^2\n", + "A3=150.0*30.0 #Area of 3,mm^2\n", + "\n", + "#Selecting the coordinate system, due to symmetry centroid must lie on y axis,\n", + "\n", + "X1=0\n", + "X2=0\n", + "\n", + "Y1=30+100+20/2\n", + "Y2=30+100/2\n", + "Y3=30/2\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n", + "\n", + "print \"Thus, the centroid is on the symmetric axis at a distance 59.71 mm from the bottom\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.7 page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 3.523 m\n", + "yc= 2.777 m\n" + ] + } + ], + "source": [ + "# Note that it is convenient to take axis in such a way that the centroids of all simple figures are having positive coordinates. If coordinate of any simple figure comes out to be negative, one should be careful in assigning the sign of moment of area \n", + "\n", + "#variable declaration\n", + "\n", + "A1=2.0*6.0*1.0/2.0 #Area of 1,m^2\n", + "A2=2.0*7.5 #Area of 2,m^2\n", + "A3=3.0*5.0*1.0/2 #Area of 3,m^2\n", + "A4=1.0*4.0 #Area of 4,m^2\n", + "\n", + "#The composite figure can be conveniently divided into two triangles and two rectangle\n", + "\n", + "X1=2.0*2.0/3.0\n", + "X2=2.0+1.0\n", + "X3=2.0+2.0+(1.0*3.0/3.0)\n", + "X4=4.0+4.0/2.0\n", + "\n", + "Y1=6.0/3.0\n", + "Y2=7.5/2.0\n", + "Y3=1.0+5.0/3.0\n", + "Y4=1/2.0\n", + "\n", + "A=A1+A2+A3+A4\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4)/A\n", + "\n", + "print \"xc=\",round(xc,3),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.8 page number 114\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 2.995 m\n", + "yc= 1.89 m\n" + ] + } + ], + "source": [ + "\n", + "# The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle\n", + "\n", + "from math import pi\n", + "#variable declaration\n", + "\n", + "A1=1.0*3.0*4.0/2.0 #Area of 1,m^2\n", + "A2=6.0*4.0 #Area of 2,m^2\n", + "A3=1.0*pi*pow(2,2)/2 #Area of 3,m^2\n", + "\n", + "#The coordinates of centroids of these three simple figures are:\n", + "\n", + "X1=6.0+3.0/3.0\n", + "X2=3.0\n", + "X3=-(4*2)/(3.0*pi)\n", + "\n", + "Y1=4.0/3.0\n", + "Y2=2.0\n", + "Y3=2.0\n", + "\n", + "A=A1+A2+A3\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "print \"xc=\",round(xc,4),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "print \"yc=\",round(yc,3),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.9 page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 145.42 m\n", + "yc= 90.39 m\n" + ] + } + ], + "source": [ + "#The composite area is equal to a rectangle of size 160 × 280 mm plus a triangle of size 280 mm base width and 40 mm height and minus areas of six holes. In this case also the can be used for locating centroid by treating area of holes as negative. The area of simple figures and their centroids are\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Ar=160.0*280.0 #Area of rectangle,mm^2\n", + "At=280.0*40.0/2.0 #Area of triangle,mm^2\n", + "d=21.5 #diameter of hole,mm \n", + "Ah=-pi*pow(d,2)/4 #Area of hole,mm^2\n", + "\n", + "A=Ar+At+Ah*6\n", + "\n", + "\n", + "Xr=140.0\n", + "Xt=560/3.0\n", + "Xh1=70.0\n", + "Xh2=140.0\n", + "Xh3=210.0\n", + "Xh4=70.0\n", + "Xh5=140.0\n", + "Xh6=210.0\n", + "\n", + "Yr=80.0\n", + "Yt=160.0+40.0/3.0\n", + "Yh1=50.0\n", + "Yh2=50.0\n", + "Yh3=50.0\n", + "Yh4=120.0\n", + "Yh5=130.0\n", + "Yh6=140.0\n", + "\n", + "xc=(Ar*Xr+At*Xt+Ah*(Xh1+Xh2+Xh3+Xh4+Xh5+Xh6))/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(Ar*Yr+At*Yt+Ah*(Yh1+Yh2+Yh3+Yh4+Yh5+Yh6))/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.10 page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 90.48 mm\n", + "yc= 67.86 mm\n" + ] + } + ], + "source": [ + "# If xc and yc are the coordinates of the centre of the circle, centroid also must have the coordinates xc and yc as per the condition laid down in the problem. The shaded area may be considered as a rectangle of size 200 mm × 150 mm minus a triangle of sides 100 mm × 75 mm and a circle of diameter 100 mm.\n", + "\n", + "\n", + "#variable declaration\n", + "\n", + "Ap=200.0*150.0 #Area of plate,mm^2\n", + "At=100.0*75.0/2.0 #Area of triangle,mm^2\n", + "Ah=pi*pow(100,2)/4.0 #Area of hole ,mm^2\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "\n", + "X1=100.0\n", + "X2=200.0-100.0/3.0\n", + "#X3=Xc\n", + "\n", + "Y1=75.0\n", + "Y2=150.0-25.0\n", + "#Y3=Yc\n", + "\n", + "A=Ap-At-Ah\n", + "\n", + "xc=(Ap*X1-At*X2)/(Ah+A)\n", + "\n", + "print \"xc=\",round(xc,2),\"mm\"\n", + "\n", + "yc=(Ap*Y1-At*Y2)/(Ah+A)\n", + "\n", + "print \"yc=\",round(yc,2),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.11 page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xc= 326.4 m\n", + "yc= 219.12 m\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "X=40.0\n", + "A1=14.0*12.0*pow(X,2) #Area of rectangle,mm^2\n", + "A2=6.0*4.0*pow(X,2)/2.0 #Area of triangle,mm^2\n", + "A3=-4*4*pow(X,2) #Area of removed subtracted,mm^2\n", + "A4=-pi*pow(4*X,2)/2.0 #Area of semicircle to be subtracted,mm^2\n", + "A5=-pi*pow(4*X,2)/4.0 #Area of quarter of circle to be subtracted,mm^2\n", + "\n", + "X1=7.0*X\n", + "X2=14*X+2*X\n", + "X3=2*X\n", + "X4=6.0*X\n", + "X5=14.0*X-(16*X/(3*pi))\n", + "\n", + "Y1=6.0*X\n", + "Y2=4.0*X/3.0\n", + "Y3=8.0*X+2.0*X\n", + "Y4=(16.0*X)/(3*pi)\n", + "Y5=12*X-4*(4*X/(3*pi))\n", + "\n", + "A=A1+A2+A3+A4+A5\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "print \"xc=\",round(xc,2),\"m\"\n", + "\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "print \"yc=\",round(yc,2),\"m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.12 page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 6372441.9 mm^4\n", + "Iyy= 2824166.0 mm^4\n", + "kxx= 46.88 mm\n", + "kyy= 31.21 mm\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + "from math import pi,sqrt\n", + "#variable declaration\n", + "\n", + "\n", + "A1=150.0*10.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "#Due to symmetry, centroid lies on the symmetric axis y-y. The distance of the centroid from the top most fibre is given by:\n", + "\n", + "Y1=5.0\n", + "Y2=10.0+70.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#Referring to the centroidal axis x-x and y-y, the centroid of A1 is g1 (0.0, yc-5) and that of A2 is g2 (0.0, 80-yc)\n", + "\n", + "#Moment of inertia of the section about x-x axis Ixx = moment of inertia of A1 about x-x axis + moment of inertia of A2 about x-x axis.\n", + "\n", + "\n", + "Ixx=(150*pow(10,3)/12)+(A1*pow((yc-5),2))+(10*pow(140,3)/12)+(A2*pow((80-yc),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(10*pow(150,3)/12)+(140*pow(10,3)/12)\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Hence, the moment of inertia of the section about an axis passing through the centroid and parallel to the top most fibre is Ixxmm^4 and moment of inertia of the section about the axis of symmetry is Iyy mm^4. \n", + "#The radius of gyration is given by\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print\"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print\"kyy=\",round(kyy,2),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.13 page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 3411298.7 mm^4\n", + "Iyy= 1208657.7 mm^4\n", + "Izz= 4619956.4 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=125.0*10.0 #Area of 1,mm^2\n", + "A2=75.0*10.0 #Area of 2,mm^2\n", + "A=A1+A2 #Total area,mm^2 \n", + "\n", + "#First, the centroid of the given section is to be located. Two reference axis (1)–(1) and (2)–(2) \n", + "\n", + "#The distance of centroid from the axis (1)–(1)\n", + "\n", + "X1=5.0\n", + "X2=10.0+75.0/2\n", + "\n", + "xc=(A1*X1+A2*X2)/A\n", + "\n", + "#Similarly, the distance of the centroid from the axis (2)–(2)\n", + "\n", + "Y1=125.0/2\n", + "Y2=5.0\n", + "\n", + "yc=(A1*Y1+A2*Y2)/A\n", + "\n", + "#With respect to the centroidal axis x-x and y-y, the centroid of A1 is g1 (xc-5, (85/2)-xc) and that of A2 is g2 ((135/2)-yc, yc-5). \n", + "Ixx=(10*pow(125,3)/12)+(A1*pow(21.56,2))+(75.0*pow(10.0,3.0)/12)+(A2*pow((39.94),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(125*pow(10,3)/12)+(A1*pow(15.94,2))+(10*pow(75,3)/12)+(A2*pow(26.56,2)) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# eample 4.14 page number 132" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 59269202.1 mm^4\n", + "Iyy= 12005814.8 mm^4\n", + "Izz= 71275016.9 mm^4\n" + ] + } + ], + "source": [ + "#The given composite section can be divided into two rectangles \n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=200.0*9.0 #Area of 1,mm^2\n", + "A2=(250.0-9*2)*6.7 #Area of 2,mm^2\n", + "A3=200.0*9.0 #Area of 3,mm^2 \n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The section is symmetrical about both x-x and y-y axis. \n", + "X1=0\n", + "X2=0\n", + "X3=0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "\n", + "Y1=245.5\n", + "Y2=125.0\n", + "Y3=4.5\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#Therefore, its centroid will coincide with the centroid of rectangle A2. With respect to the centroidal axis x-x and y-y, the centroid of rectangle A1 is g1 (0.0, 120.5), that of A2 is g2 (0.0, 0.0) and that of A3 is g3 (0.0, 120.5).\n", + "\n", + "Ixx=(200.0*pow(9,3)/12)+(A1*pow(yc-4.5,2))+(6.7*pow(232,3.0)/12)+0+(200*pow(9,3)/12)+(A3*pow((yc-4.5),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(9*pow(200,3)/12)+(232*pow(6.7,3)/12)+(9*pow(200,3)/12) \n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n", + "\n", + "#Izz=Polar moment of inertia\n", + "\n", + "Izz=Ixx+Iyy\n", + "\n", + "#misprint in book\n", + "\n", + "print \"Izz=\",round(Izz,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.15 page number 133" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 135903229.0 mm^4\n", + "Iyy= 5276363.1 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*13.5 #Area of 1,mm^2\n", + "A2=(400.0-27.0)*8.1 #Area of 2,mm^2\n", + "A3=100.0*13.5 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#The given section is symmetric about horizontal axis passing through the centroid g2 of the rectangle A2.\n", + "\n", + "X1=50.0\n", + "X2=8.1/2.0\n", + "X3=50.0\n", + "\n", + "xc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "Y1=386.5+13.5/2.0\n", + "Y2=200.0\n", + "Y3=13.5/2\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y\n", + "\n", + "Ixx=(100.0*pow(13.5,3)/12.0)+(A1*pow((200-(13.5/2)),2))+(8.1*pow(373,3.0)/12.0)+0+(100*pow(13.5,3)/12.0)+(A3*pow((200-(13.5/2)),2))\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(13.5*pow(100.0,3)/12.0)+(A1*pow((50-xc),2))+(373.0*pow(8.1,3.0)/12.0)+A2*pow(21.68,2)+(13.5*pow(100,3)/12.0)+(A3*pow((50-xc),2))\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.16 page number 134\n" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Polar moment of Inertia= 32109472.0 mm^4\n", + "kxx= 90.3 mm\n", + "kyy= 23.09 mm\n" + ] + } + ], + "source": [ + "# The section is divided into three rectangles A1, A2 and A3\n", + "\n", + " \n", + "#variable declaration\n", + "\n", + "\n", + "A1=80.0*12.0 #Area of 1,mm^2\n", + "A2=(150.0-22.0)*12.0 #Area of 2,mm^2\n", + "A3=120.0*10.0 #Area of 3,mm^2 \n", + "\n", + "A=A1+A2+A3 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on axis y-y. The bottom fibre (1)–(1) is chosen as reference axis to locate the centroid\n", + "\n", + "Y1=150-6\n", + "Y2=(128/2) +10\n", + "Y3=5\n", + "\n", + "yc=(A1*X1+A2*X2+A3*X3)/A\n", + "\n", + "X1=60.0\n", + "X2=60.0\n", + "X3=60.0\n", + "\n", + "xc=(A1*Y1+A2*Y2+A3*Y3)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangles A1 is g1 (0.0, 150-6-yc), that of A2 is g2 (0.0, 75-yc) and that of A3 is g3 (0.0, yc-5 ).\n", + "\n", + "Iyy=(12*(pow(80,3))/12)+(128*(pow(12,3))/12)+(10*(pow(120,3))/12)\n", + "\n", + "Ixx=(80.0*pow(12.0,3)/12.0)+(A1*pow((150-6-yc),2))+(12*pow(128,3.0)/12.0)+(A2*pow((75-yc),2))+(120*pow(10,3)/12.0)+(A3*pow((150-10-6-yc),2))\n", + "\n", + "\n", + "\n", + "PolarmomentofInertia=Ixx+Iyy\n", + "\n", + "print \"Polar moment of Inertia=\",round(PolarmomentofInertia),\"mm^4\"\n", + "\n", + "kxx=sqrt(Ixx/A)\n", + "print \"kxx=\",round(kxx,2),\"mm\"\n", + "\n", + "\n", + "kyy=sqrt(Iyy/A)\n", + "print \"kyy=\",round(kyy,2),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.17 page number 135" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 31543827.2 mm^4\n", + "Iyy= 19745121.6 mm^4\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "\n", + "#The given composite section may be divided into simple rectangles and triangle\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=100.0*30.0 #Area of 1,mm^2\n", + "A2=100.0*25.0 #Area of 2,mm^2\n", + "A3=200.0*20.0 #Area of 3,mm^2 \n", + "A4=87.5*20.0/2.0 #Area of 4,mm^2\n", + "A5=87.5*20.0/2.0 #Area of 5,mm^2\n", + "\n", + "A=A1+A2+A3+A4+A5 #Total area,mm^2 \n", + "\n", + "#Due to symmetry, centroid lies on the axis y-y. A reference axis (1)–(1) is choosen as shown in the figure. The distance of the centroidal axis from (1)–(1)\n", + "\n", + "X1=100.0\n", + "X2=100.0\n", + "X3=100.0\n", + "X4=2.0*87.5/3.0\n", + "X5=200-X4\n", + "xc=(A1*X1+A2*X2+A3*X3+A4*X4+A5*X5)/A\n", + "\n", + "Y1=135.0\n", + "Y2=70.0\n", + "Y3=10.0\n", + "Y4=(20.0/3.0)+20.0\n", + "Y5=Y4\n", + "\n", + "yc=(A1*Y1+A2*Y2+A3*Y3+A4*Y4+A5*Y5)/A\n", + "\n", + "#With reference to the centroidal axis x-x and y-y, the centroid of the rectangle A1 is g1 (0.0,135.0-yc), that of A2 is g2(0.0,70.00-yc), that of A3 is g3 (0.0, yc-10.0), the centroid of triangle A4 is g4 (41.66,yc-20.0-(20.0/3.0) ) and that of A5 is g5 (41.66,yc-20.0-(20.0/3.0)).\n", + "\n", + "\n", + "Ixx=(100.0*pow(30,3)/12.0)+(A1*pow((135.0-yc),2))+(25.0*pow(100,3.0)/12.0)+(A2*pow((70.0-yc),2))+(200*pow(20,3)/12.0)+(A3*pow((yc-10.0),2))+((87.5*pow(20,3)/36.0)+(A4*pow((yc-20.0-(20.0/3.0)),2)))*2\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n", + "Iyy=(30.0*pow(100,3)/12.0)+(100.0*pow(25,3.0)/12.0)+(20*pow(200,3)/12.0)+((20.0*pow(87.5,3)/36.0)+(A4*pow((41.66),2)))*2\n", + "\n", + "print \"Iyy=\",round(Iyy,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.18 page number137" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 806093331.0 mm^4\n" + ] + } + ], + "source": [ + "#In this problem, it is required to find out the moment of inertia of the section about an axis AB. So there is no need to find out the position of the centroid. \n", + "#The given section is split up into simple rectangles\n", + "#Moment of inertia about AB = Sum of moments of inertia of the rectangle about AB\n", + "\n", + "#variable declaration\n", + "\n", + "A1=400*20.0\n", + "A2=100*10\n", + "A3=10*380.0\n", + "A4=100*10.0\n", + "\n", + "IAB=(400.0*pow(20,3)/12)+(A1*pow(10,2))+((100*pow(10,3)/12)+(A2*pow(25,2)))*2+((10*pow(380,3)/12)+(A3*pow(220,2)))*2+((100*pow(10,3)/12)+(A4*pow(415,2)))*2\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.19 page number 137" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 50399393.9 mm^4\n" + ] + } + ], + "source": [ + "# The built-up section is divided into six simple rectangles\n", + "\n", + "#variable declaration\n", + "\n", + "\n", + "A1=250.0*10.0 #Area of 1,mm^2\n", + "A2=40.0*10.0 #Area of 2,mm^2\n", + "\n", + "A=A1*2+A2*4 #Total area,mm^2 \n", + "\n", + "\n", + "Y1=5.0\n", + "Y2=30.0\n", + "Y3=15.0\n", + "Y4=255.0\n", + "Y5=135.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A2*Y3+A2*Y4+A1*Y5)/A\n", + "\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(250.0*pow(10,3)/12.0)+(A1*pow((yc-5),2))+((10.0*pow(40,3.0)/12.0)+(A2*pow((yc-30.0),2)))*2+(40*pow(10,3)/12.0)+(A2*pow((yc-15.0),2))+(10.0*pow(250.0,3.0)/12.0)+(A1*pow((yc-135.0),2))+(40.0*pow(10.0,3)/12)+(A2*pow((yc-255),2))\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.20 page number 138" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "145.394736842\n", + "Ixx= 752680131.6 mm^4\n" + ] + } + ], + "source": [ + "#Each angle is divided into two rectangles \n", + "\n", + "#variable declaration\n", + "\n", + "A1=600.0*15.0 #Area of 1,mm^2\n", + "A2=140.0*10.0 #Area of 2,mm^2\n", + "A3=150.0*10.0\n", + "A4=400.0*20.0\n", + "A=A1+A2*2+A3*2+A4 #Total area,mm^2 \n", + "\n", + "#The distance of the centroidal axis from the bottom fibres of section \n", + "\n", + "Y1=320.0\n", + "Y2=100.0\n", + "Y3=25.0\n", + "Y4=10.0\n", + "\n", + "yc=(A1*Y1+2*A2*Y2+A3*Y3*2+A4*Y4)/A\n", + "print yc\n", + "#Now, Moment of inertia about the centroidalaxis=Sum of the moment of inertia of the individual rectangles\n", + "\n", + "Ixx=(15.0*pow(600,3)/12.0)+(A1*pow((yc-320),2))+((10.0*pow(140,3.0)/12.0)+(A2*pow((yc-100.0),2)))*2+((150*pow(10,3)/12.0)+(A3*pow((yc-15.0),2)))*2+(400.0*pow(20.0,3.0)/12.0)+(A4*pow((yc-10.0),2))\n", + "\n", + "\n", + "print \"Ixx=\",round(Ixx,1),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.21 page number 139" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ixx= 36000000.0 mm^4\n" + ] + } + ], + "source": [ + "\n", + "from math import asin,sin,cos,pi\n", + "\n", + "#The rectangle is divided into four triangles\n", + "#The lines AE and FC are parallel to x-axis\n", + " \n", + "#variable declaration\n", + "\n", + "theta=asin(4.0/5.0)\n", + "\n", + "AB=100.0\n", + "BK=AB*sin((90*pi/180)-theta)\n", + "ND=BK\n", + "FD=60.0/sin(theta)\n", + "AF=150.0-FD\n", + "FL=ME=75.0*sin(theta)\n", + "AE=AB/cos((90*pi/180)-theta)\n", + "FC=AE\n", + "A=125.0*60.0/2.0\n", + "\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(125*pow(60,3)/36)+(A*pow((ND*4.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*2.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))+(125*pow(60,3)/36)+(A*pow((ND*1.0/3.0),2))\n", + "\n", + "print \"Ixx=\",round(Ixx),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.22, page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IAB= 4292979.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into a triangle PQR, a semicircle PSQ having base on axis AB and a circle having its centre on axis AB\n", + "\n", + "#variable declaration\n", + "#Now,Moment of inertia of the section about axis AB\n", + "IAB=(80*pow(80,3)/12)+(pi*pow(80,4)/128)-(pi*pow(40,4)/64)\n", + "\n", + "print \"IAB=\",round(IAB),\"mm^4\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example4.23 page number141" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "106.435694487 28.4724404943\n", + "Ixx= 686943.0 mm^4\n", + "Iyy= 17146488.0 mm^4\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#The section is divided into three simple figures viz., a triangle ABC, a rectangle ACDE and a semicircle. \n", + "\n", + "#variable declaration\n", + "\n", + "r=20.0 #radius of semicircle\n", + "A1=80.0*20.0/2 #Area of triangle ABC \n", + "A3=40.0*80.0 #Area of rectangle ACDE \n", + "A4=pi*pow(r,2)/2 #Area of semicircle\n", + "At1=30.0*20.0/2.0\n", + "At2=50.0*20.0/2.0\n", + "A=A1+A3-A4 #Total area\n", + "\n", + "X1=2.0*30.0/3.0\n", + "X2=50.0*30.0/3.0\n", + "X3=40.0\n", + "X4=40.0\n", + "\n", + "xc=(At1*X1+At2*X2+A3*X3-A4*X4)/A\n", + "#mistake in book\n", + "\n", + "Y1=(20.0/3.0)+40.0\n", + "Y3=20.0\n", + "Y4=(4.0*20.0)/(3.0*pi)\n", + "\n", + "yc=(A1*Y1+A3*Y3-A4*Y4)/A\n", + "print xc,yc\n", + "#\n", + "#Moment of inertia of the section about axis x-x=Sum of the momentsof inertia of individual triangular areasabout axis\n", + "\n", + "Ixx=(80.0*pow(20.0,3)/36) +A1*pow((60.0-(2*20.0/3.0)-yc),2)+(80*pow(40,3)/12)+(A3*pow((yc-20.0),2))-((0.0068598*pow(20,4))+(A4*pow((yc-Y4),2)))\n", + "\n", + "print\"Ixx=\",round(Ixx),\"mm^4\"\n", + "\n", + "\n", + "Iyy=(20.0*pow(30.0,3)/36) +At1*pow((xc-(2*30.0/3.0)),2)+(20*pow(50,3)/36)+(At2*pow((xc-(30.0+(50/3))),2))+((40*pow(80,3)/12)+(A3*pow((xc-40),2)))-((pi*pow(40,4))/(2*64))-(A4*pow((40-xc),2))\n", + "\n", + "print\"Iyy=\",round(Iyy),\"mm^4\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 4.27 page number 150" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25000.0 5625.0 235.619449019 7889.38055098\n", + "xc= 0.411 m\n", + "yc= 0.329 m\n", + "zc= 0.221 m\n" + ] + } + ], + "source": [ + "#A concrete block of size 0.60 m × 0.75 m × 0.5 m is cast with a hole of diameter 0.2 m and depth 0.3 m\n", + "#The hole is completely filled with steel balls weighing 2500 N. Locate the centre of gravity of the body.\n", + "\n", + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "W=25000.0 # weight of concrete=25000, N/m^3\n", + "W1=0.6*0.75*0.5*W #Weight of solid concrete block\n", + "W2=pi*pow(0.2,2)*0.3*W/4 #Weight of concrete (W2) removed for making hole:\n", + "W3=2500\n", + "\n", + "#Taking origin as shown in the figure, the centre of gravity of solid block is (0.375, 0.3, 0.25) and that of hollow portion is (0.5, 0.4, 0.15)\n", + "\n", + "X1=0.375\n", + "X2=0.5\n", + "X3=0.5\n", + "\n", + "Y1=0.3\n", + "Y2=0.4\n", + "Y3=0.4\n", + "\n", + "Z1=0.25\n", + "Z2=0.15\n", + "Z3=0.15\n", + "\n", + "Wt=W3+W1-W2\n", + "print W,W1,W2,Wt\n", + "xc=(W1*X1-W2*X2+W3*X3)/Wt\n", + "\n", + "yc=(W1*Y1-W2*Y2+W3*Y3)/Wt\n", + "\n", + "zc=(W1*Z1-W2*Z2+W3*Z3)/Wt\n", + "\n", + "print\"xc=\",round(xc,3),\"m\"\n", + "print\"yc=\",round(yc,3),\"m\"\n", + "print\"zc=\",round(zc,3),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_0Ke5Vhq.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_0Ke5Vhq.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_0Ke5Vhq.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_23aeJMe.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_23aeJMe.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_23aeJMe.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_4a14Khd.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_4a14Khd.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_4a14Khd.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_eftppGy.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_eftppGy.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_eftppGy.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_jOQv5Ua.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_jOQv5Ua.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_jOQv5Ua.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_m75AW4e.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_m75AW4e.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_m75AW4e.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_mZ9916M.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_mZ9916M.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_mZ9916M.ipynb @@ -0,0 +1,774 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter5-FRICTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 1250.0 N\n", + "P= 1210.36288071 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=1000.0 #weight of block a\n", + "Wb=2000.0 #weight of block b\n", + "uab=1.0/4.0 #coefficient of friction between A and B\n", + "ubg=1.0/3.0 #coefficient of friction between ground and B\n", + "#When P is horizontal\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "N2=N1+ Wb #Normal Reaction on block B from Ground\n", + "F2=ubg*N2 #limiting Friction between A and ground\n", + "P=F1+F2\n", + "print \"P=\",P,\"N\"\n", + "#When P is inclined at angle o\n", + "o=30.0*3.14/180.0\n", + "#considering equilibrium of block A\n", + "N1=Wa #Normal Reaction on block A from block B\n", + "F1=uab*N1 #limiting Friction between A and B\n", + "T=F1 #tension\n", + "#considering equilibrium of block B\n", + "#from\n", + "#N2+Psin30=N1+Wb\n", + "#Pcos30=F1+F2\n", + "#F1=ubg*N2\n", + "N2=(N1+Wb-F1*math.tan(o))/(1+ubg*math.tan(o))\n", + "P=(N1+Wb-N2)/math.sin(o)\n", + "print \"P=\",P,\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "29.0693410161 °\n" + ] + } + ], + "source": [ + "import math\n", + "Wa=300.0 #weight of upper block \n", + "Wb=900.0 #weight of lower block \n", + "u1=1.0/3.0 #coefficient of friction between upper block and lower block\n", + "u2=1.0/3.0 #coefficient of friction between ground and lower block\n", + "#using \n", + "#N1=Wacoso Normal Reaction\n", + "#F1=u1*N1 Friction\n", + "#N2=Wbcoso+N1\n", + "#F2=u2*N2\n", + "o=math.atan((u1*Wa+u2*Wb+u2*Wa)/Wb)*180/3.14\n", + "print o,\"°\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 30.0152164356\n", + "coefficient of friction is 0.1\n" + ] + } + ], + "source": [ + "import math\n", + "W=500.0 #weight of block\n", + "F1=200.0 #force up the inclined plane when block is moving down\n", + "F2=300.0 #force up the inclined plane when block is at rest\n", + "#When block starts moving down the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Fr+F1=Wsino\n", + "#sino-ucoso=F1/w 1\n", + "#When block starts moving up the plane\n", + "#sum of all forces perpendicular to the plane = 0\n", + "#N =Wcoso\n", + "#sum of all forces parallel to the plane = 0\n", + "#Wsino+Wucoso=F2\n", + "#using these equations\n", + "o=math.asin((F1*0.5/W)+(F2*0.5/W)) #angle of inclination\n", + "print \"Angle of inclination is \",(o*180/3.14)\n", + "#using 1\n", + "u=math.sin(o)-F1/W\n", + "print \"coefficient of friction is\",round(u,3)\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.4" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of Inclination 21.8124674778\n" + ] + } + ], + "source": [ + "import math\n", + "uag=0.5 #coefficient of friction between block A and the plane\n", + "ubg=0.2 #coefficient of friction between block B and the plane\n", + "Wb=500.0 #weight of block B\n", + "Wa=1000.0 #weight of block A\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N1=Wacoso ,Fr=uagN1\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=uagWacoso-Wasino\n", + "#Considering equilibrium of block A,\n", + "#sum of all forces along the plane is 0\n", + "#N2=Wbcoso ,Fr=uagN2\n", + "#sum of all forces perpendicaular to the plane is 0\n", + "#T=Wbsino-ubgwbsino\n", + "o=math.atan((uag*Wa+ubg*Wb)/(Wa+Wb))*180.0/3.14\n", + "print \"Angle of Inclination\",o;\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.5" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "853.305553493 N\n" + ] + } + ], + "source": [ + "import math\n", + "Wl=750.0 #weight of lower block\n", + "Wu=500.0 #weight of upper block\n", + "o1=60.0*3.14/180.0 #angle of inclined plane\n", + "o2=30.0 *3.14/180.0 # anlge at which pull is applied\n", + "u=0.2 #coefficient of friction\n", + "#for 750 N block\n", + "#Σ Forces normal to the plane = 0 \n", + "N1=Wl*math.cos(o1)\n", + "F1=u*N1\n", + "#Σ Forces parallel to the plane = 0\n", + "T=F1+Wl*math.sin(o1)\n", + "#Σ Forces horizontal to the plane = 0\n", + "P=(T+u*Wu)/(math.cos(o2)+u*math.sin(o2))\n", + "print P,\"N\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.6" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Least Weight is 266.34090474 N\n", + "Greatest Weight is 969.473014916 N\n" + ] + } + ], + "source": [ + "import math\n", + "o1=60.0*3.14/180.0 #angle of inclination of plane AC\n", + "o2=30.0*3.14/180.0 #angle of inclination of plane BC\n", + "Wbc=1000.0 #weight of block on plane BC\n", + "ubc=0.28 #coefficient of friction between the load and the plane BC \n", + "uac=0.20 #coefficient of friction between the load and the plane AC\n", + "#for least weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)-F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(uac*math.cos(o1)+math.sin(o1))\n", + "print \"Least Weight is\",W,\"N\"\n", + "#for greatest weight \n", + "N1=Wbc*math.cos(o2) #Normal Reaction\n", + "F1=ubc*N1 #frictional Force\n", + "T=Wbc*math.sin(o2)+F1 #Tension\n", + "#for block on plane AC\n", + "#N2=Wcoso1\n", + "#F2=uac*N2\n", + "#T=F2+W sino2\n", + "W=T/(-1*uac*math.cos(o1)+math.sin(o1))\n", + "print \"Greatest Weight is\",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.7" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight 10498.172578 N\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.4 #The coefficient of friction on the horizontal plane\n", + "oi=30 #angle of inclined plane\n", + "o=20.0 #The limiting angle of friction for block B on the inclined plane\n", + "wb=5000.0 #weight of block b\n", + "ub=math.tan(o*3.14/180.0) #coefficcient of friction on plane\n", + "#for block B\n", + "#N1 N2 N3 are normal reaction\n", + "#F1 F2 are frictional forces\n", + "#F1=ub*N1 \n", + "#N1 sinoi + F1 cos oi=wb\n", + "N1=wb/(math.sin(oi*3.14/180.0)+ub*math.cos(oi*3.14/180.0))\n", + "F1=ub*N1\n", + "C=N1*math.cos(oi*3.14/180.0)-F1*math.sin(oi*3.14/180.0)\n", + "\n", + "#force balance on A in horizontal balance\n", + "F2=C\n", + "N2=F2/u\n", + "#force balance on A in vertical balance\n", + "W=N2\n", + "print \"Weight \",W,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.8" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force = 23812.7516422 N\n" + ] + } + ], + "source": [ + "import math\n", + "w=20000.0 #weight of upper block\n", + "o=15.0 #The angle of friction for all surfaces of contact\n", + "u=math.tan(o) #coefficient of friction\n", + "#R1 R2 are forces\n", + "Or1=15.0 #angle force R1 makes with x axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "R2=w*math.sin((90-Or1)*3.14/180.0)/math.sin((90+Or1+Or2)*3.14/180.0)\n", + "#applyig lamis theorem on block B\n", + "Or1=15.0 #angle force R3 makes with Y axis\n", + "Or2=35.0 #angle force R2 makes with Y axis\n", + "P=R2*math.sin((180-Or1-Or2)*3.14/180.0)/math.sin((90+Or1)*3.14/180.0)\n", + "print \"Force =\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.9" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 66.26 KN\n" + ] + } + ], + "source": [ + "import math \n", + "w=160.0 #weight of block,KN\n", + "u=0.25 #coefficient of friction\n", + "phi=math.atan(u)\n", + "\n", + "#The free body diagrams of wedges A, B and block C .The problem being symmetric, the reactions R1 and R2 on wedges A and B are equal. The system of forces on block C andon wedge A are shown in the form convenient for applying Lami’s theorem\n", + "R1=w*math.sin(math.pi-(16*math.pi/180)-phi)/math.sin(2*(phi+math.pi*16/180))\n", + "#consider the equillibrium of the wedge A ,Ny lamis's theorem,we get\n", + "P=R1*math.sin(math.pi-phi-phi-(16*math.pi/180))/math.sin((math.pi/2)+phi)\n", + "print\"P=\",round(P,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.10" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Force required is 62.0836173323 N\n" + ] + } + ], + "source": [ + "import math\n", + "l=4.0 #length of ladder\n", + "u1=0.2 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.3 #coefficient of friction between floor and the ladder\n", + "wm=600.0 #weight of man\n", + "lm=3.0 #distance of man\n", + "o=3.14*60.0/180.0 #angle made by ladder with floor\n", + "#sum of all moment about A =0\n", + "Nb=(w*l/2*math.cos(o)+wm*lm*math.cos(o))/(l*(math.sin(o)+u1*math.cos(o))) # normal reaction from wall\n", + "Fb=u1*Nb #friction from wall\n", + "#force balance in vertical direction\n", + "Na=(w+wm-Fb) # normal reaction from ground\n", + "Fa=u2*Na #friction from ground\n", + "P=Nb-Fa\n", + "print \"Force required is \",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.11" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of inclination is 71.6013500101 degrees\n" + ] + } + ], + "source": [ + "import math\n", + "l=6.0 #length of ladder\n", + "u1=0.4 #coefficient of friction between the wall and the ladder\n", + "w=200.0 #weight of ladder\n", + "u2=0.25 #coefficient of friction between floor and the ladder\n", + "wl=900.0 #weight of load\n", + "ll=5.0 #distance of load\n", + "#force balancing\n", + "#Na Nb normal reaction at A and B\n", + "#Fa Fb friction at A and B\n", + "#Fa=u2*Na \n", + "#Fb=u1*Nb\n", + "#Na+Fb=w+wl\n", + "#Fa=Nb\n", + "Nb=(wl+w)*u2/(1+u2*u1)\n", + "Na=Nb/u2\n", + "Fa=u2*Na\n", + "Fb=u1*Nb\n", + "#sum of all moments about a is =0\n", + "temp=((w*l*0.5)+(wl*ll)-(Fb*l))/(Nb*l)\n", + "o=math.atan(temp)*180/3.14\n", + "print \"Angle of inclination is \",o,\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.12" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "length will 0.5 times\n" + ] + } + ], + "source": [ + "import math\n", + "o=45.0*3.14/180.0 #angle of inclination \n", + "u=0.5 #coefficient of friction\n", + "r=1.5 #ratio of mans weight to ladders weight\n", + "o1=45.0*math.pi/180.0 #angle of inclination\n", + "#from law of friction\n", + "#Fa = μNa\n", + "#Fb = μNb\n", + "#Fa – Nb = 0 \n", + "#Na + Fb = W + r W\n", + "#ΣMA = 0\n", + "o=(((u*u+u)*(1+r)/((1+u)))-1.0/2.0)/r\n", + "print \"length will\",o,\"times\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.13" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum weight is 6277.60420331\n", + "Minimum weight is 57.3467183245\n" + ] + } + ], + "source": [ + "import math\n", + "n=1.25 #number of turns\n", + "o=2*3.14*n #angle of contact\n", + "u=0.3 #coefficient of friction\n", + "t=600.0 #force at the other end of the rope\n", + "#if the impending motion of the weight be downward.\n", + "W=T2=t*2.71**(u*o)\n", + "print \"Maximum weight is \",W\n", + "#if the impending motion of weight be upwards\n", + "W=T1=t*2.71**(-1*u*o)\n", + "print \"Minimum weight is \",W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.14" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Weight is 136.9599857 N\n" + ] + } + ], + "source": [ + "import math\n", + "ur=0.20 #The coefficient of friction between the rope and the fixed drum\n", + "uo=0.30 #The coefficient of friction between other surfaces\n", + "cosa=4.0/5.0 #cos of angle of inclination\n", + "sina=3.0/5.0 #sin of angle of inclination\n", + "Ww=1000.0 #weight\n", + "o=3.14 #angle of contact of rope with pulley\n", + "#for unknown weight\n", + "#force balance perpendicular to the plane\n", + "#N1 = W cos α\n", + "#fr=uoN1\n", + "#force balance along the plane\n", + "#T1 = F1 + W sin α\n", + "#for 1000 N body\n", + "#force balance perpendicular to the plane\n", + "#N2=N1+Wwcosa\n", + "#fr2=uoN2\n", + "#force balance along the plane\n", + "#T2= Wwsina -F1 -F2\n", + "#T2=T1*e^(ur*o)\n", + "W=(Ww*sina-uo*Ww*cosa)/(((uo*cosa+sina)*(2.71**(uo*o)))+(uo*cosa+uo*cosa))\n", + "print \"Weight is \",W,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.15" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force P applied at the end of the brake lever 274.480678202\n" + ] + } + ], + "source": [ + "import math\n", + "u=0.3 #coefficient of friction\n", + "r=250 #radius of brake drum\n", + "l=300 #length of lever arm\n", + "M=300000.0 #torque\n", + "o=r*3.14/180.0\n", + "l2=50.0\n", + "#using \n", + "#T2 = T1e^(μθ) T1 and T2 are tension\n", + "#(T2-T1)r=M\n", + "T1=M/(r*(2.71**(u*o)-1))\n", + "T2=(2.71**(u*o))*T1\n", + "#Consider the lever arm. Taking moment about the hinge\n", + "p=T2*l2/l #force P applied at the end of the brake lever\n", + "print \"force P applied at the end of the brake lever\",p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 5.16" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6972.02507534 mm\n", + "Power Transmitted 3252832.96438 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=O2=3.14+2*math.asin((d1+d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2+d2/2)*O1+2*D*math.cos(math.asin((d1+d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O1))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 5.17" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of belt is 6955.3382782 mm\n", + "Power Transmitted 3035637.41075 Watt\n" + ] + } + ], + "source": [ + "import math\n", + "d1=500.0 #diameter of a shaft\n", + "d2=100.0 #diameter of a shaft\n", + "D=3000.0 #distance between shafts in mm\n", + "T=1000.0 #Maximum permissible tension in the belt\n", + "U=0.25 #coefficient of friction between the belt and the pulley\n", + "R=220.0 #revlution per minute of larger shaft\n", + "O1=3.14+2*math.asin((d1-d2)/(2*D))\n", + "O2=3.14-2*math.asin((d1-d2)/(2*D))\n", + "#Length of belt = Arc length DC + Arc length FE + 2BG\n", + "L=(d1/2*O1+d2/2*O2)+2*D*math.cos(math.asin((d1-d2)/(2*D)))\n", + "print \"Length of belt is \",L,\"mm\"\n", + "T1=T/(2.71**(U*O2))\n", + "Velocity_of_the_belt =d1/2*(R*2*3.14/60.0)\n", + "Power_transmitted=(T-T1)*Velocity_of_the_belt\n", + "print \"Power Transmitted\",Power_transmitted,\"Watt\"\n", + "\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_2OboaPO.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_2OboaPO.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_2OboaPO.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+fB0ubwAHhyeAgAAFJ9fRY9YVo3oEQAAoOiktQDuYfna8onFl3+bWCoaafnG8pqluw8AAAAUizTOdO1s8XP7ZlgaWa6z7GvZzeLn/vny74uWJZbDLF4QL7UMtVTmX7/GFv/3AQCA5KhvmWkpz7xKGZY6pTqWuZ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gBzBUFEACANeSzfO+9FwqfZ/Jkabvtlu7YbdVKqlcv+nA1oABSAHNFAQQAYDX88IP03HNLS9/XX0uHHBJKn2f77aMP5gEFkAKYKwogAADL4bN8fsHl7I7dSZOkLbeUOnQIhe+gg6R11ok+nGcUQApgriiAAABEfvxRmjhxaembMSMUvey5fE2bWvGIQfOgAFIAc0UBBACk2n//G8qel74JE5beds1z8MHSeutFH4wRCiAFMFcUQABAqvjdNp5/fmnp8wLomzaypW+nneIxy7cyFEAKYK4ogACAovfpp0uXdf1yLRtttHTHrl+upX796IMJQQGkAOaKAggAKDqlpeECzF74PB98EC7AnC19u+wS/1m+laEASr+KHtPkcstiix/wedHjKEvWbpZJlvmWzy3+eQAAitoXX0jDhknHHittvLHUuXO4IPMVV0jffBM2d1x8sbTrrskufwjSWADdixafsvNJa3/sYnHrW8ZaJls2srS3dLecawEAoGgsWhTO5bv0Uql583C3jbvvln73uzA+c6b0j39Ixx0nbbBB9A+haKS1AK7IHy3+NelvKbW8bbnO0ssCAECiffmlNHy49Kc/SZtuGsqdF70+faRZs6QpU8LzPfZglq/YpbUA2h9tfW35xOLLv00szn4H0huWssyr4FXLdhafHQQAIDGWLJFefFHq21fac09pq62koUPDOXzPPCN99ZV0zz1Sp05hYwfSI40F8AHLzpbNLftbyi3jLetafDl4jqWi2dEjuzwAALHnM3n33iudcEKY5Tv6aOmTT6Tzzw+3X3v5Zal//7DU+yvWAVOLCV6pjmWu5SjLEZZmlsMtWftZplh8p5BvDKnIS+Hcnj17qk4d/9dI7dq1ywQAgHwoK5Nee23pjt2pU6UWLZbu2N1rL6lmzejDKTZu3LhMXGlpqQYPHuxPuQxMimULoP2OpEaWay2NLdllYN8A4ucANs28WlamAHIZGABAPn33nReacG2+sWOlxYt9AiKUvvbtw904sGJcBiadS8AdLRuHp5ll4GGWLy2+M/ghyxLLFZZ6ll0tvS23WQAAKAif5fOZvYEDpf33DwXvuuukX/9aevjhcJmW0aOlk0+m/GH1pHEG8FHLvha/O6G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nzqMU3gPjX0YuCbwLxZfosjkX+XWzxYucbBl+z+GlEWRwPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSYnuL38Hm15lXABBTFW+IDADF6DnLleFpXpRHjwAQWxRAAACAlKEAAkizbpbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_Cf1Ae70.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_Cf1Ae70.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_Cf1Ae70.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAA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Rxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_IZI7GIy.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_IZI7GIy.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_IZI7GIy.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+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PXHAc8su/7tmNUP53YYTFC8V6Fo5F/vn3Kd/p6+f7+c/soy0LLL+zcDywSr5TyL+hevnzZJ+3tjjfOu47jX6w+B80PzetsgEWXw7w3yq4jtDa8a/7yu7a4jgW+fO4xb+Ofhz8m+gjFp9pqojjURj+/anidQA5DvnzqMU3gPjX0YuCbwLxZfosjkX+XWzxYucbBl+z+GlEWRwPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSYnuL38Hm15lXABBTFW+IDADF6DnLleFpXpRHjwAQWxRAAACAlKEAAkizbpbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_TRm6El0.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_TRm6El0.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_TRm6El0.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+fB0ubwAHhyeAgAAFJ9fRY9YVo3oEQAAoOiktQDuYfna8onFl3+bWCoaafnG8pqluw8AAAAUizTOdO1s8XP7ZlgaWa6z7GvZzeLn/vny74uWJZbDLF4QL7UMtVTmX7/GFv/3AQCA5KhvmWkpz7xKGZY6pTqWuZajLM/4QCX9LW0tLTOvlrWl5fPwFAAAJMxWli/C03ShAC4tgEdbxvtAJV4A21kOyLxaVgPL3BkzZqhBA3+KQurTp48GDRoUvUIhcSziheMRHxyLeCgpKdHWW2/tTxv6S3+SNmksgB0tEyzfWTa3+BKwz+7tatnR4l+T6RbfDXyo5X6Ll8DBlsoyBdBQAGPg/PPP1w033BC9QiFxLOKF4xEfHIt48ALYsKF3v/QWwDRuAjnR8h/LfItv8qhpaWP5weJLur4BxMuhbwK5xnKJZXnlDwAAIJHSWACPsfjM3/oWn//tYvmvx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/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_WfVJQIc.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_WfVJQIc.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_WfVJQIc.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ePgF7PnOBSWb47i70R++dfz4/B0uTgeWCX/w+EnuftdQHz936fy/bX/hfbzBHx7uJ97U8/isx+fWSruIrrA4n+IfOu4n5PglzPx3xDZRbRm/ETcld21hWORX36ytC+puE0td1j8+PjSl+N45Id/bf0WlBXjMx3+S5LPXHAc8su/7tmNUP53YYTFC8V6Fo5F/vn3Kd/p6+f7+c/soy0LLL+zcDywSr5TyL+hevnzZJ+3tjjfOu47jX6w+B80PzetsgEWXw7w3yq4jtDa8a/7yu7a4jgW+fO4xb+Ofhz8m+gjFp9pqojjURj+/anidQA5DvnzqMU3gPjX0YuCbwLxZfosjkX+XWzxYucbBl+z+GlEWRwPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSYnuL38Hm15lXABBTFW+IDADF6DnLleFpXpRHjwAQWxRAAACAlKEAAkizbpbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_Z5dEk19.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_Z5dEk19.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_Z5dEk19.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFkRZYPf//c65I8tKn92Ze+d+3q/X85uZM6O/uBd2nz3nnnsFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoFhcbllsKbHMix5HWbLKLAssFd//rQUAAAAJ5QXw+fB0ubwAHhyeAgAAFJ9fRY9YVo3oEQAAoOiktQDuYfna8onFl3+bWCoaafnG8pqluw8AAAAUizTOdO1s8XP7ZlgaWa6z7GvZzeLn/vny74uWJZbDLF4QL7UMtVTmX7/GFv/3AQCA5KhvmWkpz7xKGZY6pTqWuZajLM/4QCX9LW0tLTOvlrWl5fPwFAAAJMxWli/C03ShAC4tgEdbxvtAJV4A21kOyLxaVgPL3BkzZqhBA3+KQurTp48GDRoUvUIhcSziheMRHxyLeCgpKdHWW2/tTxv6S3+SNmksgB0tEyzfWTa3+BKwz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pbpljmWaZaulqy6lv+zfG4psbxrOctSkd/0/xmL33T+HcvBFgAAABTYipaA/2jx4naQpYblUMs8y9EWV89ysqV+5pV0uOUny2GZV+EXaC99wyz+2caWVyxLLJwDCAAAUEArKoBjLX8LT392k+Wp8HS5HrFcF57qAMsiy/qZV8GRFgoggNhjCRhAWm1t+Tg8/dlHlmx5q2O53vK+xZeIZ1vaWzazuC0tPjY/8yr4JHoEgFijAAJIqxkWv2xLRTtYPgtP1dvSIcoGlg0tPmvoy8XOzw30sewSsds2egSAWKMAAkiDmhbf1FExd1lOtRxo8e+Fh1hOsQy1uAaWhZbvLP7Pd7S0tWT5+X4fWm6wrGvxGcHLLAAAACgwPwfQz8vLxi/U7I9e+LwA+kYO3wziu4F900fWxpYnLL4D+CvLEMsoywhLls8gPmvJ7gL+s4VzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_z9FlTqT.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_z9FlTqT.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_z9FlTqT.ipynb @@ -0,0 +1,1593 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter6-SIMPLE MACHINES" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.1" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 20.0\n", + "Velocity Ratio 25.0\n", + "Efficiency 0.8\n", + "Ideal Load 12500.0\n", + "Ideal Effort 400.0\n", + "Effort lost in friction 100.0\n", + "frictional resistance 2500.0\n" + ] + } + ], + "source": [ + "import math\n", + "W = 10000.0 #Load\n", + "P = 500.0 #Effort\n", + "D = 20.0 #Distance moved by the effort \n", + "d = 0.8 #Distance moved by the load \n", + "MA=W/P #Mechanical advantage\n", + "VR=D/d #Velocity Ratio\n", + "Efficiency=MA/VR\n", + "Pi =W/VR #Ideal effort\n", + "Wi = P*VR #ideal load\n", + "efl=P-Pi #Effort lost in friction\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print \"Ideal Load\",Wi\n", + "print \"Ideal Effort\",Pi\n", + "print \"Effort lost in friction\",efl\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.05 W + 30.0\n", + "Load is 3400.0 N\n", + "Mechanical advantage-- 17.0\n", + "Ideal effort is 113.333333333 N\n", + "Effort lost in friction 86.6666666667\n", + "Efficiency 56.6666666667\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 2400.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "\n", + "W2 = 3000.0 #Load 2\n", + "P2= 180.0 #Effort2\n", + "P3= 200.0 #Effort3\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "W3=(P3-C)/m #Load 2\n", + "print \"Load is \",W3,\"N\"\n", + "MA=W3/P3 #Mechanical advantage\n", + "print \"Mechanical advantage--\",MA\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100\n", + "Pi =W3/VR #Ideal effort\n", + "print \"Ideal effort is\",Pi,\"N\"\n", + "\n", + "efl=P3-Pi #Effort lost in friction\n", + "\n", + "print \"Effort lost in friction\",efl\n", + "print \"Efficiency\",Efficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example 6.3" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 51.3333333333\n", + "Velocity Ratio 85.5555555556\n", + "Efficiency 61.7142857143\n", + "Maximum Mechanical advantage-- 55.0\n", + "Maximum Efficiency 64.2857142857\n" + ] + } + ], + "source": [ + "import math\n", + "W1 = 7700.0 #Load 1\n", + "P1= 150.0 #Effort1\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=0.6\n", + "VR=MA/Efficiency #Velocity Ratio\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "W2 = 13200.0 #Load 2\n", + "P2= 250.0 #Effort2\n", + "MA=W2/P2\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "\n", + "\n", + "MMA=1/m #Maximum Mechanical advantage\n", + "print \"Maximum Mechanical advantage--\",MMA\n", + "\n", + "MaxEfficiency=MMA/VR*100\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.4" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Law of machine is P= 0.06 W + 10.5\n" + ] + }, + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('<div/>');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n", + " 'ui-helper-clearfix\"/>');\n", + " var titletext = $(\n", + " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n", + " 'text-align: center; padding: 3px;\"/>');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('<div/>');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('<canvas/>');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('<canvas/>');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('<button/>');\n", + " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n", + " 'ui-button-icon-only');\n", + " button.attr('role', 'button');\n", + " button.attr('aria-disabled', 'false');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + "\n", + " var icon_img = $('<span/>');\n", + " icon_img.addClass('ui-button-icon-primary ui-icon');\n", + " icon_img.addClass(image);\n", + " icon_img.addClass('ui-corner-all');\n", + "\n", + " var tooltip_span = $('<span/>');\n", + " tooltip_span.addClass('ui-button-text');\n", + " tooltip_span.html(tooltip);\n", + "\n", + " button.append(icon_img);\n", + " button.append(tooltip_span);\n", + "\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " var fmt_picker_span = $('<span/>');\n", + "\n", + " var fmt_picker = $('<select/>');\n", + " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n", + " fmt_picker_span.append(fmt_picker);\n", + " nav_element.append(fmt_picker_span);\n", + " this.format_dropdown = fmt_picker[0];\n", + "\n", + " for (var ind in mpl.extensions) {\n", + " var fmt = mpl.extensions[ind];\n", + " var option = $(\n", + " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n", + " fmt_picker.append(option)\n", + " }\n", + "\n", + " // Add hover states to the ui-buttons\n", + " $( \".ui-button\" ).hover(\n", + " function() { $(this).addClass(\"ui-state-hover\");},\n", + " function() { $(this).removeClass(\"ui-state-hover\");}\n", + " );\n", + "\n", + " var status_bar = $('<span class=\"mpl-message\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "}\n", + "\n", + "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n", + " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n", + " // which will in turn request a refresh of the image.\n", + " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n", + "}\n", + "\n", + "mpl.figure.prototype.send_message = function(type, properties) {\n", + " properties['type'] = type;\n", + " properties['figure_id'] = this.id;\n", + " this.ws.send(JSON.stringify(properties));\n", + "}\n", + "\n", + "mpl.figure.prototype.send_draw_message = function() {\n", + " if (!this.waiting) {\n", + " this.waiting = true;\n", + " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n", + " }\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " var format_dropdown = fig.format_dropdown;\n", + " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n", + " fig.ondownload(fig, format);\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype.handle_resize = function(fig, msg) {\n", + " var size = msg['size'];\n", + " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n", + " fig._resize_canvas(size[0], size[1]);\n", + " fig.send_message(\"refresh\", {});\n", + " };\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n", + " var x0 = msg['x0'];\n", + " var y0 = fig.canvas.height - msg['y0'];\n", + " var x1 = msg['x1'];\n", + " var y1 = fig.canvas.height - msg['y1'];\n", + " x0 = Math.floor(x0) + 0.5;\n", + " y0 = Math.floor(y0) + 0.5;\n", + " x1 = Math.floor(x1) + 0.5;\n", + " y1 = Math.floor(y1) + 0.5;\n", + " var min_x = Math.min(x0, x1);\n", + " var min_y = Math.min(y0, y1);\n", + " var width = Math.abs(x1 - x0);\n", + " var height = Math.abs(y1 - y0);\n", + "\n", + " fig.rubberband_context.clearRect(\n", + " 0, 0, fig.canvas.width, fig.canvas.height);\n", + "\n", + " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n", + " // Updates the figure title.\n", + " fig.header.textContent = msg['label'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n", + " var cursor = msg['cursor'];\n", + " switch(cursor)\n", + " {\n", + " case 0:\n", + " cursor = 'pointer';\n", + " break;\n", + " case 1:\n", + " cursor = 'default';\n", + " break;\n", + " case 2:\n", + " cursor = 'crosshair';\n", + " break;\n", + " case 3:\n", + " cursor = 'move';\n", + " break;\n", + " }\n", + " fig.rubberband_canvas.style.cursor = cursor;\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_message = function(fig, msg) {\n", + " fig.message.textContent = msg['message'];\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_draw = function(fig, msg) {\n", + " // Request the server to send over a new figure.\n", + " fig.send_draw_message();\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n", + " fig.image_mode = msg['mode'];\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Called whenever the canvas gets updated.\n", + " this.send_message(\"ack\", {});\n", + "}\n", + "\n", + "// A function to construct a web socket function for onmessage handling.\n", + "// Called in the figure constructor.\n", + "mpl.figure.prototype._make_on_message_function = function(fig) {\n", + " return function socket_on_message(evt) {\n", + " if (evt.data instanceof Blob) {\n", + " /* FIXME: We get \"Resource interpreted as Image but\n", + " * transferred with MIME type text/plain:\" errors on\n", + " * Chrome. But how to set the MIME type? It doesn't seem\n", + " * to be part of the websocket stream */\n", + " evt.data.type = \"image/png\";\n", + "\n", + " /* Free the memory for the previous frames */\n", + " if (fig.imageObj.src) {\n", + " (window.URL || window.webkitURL).revokeObjectURL(\n", + " fig.imageObj.src);\n", + " }\n", + "\n", + " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n", + " evt.data);\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n", + " fig.imageObj.src = evt.data;\n", + " fig.updated_canvas_event();\n", + " fig.waiting = false;\n", + " return;\n", + " }\n", + "\n", + " var msg = JSON.parse(evt.data);\n", + " var msg_type = msg['type'];\n", + "\n", + " // Call the \"handle_{type}\" callback, which takes\n", + " // the figure and JSON message as its only arguments.\n", + " try {\n", + " var callback = fig[\"handle_\" + msg_type];\n", + " } catch (e) {\n", + " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n", + " return;\n", + " }\n", + "\n", + " if (callback) {\n", + " try {\n", + " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n", + " callback(fig, msg);\n", + " } catch (e) {\n", + " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n", + " }\n", + " }\n", + " };\n", + "}\n", + "\n", + "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n", + "mpl.findpos = function(e) {\n", + " //this section is from http://www.quirksmode.org/js/events_properties.html\n", + " var targ;\n", + " if (!e)\n", + " e = window.event;\n", + " if (e.target)\n", + " targ = e.target;\n", + " else if (e.srcElement)\n", + " targ = e.srcElement;\n", + " if (targ.nodeType == 3) // defeat Safari bug\n", + " targ = targ.parentNode;\n", + "\n", + " // jQuery normalizes the pageX and pageY\n", + " // pageX,Y are the mouse positions relative to the document\n", + " // offset() returns the position of the element relative to the document\n", + " var x = e.pageX - $(targ).offset().left;\n", + " var y = e.pageY - $(targ).offset().top;\n", + "\n", + " return {\"x\": x, \"y\": y};\n", + "};\n", + "\n", + "/*\n", + " * return a copy of an object with only non-object keys\n", + " * we need this to avoid circular references\n", + " * http://stackoverflow.com/a/24161582/3208463\n", + " */\n", + "function simpleKeys (original) {\n", + " return Object.keys(original).reduce(function (obj, key) {\n", + " if (typeof original[key] !== 'object')\n", + " obj[key] = original[key]\n", + " return obj;\n", + " }, {});\n", + "}\n", + "\n", + "mpl.figure.prototype.mouse_event = function(event, name) {\n", + " var canvas_pos = mpl.findpos(event)\n", + "\n", + " if (name === 'button_press')\n", + " {\n", + " this.canvas.focus();\n", + " this.canvas_div.focus();\n", + " }\n", + "\n", + " var x = canvas_pos.x;\n", + " var y = canvas_pos.y;\n", + "\n", + " this.send_message(name, {x: x, y: y, button: event.button,\n", + " step: event.step,\n", + " guiEvent: simpleKeys(event)});\n", + "\n", + " /* This prevents the web browser from automatically changing to\n", + " * the text insertion cursor when the button is pressed. We want\n", + " * to control all of the cursor setting manually through the\n", + " * 'cursor' event from matplotlib */\n", + " event.preventDefault();\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " // Handle any extra behaviour associated with a key event\n", + "}\n", + "\n", + "mpl.figure.prototype.key_event = function(event, name) {\n", + "\n", + " // Prevent repeat events\n", + " if (name == 'key_press')\n", + " {\n", + " if (event.which === this._key)\n", + " return;\n", + " else\n", + " this._key = event.which;\n", + " }\n", + " if (name == 'key_release')\n", + " this._key = null;\n", + "\n", + " var value = '';\n", + " if (event.ctrlKey && event.which != 17)\n", + " value += \"ctrl+\";\n", + " if (event.altKey && event.which != 18)\n", + " value += \"alt+\";\n", + " if (event.shiftKey && event.which != 16)\n", + " value += \"shift+\";\n", + "\n", + " value += 'k';\n", + " value += event.which.toString();\n", + "\n", + " this._key_event_extra(event, name);\n", + "\n", + " this.send_message(name, {key: value,\n", + " guiEvent: simpleKeys(event)});\n", + " return false;\n", + "}\n", + "\n", + "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n", + " if (name == 'download') {\n", + " this.handle_save(this, null);\n", + " } else {\n", + " this.send_message(\"toolbar_button\", {name: name});\n", + " }\n", + "};\n", + "\n", + "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n", + " this.message.textContent = tooltip;\n", + "};\n", + "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n", + "\n", + "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n", + "\n", + "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n", + " // Create a \"websocket\"-like object which calls the given IPython comm\n", + " // object with the appropriate methods. Currently this is a non binary\n", + " // socket, so there is still some room for performance tuning.\n", + " var ws = {};\n", + "\n", + " ws.close = function() {\n", + " comm.close()\n", + " };\n", + " ws.send = function(m) {\n", + " //console.log('sending', m);\n", + " comm.send(m);\n", + " };\n", + " // Register the callback with on_msg.\n", + " comm.on_msg(function(msg) {\n", + " //console.log('receiving', msg['content']['data'], msg);\n", + " // Pass the mpl event to the overriden (by mpl) onmessage function.\n", + " ws.onmessage(msg['content']['data'])\n", + " });\n", + " return ws;\n", + "}\n", + "\n", + "mpl.mpl_figure_comm = function(comm, msg) {\n", + " // This is the function which gets called when the mpl process\n", + " // starts-up an IPython Comm through the \"matplotlib\" channel.\n", + "\n", + " var id = msg.content.data.id;\n", + " // Get hold of the div created by the display call when the Comm\n", + " // socket was opened in Python.\n", + " var element = $(\"#\" + id);\n", + " var ws_proxy = comm_websocket_adapter(comm)\n", + "\n", + " function ondownload(figure, format) {\n", + " window.open(figure.imageObj.src);\n", + " }\n", + "\n", + " var fig = new mpl.figure(id, ws_proxy,\n", + " ondownload,\n", + " element.get(0));\n", + "\n", + " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n", + " // web socket which is closed, not our websocket->open comm proxy.\n", + " ws_proxy.onopen();\n", + "\n", + " fig.parent_element = element.get(0);\n", + " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n", + " if (!fig.cell_info) {\n", + " console.error(\"Failed to find cell for figure\", id, fig);\n", + " return;\n", + " }\n", + "\n", + " var output_index = fig.cell_info[2]\n", + " var cell = fig.cell_info[0];\n", + "\n", + "};\n", + "\n", + "mpl.figure.prototype.handle_close = function(fig, msg) {\n", + " fig.root.unbind('remove')\n", + "\n", + " // Update the output cell to use the data from the current canvas.\n", + " fig.push_to_output();\n", + " var dataURL = fig.canvas.toDataURL();\n", + " // Re-enable the keyboard manager in IPython - without this line, in FF,\n", + " // the notebook keyboard shortcuts fail.\n", + " IPython.keyboard_manager.enable()\n", + " $(fig.parent_element).html('<img src=\"' + dataURL + '\">');\n", + " fig.close_ws(fig, msg);\n", + "}\n", + "\n", + "mpl.figure.prototype.close_ws = function(fig, msg){\n", + " fig.send_message('closing', msg);\n", + " // fig.ws.close()\n", + "}\n", + "\n", + "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n", + " // Turn the data on the canvas into data in the output cell.\n", + " var dataURL = this.canvas.toDataURL();\n", + " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\">';\n", + "}\n", + "\n", + "mpl.figure.prototype.updated_canvas_event = function() {\n", + " // Tell IPython that the notebook contents must change.\n", + " IPython.notebook.set_dirty(true);\n", + " this.send_message(\"ack\", {});\n", + " var fig = this;\n", + " // Wait a second, then push the new image to the DOM so\n", + " // that it is saved nicely (might be nice to debounce this).\n", + " setTimeout(function () { fig.push_to_output() }, 1000);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('<div/>')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items){\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) { continue; };\n", + "\n", + " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n", + " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " event.shiftKey = false;\n", + " // Send a \"J\" for go to next cell\n", + " event.which = 74;\n", + " event.keyCode = 74;\n", + " manager.command_mode();\n", + " manager.handle_keydown(event);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i<ncells; i++) {\n", + " var cell = cells[i];\n", + " if (cell.cell_type === 'code'){\n", + " for (var j=0; j<cell.output_area.outputs.length; j++) {\n", + " var data = cell.output_area.outputs[j];\n", + " if (data.data) {\n", + " // IPython >= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "<IPython.core.display.Javascript object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADQfSURBVHhe7d0HnFTV/f7xh1AtgF1BjVgwYlQUYwdsCCiWxEhQUESDooLlL1YERCXEFjtElIgiKPyMvQREEQRbFAto7DGKomIBFk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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOJA+v9AkmDBbNm4yQAAAABJRU5ErkJggg==\">" + ], + "text/plain": [ + "<IPython.core.display.HTML object>" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum Efficiency 66.6666666667\n" + ] + } + ], + "source": [ + "%matplotlib notebook\n", + "import matplotlib\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt2\n", + "W=[100.0,200.0,300.0,400.0,500.0,600.0] #loads \n", + "P=[16.0,22.5,28.0,34.0,40.5,46.5] #Efforts\n", + "VR=25.0 #velocity ratio\n", + "E=[0,0,0,0,0,0] #Efficiency\n", + "#calculating average slope\n", + "m=(P[4]-P[1])/(W[4]-W[1])\n", + "C=P[4]-m*W[4]\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "for i in range(0,6):\n", + " \n", + " E[i]=W[i]/(25*P[i])*100 #E=W/(P*VR)\n", + " \n", + "plt2.plot(W,E)\n", + "plt2.ylabel(\"Efficiency\")\n", + "plt2.xlabel(\"Load\")\n", + "plt2.show() \n", + "\n", + " \n", + "MaxEfficiency=1/VR*100*1/m\n", + "\n", + "print \"Maximum Efficiency\",MaxEfficiency\n", + "\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.5" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical advantage-- 13.8888888889\n", + "Velocity Ratio 30.0\n", + "Efficiency 46.2962962963\n", + "self-locking machine\n", + "Ideal Load 10800.0\n", + "frictional resistance 5800.0\n" + ] + } + ], + "source": [ + "\n", + "W = 5000.0 #Load\n", + "P = 360.0 #Effort\n", + "\n", + "MA=W/P #Mechanical advantage\n", + "VR=30.0 #Velocity Ratio\n", + "Efficiency=MA/VR*100.0\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "\n", + "\n", + "\n", + "Wi = P*VR #ideal load\n", + "\n", + "Fr=Wi-W #frictional resistance\n", + "print \"Mechanical advantage--\",MA\n", + "print \"Velocity Ratio\",VR\n", + "print \"Efficiency\",Efficiency\n", + "print var\n", + "print \"Ideal Load\",Wi\n", + "\n", + "print \"frictional resistance\",Fr\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.6" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 937.5 N\n", + "number of pulley is 4\n" + ] + } + ], + "source": [ + "import math\n", + "W = 6000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.8\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n", + "#second case\n", + "P=520.0\n", + "n=0,\n", + "for i in range(3,20):\n", + " if((P*(0.8-(i-3)*0.05)*(2**i)))>6000:\n", + " n=i\n", + " break\n", + " \n", + " \n", + "print \"number of pulley is \",n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Exmple 6.7" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 2352.94117647 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N=3.0 #number of movable pulleys\n", + "VR=2*N #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.85\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.8" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1923.07692308 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 12000.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1\n", + "N2=2.0 #number of movable puleys in system 2\n", + "VR=2*N1+2*N2 #Velocity Ratio\n", + "L=0.05 #Efficiency loss in each pulley\n", + "Efficiency=0.78\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 79.3650793651\n", + "Effort lost in friction 37.1428571429\n" + ] + } + ], + "source": [ + "import math\n", + "W = 1000.0 #Load\n", + "N=3.0 #number of pulleys\n", + "VR=2**N-1 #Velocity Ratio\n", + "P = 180.0 #Effort\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100\n", + "print \"Efficiency\",Efficiency\n", + "Pi =W/VR #Ideal effort\n", + "\n", + "efl=P-Pi #Effort lost in friction\n", + "print \"Effort lost in friction\",efl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.10" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 595.238095238 N\n" + ] + } + ], + "source": [ + "import math\n", + "W = 2500.0 #Load\n", + "N1=2.0 #number of movable pulleys in system 1 in figure B\n", + "N2=2.0 #number of movable puleys in system 2 in figure C\n", + "VR=2**N1-1+2**N2-1 #Velocity Ratio\n", + "Efficiency=0.70\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.11" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 2.3\n", + "Effort is 745.341614907 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle\n", + "tcw=6.0 #thickness of the cord on the wheel\n", + "tca=20.0 #thickness of the cord on the axle\n", + "W=1200 #effort\n", + "ED=D+tcw #Effective diameter of the wheel\n", + "Ed=d+tca #Effectivediameter of axle\n", + "VR=ED/Ed #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.7\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.12" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 32.0\n", + "Effort is 1136.36363636 N\n" + ] + } + ], + "source": [ + "D=800.0 #diameter of the wheel\n", + "d1=250.0 #diameter of axle 1\n", + "d2=300.0 #diameter of axle 2\n", + "\n", + "W=20000.0 #effort\n", + "\n", + "VR=(2*D)/(d2-d1) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.55\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.13" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity ratio is 3.33333333333\n", + "Effort is 2500.0 N\n" + ] + } + ], + "source": [ + "D=500.0 #diameter of the wheel\n", + "d=200.0 #diameter of axle \n", + "\n", + "W=5000.0 #effort\n", + "\n", + "VR=(2*D)/(D-d) #Velocity Ratio\n", + "print \"Velocity ratio is \",VR\n", + "Efficiency=0.6\n", + "MA=Efficiency*VR #Mechanical advantage\n", + "P = W/MA #Effort\n", + "print \"Effort is\",P,\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 1741.88034188 N\n" + ] + } + ], + "source": [ + "D=40.0 #Screw diameter\n", + "l=20.0 #Screw lwngth\n", + "p=l/3.0 #Lead of the screw\n", + "W=40000.0 #effort\n", + "R = 400 #Lever length\n", + "u = 0.12 #coefficient of friction between screw and nut\n", + "P = (d/(2*R))*W*((u+(p/(3.14*D)))/(1-u*(p/(3.14*D)))) #Effort\n", + "print \"Effort is\",P,\"N\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.15" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Effort is 57.0287539936 N\n", + "Efficiency 55.8439936484 %\n", + "reversible machine\n", + "The torque required to keep the load from descending 2047.61904762 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "d=50.0 #mean diameter of screw\n", + "p=10.0 #pitch of screw\n", + "u=0.05 #coefficient of friction at the screw thread\n", + "R=300.0 ##Lever length\n", + "W=6000.0 #Load\n", + "o1=math.atan(p/(3.14*d))\n", + "o2=math.atan(0.05)\n", + "P=d/(2*R)*(W*math.tan(o1+o2)) #effort\n", + "print \"Effort is\",P,\"N\"\n", + "VR=2*3.14*R/p #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "print \"Efficiency\",Efficiency,\"%\"\n", + "var=\"reversible machine\"\n", + "if Efficiency < 50.0:\n", + " var=\"self-locking machine\"\n", + "print var\n", + "T =d/2.0*W*math.tan(o1-o2) #The torque required to keep the load from descending\n", + "print \"The torque required to keep the load from descending\",T,\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.16" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency 12.9110001721 %\n" + ] + } + ], + "source": [ + "import math\n", + "p1=5.0 #Pitch of smaller screw\n", + "p2=10.0 #Pitch of larger screw\n", + "R=500.0 #Lever arm length from centre of screw\n", + "W=15000.0 #Load\n", + "P=185.0 #Effort\n", + "VR=2*3.14*R/(p2-p1) #Velocity Ratio\n", + "MA=W/P #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency\",Efficiency,\"%\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.17" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 120.0\n", + "Law of machine is P= 0.01 W + 70.0\n", + "Efficiency for first case 25.0 %\n", + "Efficiency for second case 46.875 %\n" + ] + } + ], + "source": [ + "d=200.0 #Diameter of the load drum \n", + "R = 1200.0 # Length of lever arm \n", + "T1 = 10.0 #Number of teeth on pinion, \n", + "T2 = 100.0 #Number of teeth on spur wheel\n", + "VR=R*T2/(d*T1)*2.0 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "W1 = 3000.0 #Load 1\n", + "P1= 100.0 #Effort1\n", + "\n", + "W2 = 9000.0 #Load 2\n", + "P2= 160.0 #Effort2\n", + "\n", + "#law of machine is given by P=mW+C\n", + "m=(P2-P1)/(W2-W1)\n", + "C=P2-m*W2\n", + "print \"Law of machine is P=\",m,\"W\",\"+\",C\n", + "MA=W1/P1 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for first case\",Efficiency,\"%\"\n", + "MA=W2/P2 #Mechanical advantage\n", + "Efficiency=MA/VR*100.0\n", + "\n", + "print \"Efficiency for second case\",Efficiency,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 6.18" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Velocity Ratio is 32.0\n", + "LOad 3200.0 N\n" + ] + } + ], + "source": [ + "d=150.0 #Diameter of the load drum \n", + "R = 400.0 # Length of lever arm \n", + "T1 = 15.0 #Number of teeth on pinion, \n", + "T3 = 20.0 #Number of teeth on pinion, \n", + "T2 = 45.0 #Number of teeth on spur wheel\n", + "T4 = 40.0 #Number of teeth on spur wheel\n", + "P= 250.0 #Effort\n", + "Efficiency=0.4\n", + "VR=R*T2/(d*T1)*2.0*T4/T3 #Velocity Ratio\n", + "print \"Velocity Ratio is \",VR\n", + "\n", + "W=VR*Efficiency*P #Load \n", + "\n", + "print \"LOad\",W,\"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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_6BR5OK6.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_6BR5OK6.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_6BR5OK6.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_FV7Jgrb.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_FV7Jgrb.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_FV7Jgrb.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_Q79Sp1O.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_Q79Sp1O.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_Q79Sp1O.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_Qhj9HPA.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_Qhj9HPA.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_Qhj9HPA.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_fBoE3j3.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_fBoE3j3.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_fBoE3j3.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_mFOxHz2.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_mFOxHz2.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_mFOxHz2.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_zNY63b3.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_zNY63b3.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_zNY63b3.ipynb @@ -0,0 +1,1325 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter8-SIMPLE STRESSES AND STRAINS" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.1 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sectional area= 201.06 mm^2\n", + "stress= 198.94 N/mm^2\n", + "strain= 0.000994718394324 N/mm^2\n", + "Elongation= 0.497 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40000) #Load,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=500 #length of circular rod,mm\n", + "d=float(16) #diameter of rod,mm\n", + " \n", + "A=(pi*(pow(d,2)))/4 #sectional area, mm^2\n", + "p=P/A #stress, N/mm^2\n", + "e=p/E #strain\n", + "delta=(P*L)/(A*E) #Elongation,mm\n", + "\n", + "print \"sectional area=\",round(A,2),\"mm^2\"\n", + "print \"stress=\",round(p,2),\"N/mm^2\"\n", + "print \"strain=\",e,\"N/mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.2 Page number243" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "area= 11.25 mm^2\n", + "Elongation= 1.6 mm\n", + "Hence, if measured length is 30.0 m.\n", + "Actual length is 30.0016 m\n", + "Actual length of line AB= 150.008 m.\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "P=float(120) # force applied during measurement,N\n", + "E=float(200000) #Modulus of elasticity for steel,N/mm^2\n", + "L=float(30) #length of Surveyor’s steel tape,mm\n", + " \n", + " \n", + "A=15*0.75 #area, mm^2\n", + "delta=((P*L*1000)/(A*E)) #Elongation,mm\n", + "\n", + "print \"area=\",round(A,2),\"mm^2\"\n", + "print \"Elongation=\",round(delta,3),\"mm\"\n", + "\n", + "print \"Hence, if measured length is\", L,\"m.\"\n", + "print \"Actual length is\" ,round((L+(delta/1000)),6),\"m\"\n", + "\n", + "print \"Actual length of line AB=\",round((150*(L+(delta/1000))/30),3),\"m.\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.3 Page number 244\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Therefore, permissible stress\n", + "p= 142.857 N/mm^2\n", + "Load P= 160000.0 N\n", + "A= 1120.0 mm^2\n", + "d= 94.32 mm\n", + "t= 3.64 mm\n", + "Hence, use of light section is recommended.\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "\n", + "#variable declaration\n", + "\n", + "Y=float(250) #Yield stress, N/mm^2\n", + "FOS=float(1.75) #Factor of safety\n", + "P=float(160) #Load,KN\n", + "\n", + "p=Y/FOS\n", + "\n", + "print \"Therefore, permissible stress\"\n", + "print \"p=\",round(p,3), \"N/mm^2\"\n", + "print \"Load P=\",P*1000,\"N\"\n", + "\n", + "#p=P/A\n", + "\n", + "A=P*1000/p #area,mm^2\n", + "\n", + "print \"A=\",round(A),\"mm^2\"\n", + "\n", + "#For hollow section of outer diameter ‘D’ and inner diameter ‘d’ A=pi*(D^2-d^2)/4\n", + "D=float(101.6) #outer diameter,mm\n", + "\n", + "d=sqrt(pow(D,2)-(4*A/pi))\n", + "\n", + "print \"d=\",round(d,2),\"mm\"\n", + "\n", + "t=(D-d)/2\n", + "print \"t=\",round(t,2),\"mm\"\n", + "\n", + "print \"Hence, use of light section is recommended.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.4 page number 245" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Area= 314.16 mm^2\n", + "Stress at elastic limit= 324.68 N/mm^2\n", + "Young's modulus E= 12732.4 N/mm^22\n", + "Percentage elongation= 28.0 %\n", + "Percentage reduction in area= 43.75 %\n", + "Ultimate Tensile Stress= 0.41 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration \n", + "\n", + "d=float(20) #Diameter ,mm\n", + "Loadatelasticlimit=float(102) #Load at elastic limit,KN\n", + "P=80 #Load for extension of o.25mm , KN\n", + "delta=float(0.25) #extension in specimen of steel,mm\n", + "L=200 #gauge length of specimen of steel,mm\n", + "Finalextension=float(56) #total extension at fracture,mm\n", + "\n", + "\n", + "A=(pi*pow(d,2))/4 #Area,mm^2\n", + "print \"Area=\", round(A,2),\"mm^2\"\n", + "\n", + "Stressatelasticlimit=Loadatelasticlimit*1000/A #Stress at elastic limit,N/mm^2 \n", + "print \"Stress at elastic limit=\",round(Stressatelasticlimit,2),\"N/mm^2\"\n", + "\n", + "E=(P*1000/A)*(delta*L) #Young’s modulus ,N/mm^2\n", + "print \"Young's modulus E=\", round(E,2),\"N/mm^22\"\n", + "\n", + "Percentageelongation=Finalextension*100/L #percentage elongation,%\n", + "print \"Percentage elongation=\", round(Percentageelongation,2),\"%\"\n", + "\n", + "Initialarea=(pi*pow(d,2))/4\n", + "Finalarea=(pi*pow(15,2))/4 # total extension at fracture is 56 mm and diameter at neck is 15 mm.\n", + "Percentagereductioninarea=(Initialarea-Finalarea)*100/Initialarea\n", + "\n", + "print \"Percentage reduction in area=\",round(Percentagereductioninarea,2),\"%\"\n", + "\n", + "UltimateLoad=130 #Maximum Load=130,kN\n", + "UltimateTensileStress=UltimateLoad/A\n", + "\n", + "print\"Ultimate Tensile Stress=\",round(UltimateTensileStress,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.5 Page number247\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 56277.19 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(40) #Load,KN\n", + "L1=150 #length of 1st portion,mm\n", + "A1=pi*pow(25,2)/4 #Area of 1st portion,mm^2\n", + "L2=250 #length of 2nd portion,mm\n", + "A2=pi*pow(20,2)/4 #Area of 2nd portion,mm^2\n", + "L3=150 #length of 3rd portion,mm\n", + "A3=pi*pow(25,2)/4 #Area of 3rd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2+Extension of portion 3\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "E=(P*1000*L1/A1)+(P*1000*L2/A2)+(P*1000*L3/A3)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.6 Page number247" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total extension of the bar= 0.5125 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=40*20 #Area of 1st portion,mm^2\n", + "\n", + "E1=200000 # material 1 Young’s modulus,N/mm^2\n", + " \n", + "E2=100000 # material 2 Young’s modulus,N/mm^2\n", + " \n", + "\n", + "L2=800 #length of 2nd portion,mm\n", + "A2=30*20 #Area of 2nd portion,mm^2\n", + "\n", + "Extensionofportion1=(P*1000*L1)/(A1*E1) #mm\n", + "Extensionofportion2=(P*1000*L2)/(A2*E2) #mm\n", + "\n", + "Totalextensionofthebar= Extensionofportion1 + Extensionofportion2\n", + "\n", + "print\"Total extension of the bar=\",round(Totalextensionofthebar,4),\"mm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.7 Page number248\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 200735.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(30) #Load,KN\n", + "L1=600 #length of 1st portion,mm\n", + "A1=pi*pow(30,2)/4 #Area of 1st portion,mm^2\n", + "L2=400 #length of 2nd portion,mm\n", + "A2=pi*(pow(30,2)-pow(10,2))/4 #Area of 2nd portion,mm^2\n", + "\n", + "#E,Young's modulus ,N/mm^2\n", + "\n", + "#Total extension= Extension of portion 1+Extension of portion 2\n", + "\n", + "#Extension=(P*1000*L)/(A*E)\n", + "\n", + "T=float(0.222) #Total extension of the bar,mm\n", + "\n", + "E=((P*1000*L1/A1)+(P*1000*L2/A2))/T \n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.10 Page number 251" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 0.2113 mm\n", + "there is calculation mistake in book\n", + "delta2= 0.48 mm^2\n", + "Percentage error= 55.977 %\n", + "there is calculation mistake in book\n" + ] + } + ], + "source": [ + "import math\n", + "#variable declaration\n", + "\n", + "t=10 #steel flat thickness,mm\n", + "b1=float(60) #tapering from b1 to b2\n", + "b2=40\n", + "L=600 #steel flat length\n", + "P=float(80) #Load,KN\n", + "E=2*100000 #Young's Modulus,N/mm^2\n", + "\n", + "#Extension of the tapering bar of rectangular section\n", + "\n", + "delta1=(P*1000*L*math.log((b1/b2),10))/(t*E*(b1-b2))\n", + "\n", + "print \"delta1=\",round(delta1,4),\"mm\"\n", + "print \"there is calculation mistake in book\"\n", + "\n", + "#If averages cross-section is considered instead of tapering cross-section, extension is given by \n", + "\n", + "Aav=(b1+b2)*t/2 #mm^2\n", + "\n", + "delta2=(P*1000*L)/(Aav*E) #mm\n", + "print\"delta2=\",round(delta2,3),\"mm^2\"\n", + "\n", + "P= (delta2-delta1)*100/delta2\n", + "\n", + "print\"Percentage error=\",round(P,3),\"%\"\n", + "\n", + "print \"there is calculation mistake in book\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.11 page number251" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "delta1= 1.194 mm\n", + "delta2= 0.265 mm\n", + "Total extension 1.459 mm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(200) #loading,KN\n", + "E=200*1000\n", + "d1=40 #Young's modulus,N/mm^2\n", + "A= pi*pow(d1,2)/4 #Area of uniform portion,mm^2 \n", + "L1=1500 #length of uniform portion,mm \n", + "d2=60 #diameter of tapered section,mm\n", + "L2=500 #length of tapered section,mm\n", + "#Extensions of uniform portion and tapering portion are worked out separately and then added to get extension of the given bar. \n", + "\n", + "#Extension of uniform portion\n", + "\n", + "delta1=(P*1000*L1)/(A*E)\n", + "\n", + "print \"delta1=\",round(delta1,3),\"mm\"\n", + "\n", + "delta2=(P*1000*4*L2)/(E*pi*d1*d2)\n", + "\n", + "print \"delta2=\",round(delta2,3),\"mm\"\n", + "\n", + "T=delta1 + delta2 \n", + "print \"Total extension\",round(T,3),\"mm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.13 page number259" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Poisson's ratio= 0.3\n", + "E= 203718.33 N/mm^2\n", + "G= 78353.2 N/mm^2\n", + "K= 169765.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "P=float(60) #load,KN\n", + "d=float(25) #diameter,mm\n", + "A=pi*pow(d,2)/4 #Area,mm^2\n", + "L=float(200) #gauge length,mm\n", + "\n", + "delta=0.12 #extension,mm\n", + "deltad=0.0045 #contraction in diameter,mm\n", + "Linearstrain=delta/L\n", + "Lateralstrain=deltad/d\n", + "\n", + "Pr=Lateralstrain/Linearstrain\n", + "\n", + "print \"Poisson's ratio=\",round(Pr,1)\n", + "\n", + "E=(P*1000*L)/(A*delta)\n", + "\n", + "print \"E=\",round(E,2),\"N/mm^2\"\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "print \"G=\",round(G,1),\"N/mm^2\"\n", + "\n", + "K=E/(3*(1-(2*Pr))) #bulk modulus\n", + "\n", + "print \"K=\",round(K,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.14 page number 260" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "G= 76923.1 N/mm^2\n", + "K= 166666.67 N/mm^2\n", + "change in volume 60.0 mm^3\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "Pr=float(0.3) #poisson's ratio\n", + "\n", + "G=E/(2*(1+Pr)) #Rigidity modulus\n", + "\n", + "K=E/(3*(1-2*(Pr))) #Bulk modulus\n", + "\n", + "print \"G=\", round(G,1),\"N/mm^2\"\n", + "\n", + "print \"K=\", round(K,2), \"N/mm^2\"\n", + "\n", + "P=60 #Load,kN\n", + "A=pi*pow(25,2)/4 #Area,mm^2\n", + "\n", + "Stress=P*1000/A #N/mm^2\n", + "#Linear strain,ex\n", + "\n", + "ex=Stress/E\n", + " \n", + "#Lateralstrain,ey,ez\n", + "\n", + "ey=-1*Pr*ex\n", + "ez=-1*Pr*ex\n", + "\n", + "#volumetric strain,ev=ex+ey+ez\n", + "\n", + "ev=ex+ey+ez\n", + "\n", + "v=pi*pow(25,2)*500/4\n", + "Changeinvolume=ev*v\n", + "\n", + "print\"change in volume\",round(Changeinvolume,2),\"mm^3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.15 page number261" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in volume= 10.8 mm^3\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "# Let the x, y, z be the mutually perpendicular directions\n", + "\n", + "pr=float(0.3)\n", + "PX=float(15) #Loading in x-direction,KN\n", + "PY=float(80) #Loading in Y-direction(compressive),KN\n", + "PZ=float(180) #Loading in Z-direction,KN\n", + "\n", + "#Area in X-,Y-,Z-Direction is AX,AY,AZ respectively,mm^2\n", + "\n", + "AX=float(10*30)\n", + "AY=float(10*400)\n", + "AZ=float(30*400)\n", + "\n", + "#stress devoloped in X-,Y-,Z- direction as px,py,pz respectively,N/mm^2\n", + "\n", + "px=PX*1000/AX\n", + "py=PY*1000/AY\n", + "pz=PZ*1000/AZ\n", + "\n", + "#Noting that a stress produces a strain of p/E in its own direction, the nature being same as that of stress and µ p E in lateral direction of opposite nature, and taking tensile stress as +ve, we can write expression for strains ex, ey, ez.\n", + "E=2*100000 #young's modulus,N/mm^2\n", + "\n", + "ex=(px/E)+(pr*py/E)-(pr*pz/E)\n", + "ey=(-pr*px/E)-(py/E)-(pr*pz/E)\n", + "ez=(-pr*px/E)+(pr*py/E)+(pz/E)\n", + "\n", + "ev=ex+ey+ez #Volumetric strain\n", + "\n", + "volume=10*30*400\n", + "\n", + "Changeinvolume=ev*volume\n", + "\n", + "print \"Change in volume=\",round(Changeinvolume,2),\"mm^3\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.17 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "poisson's Ratio= 0.346\n", + "Bulk modulus= 227500.0 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "E=float(2.1*100000) #Young’s modulus of the material,N/mm^2\n", + "G=float(0.78*100000) #modulus of rigidity,N/mm^2\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"poisson's Ratio=\",round(pr,3)\n", + "\n", + "K=E/(3*(1-2*pr))\n", + "\n", + "print \"Bulk modulus=\",round(K,3),\"N/mm^2\" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.18 page number 263" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Young's modulus= 102857.143 N\n", + "Poisson's Ratio 0.2857\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "G=float(0.4*100000) #modulus of rigidity of material,N/mm^2\n", + "K=float(0.8*100000) #bulk modulus,N/mm^2\n", + "\n", + "E=(9*G*K)/(3*K+G)\n", + "\n", + "\n", + "print \"Young's modulus=\",round(E,3),\"N\"\n", + "\n", + "pr=(E/(2*G))-1\n", + "\n", + "print \"Poisson's Ratio\",round(pr,4)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.19 page number 264" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stress in aluminium strip= 23.08 N/mm^2\n", + "Stress in steel strip= 46.15 N/mm^2\n", + "Extension of the compound bar= 0.138 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(600) #compound bar of length,mm\n", + "P=float(60) #compound bar when axial tensile force ,KN\n", + "\n", + "Aa=float(40*20) #area of aluminium strip,mm^2\n", + "As=float(60*15) #area of steel strip,mm^2\n", + "\n", + "Ea=1*100000 # elastic modulus of aluminium,N/mm^2\n", + "Es=2*100000 # elastic modulus of steel,N/mm^2\n", + "\n", + "#load shared by aluminium strip be Pa and that shared by steel be Ps. Then from equilibrium condition Pa+Ps=P\n", + "#From compatibility condition, deltaAL=deltaS\n", + "Pa=(P*1000)/(1+((As*Es)/(Aa*Ea)))\n", + "Ps=Pa*((As*Es)/(Aa*Ea))\n", + "\n", + "Sias=Pa/Aa\n", + "print \"Stress in aluminium strip=\",round(Sias,2),\"N/mm^2\"\n", + "Siss=Ps/As\n", + "print \"Stress in steel strip=\",round(Siss,2),\"N/mm^2\"\n", + "\n", + "L=600\n", + "#Extension of the compound bar \n", + "deltal=(Pa*L)/(Aa*Ea)\n", + "print\"Extension of the compound bar=\",round(deltal,3),\"mm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.20 page number 265" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Copper= 75.76 N/mm^2\n", + "stress in Steel= 126.27 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel rod ,N/mm^2\n", + "Ec=float(1.2*100000) #Young's modulus of copper tube,N/mm^2\n", + "\n", + "di=float(25) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "\n", + "As=pi*pow(di,2)/4 #Area of steel rod,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #Area of copper tube,mm^2\n", + "P=120 #load, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel rod and Pc is the load shared by the copper tube.\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Es)/(Ac*Ec)))\n", + "Ps=Pc*((As*Es)/(Ac*Ec))\n", + "\n", + "SIC=Pc/Ac #stress in copper, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Copper=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.21 page number 266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Concrete= 4.51 N/mm^2\n", + "stress in Steel= 81.2 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "#Es/Ec=18(given)\n", + "Er=float(18) #young modulus ratio Er=Es/Ec\n", + "d=float(16) #steel bar diameter,mm\n", + "#8 steel bars\n", + "As=8*pi*pow(d,2)/4 #Area of steel bar,mm^2\n", + "Ac=(300*500)-As #Area of concrete,mm^2\n", + "\n", + "P=800 #Compressive force, KN\n", + "#From equation of equilibrium, Ps+Pc=P,where Ps is the load shared by steel bar and Pc is the load shared by the Concrete\n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pc=(P*1000)/(1+((As*Er)/(Ac)))\n", + "Ps=Pc*((As*Er)/(Ac))\n", + "\n", + "SIC=Pc/Ac #stress in Concrete, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Concrete=\",round(SIC,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.22 page number 267" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in Aluminium= 66.96 N/mm^2\n", + "stress in Steel= 89.29 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Es=float(2*100000) #Young's modulus of steel ,N/mm^2\n", + "Ea=float(1*100000) #Young's modulus of aluminium,N/mm^2\n", + "Ls=240 #length of steel,mm\n", + "La=160 #length of aluminium,mm\n", + "Aa=1200 #Area of aluminium,mm^2\n", + "As=1000 #Area of steel,mm^2\n", + "P=250 #load, KN\n", + "#From equation of equilibrium, Ps+2Pa=P,et force shared by each aluminium pillar be Pa and that shared by steel pillar be Ps. \n", + "#From compatibility condition,deltaS=deltaC\n", + "\n", + "Pa=(P*1000)/(2+((As*Es*La)/(Aa*Ea*Ls)))\n", + "Ps=Pa*((As*Es*La)/(Aa*Ea*Ls))\n", + "\n", + "SIA=Pa/Aa #stress in aluminium, N/mm^2\n", + "SIS=Ps/As #stress in steel,N/mm^2\n", + "\n", + "print \"stress in Aluminium=\",round(SIA,2),\"N/mm^2\"\n", + "print \"stress in Steel=\",round(SIS,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.23 page number 268\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ps= 91.73 N/mm^2\n", + "pc= 44.96 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let the force shared by bolt be Ps and that by tube be Pc. Since there is no external force, static equilibrium condition gives Ps + Pc = 0 or Ps = – Pc i.e., the two forces are equal in magnitude but opposite in nature. Obviously bolt is in tension and tube is in compression.\n", + "#Let the magnitude of force be P. Due to quarter turn of the nut\n", + "\n", + "#[Note. Pitch means advancement of nut in one full turn] \n", + "\n", + "Ls=float(600) #length of whole assembly,mm\n", + "Lc=float(600) #length of whole assembly,mm\n", + "delta=float(0.5)\n", + "ds=float(20) #diameter,mm\n", + "di=float(28) #internal diameter,mm\n", + "de=float(40) #external diameter,mm\n", + "Es=float(2*100000) #Young's modulus, N/mm^2\n", + "Ec=float(1.2*100000)\n", + "As=pi*pow(ds,2)/4 #area of steel bolt,mm^2\n", + "Ac=pi*(pow(de,2)-pow(di,2))/4 #area of copper tube,mm^2\n", + "\n", + "P= (delta*(1/Ls))/((1/(As*Es))+(1/(Ac*Ec))) #Load,N\n", + "\n", + "ps=P/As #stress,N/mm^2\n", + "pc=P/Ac #copper,N/mm^2\n", + "\n", + "print \"ps=\",round(ps,2),\"N/mm^2\"\n", + "print \"pc=\",round(pc,2),\"N/mm^2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.24 page number 271" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) p= 52.8 \tN/mm^2\n", + "(b) p= 27.8 \tN/mm^2\n", + " (iii) delta= 1.968 mm\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "E=float(2*100000) #Young's modulus,N/mm^2\n", + "alpha=float(0.000012) #expansion coeffecient,/°c\n", + "L=float(12) #length,m\n", + "t=float(40-18) #temperature difference,°c\n", + "\n", + "delta=alpha*t*L*1000 #free expansion of the rails,mm \n", + "# Provide a minimum gap of 3.168 mm between the rails, so that temperature stresses do not develop\n", + " \n", + "# a) If no expansion joint is provided, free expansion prevented is equal to 3.168 mm.\n", + "\n", + "#delta=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p1=(delta*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(a) p=\", round(p1,1),\"\tN/mm^2\"\n", + "\n", + "#(b) If a gap of 1.5 mm is provided, free expansion prevented delta2 = 3.168 – 1.5 = 1.668 mm.\n", + "\n", + "delta2=1.668 #mm\n", + "#delta2=(P*L)/(A*E) & p=P/A where p is stress, P,A is load,area \n", + "\n", + "p2=(delta2*E)/(L*1000) #stress developed , N/mm^2\n", + "\n", + "print \"(b) p=\", round(p2,1),\"\tN/mm^2\"\n", + "\n", + "# If the stress developed is 20 N/mm2, then p = P/ A\n", + "p3=20 #stress developed,N/mm^2\n", + "delta3=delta-(p3*L*1000/E)\n", + "\n", + "print \" (iii) delta=\",round(delta3,3),\"mm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.25 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress p= 360.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "# Let D be the diameter of ring after heating and ‘d’ be its diameter before heating\n", + "D=float(1.2*1000) #mm\n", + "\n", + "#Circumference of ring after heating Ca= pi*D & Circumference of ring before heating Cb= pi*d\n", + "\n", + "Ca=pi*D\n", + "Cb=pi*d\n", + "alphas=float(0.000012) #coefficient of expansion,/°C\n", + "t=150 #temperature change,°C\n", + "Es=2*100000 #young's modulus,N/mm^2\n", + "d=(Ca-Cb)/(alphas*t*pi)\n", + "\n", + "#when it cools expansion prevented\n", + "#delta=pi*(D-d)\n", + "delta=alphas*t*pi*d\n", + "\n", + "p=(delta*Es)/(pi*d) #stress,N/mm^2\n", + "\n", + "print \"stress p=\",round(p,2),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.26 page number 272\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "P= 12907.3 N\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "Ea=70*1000 #Young's modulus of aluminium,N/mm^2\n", + "Es=200*1000 #Young's modulus of steel,N/mm^2\n", + "\n", + "alphaa=float(0.000011) #expansion coefficient,/°C\n", + "alphas=float(0.000012) #expansion coefficient,/°C\n", + "\n", + "Aa=600 #Area of aluminium portion,mm^2\n", + "As=400 #Area of steel, mm^2\n", + "La=float(1.5) #length of aluminium portion,m\n", + "Ls=float(3.0) #length of steel portion,m\n", + "t=18 #temperature,°C\n", + "\n", + "delta=(alphaa*t*La*1000)+(alphas*t*Ls*1000) #mm\n", + "\n", + "P=(delta)/(((La*1000)/(Aa*Ea))+((Ls*1000)/(As*Es)))\n", + "\n", + "print \"P=\" ,round(P,1),\"N\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example8.27 page number 273" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Corresponding maximum stress = 120.0 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "d1=float(25) # variation linearly in diameter from 25 mm to 50 mm \n", + "d2=float(50)\n", + "L=float(500) #length,mm\n", + "alpha=float(0.000012) #expansion coeffecient,/°C\n", + "t=25 #rise in temperture,°C\n", + "E=2*100000 #Young's modulus,N/mm^2\n", + "\n", + "delta=alpha*t*L\n", + "\n", + "#If P is the force developed by supports, then it can cause a contraction of 4*P*L/(pi*d1*d2*E)\n", + "\n", + "P=(delta*pi*d1*d2*E)/(4*L)\n", + "Am=pi*pow(d1,2)/4\n", + "Ms=P/Am\n", + "\n", + "print \"Corresponding maximum stress = \",round(Ms,1),\"N/mm^2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.28 page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stress in steel= 12.17 N/mm^2\n", + "Stress in brass= 36.51 N/mm^2\n", + "Shear stress in pin 18.26 N/mm^2\n" + ] + } + ], + "source": [ + "from math import pi\n", + "\n", + "#variable declaration\n", + "\n", + "Db=float(20) #diameter of brass rod,mm\n", + "Dse=float(40) #external diameter of steel tube,mm\n", + "Dsi=float(20) #internal diameter of steel tube,mm\n", + "Es=float(2*100000 ) #Young's modulus steel, N/mm^2\n", + "Eb=float(1*100000 ) #Young's modulus brass, N/mm^2\n", + "alphas=float(0.0000116) #coeffcient of expansion of steel,/°C\n", + "alphab=float(0.0000187) #coeffcient of expansion of brass,/°C\n", + "t=60 #raise in temperature, °C\n", + "As=pi*(pow(Dse,2)-pow(Dsi,2))/4 #Area of steel tube, mm^2\n", + "Ab=pi*(pow(Db,2))/4 #Area of brass rod,mm^2\n", + "L=1200 #length,mm\n", + "#Since free expansion of brass is more than free expansion of steel , compressive force Pb develops in brass and tensile force Ps develops in steel to keep the final position at CC \n", + "\n", + "#Horizontal equilibrium condition gives Pb = Ps, say P. \n", + "\n", + "P=((alphab-alphas)*t*L)/((L/(As*Es))+(L/(Ab*Eb)))\n", + "\n", + "ps=P/As\n", + "pb=P/Ab\n", + "\n", + "print \"stress in steel=\",round(ps,2),\"N/mm^2\"\n", + "print \"Stress in brass=\",round(pb,2),\"N/mm^2\"\n", + "\n", + "#the pin resist the force P at the two cross- sections at junction of two bars.\n", + "\n", + "Shearstress=P/(2*Ab)\n", + "print \"Shear stress in pin\",round(Shearstress,2),\"N/mm^2\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 8.29 page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in length= 1.07 mm\n", + "Hoop stress f= 83.33 N/mm^2\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "L=float(1000) #length of the bar at normal temperature,mm\n", + "As=float(50*10) #Area of steel,mm^2\n", + "Ac=float(40*5) #Area of copper,mm^2\n", + "#Ac = Free expansion of copper is greater than free expansion of steel . To bring them to the same position, tensile force Ps acts on steel plate and compressive force Pc acts on each copper plate. \n", + "alphas=float(0.000012) #Expansion of coeffcient of steel,/°C\n", + "alphac=float(0.000017 ) #Expansion of coeffcient of copper,/°C\n", + "t=80 #raise by temperature, °C\n", + "Es=2*100000 #Young's modulus of steel,N/mm^2\n", + "Ec=1*100000 #Young's modulus of copper,N/mm^2\n", + "Pc=((alphac-alphas)*t*L)/((2*L/(As*Es)) +(L/(Ac*Ec)))\n", + "Ps=2*Pc\n", + "\n", + "pc=Pc/Ac #Stress in copper,N/mm^2\n", + "ps=Ps/As #Stress in steel, N/mm^2\n", + "\n", + "Changeinlength=alphas*t*L+(Ps*L/(As*Es))\n", + "\n", + "\n", + "print\"Change in length=\",round(Changeinlength,2),\"mm\"\n", + "\n", + "##example 8.30 page number 278\n", + "\n", + "#variable declaration\n", + "\n", + "p=float(2) #internal pressure, N/mm^2\n", + "t=12 #thickness of thin cylinder,mm\n", + "D=float(1000) #internal diameter,mm\n", + "\n", + "f=(p*D)/(2*t) #Hoop stress,N/mm^2\n", + "\n", + "print \"Hoop stress f=\",round(f,2),\"N/mm^2\"\n", + "\n", + "\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_039FJN6.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_039FJN6.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_039FJN6.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_0AhnrOb.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_0AhnrOb.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_0AhnrOb.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_8K1gGKx.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_8K1gGKx.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_8K1gGKx.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_E4M5MRA.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_E4M5MRA.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_E4M5MRA.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_Ivqhz8T.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_Ivqhz8T.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_Ivqhz8T.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ZSvbidk.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ZSvbidk.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ZSvbidk.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_u7ekl0N.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_u7ekl0N.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_u7ekl0N.ipynb @@ -0,0 +1,466 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter9-Beams" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.1 page number 286" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 18.8684 KN\n", + "RA= 29.989 KN\n", + "alpha= 25.21 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(10) #Vertical down Load at 4m from A,KN\n", + "P2=float(15) #Inclined down Load at angle 30° at 6m from A,KN\n", + "P3=float(20) #Inclined down Load at angle 45° at 10m from A,KN\n", + "theta2=30\n", + "theta3=45\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Ha=P2*cos(theta2*pi/180)+P3*cos(theta3*pi/180)\n", + "Rb=(P1*4+P2*6*sin(theta2*pi/180)+P3*10*sin(theta3*pi/180))/12 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)+P1-Rb\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.2 page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.4475 KN\n", + "RA= 87.0172 KN\n", + "alpha= 79.45 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(60) #inclined down to right Load at angle 60 at 1m from A,KN\n", + "P2=float(80) #Inclined down to left Load at angle 75° at 3m from A,KN\n", + "P3=float(50) #Inclined down to left Load at angle 60° at 5.5m from A,KN\n", + "theta1=60 \n", + "theta2=75\n", + "theta3=60\n", + "thetaRb=60\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(P1*1*sin(theta1*pi/180)+P2*3*sin(theta2*pi/180)+P3*5.5*sin(theta3*pi/180))/(6*sin(thetaRb*pi/180)) #reaction at B point,KN\n", + "Ha=-P1*cos(theta1*pi/180)+P2*cos(theta2*pi/180)-P3*cos(theta3*pi/180)+Rb*cos(thetaRb*pi/180)\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)+P2*sin(theta2*pi/180)+P3*sin(theta3*pi/180)-Rb*sin(thetaRb*pi/180)\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.3 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RA= 91.6503 KN\n", + "HB= 42.4264 KN\n", + "VB= 90.7761 KN\n", + "RB= 100.2013 KN\n", + "alpha= 64.95 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(30) #uniform distributed load from 2m to 6m from A,KN/m(in 4m of span)\n", + "P3=float(60) #Inclined down to right Load at angle 45° at 7m from A,KN\n", + "\n", + "theta3=45\n", + "#horizontal,vertical component at B is Hb,Vb respectively.\n", + "\n", + "Ra=(P1*7+P2*4*5+P3*2*sin(theta3*pi/180))/(9) #reaction at B point,KN\n", + "\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "Hb=P3*cos(theta3*pi/180)\n", + "print \"HB=\",round(Hb,4),\"KN\"\n", + "#now vertical component\n", + "Vb=P1+P2*4+P3*sin(theta3*pi/180)-Ra\n", + "print \"VB=\",round(Vb,4),\"KN\"\n", + "\n", + "Rb=sqrt(pow(Hb,2)+pow(Vb,2))\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "alpha=(atan(Vb/Hb))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.4 page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 74.0 KN\n", + "MA= 148.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Ha, Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(20) #vertical down Load at 2m from A,KN\n", + "P2=float(12) #vertical down Load at 3m from A,KN \n", + "P3=float(10) #vertical down Load at 4m from A,KN\n", + "Pu=float(16) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2+P3\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*2+P2*3+P3*4\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.5 page number 288\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VA= 65.0 KN\n", + "MA= 165.0 KN-m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(15) #vertical down Load at 3m from A,KN\n", + "P2=float(10) #vertical down Load at 5m from A,KN \n", + "M=float(30) #CW moment at 4m distance from A, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Va=Pu*2+P1+P2\n", + "print \"VA=\", round(Va,2),\"KN\"\n", + "Ma=Pu*2*1+P1*3+P2*5+M\n", + "print \"MA=\", round(Ma,2),\"KN-m\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.6 page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 100.0 KN\n", + "RA= 30.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#As supports A and B are simple supports and loading is only in vertical direction, the reactions RA and RB are in vertical directions only.\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(30) #vertical down Load at 1m from A,KN\n", + "P2=float(40) #vertical down Load at 6.5m from A,KN \n", + "Pu=float(20) #uniform distributed load from 2m to 5m from A,KN/m(in 3m of span).\n", + "\n", + "Rb=(Pu*3*3.5+P1*1+P2*6.5)/5\n", + "print \"RB=\", round(Rb,2),\"KN\"\n", + "Ra=Pu*3+P1+P2-Rb\n", + "print \"RA=\", round(Ra,2),\"KN\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.7 page number 289\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "no horizontal force HA=0\n", + "VB= 50.0 KN\n", + "VA= 70.0 KN\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "#Let the reactions at A be Va and Ma.\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + "\n", + "P1=float(60) #vertical down Load at 4m from A to right,KN\n", + "P2=float(20) #vertical down Load at 11m from A to right,KN \n", + "M=float(30) #CW moment at 7m distance from A to right, KN-m\n", + "Pu=float(20) #uniform distributed load from A to 2m from A to left ,KN/m(in 2m of span)\n", + "##horizontal,vertical component at A is Ha,Va respectively.\n", + "print\"no horizontal force \",\"HA=0\"\n", + "Vb=(-Pu*2*1+P1*4+P2*11+M)/9\n", + "print \"VB=\", round(Vb,2),\"KN\"\n", + "Va=Pu*2+P1+P2-Vb\n", + "print \"VA=\", round(Va,2),\"KN\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.8 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RB= 71.011 KN\n", + "(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \n", + "RA= 23.3666 KN\n", + "alpha= 24.79 °\n" + ] + } + ], + "source": [ + "from math import pi,atan,sqrt,cos,sin\n", + "\n", + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "P1=float(30) #Inclined down Load at angle 45° to left at 5m from A,KN\n", + "Pu=float(20) #uniformly distributed load from 6m to 8m from A ,KN,(2m of span)\n", + "theta1=45\n", + "M=40 #ACW moment at 3m from A, KN-m\n", + "#horizontal,vertical component at A is Ha,Va respectively.\n", + "\n", + "Rb=(M+P1*5*sin(theta1*pi/180)+Pu*2*7)/6 #reaction at B point,KN\n", + "\n", + "print \"RB=\",round(Rb,4),\"KN\"\n", + "\n", + "Ha=P1*cos(theta1*pi/180)\n", + "\n", + "#now vertical component\n", + "Va=P1*sin(theta1*pi/180)-Rb+Pu*2\n", + "\n", + "Ra=sqrt(pow(Ha,2)+pow(Va,2))\n", + "\n", + "print \"(Negative sign show that the assumed direction of VA is wrong. In other words, VA is acting vertically downwards). \"\n", + "\n", + "Va1=-1*Va\n", + "print \"RA=\",round(Ra,4),\"KN\"\n", + "\n", + "alpha=(atan(Va1/Ha))*180/pi\n", + "\n", + "print \"alpha=\",round(alpha,2),\"°\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# example 9.9 page number 290\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "X= 5.0 m\n" + ] + } + ], + "source": [ + "#variable declaration\n", + "\n", + "#summation of all horizontal forces is zero & vertical forces is zero.\n", + " \n", + "#Let the left support C be at a distance x metres from A. \n", + "\n", + "P1=float(30) #vertical down load at A,KN\n", + "Pu=float(6) #uniform distributed load over whole span,KN/m,(20m of span)\n", + "P2=float(50) #vertical down load at B, KN\n", + "\n", + "#Rc=Rd(given) reaction at C & D is equal.\n", + "\n", + "Rc=(P1+P2+Pu*20)/2\n", + "Rd=Rc\n", + "\n", + "#taking moment at A \n", + "x=(((Pu*20*10+P2*20)/100)-12)/2\n", + "\n", + "print \"X=\", round(x,2),\"m\"\n" + ] + } + ], + "metadata": { + "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 +} diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_mHmqCLQ.png b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_mHmqCLQ.png Binary files differnew file mode 100644 index 00000000..c6681894 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_mHmqCLQ.png diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_UicjBqW.png b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_UicjBqW.png Binary files differnew file mode 100644 index 00000000..d7b1586d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_UicjBqW.png diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_xk3ylh6.png b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_xk3ylh6.png Binary files differnew file mode 100644 index 00000000..ba271472 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_xk3ylh6.png diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter2_eh02mMg.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter2_eh02mMg.ipynb new file mode 100644 index 00000000..f4889ecb --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter2_eh02mMg.ipynb @@ -0,0 +1,1146 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2:Network Analysis And Network Theorems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1:Page number-50" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 2.5 A\n", + "voltage across 6 ohm resistor= 6.0 V\n", + "voltage across 4 ohm resistor= 4.0 V\n", + "voltage when 4 ohm resistor is connected= 40.0 V\n", + "voltage when both resistors are in series= 100.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "v=10\n", + "r=4\n", + "#case a\n", + "i=v/float(r)\n", + "print \"i=\",format(i,'.1f'),\"A\"\n", + "#case b\n", + "#6ohm resistor is in series with 4 ohm resistor\n", + "i=v/(6+4)\n", + "v1=i*6\n", + "v2=i*4\n", + "print \"voltage across 6 ohm resistor=\",format(v1,'.1f'),\"V\"\n", + "print \"voltage across 4 ohm resistor=\",format(v2,'.1f'),\"V\"\n", + "#case c\n", + "i=10 #constant in both cases\n", + "v4=i*4\n", + "print \"voltage when 4 ohm resistor is connected=\",format(v4,'.1f'),\"V\"\n", + "v6=i*6\n", + "v=v4+v6\n", + "print \"voltage when both resistors are in series=\",format(v,'.1f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2:Page number-53" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rs= 0.5 ohm\n", + "the load voltage is expressed as 36rl/(0.5+rl)\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEPCAYAAACk43iMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGt9JREFUeJzt3XuUVeWd5vHvUyBqokK8NNDLNJcVFJfKRRSJjeSgsUUT\njUbNyDh0vEbtoMloM+poFtjpbuNl1MnNdEdwlDVjJOoYs7BFRz2agGJUQIXYcdJixx5FOyQuRWuJ\n8ps/3lOmrFQVpy777L3PeT5rsTh1rg97FfWr931/+92KCMzMrDW15R3AzMzy4yJgZtbCXATMzFqY\ni4CZWQtzETAza2EuAmZmLSyzIiBpJ0mrJa2VtEHSVZ0eu0DSLyU9L+nqrDKYmVnvhmb1xhHRLml2\nRLwjaSjwc0kzgR2A44FJEbFV0l5ZZTAzs95lOh0UEe/Ubg4DhgC/A84DroqIrbXnvJFlBjMz61mm\nRUBSm6S1wCbgkYhYD+wDzJL0hKSqpIOzzGBmZj3LbDoIICK2AVMkDQdWSKrUPvMTETFD0iHAMmB8\nljnMzKx7mRaBDhHxpqTlwMHAK8Ddtft/IWmbpD0i4redXyPJmxqZmfVRRKgvz8+yO2hPSSNqt3cG\njgLWAP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QeXvkucDRETGutoX4wXRaFwBG115jVnguAmYfFd3cXgfsC6l1\nFPhkRKz+8EkRG4E3JR1Su2s68LOsg5oNBm8lbVYHSf8DuKnzD/8enrcb8FBEHNLb88yKwiMBs/pc\nB5xXx/NOB/57tlHMBo9HAmZmLcwjATOzFuYiYGbWwlwEzMxamIuAmVkLcxEwM2thLgJmZi3s/wOO\nnRNQ8e59PAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x7f9cd722d810>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "i=72\n", + "v=36\n", + "rs=v/float(i)\n", + "print \"rs=\",format(rs,'.1f'),\"ohm\"\n", + "print \"the load voltage is expressed as 36rl/(0.5+rl)\"\n", + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "x=[40,50,60,72]\n", + "y=[36,34,32,30]\n", + "plt.plot(x,y)\n", + "plt.xlabel('il(A)')\n", + "plt.ylabel('vl(V)')\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3:Page number-55" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ir= 32.0 A\n", + "il= 2.23 A\n" + ] + } + ], + "source": [ + "import math\n", + "v=24\n", + "r=0.75\n", + "ir=v/r\n", + "print \"ir=\",format(ir,'.1f'),\"A\"\n", + "il=v/(10+r) #since 10 is in series with r\n", + "print \"il=\",format(il,'.2f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4:Page number-56" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power= 120.0 W\n", + "power dissipated= 30.0 W\n", + "total power supplied by practical source is= 90.0 W\n", + "current source= 40.0 A\n" + ] + } + ], + "source": [ + "import math\n", + "vs=12\n", + "rs=0.3\n", + "il=10\n", + "#case a\n", + "p=vs*il\n", + "print \"power=\",format(p,'.1f'),\"W\"\n", + "#case b\n", + "power=il**2*rs\n", + "print \"power dissipated=\",format(power,'.1f'),\"W\"\n", + "#case c\n", + "totpow=(vs-il*rs)*il\n", + "print \"total power supplied by practical source is=\",format(totpow,'.1f'),\"W\"\n", + "i=vs/rs\n", + "print \"current source=\",format(i,'.1f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5:Page number-58" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "r2= 15.0 ohm\n", + "req= 15.0 ohm\n", + "0.0291666666667\n", + "req= 15.0 ohm\n", + "0.230833333333\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "#v0/vs=r2/(r1+r2)=0.4r2=0.6r1\n", + "r1=10\n", + "r2=(0.6*r1)/float(0.4)\n", + "print \"r2=\",format(r2,'.1f'),\"ohm\"\n", + "#case b\n", + "#when r2 is parallel to r3\n", + "r3=200000\n", + "req=(r2*r3)/(r2+r3)\n", + "print \"req=\",format(req,'.1f'),\"ohm\"\n", + "#v0/vs=0.5825\n", + "change=(0.6-0.5825)/float(0.6)\n", + "print change\n", + "r3=20000\n", + "req=(r2*r3)/(r3+r2)\n", + "print \"req=\",format(req,'.1f'),\"ohm\"\n", + "#v0/vs=0.4615\n", + "change=(0.6-0.4615)/0.6\n", + "print change" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6:Page number-60" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "req= 1.09 ohm\n", + "vs= 7.66 V\n" + ] + } + ], + "source": [ + "import math\n", + "r=2\n", + "i=2\n", + "i3=3 #obtained by applying current divider rule to figure\n", + "i4=1\n", + "req=1/float(0.5+0.25+0.166) #1/2,1/4,1/6 values are converted to decimal form\n", + "print \"req=\",format(req,'.2f'),\"ohm\"\n", + "i2=(4*i4/float(6))\n", + "i1=(6*i2)/float(req)\n", + "#tracing circuit cabc via 6 ohm resistor and applying ohms law,\n", + "vs=i1*i4+i2*6\n", + "print \"vs=\",format(vs,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7:Page number-61" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of series parallel resistances is 10 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#combining series parallel series\n", + "#[(2+2+2)||(6+5+2)||10]+5\n", + "#[[6*6/6+6]+7]||10]+5=[10+10/10*10]+5=5+5=10\n", + "print \"the value of series parallel resistances is 10 ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rab= 54.55 ohm\n", + "rab= 54.286 ohm\n", + "rcd= 50.91 ohm\n", + "rab= 50.67 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "#rab=(80+40)||(60+40)\n", + "rab=(120*100)/float(120+100)\n", + "print \"rab=\",format(rab,'.2f'),\"ohm\"\n", + "#rab=(80||60)+(40||40)\n", + "rab=(4800/float(140))+(1600/80)\n", + "print \"rab=\",format(rab,'.3f'),\"ohm\"\n", + "#case b\n", + "#(60+80)||(40+40)\n", + "rcd=(140*80)/float(140+80)\n", + "print \"rcd=\",format(rcd,'.2f'),\"ohm\"\n", + "#(60||40)+(80||40)\n", + "rab=float(2400/float(100))+(3200/float(120))\n", + "print \"rab=\",format(rab,'.2f'),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## example 2.9:Page number-65" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ceq= 0.83402836 F\n" + ] + } + ], + "source": [ + "import math\n", + "#simplifying the circuit \n", + "ceq=1/float(0.333+0.666+0.2) #converted to decimal form\n", + "print \"ceq=\",format(ceq,'.8f'),\"F\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10:Page number-67" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 1.200000 A\n", + "i1= 0.800000 A\n", + "i2= 0.400000 A\n", + "power consumed by 2 ohm resistor= 2.88 W\n", + "power consumed by 12 ohm resistor= 7.68 W\n", + "power consumed by 2 ohm resistor= 3.84 W\n", + "voltage drop= 2.4 V\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "I=12/(2+((12*24)/float(36))) #values taken from circuit\n", + "I1=I*(24/float(36))\n", + "I2=I*(12/float(36))\n", + "print \"i=\",format(I,'1f'),\"A\"\n", + "print \"i1=\",format(I1,'1f'),\"A\"\n", + "print \"i2=\",format(I2,'1f'),\"A\"\n", + "#case b\n", + "power=(I**2)*2\n", + "print \"power consumed by 2 ohm resistor=\",format(power,'.2f'),\"W\"\n", + "power=(I1**2)*12\n", + "print \"power consumed by 12 ohm resistor=\",format(power,'.2f'),\"W\"\n", + "power=(I2**2)*24\n", + "print \"power consumed by 2 ohm resistor=\",format(power,'.2f'),\"W\"\n", + "#case c\n", + "v=I*2\n", + "print \"voltage drop=\",format(v,'.1f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11:Page number-69" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rab=3.12ohm\n", + "ran=6 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "#values taken and calculated from figure\n", + "r1=6\n", + "r2=12\n", + "r3=18\n", + "rab=3.21 #calculating similar to above using parallel in series resistances\n", + "print \"rab=3.12ohm\"\n", + "#case b\n", + "r4=30\n", + "r5=15\n", + "r6=30\n", + "ran=6 #similar as above\n", + "print \"ran=6 ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12:Page number-73" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v1=0.0769 V\n", + "v2=-0.3846V\n", + "current in 0.5ohm resistance is 0.154A,0.25ohm resistance is 1.846,0.66ohm resistor is -1.154A\n" + ] + } + ], + "source": [ + "import math\n", + "#eqns derived from figure\n", + "#6v1-4v2=2-->1\n", + "#-4v1+7v2=-3-->2\n", + "#eqn 1 and 2 are written in matrix form and solved using cramers rule\n", + "print \"v1=0.0769 V\"\n", + "print \"v2=-0.3846V\"\n", + "print \"current in 0.5ohm resistance is 0.154A,0.25ohm resistance is 1.846,0.66ohm resistor is -1.154A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13:Page number-74" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v1=3.6V\n", + "v2=2.2V\n", + "the current in 0.6 ohm resistor is 10.8A,0.2 ohm resistor is 7A,0.16ohm resistor is 13.2 A\n" + ] + } + ], + "source": [ + "import math\n", + "#from the figure the eqns are written in matrix form and using cramers rule the value of v1 and v2 can be found\n", + "print \"v1=3.6V\"\n", + "print \"v2=2.2V\"\n", + "print \"the current in 0.6 ohm resistor is 10.8A,0.2 ohm resistor is 7A,0.16ohm resistor is 13.2 A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14:Page number-76 " + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the voltages of nodes 1 and 3 are 50.29 and 57.71 respectively\n", + "current through 16 ohm resistor is 1.64A\n" + ] + } + ], + "source": [ + "import math\n", + "#kcl is applied to the circuit and the eqns obtained are solved using cramer's rule\n", + "print \"the voltages of nodes 1 and 3 are 50.29 and 57.71 respectively\"\n", + "#i3=v/r\n", + "print \"current through 16 ohm resistor is 1.64A\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15:Page number-78" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage across 3 ohm resistor is= 5.832 V\n" + ] + } + ], + "source": [ + "import math\n", + "#the eqns obtained are converted to matrix form for solving using cramer's rule values are found\n", + "i1=5.224\n", + "i2=0.7463\n", + "i3=3.28\n", + "v=(i1-i3)*3\n", + "print \"voltage across 3 ohm resistor is=\",format(v,'.3f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16:page number-79" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "currents obtained are i1=2.013 and i2=1.273\n" + ] + } + ], + "source": [ + "import math\n", + "#kvl eqns are obtained from figure which are solved to obtain currents\n", + "print \"currents obtained are i1=2.013 and i2=1.273\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17:Page number-80" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage at node D= 5.68 v\n", + "current in 4 ohm resistor is= 1.47 A\n", + "power supplied by 18V source is= 27.72 W\n" + ] + } + ], + "source": [ + "import math\n", + "#the currents are obtained by solving the eqns\n", + "i1=5.87\n", + "i2=-0.13\n", + "i3=-1.54\n", + "v=18-1.54*8\n", + "print \"voltage at node D=\",format(v,'.2f'),\"v\"\n", + "i=5.86/float(4)\n", + "print \"current in 4 ohm resistor is=\",format(i,'.2f'),\"A\"\n", + "power=18*1.54\n", + "print \"power supplied by 18V source is=\",format(power,'.2f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.18:Page number-82" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "va=8.33V and vb=4.17V\n", + "current through 8 ohm resistor is= 1.04 A\n" + ] + } + ], + "source": [ + "import math\n", + "#node eqns are obtained form the figure\n", + "print \"va=8.33V and vb=4.17V\"\n", + "i=8.33/float(8)\n", + "print \"current through 8 ohm resistor is=\",format(i,'.2f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19:Page number-83 " + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i1=-1.363A and i2=-3.4A\n" + ] + } + ], + "source": [ + "import math\n", + "#eqns obtained are calculated just like above problems and are aolved for i1 and i2\n", + "print \"i1=-1.363A and i2=-3.4A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.20:Page number-84" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current supplied by dependent source is= -6.0 A\n", + "power supplied by voltage source is= 41.34 W\n" + ] + } + ], + "source": [ + "import math\n", + "#eqns are obtained from the figure and are solved for currents\n", + "i1=6.89\n", + "i2=3.89\n", + "i3=-2.12\n", + "i=2*(i2-i1)\n", + "print \"current supplied by dependent source is=\",format(i,'.1f'),\"A\"\n", + "power=6*i1\n", + "print \"power supplied by voltage source is=\",format(power,'.2f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21:Page number-86" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i8= 0.667 A\n", + "i8'= 1.333 A\n", + "total current= 2.0 A\n" + ] + } + ], + "source": [ + "import math\n", + "#the following problem is based on usage of superposition theorem\n", + "i8=12/float(6+4+8) #current for 8 ohm resistor.the resistances are in series with each other.Hence 6+4+8\n", + "#next when voltage source is short circuited (8+4) total of resistance is obtained.The 4A is distributed in parallel branches as per current divider rule\n", + "i=(4*6)/float(6+12)\n", + "print \"i8=\",format(i8,'.3f'),\"A\"\n", + "print \"i8'=\",format(i,'.3f'),\"A\"\n", + "tot=i8+i\n", + "print \"total current=\",format(tot,'.1f'),\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exampe 2.22:Page number-88" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.972972972973 A\n" + ] + } + ], + "source": [ + "import math\n", + "#kvl is applied to circuit\n", + "i=1\n", + "vth=12-(1*4) #12 is voltage 1 is current and 4 is resistance\n", + "rth=(4*5)/float(4+5)\n", + "i6=vth/float(rth+6) #since current passes through 6 ohm resistor\n", + "print i6,\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23:Page number-89" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through 2 ohm resistor is= 2.45 A\n", + "Note that the same problem is again solved using superposition theorem and hence ignored \n" + ] + } + ], + "source": [ + "import math\n", + "#thevenin's theorem and superposition theorem used here\n", + "#applying mesh eqns to the 2 circuits and after getting the eqns they are solved using cramer's rule to obtain i1 and i2\n", + "i1=-0.6\n", + "i2=-1.2\n", + "#the value of currents indicates that they have assumed to be flowing in directions opposite to the assumed direction\n", + "vth=12-1.2*3 #voltage eqn\n", + "rth=1.425 #(1+2||12)||3=(1+(2*12)/(2+12))||3=19/7||3=19/7*3/19/7+3=1.425\n", + "i2=vth/(rth+2)\n", + "print \"current through 2 ohm resistor is=\",format(i2,'.2f'),\"A\"\n", + "print \"Note that the same problem is again solved using superposition theorem and hence ignored \" " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.24:Page number-91" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current through 5 ohm resistor is= 1.327 A\n" + ] + } + ], + "source": [ + "import math\n", + "#using thevenin's theorem\n", + "#applying kcl at node a va is obtained\n", + "va=12\n", + "rth=1.33 #2||4\n", + "i5=vth/(rth+5)\n", + "print \"current through 5 ohm resistor is=\",format(i5,'.3f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.25:Page number-92" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rth= 4.997 A\n" + ] + } + ], + "source": [ + "import math\n", + "#applying kvl to circuit\n", + "i=0.414\n", + "vth=12-4*0.414 #using vth formula\n", + "#when terminals a and b are short circuited applying kcl to node a gives isc=5*i\n", + "isc=2.07\n", + "rth=vth/isc\n", + "print \"rth=\",format(rth,'.3f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.26:Page number-93" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "iab= 1.5 A\n" + ] + } + ], + "source": [ + "import math\n", + "#norton's theorem\n", + "v=10\n", + "#applying kvl to closed circuit \n", + "isc=12/float(2+2) \n", + "rn=4 #resistance obtained by short circuiting v and opening i\n", + "iab=(4*3)/float(4+4) #current through 4 ohm connected across AB\n", + "print \"iab=\",format(iab,'.1f'),\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.27:Page number-103" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "natural frequency= -0.91668 secinverse\n" + ] + } + ], + "source": [ + "import math\n", + "#natural frequency needs to be determined\n", + "#req=[(6+6)||4]+[1||2]=3.6666\n", + "req=3.6667\n", + "l=4 #inductance\n", + "s=-req/float(l)\n", + "print \"natural frequency=\",format(s,'.5f'),\"secinverse\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.28" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "natural frequency= -0.15873 secinverse\n", + "time constant= 6.3 sec\n" + ] + } + ], + "source": [ + "import math\n", + "#req=[10+2+(5||15)]=15.75\n", + "#case a\n", + "c=0.4\n", + "req=15.75\n", + "s=-1/float(c*req)\n", + "print \"natural frequency=\",format(s,'.5f'),\"secinverse\"\n", + "#case b\n", + "tc=req*0.4 #time constant\n", + "print \"time constant=\",format(tc,'.1f'),\"sec\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.30:Page number-109" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage= 1560.0 v\n", + "r=20 ohm\n", + "tc= 0.1667 sec\n", + "balance energy= 2.25 J\n", + "t=0.25 sec\n" + ] + } + ], + "source": [ + "import math\n", + "v=120\n", + "r=40\n", + "i=v/float(r)\n", + "#applying kvl to the closed loop\n", + "v=3*520\n", + "print \"voltage=\",format(v,'.1f'),\"v\"\n", + "#when v=120,R can be found by I*(r+20)=120-->r=20\n", + "r=20\n", + "print \"r=20 ohm\"\n", + "#when r=20 total r=20+20+20=60\n", + "r=60\n", + "l=10\n", + "tc=l/float(r) #time constant\n", + "print \"tc=\",format(tc,'.4f'),\"sec\"\n", + "#i=I0*e^-(t/tc)=3*e^(-6t)\n", + "energy=(10*9)/float(2)\n", + "benergy=0.05*energy\n", + "print \"balance energy=\",format(benergy,'.2f'),\"J\"\n", + "#(L*i^2)/2=2.25-->hence i=0.6708\n", + "#3*e^-6t=0.6708-->e^-6t=0.2236-->applying log on both sides we get t=0.25\n", + "print \"t=0.25 sec\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.34:Page number-116" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R=2.72Mohm\n", + "t=9.16 sec\n" + ] + } + ], + "source": [ + "import math\n", + "v=120\n", + "V=200\n", + "#v=V(1-e^-5/2R)\n", + "#120=200*(1-e^-5/2R)\n", + "#applying log on both sides and solving we get R=2.72 Mohm\n", + "print \"R=2.72Mohm\"\n", + "R=5 \n", + "tc=10\n", + "#applying in the above eqn and solving lograthmically we get t=9.16\n", + "print \"t=9.16 sec\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter4_QnODdtI.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter4_QnODdtI.ipynb new file mode 100644 index 00000000..99569ba7 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter4_QnODdtI.ipynb @@ -0,0 +1,1638 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4:Alternating quantities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1:Page number-193" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e(t)=0 V\n", + "e(t)= 362.58 V\n", + "e(t)= 418.67 V\n" + ] + } + ], + "source": [ + "import math \n", + "#given\n", + "b=0.2\n", + "a=0.04\n", + "n=1000/float(60) #rev/sec\n", + "t=500\n", + "#case a\n", + "#since coil is at right angles ang=0\n", + "print \"e(t)=0 V\"\n", + "#case b\n", + "#when coil is 30deg to the field ang=60\n", + "#p=math.sin(60) \n", + "p=0.8660254\n", + "e=2*3.14*a*n*b*t*p\n", + "print \"e(t)=\",format(e,'.2f'),\"V\"\n", + "#case c\n", + "#when ang=90 that is coil is in the plane of the field\n", + "#p=math.sin(90)\n", + "p=1\n", + "e=2*3.14*b*a*n*p*t\n", + "print \"e(t)=\",format(e,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.2:Page number-202" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t= 0.0167 sec\n", + "f= 60.0 Hz\n", + "t= -0.0014 sec\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "vm=155\n", + "omega=377\n", + "#case a\n", + "t=(2*3.14)/float(omega)\n", + "print \"t=\",format(t,'.4f'),\"sec\"\n", + "#case b\n", + "f=1/float(t)\n", + "print \"f=\",format(f,'.1f'),\"Hz\"\n", + "#case c\n", + "v=109.60 #rms value\n", + "#at t=0 -77.5=155*sin(ang)\n", + "#therefore, ang=-0.5236 rad\n", + "ang=-0.5236\n", + "t=ang/omega\n", + "print \"t=\",format(t,'.4f'),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 10.0 A\n", + "f= 50.0 A\n", + "i= 0.15 A\n", + "NOTE:Answer calculated wrongly in textbook for i obtained here\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#i=14.14*sin(314t)-->i=im*sin(omega*t)\n", + "#case a\n", + "im=14.14\n", + "i=14.14/1.414 #1.414 is the value of root 2\n", + "print \"i=\",format(i,'.1f'),\"A\"\n", + "#case b\n", + "#omega=314=2*3.14*f\n", + "f=314/float(2*3.14)\n", + "print \"f=\",format(f,'.1f'),\"A\"\n", + "#case c\n", + "t=0.002\n", + "#i=im*sin(omega*t)\n", + "p=0.01096 #value of sin(omega*t)\n", + "i=im*p\n", + "print \"i=\",format(i,'.2f'),\"A\" \n", + "print \"NOTE:Answer calculated wrongly in textbook for i obtained here\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4:Page number-203" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I= 24.496 A\n" + ] + } + ], + "source": [ + "import math\n", + "i=20\n", + "im=i/float(1.414) #that is i*root 2\n", + "#the heat produced by i is the sum of heat produced by dc and ac current\n", + "p=i**2\n", + "q=im**2\n", + "r=p+q\n", + "I=(r**0.5)\n", + "print \"I=\",format(I,'.3f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 0.2 A\n", + "i= 1.4 A\n", + "NOTE:The answer given in text is printed wrongly\n", + "t= 0.00333 A\n" + ] + } + ], + "source": [ + "import math\n", + "f=50\n", + "irms=10\n", + "im=irms/float(0.707)\n", + "#omega*t=2*3.14*f*t here the value for t can be substituted and value for i can be found from i=im*sin(omega*t)\n", + "t=0.0025\n", + "p=0.0137 #value of sin(314*0.0025)\n", + "i=(10*p)/float(0.707)\n", + "print \"i=\",format(i,'.1f'),\"A\"\n", + "#maximum value is when 314*t=pi/2 (in radians)-->t=0.005\n", + "#hence at t=0.005+0.0125=0.0175 the value of i nedds to be found\n", + "p=0.0957\n", + "i=(10*p)/float(0.707)\n", + "print \"i=\",format(i,'.1f'),\"A\"\n", + "print \"NOTE:The answer given in text is printed wrongly\"\n", + "i=7.07\n", + "#7.07=(10*sin314t)/0.707-->t=0.00833 sec\n", + "t=0.00833-0.005 #the time at which the instaneous value is 7.07A after positive maximum value is at this time\n", + "print \"t=\",format(t,'.5f'),\"A\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6:Page number-204" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v= 25.79 V\n", + "vavg= 20.0 v\n", + "1.28937969582\n", + "1.93891683582\n", + "rms value for a sin wave with the same peak value is= 35.35 V\n" + ] + } + ], + "source": [ + "import math\n", + "#from graph \n", + "a=0\n", + "b=5**2\n", + "c=10**2\n", + "c=20**2\n", + "d=40**2\n", + "e=50**2\n", + "f=40**2\n", + "g=20**2\n", + "h=10**2\n", + "i=5**2\n", + "v=(0.1*(a+b+c+d+e+f+g+h+i))**0.5 #pi and omega values get cancelled\n", + "print \"v=\",format(v,'.2f'),\"V\"\n", + "vavg=0.1*(0+5+10+20+40+50+40+20+10+5)\n", + "print \"vavg=\",format(vavg,'.1f'),\"v\"\n", + "ff=v/float(vavg)\n", + "print ff\n", + "pf=50/float(v) #50 is the maximum value\n", + "print pf\n", + "v=0.707*50 \n", + "print \"rms value for a sin wave with the same peak value is=\",format(v,'.2f'),\"V\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8:Page number-210" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "vac= 130.77 v\n", + "phase position with respect to vbc=60-36.59=23.41\n" + ] + } + ], + "source": [ + "import math\n", + "#from phasor diagram vac=vab+vbc\n", + "hcab=60\n", + "vcab=60\n", + "hcbc=45\n", + "vcbc=77.94 #vbc=60*sin(60)\n", + "p=(vcab+hcbc)**2\n", + "q=vcbc**2\n", + "vac=((p+q)**0.5)\n", + "print \"vac=\",format(vac,'.2f'),\"v\"\n", + "#the angle is given by ang=taninverse(vcbc/(vcab+hcbc))=36.59\n", + "print \"phase position with respect to vbc=60-36.59=23.41\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10:Page number-215" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a+b=22.72+j2.12\n", + "a/b=-0.13+j0.74\n", + "Thus (a+b)/(a-b) gives -0.24-j0.81\n", + "(a+b*b/(a-b)*a)=-1.01+j0.5\n" + ] + } + ], + "source": [ + "import math\n", + "#a=6.34+j*13.59\n", + "#b=20angle(35)\n", + "#case a-->(a+b)\n", + "#in polar form a=15 at angle 65\n", + "#in rectangular form b=16.38-j*11.47\n", + "#a+b=6.34+j13.59+16.38-j11.47=22.72+j2.12\n", + "print \"a+b=22.72+j2.12\"\n", + "#a/b=15angle(65)/20angle(-35)=0.75angle(100)=-0.13+j0.74\n", + "print \"a/b=-0.13+j0.74\"\n", + "#a-b=-10.04+j25.06\n", + "print \"Thus (a+b)/(a-b) gives -0.24-j0.81\"\n", + "#(a+b)*b/(a-b)*a\n", + "print \"(a+b*b/(a-b)*a)=-1.01+j0.5\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I=7.5+j4.75. Its value in polar form is obtained as 8.8776 at angle 32.34\n", + "instantaneous value of resultant i is 12.5548*sin(314t+32.34)\n" + ] + } + ], + "source": [ + "import math\n", + "#i1=20*sin(314t+60),i2=-10*sin(314t),i3=15*sin(314t-45)-->angles are in degrees\n", + "#I1=(7.7072+j12.25),I2=(-7.072),I3=7.5-j7.5\n", + "#adding phasor currents I1,I2 and I3\n", + "#I=7.702+j12.25-7.702+7.5-j7.5=7.5+j4.75\n", + "print \"I=7.5+j4.75. Its value in polar form is obtained as 8.8776 at angle 32.34\"\n", + "#i=2**0.5*8.8776*sin(314t+32.34)-->instantaneous value of resultant i\n", + "print \"instantaneous value of resultant i is 12.5548*sin(314t+32.34)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.12:Page number-226" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 12.35 A\n", + "phase angle of current=57.52 lag\n" + ] + } + ], + "source": [ + "import math\n", + "v=230\n", + "f=50\n", + "L=50*10**-3\n", + "r=10\n", + "#case a\n", + "xl=2*3.14*f*L\n", + "z=complex(r,xl)\n", + "#the value of z in polar form is 18.62 ohm\n", + "z=18.62\n", + "i=v/float(z)\n", + "print \"i=\",format(i,'.2f'),\"A\"\n", + "#case b\n", + "#phy=taninverse(xl/r)=57.52 lag\n", + "print \"phase angle of current=57.52 lag\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v= 279.21 V\n" + ] + } + ], + "source": [ + "import math\n", + "vr=150\n", + "r=50\n", + "l=250*10**-3\n", + "f=50\n", + "i=vr/r\n", + "xl=2*3.14*f*l\n", + "vl=i*xl\n", + "v=(((vr**2)+(vl**2))**0.5)\n", + "print \"v=\",format(v,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.6875\n", + "power consumed= 500.0 w\n", + "power consumed in choke oil= 187.5 W\n" + ] + } + ], + "source": [ + "import math\n", + "v=200\n", + "f=50\n", + "r=20\n", + "vr=100\n", + "vc=144\n", + "vl=150\n", + "#case a\n", + "#from eqn ((vr**2+vl*cos(angle))**2)+((vl*sin(angle))**2)=v**2\n", + "#on substituting values in the above eqn the value of angle can be found by isolating cos\n", + "#angle=75.52\n", + "cos=0.25\n", + "pf=(vr+vl*cos)/float(v)\n", + "print pf\n", + "#case b\n", + "i=vr/r\n", + "power=i**2*r\n", + "print \"power consumed=\",format(power,'.1f'),\"w\"\n", + "#case c\n", + "power=vl*i*cos\n", + "print \"power consumed in choke oil=\",format(power,'.1f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15:Page number-230" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " xc= 31.85 ohm\n", + "i= 6.89 A\n", + "0.299580587178\n", + "phase angle=72.6\n", + "v= 68.9 v\n", + "v= 219.4 v\n" + ] + } + ], + "source": [ + "import math\n", + "r=10\n", + "c=10**-4\n", + "v=230\n", + "f=50\n", + "omega=314\n", + "#case a\n", + "xc=1/float(omega*c)\n", + "print \"xc=\",format(xc,'.2f'),\"ohm\"\n", + "#case b\n", + "zc=33.38 #zc=10-j31.85 into polar form is 33.38\n", + "i=v/zc\n", + "print \"i=\",format(i,'.2f'),\"A\"\n", + "#case c\n", + "pf=r/zc\n", + "print pf\n", + "#case d\n", + "#phase angle=cosinverse(0.3)=72.6\n", + "print \"phase angle=72.6\"\n", + "#case e\n", + "v=r*i\n", + "print \"v=\",format(v,'.1f'),\"v\"\n", + "v=xc*i\n", + "print \"v=\",format(v,'.1f'),\"v\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.16:Page number-230" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "vc= 207.12 v\n", + "c= 0.00007688 F\n", + "maximum voltage across c= 292.92 V\n", + "phase angle=64.2\n" + ] + } + ], + "source": [ + "import math\n", + "v=230\n", + "f=50\n", + "#voltage vr across r is in phase with the current i while voltage vc across c lage i by 90\n", + "#from phasor diagram v**2=vr**2+vc**2\n", + "vr=100\n", + "vc=((v**2)-(vr**2))**0.5\n", + "print \"vc=\",format(vc,'.2f'),\"v\"\n", + "p=500 #power\n", + "i=p/vr\n", + "c=i/float(2*3.14*f*vc)\n", + "print \"c=\",format(c,'.8f'),\"F\"\n", + "#case b\n", + "v=(2**0.5)*vc\n", + "print \"maximum voltage across c=\",format(v,'.2f'),\"V\"\n", + "#case c\n", + "#phase angle=cosinverse(vr/v)=cosinverse(0.4348)=64.2\n", + "print \"phase angle=64.2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17:Page number-234" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "xl= 47.1 ohm\n", + "xc= 25.48 ohm\n", + "complex impedance=8+j21.62 at an impedance angle of 69.7\n", + "current= 9.98 A\n", + "voltage across coil=446.8 at 10.66 degrees\n", + "voltage across capacitor=-254.29 at -159.7 degrees\n", + "phase difference between supply and current i is 69.7 lag\n" + ] + } + ], + "source": [ + "import math\n", + "r=8\n", + "l=0.15\n", + "f=50\n", + "v=230\n", + "c=125*10**-6\n", + "#case a inductive reactance\n", + "xl=2*3.14*f*l\n", + "print \"xl=\",format(xl,'.1f'),\"ohm\"\n", + "#case b capacitance reactance\n", + "xc=1/float(2*3.14*f*c)\n", + "print 'xc=',format(xc,'.2f'),\"ohm\"\n", + "#case c complex impedance\n", + "#z=r+j(xl-xc)-->on substituting valuees we get z=8+j21.62\n", + "#z=((8**2)+(21.62**2))**0.5\n", + "print \"complex impedance=8+j21.62 at an impedance angle of 69.7\"\n", + "#impedance angle=taninverse(xl-xr)/r\n", + "#case d\n", + "v=230\n", + "z=23.05\n", + "i=v/z\n", + "print \"current=\",format(i,'.2f'),\"A\"\n", + "#case e\n", + "#(r+jxl)*i=446.8 at 10.66 degrees\n", + "print \"voltage across coil=446.8 at 10.66 degrees\"\n", + "#-j*xc*i=25.48*9.98\n", + "print \"voltage across capacitor=-254.29 at -159.7 degrees\"\n", + "#case e\n", + "print 'phase difference between supply and current i is 69.7 lag'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18:Page number-235 " + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capacitive reactance= 63.7 ohm\n", + "f= 50.0 cycles/sec\n", + "power loss in iron cored choke is= 53.69 w\n" + ] + } + ], + "source": [ + "import math\n", + "c=50*10**-6\n", + "i=2.355\n", + "#case a\n", + "vl=120\n", + "vr=70\n", + "vac=150\n", + "#the phasor sum of vr and vl is OC;the applied voltage v is the phasor sum of vc and OC and is represented by OV\n", + "#the theta be the impedance angle of RL combination\n", + "#from right angled triangle OCD,theta can be determined as follows:\n", + "#(vr+vl*costheta)**2+(vl*costheta)**2=vac**2\n", + "#substitute the values then value of costheta can be found\n", + "zl=vl/i #impedance of the coil\n", + "p=0.981 #value of sin(79)\n", + "xl=zl*p\n", + "q=0.19 #value of cos(79)\n", + "r=zl*q\n", + "dc=i*xl\n", + "bd=i*r\n", + "#from right angled triangle ODB in fig.\n", + "v=98.3\n", + "xc=vac/i\n", + "print \"capacitive reactance=\",format(xc,'.1f'),\"ohm\"\n", + "f=1/float(xc*2*3.14*c)\n", + "print \"f=\",format(f,'.1f'),\"cycles/sec\"\n", + "ploss=i**2*r\n", + "print \"power loss in iron cored choke is=\",format(ploss,'.2f'),\"w\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19:Page number-238" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 12.07 A\n" + ] + } + ], + "source": [ + "import math\n", + "r=20\n", + "l=200*10**-3\n", + "v=230\n", + "f=50\n", + "xl=314*l #314 is omega\n", + "ir=v/float(r)\n", + "il=v/float(xl)\n", + "i=((ir**2)+(il**2))**0.5\n", + "print \"i=\",format(i,'.2f'),\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20:Page number-240 " + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current with a lead of 57.5 is obtained as= 4.13 A\n" + ] + } + ], + "source": [ + "import math\n", + "r=100\n", + "c=50*10**-6\n", + "f=50\n", + "v=230\n", + "#case a\n", + "xc=-1/float(314*c) #314 is omega\n", + "ir=v/r #with angle 0\n", + "ic=230/float(xc) #with angle of 90 deg\n", + "i=((ir**2)+(ic**2))**0.5\n", + "print \"current with a lead of 57.5 is obtained as=\",format(i,'.2f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.21:Page number-242" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current at 56.76 lead= 4.196 A\n" + ] + } + ], + "source": [ + "import math\n", + "r=100\n", + "l=0.1\n", + "c=150*10**-6\n", + "v=230\n", + "f=50\n", + "#case a\n", + "xl=314*l #at 90 deg\n", + "xc=1/float(314*c) #at lag -90 deg\n", + "ir=v/r #at 0 deg\n", + "il=v/xl\n", + "ic=v/xc\n", + "#i=ir+ic+il-->2.3+j3.51\n", + "i=((2.3**2)+(3.51**2))**0.5\n", + "print \"current at 56.76 lead=\",format(i,'.3f'),\"A\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 4.22:Page number-244" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of zbc is 8.159-j9.553\n", + "zac=18.159+j5.447(in rectangular form)\n" + ] + } + ], + "source": [ + "import math\n", + "z1=18.03 #z1=10+j15 converted to polar form also it is at angle 56.31\n", + "z2=32.02\n", + "z3=10.77\n", + "#ybc=1/zbc=(1/z2+1/z3)=1/32.02+1/10.77\n", + "#on performing the add operation we get the value of zbc as 8.159-j9.553 that is in rectangular form\n", + "print \"The value of zbc is 8.159-j9.553\"\n", + "#thus total impedance between terminals A and C is given by zac=z1+zbc\n", + "print \"zac=18.159+j5.447(in rectangular form)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.23:Page number-246" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I= 5.76 A\n", + "z= 39.91 ohm\n", + "R= 36.97 ohm\n", + "x= -15.03 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "r1=25\n", + "l1=0.159\n", + "r2=60\n", + "c=125*10**-6\n", + "v=230\n", + "f=50\n", + "#case a\n", + "xl=2*3.14*f*l1\n", + "z1=((r1**2)+(xl**2))**0.5\n", + "i1=v/z1\n", + "#phy1=cosinverse(r1/z1)=63.43 lag\n", + "xc=1/float(2*3.14**c)\n", + "z2=((r2**2)+(xc**2))**0.5\n", + "i2=v/z2\n", + "#i2 has 23 deg lead calculated similar to i1\n", + "#p=cosphy1\n", + "#q=cosphy2\n", + "p=0.44\n", + "q=0.92\n", + "I1=i1*p+i2*q\n", + "a=-0.89\n", + "b=0.39\n", + "I2=i1*a+i2*b\n", + "I=((I1**2)+(I2**2))**0.5\n", + "print \"I=\",format(I,'.2f'),\"A\"\n", + "#case b\n", + "z=v/I\n", + "print \"z=\",format(z,'.2f'),\"ohm\"\n", + "R=(z*I1)/I #note the value of I in text is printed wrongly so the result may vary\n", + "print \"R=\",format(R,'.2f'),\"ohm\"\n", + "x=(z*I2)/I #same note applicable here as well\n", + "print \"x=\",format(x,'.2f'),\"ohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.24:Page number-247" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I1=6.78A\n", + "I2=13.22A\n", + "power loss in z1= 689.53 W\n", + "power loss in z2= 1398.15 W\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#z1=15+j20\n", + "#z2=8-j10\n", + "I=20\n", + "z1=25 #in polar form at angle 53.13\n", + "z2=12.81 #at angle -51.34\n", + "#v=I1z1=I2z2\n", + "#I2=1.95I1\n", + "#from diagram I**2=(I1cosang1+I2cosang2)**2+(I2sinang2-I1sinang1)**2\n", + "#on substituting values in the above eqn and simplifying\n", + "I1=6.78\n", + "print \"I1=6.78A\"\n", + "I2=13.22\n", + "#substitute this in I2=1.95I1\n", + "print \"I2=13.22A\"\n", + "pow1=I1**2*15\n", + "pow2=I2**2*8\n", + "print \"power loss in z1=\",format(pow1,'.2f'),\"W\"\n", + "print \"power loss in z2=\",format(pow2,'.2f'),\"W\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.25:Page number-248" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i1= 7.19 A\n", + "current lags by voltage 38.66\n", + "c= 0.00006218 F\n", + "ir= 5.606 A\n" + ] + } + ], + "source": [ + "import math\n", + "r=25\n", + "f=50\n", + "xl=20\n", + "v=230\n", + "#case a\n", + "#z1=r+jxl\n", + "z1=32 #in polar form\n", + "i1=v/float(z1)\n", + "print \"i1=\",format(i1,'.2f'),'A'\n", + "#case b\n", + "print \"current lags by voltage 38.66\"\n", + "#case c\n", + "p=0.78 #cos value\n", + "q=-0.62 #sin value\n", + "ir=i1*p\n", + "il=i1*q\n", + "#from phasor diagram current c is equal to il\n", + "ic=il=4.491\n", + "c=ic/float(v*2*3.14*50)\n", + "print \"c=\",format(c,'.8f'),\"F\"\n", + "#case d\n", + "print \"ir=\",format(ir,'.3f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.26:Page number-249" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(12.9596827495-2.78255122274j)\n", + "the phase angle is -12.11\n" + ] + } + ], + "source": [ + "import math\n", + "z1=complex(6,-10)\n", + "z2=complex(10,15)\n", + "z3=complex(18,12)\n", + "#z1+z2 is parallel to z3\n", + "zab=z1+(z2*z3)/(z2+z3)\n", + "print zab\n", + "print \"the phase angle is -12.11\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.27:Page number-258" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "current at -63 lag is= 13.05 A\n", + "phase angle between supply voltage and current is -63\n", + "power= 3002.3 VA\n", + "active power= 1351.0 W\n", + "reactive power= 2672.0 VAR\n" + ] + } + ], + "source": [ + "import math\n", + "r=8\n", + "l=0.05\n", + "v=230\n", + "f=50\n", + "#case a\n", + "xl=2*3.14*f*l\n", + "zl=complex(r,xl)\n", + "zl=17.62\n", + "i=v/zl #since v=230 at angle 0 and zl in polar form has 63 deg i has a lag of 63\n", + "print \"current at -63 lag is=\",format(i,'.2f'),'A'\n", + "#case b\n", + "print \"phase angle between supply voltage and current is -63\"\n", + "#case c\n", + "power=v*i\n", + "print \"power=\",format(power,'.1f'),\"VA\"\n", + "#case d\n", + "p=0.45 #cos63\n", + "actpow=v*i*p\n", + "print \"active power=\",format(actpow,'.1f'),\"W\"\n", + "#case e\n", + "q=0.89 #sin63\n", + "reapow=v*i*q\n", + "print 'reactive power=',format(reapow,'.1f'),\"VAR\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.28:Page number-259" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input= 13392.86 VA\n", + "active component= 40.76 A\n", + "reactive component= 41.34 A\n", + "reactive power= 9508.9 VAR\n", + "c= 0.00006218 F\n" + ] + } + ], + "source": [ + "import math\n", + "v=230\n", + "f=50\n", + "pf=0.7\n", + "n=0.8\n", + "op=7500\n", + "#case a\n", + "ip=op/float(0.7*0.8)\n", + "print \"input=\",format(ip,'.2f'),\"VA\"\n", + "#case b\n", + "im=ip/v\n", + "p=0.71 #sin\n", + "activecompo=im*pf\n", + "print \"active component=\",format(activecompo,'.2f'),\"A\"\n", + "reacompo=p*im\n", + "print \"reactive component=\",format(reacompo,'.2f'),\"A\"\n", + "#case c\n", + "reacpow=p*ip\n", + "print \"reactive power=\",format(reacpow,'.1f'),\"VAR\"\n", + "#case d\n", + "cos=0.95\n", + "i=activecompo/cos\n", + "isin=13.40 #i*sinang=i*(1-cos**2)**0.5ic=28.18 #since i=ic+im\n", + "c=ic/float(2*3.14*f*v)\n", + "print \"c=\",format(c,'.8f'),\"F\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.29:Page number-266" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "c= 0.00004057\n", + "i= 115.0 A\n", + "39.25\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "l=0.25\n", + "f=50\n", + "v=230\n", + "r=2\n", + "c=1/float(((2*3.14*f)**2)*l)\n", + "print \"c=\",format(c,'.8f')\n", + "#case b\n", + "i=v/r\n", + "print \"i=\",format(i,'.1f'),\"A\"\n", + "#case c\n", + "vl=2*3.14*f*l*i\n", + "vc=i/float(c*2*3.14*f)\n", + "q=(2*3.14*f*l)/float(r)\n", + "print q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.30:Page number-266" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "f0= 102.0860 Hz\n", + "f1= 101.2898 Hz\n", + "f2= 102.8822 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "l=10\n", + "r=100\n", + "i=1\n", + "f=100\n", + "i1=0.5\n", + "c=1/float(4*(3.14**2)*(r**2)*l)\n", + "v=i*r\n", + "z=v/i1\n", + "#z=100+jX\n", + "x=((200**2)-(100**2))**0.5\n", + "omega=641.1 #angular frequency in rad/sec\n", + "f0=omega/float(2*3.14)\n", + "f1=f0-(r/float(4*3.14*l))\n", + "f2=f0+(r/float(4*3.14*l))\n", + "print \"f0=\",format(f0,'.4f'),\"Hz\"\n", + "print \"f1=\",format(f1,'.4f'),\"Hz\"\n", + "print \"f2=\",format(f2,'.4f'),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.31:Page number-271 " + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "l= 0.00507 H\n" + ] + } + ], + "source": [ + "import math\n", + "v=3*10**8\n", + "lamb=3000\n", + "c=0.0005*10**-6\n", + "f=v/lamb\n", + "l=1/float(4*3.14*3.14*f**2*c)\n", + "print \"l=\",format(l,'.5f'),\"H\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.32:Page number-272" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "c= 0.0000000005599 F\n", + "z= 238130.4 ohm\n", + "i= 0.0000063 A\n" + ] + } + ], + "source": [ + "import math\n", + "r=1500\n", + "l=0.2\n", + "v=1.5\n", + "f=15000\n", + "#case a\n", + "#p=1/0.2c\n", + "p=(4*3.14*3.14*f**2)+(r**2)/float(l**2)\n", + "c=1/float(0.2*p)\n", + "print \"c=\",format(c,'.13f'),\"F\"\n", + "#case b\n", + "z=l/float(c*r)\n", + "print \"z=\",format(z,'.1f'),\"ohm\"\n", + "#case c\n", + "i=v/float(z)\n", + "print \"i=\",format(i,'.7f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.33:Page number-274" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v1 at -47.63 is= 18.80 V\n", + "v2 at -42.30 is= 21.55 V\n" + ] + } + ], + "source": [ + "import math\n", + "#the eqns are formed using the given diagram\n", + "#the derivations from the eqns are obtained as below using matrices for their construction\n", + "#the below eqns are in polar form\n", + "delta=0.3165\n", + "delta1=5.95\n", + "delta2=6.82\n", + "v1=delta1/delta\n", + "print \"v1 at -47.63 is=\",format(v1,'.2f'),\"V\"\n", + "v2=delta2/delta\n", + "print \"v2 at -42.30 is=\",format(v2,'.2f'),\"V\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.34:Page number-275 " + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i at -84.21 is= -1.32 V\n" + ] + } + ], + "source": [ + "import math\n", + "#in polar form\n", + "z1=10\n", + "z2=12.806\n", + "z3=13.416\n", + "#the mesh currents are written in matrix form\n", + "delta=329.31 #in polar form\n", + "delta1=360\n", + "delta2=793.22\n", + "i1=delta1/delta\n", + "i2=delta2/delta\n", + "i=i1-i2 #answer obtained in text is wrongly printed\n", + "print \"i at -84.21 is=\",format(i,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.35:Page number-276 " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(1.638+4.839j)\n", + "(0.732-5.144j)\n", + "(2.37-0.305j)\n" + ] + } + ], + "source": [ + "import math\n", + "#superposition theorem\n", + "r=4\n", + "#z=4+(8+6j)*(0-j10)/8+j6+0-j10\n", + "#z=14-j5\n", + "z=14.87\n", + "l=40\n", + "#I1a=z/l=2.69 in polar form\n", + "I1a=complex(2.533,0.904)\n", + "I2a=complex(-0.324,-2.67)\n", + "#from fig c\n", + "z=complex(2.93,-9.47)\n", + "I1b=complex(-0.895,3.935)\n", + "I2b=complex(1.056,-2.474)\n", + "I1=I1a+I1b\n", + "print I1\n", + "I2=I2a+I2b\n", + "print I2\n", + "I=I1+I2\n", + "print I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.36:Page number-278" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(3.07692307692+5.38461538462j)\n", + "(8.81695846645+9.55403833866j)\n" + ] + } + ], + "source": [ + "import math\n", + "#thevenin's theorem\n", + "#all the values are derived from the figures\n", + "z1=complex(8,-6)\n", + "z2=complex(0,5)\n", + "zth=(z1*z2)/(z1+z2)\n", + "print zth\n", + "vth=complex(-17.71,141.54)\n", + "zload=complex(4,3)\n", + "I=vth/(zth+zload)\n", + "print I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.37:Page number-279" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(8.8178913738+9.55271565495j)\n" + ] + } + ], + "source": [ + "import math\n", + "#norton's theorem\n", + "#values derived and calculated from figure\n", + "v=complex(230,0)\n", + "xl=complex(8,-6)\n", + "isc=v/xl\n", + "IN=isc\n", + "rl=complex(0,5)\n", + "zn=(rl*xl)/(rl+xl)\n", + "zload=complex(4,3)\n", + "I=(IN*zn)/(zn+zload)\n", + "print I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.38:Page number-281" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I= 4.51 A\n", + "pl= 18.75 w\n" + ] + } + ], + "source": [ + "import math\n", + "#all values derived from figure\n", + "#zth=complex(0.923,2.615)\n", + "#vth=complex(-4.615,-6.923) #derived using formula\n", + "#zl=complex(0.923,-2.615)\n", + "#z=zl+zth\n", + "vth=8.32 #polar form\n", + "z=1.846\n", + "I=vth/z\n", + "print \"I=\",format(I,'.2f'),\"A\"\n", + "rl=0.923\n", + "pl=(I**2)*rl\n", + "print \"pl=\",format(pl,'.2f'),\"w\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter5_IwMblyq.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter5_IwMblyq.ipynb new file mode 100644 index 00000000..6e2c62ae --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/Chapter5_IwMblyq.ipynb @@ -0,0 +1,398 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Three Phase Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Page number-317" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ia= 51.962 A\n", + "ib= 43.30129 A\n", + "ic= 34.64103 A\n", + "IN= 15.0 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "vl=400 #line voltage\n", + "va=vl/math.sqrt(3)\n", + "vb=230.94 #angle(-120)\n", + "vc=230.94 #angle(-240)\n", + "#case a\n", + "#the line currents are given by\n", + "ia=12000/230.94 #with angle 0\n", + "ib=10000/230.94 #with angle 120\n", + "ic=8000/230.94 #with angle 240\n", + "print\"ia=\",round(ia,3),\"A\"\n", + "print \"ib=\",round(ib,5),\"A\"\n", + "print \"ic=\",round(ic,5),\"A\"\n", + "#case b\n", + "#IN=ia+ib+ic\n", + "#ia,ib and ic are phase currents hence contain with angles they are in the form sin(angle)+icos(angle)\n", + "#IN=51.96*(sin(0)+i*cos(0))+43.3*(sin(120)+i*cos(120))+34.64*(sin(240)+i*cos(240))\n", + "#IN=51.96+(-21.65+i*37.5)+34.64*(-0.5-i*0.866)\n", + "#12.99+i*7.5 on which the sin+icos=sin**2+cos**2 operation is performed\n", + "#therefore \n", + "IN=15 #at angle 30\n", + "print \"IN=\",round(IN,10),\"A\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2:Page number-320 " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "iab= 2.0 A\n", + "ibc=5.4414-j3.1416 A\n", + "ica=3.1463+j4.2056 A\n", + "ia=4.2328 with an angle of -96.51 A\n", + "ib=4.1915 with angle of -48.55 A\n", + "ic=7.6973 with an angle of 107.35 A\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "vab=400 #phase angle of 0\n", + "vbc=400 #phase angle of 120\n", + "vca=400 #phase angle of 240\n", + "#the phase currents are given by iab,ibc,ica\n", + "iab=400/150 #from the diagram \n", + "print \"iab=\",round(iab,5),\"A\"\n", + "#ibc=(400*314*50)/10**6 numerator with an angle of -120 and denominator angle of -90 which amounts to -30 in numerator\n", + "#this leads to simplifying with the formula as the value obtained for ibc after simplification from above mutiplied by values of cos(-30)+jsin(-30)\n", + "#therefore print as below\n", + "print\"ibc=5.4414-j3.1416\",\"A\"\n", + "#same method for ica\n", + "print \"ica=3.1463+j4.2056\",\"A\"\n", + "#case b\n", + "#ia=iab-ica\n", + "#ia=2.667-(3.1463+j4.2056)\n", + "#leads to 4.2328 with an angle of -96.51\n", + "#angle calculated using tan formula\n", + "print \"ia=4.2328 with an angle of -96.51\",\"A\"\n", + "#same for ib and ic\n", + "print \"ib=4.1915 with angle of -48.55\",\"A\"\n", + "print \"ic=7.6973 with an angle of 107.35\",\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3:Page number:321" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power factor =0.8\n", + "p= 25601.1 KW\n", + "q= 19200.82 Kvar\n", + "t= 32001.0 KVA\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "#given\n", + "zl=5 #load impedanc with an angle of 36.87 degrees\n", + "vl=400 #line voltage\n", + "il=46.19\n", + "va=400/3**0.5 #phase voltage\n", + "ia=va/zl #line current with an angle of -36.87 degrees\n", + "#ib and ic are also the same values with changes in in their angles\n", + "#case b\n", + "#cos(-36.87)=0.8 lagging\n", + "print \"power factor =0.8\"\n", + "#case c\n", + "p=3**0.5*vl*il*0.8 #power where 0.8 is power factor\n", + "print\"p=\",round(p,2),\"KW\"\n", + "#case d\n", + "q=3**0.5*vl*il*0.6 #where 0.6 is sin(36.87) and q is reactive volt ampere\n", + "print\"q=\",round(q,2),\"Kvar\"\n", + "#case e\n", + "t=3**0.5*vl*il #total volt ampere\n", + "print \"t=\",round(t,0),\"KVA\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: Page number-321" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ia=29.33A\n", + "ib=73.83A\n", + "ic=73.82A\n", + "vr=1466.5V\n", + "vl=73.83V\n", + "vc=73.83V\n", + "vn=1212.45V\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "za=50\n", + "zb=15 #j15\n", + "zc=-15 #-j15\n", + "vl=440\n", + "vab=440 #with an angle of 0\n", + "vbc=440 #with an angle of -120\n", + "vca=440 #with an angle of -240\n", + "#applying kvl to meshes as in the diagram we get the following equations\n", + "#50i1+j15(i1-i2)-440(angle 0)=0,j15(i2-i1)+(-j15)i2-440(angle 120)=0\n", + "#solving the above 2 eqns we get the values of ia,ib and ic as follows\n", + "print \"ia=29.33A\" #at angle -30\n", + "print \"ib=73.83A\" #at angle -131.45\n", + "print \"ic=73.82A\" #at angle 71.5\n", + "#the voltage drops across vr,vl and vc which are voltages across resistance ,inducctance and capacitance are given as follows\n", + "print \"vr=1466.5V\" #at angle -30\n", + "print \"vl=73.83V\" #at angle -41.45\n", + "print \"vc=73.83V\" #at angle -18.5\n", + "#the potential of neutral point\n", + "print \"vn=1212.45V\" #at angle 150\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5:Page number-323" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "il= 42.88104 A\n", + "ip= 24.75738 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "v=440 #voltage\n", + "o=25000 #output power\n", + "e=0.9 #efficiency\n", + "p=0.85 #poer factor\n", + "#case a\n", + "il=o/(3**0.5*v*p*e) #line current\n", + "print \"il=\",round(il,5),\"A\"\n", + "#case b\n", + "ip=o/(3*v*e*p) #phase current for delta current winding\n", + "print \"ip=\",round(ip,5),\"A\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 5.7:Page number-329" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "iab= 34.78 A\n", + "ibc= 55.648 A\n", + "ica= 41.736 A\n", + "ia=76.38A\n", + "ib=87.85A\n", + "ic=32.21A\n", + "w1=31.63KW\n", + "w2=12.827KW\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#25kW at power factor 1 for branch AB\n", + "#40KVA at power factor 0.85 for branch BC\n", + "#30KVA at power factor 0.6 for branch CA\n", + "#line voltages with vab as reference phasor\n", + "vab=415 #at angle 0\n", + "vbc=415 #at angle -120\n", + "vca=415 #at angle -240\n", + "#phase currents are given with x+jy form of an imaginary number and vary according to angles.The values below are only the values of the currents without conversion into imaginary form\n", + "iab=(25*10**3)/(3**0.5*415*1)\n", + "print \"iab=\",round(iab,3),\"A\"\n", + "ibc=(40*10**3)/(3**0.5*415)\n", + "print \"ibc=\",round(ibc,3),\"A\"\n", + "ica=(30*10**3)/(3**0.5*415)\n", + "print \"ica=\",round(ica,3),\"A\"\n", + "#the line currents are as below.The following values can also be converted to x+iy form where x is real and y is imaginary\n", + "#ia=iab-ibc and subtraction is done of x+iy forms where the value of the term varies as obtained by sqrt(x**2+y**2)\n", + "print \"ia=76.38A\" #at angle -3.75\n", + "#ib=ibc-iab\n", + "print \"ib=87.85A\"\n", + "#ic=ica-ibc\n", + "print \"ic=32.21A\"\n", + "#wattmeter readings on phase A\n", + "#w1=vab*ia*cos(-3.35) where the cos angle is given by phase angle between ia and vab\n", + "print \"w1=31.63KW\"\n", + "#same formula for wattmeter readings in phase c where the angle is 16.35\n", + "print \"w2=12.827KW\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8:Page number-331" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the total input power= 700.0 KW\n", + "power factor=0.803\n", + "il= 0.22877 A\n", + "output= 0.845 hp\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "w1=500\n", + "w2=200\n", + "w=w1+w2\n", + "#case a\n", + "print \"the total input power=\",round(w,0),\"KW\"\n", + "#case b\n", + "#tan(angle)=3**0.5*(w1-w2)/(w1+w2) where the angle=36.58 and cos(36.58)=0.803 which is the power factor\n", + "print \"power factor=0.803\"\n", + "#case c\n", + "#given\n", + "vl=2200\n", + "il=w/(3**0.5*vl*0.803) #0.803 is the value of the cos angle and il is the line current\n", + "print \"il=\",round(il,5),\"A\"\n", + "#case d\n", + "#efficiency=o/i #i is input and o is output\n", + "hp=746 #horse power\n", + "o=0.9*w/hp #0.9 is efficiency\n", + "print \"output=\",round(o,3),\"hp\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter11_nHcyQSN.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter11_nHcyQSN.ipynb new file mode 100644 index 00000000..4897b494 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter11_nHcyQSN.ipynb @@ -0,0 +1,126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11:Basic Analogue Instruments" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1:Page number-617" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rsh= 0.00450 ohm\n", + "rsh= 0.00300 ohm\n", + "rsh= 0.00225 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "rm=75\n", + "im=300*(10**-6)\n", + "#case a\n", + "i=5\n", + "rsh=(rm*im)/float(i-im)\n", + "print \"rsh=\",format(rsh,'.5f'),\"ohm\"\n", + "#case b\n", + "i=7.5\n", + "rsh=(rm*im)/float(i-im)\n", + "print \"rsh=\",format(rsh,'.5f'),\"ohm\"\n", + "#case c\n", + "i=10\n", + "rsh=(rm*im)/float(i-im)\n", + "print \"rsh=\",format(rsh,'.5f'),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2:Page number-619" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rse= 166591.67 ohm\n", + "rse= 249925.00 ohm\n", + "rse= 333258.33 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "im=300*(10**-6)\n", + "rm=75\n", + "#case a\n", + "v=50\n", + "rse=(v/im)-rm\n", + "print \"rse=\",format(rse,'.2f'),\"ohm\"\n", + "#case b\n", + "v=75\n", + "rse=(v/im)-rm\n", + "print \"rse=\",format(rse,'.2f'),\"ohm\"\n", + "#case c\n", + "v=100\n", + "rse=(v/im)-rm\n", + "print \"rse=\",format(rse,'.2f'),\"ohm\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1_ivpTi0v.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1_ivpTi0v.ipynb new file mode 100644 index 00000000..7f27495e --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter1_ivpTi0v.ipynb @@ -0,0 +1,679 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1:Introduction to electrical engineering" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1:Page number-6" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 90065423.52 N\n" + ] + } + ], + "source": [ + "import math\n", + "q1=q2=0.1\n", + "r=1\n", + "e=8.84*(10**-12)\n", + "E=(q1*q2)/float(4*3.14*e*(r**2))\n", + "print \"E=\",format(E,'.2f'),\"N\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2:Page number-7" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5.52146091786 J\n", + "Vab=-vba=5.4V\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "q1=2*(10**-9)\n", + "q2=3*(10**-9)\n", + "#q1 and q2 are 6m apart in air\n", + "#on substituting the values in the formula for calculating force between q and q1 and q and q2 we get 9[(3/(6-x**2)-(2/(x**2)))]\n", + "import sympy as sp\n", + "x=sp.Symbol('x')\n", + "sp.integrate(((3/(6-x)**2)-(2/x**2)),x)\n", + "from scipy.integrate import quad\n", + "import scipy.integrate\n", + "def f(x):\n", + " return -(x+12)/(x**2 - 6*x)\n", + "i=quad(f,1,4)\n", + "print (i[0]),\"J\"\n", + "print \"Vab=-vba=5.4V\"\n", + "#the value obtained is directly given with print \n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3:Page number-11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "iav= 1.6 A\n" + ] + } + ], + "source": [ + "import math\n", + "charge=1.6*(10**-19)\n", + "iav=1.6*(10**-19)*(10**19) #total charge movement per second\n", + "print \"iav=\",format(iav,'.1f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4:Page number-14" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of each coulomb of charge= 3.0 J\n" + ] + } + ], + "source": [ + "import math\n", + "p=30\n", + "i=10\n", + "v=p/i\n", + "dt=1\n", + "dq=i*dt\n", + "dw=v*dq\n", + "energy=dw/i\n", + "print \"energy of each coulomb of charge=\",format(energy,'.1f'),\"J\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "torque= 95.54 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "p=15000\n", + "n=1500\n", + "t=(60*p)/float(1500*2*3.14)\n", + "print \"torque=\",format(t,'.2f'),\"Nm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.6:Page number-16" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " R= 0.1376 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "res=1.72*(10**-8)\n", + "l=200\n", + "a=25*(10**-6)\n", + "R=(res*l)/float(a)\n", + "print \"R=\",format(R,'.4f'),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7 " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 0.00000270 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "meanrad=0.08\n", + "meanlen=3.14*meanrad\n", + "a=0.04*0.04\n", + "res=1.72*(10**-8)\n", + "R=(res*meanlen)/float(a)\n", + "print \"R=\",format(R,'.8f'),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8:Page number-17 " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 80.0000 ohm\n", + "power= 661.25 W\n" + ] + } + ], + "source": [ + "import math\n", + "res=0.02*(10**-6)\n", + "l=4000*80*(10**-2)\n", + "a=0.8*(10**-6)\n", + "R=(res*l)/float(a)\n", + "print \"R=\",format(R,'.4f'),\"ohm\"\n", + "power=(230*230)/float(80)\n", + "print \"power=\",format(power,'.2f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 0.2675 ohm\n", + "0.40127388535\n", + "dcu= 0.000569 nm\n" + ] + } + ], + "source": [ + "import math\n", + "lal=7.5\n", + "lcu=6\n", + "rcu=0.017*(10**-6)\n", + "ral=0.028*(10**-6)\n", + "d=(10**-6)\n", + "a=((3.14*d))/float(4)\n", + "Ral=(lal*ral)/float(a)\n", + "print \"R=\",format(Ral,'.4f'),\"ohm\"\n", + "ial=3\n", + "pv=Ral*ial\n", + "Rcu=pv/float(2)\n", + "print Rcu\n", + "a=(rcu*lcu)/float(Rcu)\n", + "dcu=(((a*4)/3.14)**0.5)\n", + "print \"dcu=\",format(dcu,'.6f'),\"nm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "l= 2706.896552 cm\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "a=100/0.32 #area required to dissipate 100W power\n", + "d=5\n", + "#length of cyclinder L,length of wire if l,diameter of the wire is d\n", + "L=a/float(3.14*d)\n", + "r=100/1**2\n", + "#spacing is d cm\n", + "#distance along the axis of the cylinder is 2d cm\n", + "#no of turns is 10/d\n", + "#length of one turn of the wire is 3.14*5 cm\n", + "#length of the wire is 50*3.14/d\n", + "res=10**-4\n", + "#d=(((2*10**-4))**(0.6))\n", + "d=0.058\n", + "l=(50*3.14)/d\n", + "print \"l=\",format(l,'.6f'),\"cm\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Page number-20" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t= 84.62 centigrade\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "v=250\n", + "i=5\n", + "i1=3.91\n", + "t0=0.00426 #temperature coefficient\n", + "r15=v/i #at 15 degrees\n", + "rt=v/i1 #at t degrees\n", + "l=(rt*(1+t0*15))/50 #left hand side\n", + "t=(l-1)/t0\n", + "print \"t=\",format(t,'.2f'),\"centigrade\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "al2=al1/(1+al1*(t1-t2))\n" + ] + } + ], + "source": [ + "import math\n", + "#this is a derivation by substitution problem\n", + "#al1=al0/(1+al0*t1)\n", + "#al2=al0/(1+al0*t2)\n", + "#where t1 and t2 are different temperatures al0,al1 and al2 are temperature coefficients\n", + "#substitute al0 in al2\n", + "#on deriving and solving for al2 we get,\n", + "print \"al2=al1/(1+al1*(t1-t2))\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13:Page number-22" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v= 20.0 v\n", + "v= -10.0 v\n" + ] + } + ], + "source": [ + "import math\n", + "#values are obtained from the graph\n", + "i=10 #10t A for 0 to 1 second\n", + "d=10 #where di/dt is 10\n", + "L=2\n", + "# at one second\n", + "v=L*d\n", + "print \"v=\",format(v,'.1f'),\"v\"\n", + "#for 1 to 5 seconds\n", + "d=-5\n", + "#at t=3 seconds voltage across the inductor is\n", + "v=L*d\n", + "print \"v=\",format(v,'.1f'),\"v\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16:Page number-27" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " i= 0.0005 A\n", + "q= 0.0005 C\n", + "p= 0.0100 W\n", + "wc= 0.0050 J\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "dv=20 #dv/dt\n", + "c=25*(10**-6)\n", + "#case a\n", + "i=c*dv\n", + "print \"i=\",format(i,'.4f'),\"A\"\n", + "#case b\n", + "q=c*dv\n", + "print \"q=\",format(q,'.4f'),\"C\"\n", + "#case c\n", + "p=dv*i\n", + "print \"p=\",format(p,'.4f'),\"W\"\n", + "#case d\n", + "v=dv**2\n", + "wc=(c*v)/2\n", + "print \"wc=\",format(wc,'.4f'),\"J\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 1.18:Page number-34" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "f= 75.0 N\n", + "p= 375.0 W\n", + "e= 7.5 V\n" + ] + } + ], + "source": [ + "import math\n", + "l=1\n", + "b=1.5\n", + "i=50\n", + "u=5\n", + "#case a\n", + "f=b*i*l\n", + "print \"f=\",format(f,'.1f'),\"N\"\n", + "#case b\n", + "p=f*u\n", + "print \"p=\",format(p,'.1f'),\"W\"\n", + "#case c\n", + "e=b*l*u\n", + "print \"e=\",format(e,'.1f'),\"V\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19:Page number-35" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e= 30.0 V\n", + "e= 15.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#e=b*l*u*sin(angle)\n", + "b=0.5\n", + "l=40\n", + "u=1.5\n", + "#when angle=90 sin(90)=1=s\n", + "s=1\n", + "e=b*l*u*s\n", + "print \"e=\",format(e,'.1f'),\"V\"\n", + "#when angle=30 sin(angle)=s=0.5\n", + "s=0.5\n", + "e=b*l*u*s\n", + "print \"e=\",format(e,'.1f'),\"V\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22:Page number-37" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "vse= 8.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#applying kcl to circuit at node b i3+i4=6-4=2\n", + "i3=i4=1 #potential of node b with respect to node c\n", + "vb=8\n", + "vba=2 #voltage drop across nodes b and a\n", + "va=6 #potential of node a w.r.t note c\n", + "i2=3\n", + "#applying kcl to node a\n", + "isa=1\n", + "vs=va+2*isa\n", + "print \"vse=\",format(vs,'.1f'),\"V\"\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter3.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter3.ipynb new file mode 100644 index 00000000..eadaec84 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter3.ipynb @@ -0,0 +1,728 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3:Magnetic Circuits" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1:Page number-158\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The reluctance of steel ring is= 1250000.0 AT/Wb\n", + "The magnetomotive force is= 625.0 AT\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "pi=3.14\n", + "l=pi*0.2 #l=mean length of the ring=pi*mean diameter of the ring\n", + "A=400*10**-6 #A=cross sectional area of ring\n", + "u1=1000 #u1=relative permeability of steel\n", + "u2=4*pi*10**-7 #relative permeability of air\n", + "R=l/(A*u1*u2) #reluctance of steel ring\n", + "print \"The reluctance of steel ring is=\",round(R,0),\"AT/Wb\"\n", + "#case b\n", + "flux=500*10**-6\n", + "f=flux*R\n", + "print \"The magnetomotive force is=\",round(f,0),\"AT\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2:Page number-158" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The flux density is= 0.625 Wb/m**2\n", + "The magnetomotive force is= 375.0 AT\n", + "The magnetic field strength is= 750.0 AT/m\n", + "The relative permeability is= 663.0\n", + "The flux density is= 1.5 Wb/m**2\n", + "The magnetomotive force is= 1250.0 AT\n", + "Magnetic field strength= 2500.0 AT/m\n", + "The relative permeability is= 477.7\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "l=0.5\n", + "A=4*10**-4\n", + "N=250\n", + "I=1.5\n", + "flux=0.25*10**-3\n", + "fluxdensity=flux/A \n", + "f=N*I #magnetomotive force\n", + "H=(N*I)/l #magnetic field strength\n", + "pi=3.14\n", + "u1=4*pi*10**-7\n", + "u2=fluxdensity/(u1*H)\n", + "print \"The flux density is=\",round(fluxdensity,3),\"Wb/m**2\"\n", + "print \"The magnetomotive force is=\",round(f,0),\"AT\"\n", + "print \"The magnetic field strength is=\",round(H,0),\"AT/m\"\n", + "print \"The relative permeability is=\",round(u2,0)\n", + "#case b\n", + "#given\n", + "I=5\n", + "flux=0.6*10**-3\n", + "A=4*10**-4\n", + "N=250\n", + "l=0.5\n", + "fluxdensity=flux/A\n", + "print \"The flux density is=\",round(fluxdensity,1),\"Wb/m**2\"\n", + "f=N*I #magnetomotive force\n", + "print \"The magnetomotive force is=\",round(f,0),\"AT\"\n", + "H=(N*I)/l #magnetic field stength\n", + "print \"Magnetic field strength=\",round(H,0),\"AT/m\"\n", + "pi=3.14\n", + "u1=4*pi*10**-7\n", + "u2=fluxdensity/(u1*H)\n", + "print \"The relative permeability is=\",round(u2,1)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Page number-159" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnetomotive force= 1250.0 AT\n", + "The reluctance of air gap is= 162154.449 AT/Wb\n", + "The flux is= 0.006475308 Wb\n", + "The flux density is= 13.188 Wb/m**2\n", + "The reluctance of steel string is= 69494.763801 AT/Wb\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "pi=3.14\n", + "ls=0.627 #mean length of steel string\n", + "la=0.0001 #length of air gap\n", + "A=4.91*10**-4 #cross sectional area of magnetic circuit\n", + "f=N*I #magnetomotive force\n", + "print \"Magnetomotive force=\",round(f,0),\"AT\"\n", + "fa=1050 #fa=mmf of air gap=1050AT\n", + "fs=450 #fs=mmf of steel ring=450\n", + "#case b\n", + "u1=4*pi*10**-7\n", + "ra=la/(u1*A) #reluctance of air gap\n", + "print \"The reluctance of air gap is=\",round(ra,3),\"AT/Wb\"\n", + "flux=fa/ra\n", + "print \"The flux is= \",round(flux,20),\"Wb\"\n", + "#case c\n", + "fluxdensity=flux/A\n", + "print \"The flux density is=\",round(fluxdensity,5),\"Wb/m**2\"\n", + "#case d\n", + "rs=fs/flux #reluctance of steel string\n", + "print \"The reluctance of steel string is=\",round(rs,6),\"AT/Wb\"\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Page number-160" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The air gap= 955414.01274 AT/m\n", + "The magnetomotive force is= 5.0 AT\n", + "hs= 1061.57 AT/m\n", + "The magnetomotive force for air gap is= 318.47 AT\n", + "Total mmf= 323.47 AT\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "la=2*10**-3 #length of the air gap\n", + "ls=0.3 #lentgh of the cast steel core\n", + "B=1.2\n", + "ha=B/u1\n", + "print \"The air gap=\",round(ha,5),\"AT/m\"\n", + "fa=H*la #magnetomotive ofrce for air gap\n", + "print \"The magnetomotive force is=\",round(fa,0),\"AT\"\n", + "u2=900\n", + "hs=B/(u1*u2)\n", + "print \"hs=\",round(hs,2),\"AT/m\"\n", + "fs=hs*ls #magnetomotive force for air gap\n", + "print \"The magnetomotive force for air gap is=\",round(fs,2),\"AT\"\n", + "totmmf=fa+fs\n", + "print \"Total mmf=\",round(totmmf,2),\"AT\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5-Page number-161 " + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "flux density is= 2.15844 mWb/m**2\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "f=200 #total mmf\n", + "#ra=2*10**-3/(u1*a) #reluctance of air gap\n", + "#ri=10**-3/(u1*a) #reluctance of iron core\n", + "#r=3*10**-3/(u1*a) #reluctance of magnetic circuit\n", + "#flux=f/r\n", + "a=3*10**-3\n", + "fluxdensity=flux/a\n", + "print \"flux density is=\",round(fluxdensity,5),\"mWb/m**2\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6-Page number-161" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The relucatance of air gap is= 497611.464968 AT/wb\n", + "The flux density in central limb is= 0.1125 Wb/m**2\n", + "The mmf drop in central limb is= 300.0 AT\n", + "fabh= 500.0 AT\n", + "The total mmf required is= 1695.0 AT\n", + "The required current is= 2.825 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "fluxa=0.00018 #flux in the air gap\n", + "la=0.1*10**-2 #length of the air gap\n", + "ac=16*10**-4 #area of cross section\n", + "u1=4*3.14*10**-7\n", + "ra=la/(u1*ac) #reluctance of the air gap\n", + "print \"The relucatance of air gap is=\",round(ra,10),\"AT/wb\"\n", + "#fa=fluxa*ra #mmf required to set up flux in air gap\n", + "#print \"The mmf required to set up flux in air gap is=\",round(fa,10),\"AT\" --> This rounds to 895\n", + "fa=895\n", + "B=fluxa/ac #flux density in central limb\n", + "print \"The flux density in central limb is=\",round(B,10),\"Wb/m**2\"\n", + "#given from B-H curve, when B=1.125 the field density required is hc=1000 AT/m\n", + "#given\n", + "hc=1000 #as above\n", + "lc=30*10**-2 #length of central limb\n", + "fc=hc*lc #mmf drop in central limb\n", + "print \"The mmf drop in central limb is=\",round(fc,0),\"AT\"\n", + "#from the diagram the flux density in parallel path fabh is flux(a)/2 =0.5625 Wb/m**2 and field intensity H=625 AT/m\n", + "#given\n", + "lp=80*10**-2 #length of parallel path\n", + "H=625 #from above\n", + "fabh=H*lp\n", + "print \"fabh=\",round(fabh,0),\"AT\"\n", + "F=fa+fc+fabh\n", + "print \"The total mmf required is=\",round(F,0),\"AT\"\n", + "#given\n", + "N=600 #number of turns\n", + "I=F/N\n", + "print \"The required current is=\",round(I,5),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7:Page number-163" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "B= 0.7 Wb/m**2\n", + "mmf= 111.4 AT\n", + "totmmf= 223.85 AT\n", + "h2= 298.46667 AT\n", + "flux2= 0.0014 Wb\n", + "total mmf in fabc= 2250.0 Wb/m**2\n", + "totmmfm= 2473.85 AT\n", + "The total current required to set up flux in air gap is= 4.9477 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "fluxa=1.4*10**-3\n", + "area=0.002\n", + "B=fluxa/area #flux density in air gap \n", + "print \"B=\",round(B,3),\"Wb/m**2\"\n", + "#u1=4*3.14*10**-7\n", + "#ha=B/u1 in AT/m #magnetic field in air gap\n", + "ha=55.7\n", + "la=2 #length of air gap in m\n", + "mmf=ha*la #mmf of air gap\n", + "print \"mmf=\",round(mmf,3),\"AT\"\n", + "#since the flux density of central limb is 0.7 the corresponding field srength is h1=250AT/m\n", + "h1=250\n", + "mmfl=112.45 #mmf for magnetic central limb-->mmf=250*(450-0.2)*10**-3\n", + "totmmf=mmf+mmfl\n", + "print \"totmmf=\",round(totmmf,5),\"AT\"\n", + "#mean length of core CGHF=0.75m\n", + "ml=0.75 #as above\n", + "#since the central limb and magnetic core are in parallel they have same mmf that is 223.86AT\n", + "h2=totmmf/ml #magnetic intensity in CGHF\n", + "print \"h2=\",round(h2,5),\"AT\"\n", + "flux2=B*area \n", + "print \"flux2=\",round(flux2,5),\"Wb\"\n", + "totflux=fluxa+flux2 #Wb\n", + "Bfabc=totflux/area #flux density in magnetic core fabc in Wb/m**2\n", + "H=3000 #AT/m\n", + "totmmffabc=H*ml #total mmf in fabc in AT\n", + "print \"total mmf in fabc=\",round(totmmffabc,5),\"Wb/m**2\"\n", + "totmmfm=totmmffabc+totmmf #total mmf in magnetic core in AT\n", + "print \"totmmfm=\",round(totmmfm,5),\"AT\"\n", + "N=500\n", + "I=totmmfm/N #The required current to set up flux in air gap\n", + "print \"The total current required to set up flux in air gap is=\",round(I,5),\"A\"\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 3.8:Page number-171" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "l1= 0.004 mH\n", + "m12= 0.003 mH\n", + "l2= 0.006 mH\n", + "m21= 0.003 mH\n", + "Work done= 7.7 J\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "r1=3.98*10**6 #reluctance of air gap in AT/Wb and the value is same for r2\n", + "r3=5.97*10**6 #reluctance of air gap in AT/Wb\n", + "#assume that current of 1A flows through 150 turns coil,for assumed directions of fluxes application of mesh current leads to matrix equations that can be simplified to:\n", + "#[flux1 flux2]=[2.36 1.41]*10**-5 Wb\n", + "#The self inductance and mutual inductance are obtained as follows:\n", + "n1=150 #number of turns\n", + "i1=1 #A\n", + "flux1=2.36*10**-5 #Wb\n", + "l1=(n1*flux1)/i1 #self inductance\n", + "print \"l1=\",round(l1,3),\"mH\"\n", + "n2=200 #number of turns\n", + "flux2=1.41*10**-5\n", + "m12=(n2*flux2)/i1 #mutual inductance\n", + "print \"m12=\",round(m12,3),\"mH\"\n", + "#assume that 1A of current flows through 200 turns coil\n", + "#The self inductance of the coil is determined as above using the matrix and the result is as follows\n", + "#[flux1 flux2]=[1.89 3.14]*10**-5 Wb\n", + "#Hence self and mutual inductance are computed as follows\n", + "n2=200 #number of turns\n", + "flux2=3.14*10**-5 #Wb\n", + "i2=1 #A\n", + "l2=(n2*flux2)/i2 #self inductance\n", + "print \"l2=\",round(l2,3),\"mH\"\n", + "flux1=1.89*10**-5\n", + "m21=(n1*flux1)/i2 #mutual inductance\n", + "print \"m21=\",round(m21,3),\"mH\"\n", + "#case b\n", + "#When the air gap l3 is closed the reluctance of the limb is zero since the permeability of the magnetic material is infinity.Thus,the limb behaves like short circuit and the entire flux passes through it.Thus,the flux linking 200 turns coil is zero and mutual inductance is zero\n", + "#case 3\n", + "W=((3.5)/2)+((6.3)/2)+2.8 #work equation in joules\n", + "print \"Work done=\",round(W,5),\"J\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9:Page number-174" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "i= 7.85 A\n", + "l= 0.20382 H\n", + "rair= 3184713.3758 AT/Wb\n", + "fair= 6369.42675 AT\n", + "total mmf= 12602.60675 AT\n", + "L= 0.10157 H\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "B=0.8 #Wb/m**2\n", + "A=25*10**-4 #m**2\n", + "flux=20*10**-4 #Wb\n", + "l=3.14*40*10**-2 #m\n", + "f=2000*3.14 #AT\n", + "n=800 #number of turns\n", + "#case a\n", + "i=f/n #A exciting current\n", + "print \"i=\",round(i,3),\"A\"\n", + "l=(n*flux)/i #self inductance in H\n", + "print \"l=\",round(l,5),\"H\"\n", + "#case b\n", + "fluxa=20*10**-4 #Wb\n", + "gap=1*10**-2\n", + "u1=4*3.14*10**-7\n", + "rair=gap/(u1*A) #reluctance of air in AT/Wb\n", + "print \"rair=\",round(rair,5),\"AT/Wb\"\n", + "fair=rair*flux #mmf for air gap in AT\n", + "print \"fair=\",round(fair,5),\"AT\"\n", + "fcore=6233.18 #AT--> 5000*((0.4*3.14)-0.01)=6233.18\n", + "totmmf=fcore+fair\n", + "print \"total mmf=\",round(totmmf,5),\"AT\"\n", + "I=totmmf/n #A exciting current\n", + "#self inductance\n", + "L=(n*flux)/I\n", + "print \"L=\",round(L,5),\"H\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10:Page number-175" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lx= 0.01 H\n", + "m= 0.015 H\n", + "The induced emf in coil Y= 30.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "n=2000 #number of turns\n", + "flux=0.05*10**-3 #Wb\n", + "i=10 #A\n", + "lx=(n*flux)/i #self inductance in X\n", + "print \"lx=\",round(lx,5),\"H\"\n", + "#since coils are identical self inductance in Y=self inductance in x\n", + "fluxlinkingX=0.75*0.05*10**-3 #Wb flux linking due to current in coil X\n", + "fluxlinkingY=2000*0.05*0.75*10**-3 #Wb flux linkages in coil Y\n", + "m=fluxlinkingY/5 #mutual inductance\n", + "print \"m=\",round(m,5),\"H\"\n", + "#The rate of change in current di/dt=2000A/sec --> di/dt=(10-(-10))/0.01\n", + "rate=2000\n", + "ey=m*rate\n", + "print \"The induced emf in coil Y=\",round(ey,0),\"V\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11:Page number-175" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "k=0.72168\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#when currents are in same direction the total induction is:\n", + "#lt=l1+l2+2m\n", + "#when currents are in opposite direction the total emf is:\n", + "#lt=l1+l2-2m\n", + "#According to this problem\n", + "#l1+l2+2m=1.2\n", + "#l1+l2-2m=0.2\n", + "#Solving the above equations we get l1=0.4H M=0.25H\n", + "#on substituting we get l2=0.3H\n", + "#k=m/squareroot(l1*l2)\n", + "print \"k=0.72168\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12:Page number-176" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "flux 0.0001 Wb\n", + "i 0.3125 A\n", + "l= 0.08 H\n", + "w= 0.00391 J\n", + "796.178343949\n", + "exciting current= 6.3 A\n", + "l= 0.00397 H\n", + "e= 0.07881 J\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#case a\n", + "B=1 #Wb/m**2\n", + "A=10**-4 #cm**2\n", + "per=800 #permeability\n", + "n=250 #number of turns\n", + "flux=B*A\n", + "print \"flux\",round(flux,5),\"Wb\"\n", + "r=781250 #AT/Wb calculated using formula for reluctance\n", + "mmf=flux*r #AT\n", + "i=mmf/n #exciting current required in A\n", + "print \"i\",round(i,5),\"A\"\n", + "l=(n*flux)/i #self inductance of the coil\n", + "print \"l=\",round(l,5),\"H\"\n", + "w=(l*i*i)/2 #energy stored\n", + "print \"w=\",round(w,5),\"J\"\n", + "#case b\n", + "airgap=1*10**-3 #air gap is assumed \n", + "rair=airgap/(u1*A) #reluctance of air gap in AT/Wb\n", + "mmfa=flux*rair #mmf of air in AT\n", + "print mmfa\n", + "#rcore=((2.5*3.14)-0.1)/(32*3.14*10**-6) #reluctance of core \n", + "#mmfc=flux*rcore\n", + "mmfc=780 #AT\n", + "F=mmfc+mmfa\n", + "I=F/n #A\n", + "print \"exciting current=\",round(I,2),\"A\"\n", + "n=250 #number of turns\n", + "L=(n*flux)/I #self inductanc eof coil with air gap \n", + "print \"l=\",round(L,5),\"H\"\n", + "e=(L*I*I)/2 #energy stored in coil\n", + "print \"e=\",round(e,5),\"J\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13:Page number:178" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "force= 39808.9172 N\n", + "W= 796.17834 J\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "A=10**-1 #area\n", + "flux=0.1 #Wb\n", + "#case a\n", + "B=flux/A #flux density Wb/m**2\n", + "u1=4*3.14*10**-7 \n", + "F=(B*B*A)/(2*u1) #force in N\n", + "print \"force=\",round(F,5),\"N\"\n", + "#case b\n", + "l=10**-2 #length of the air gap\n", + "w=(B*B*A*l*2)/(2*u1) #energy stored in two airgaps, 2=air gaps\n", + "print \"W=\",round(w,5),\"J\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter6_7Vcvq3x.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter6_7Vcvq3x.ipynb new file mode 100644 index 00000000..9192cf83 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter6_7Vcvq3x.ipynb @@ -0,0 +1,678 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6:Transformer Principles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1:Page number-343" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bm= 0.7207 Wb/m2\n", + "e2= 800.0 V\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "a=50*(10**-4)\n", + "e=400\n", + "f=50\n", + "n1=500\n", + "n2=1000\n", + "#phym=bm*a\n", + "#case a\n", + "#e=4.44*f*n*bm*a\n", + "bm=(e)/float(4.44*f*n1*a)\n", + "print \"bm=\",format(bm,'.4f'),\"Wb/m2\"\n", + "#case b\n", + "e2=4.44*f*n2*bm*a\n", + "print \"e2=\",format(e2,'.1f'),\"V\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cross sectional area= 0.02065 m2\n", + "secondary voltage on no load= 440.0 V\n", + "primary magnetising current= 1.133 A\n", + "core loss= 366.7 W\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "e=3300\n", + "f=50\n", + "n1=600\n", + "n2=80\n", + "bm=1.2\n", + "h=425\n", + "l=1.6\n", + "density=7400\n", + "loss=1.5\n", + "#case a\n", + "phym=e/float(4.44*f*n1)\n", + "csa=phym/bm\n", + "print \"cross sectional area=\",format(csa,'.5f'),\"m2\"\n", + "#case b\n", + "sv=(e*n2)/n1\n", + "print \"secondary voltage on no load=\",format(sv,'.1f'),\"V\"\n", + "#case c\n", + "mc=(h*l)/n1\n", + "print \"primary magnetising current=\",format(mc,'.3f'),\"A\"\n", + "#case d\n", + "v=l*csa\n", + "m=v*density\n", + "closs=m*loss\n", + "print \"core loss=\",format(closs,'.1f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3:Page number-356" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.0333333333333\n", + "30\n", + "number of turns of high voltage soil= 2640.0\n", + "number of turns of high voltage soil= 88.0\n", + "primary current as a step down transformer is= 1.515 A\n", + "secondary current as a step down transformer is= 45.45 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#as per step up tranformer\n", + "v1=220\n", + "v2=6600\n", + "f=50\n", + "vturn=2.5\n", + "kva=10000\n", + "#case a\n", + "a=v1/float(v2)\n", + "print a\n", + "#as per step down case b\n", + "v1=6600\n", + "v2=220\n", + "a=v1/v2\n", + "print a\n", + "#case c\n", + "#high voltage soil\n", + "n=v1/float(vturn)\n", + "print \"number of turns of high voltage soil=\",format(n,'.1f')\n", + "#low voltage soil\n", + "n1=v2/float(vturn)\n", + "print \"number of turns of high voltage soil=\",format(n1,'.1f')\n", + "#case d\n", + "i=kva/float(v1)\n", + "print \"primary current as a step down transformer is=\",format(i,'.3f'),\"A\"\n", + "#case e\n", + "i=kva/float(v2)\n", + "print \"secondary current as a step down transformer is=\",format(i,'.2f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4:Page number-357" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "turns ratio for impedance machting is 0.25\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "rl=32\n", + "#let ratio of sides be a\n", + "rs=2\n", + "a=(2/float(32))\n", + "p=a**0.5\n", + "print \"turns ratio for impedance machting is\",format(p,'.2f')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5:Page number-364" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import math\n", + "#given\n", + "n1=2200\n", + "n2=220\n", + "kva=100\n", + "f=50\n", + "r1=0.75\n", + "r2=0.0007\n", + "x2=0.0009\n", + "#case a\n", + "#subcase 1\n", + "#lv side leakage impedance=r2+jx2-->complex number\n", + "#hv side leakage impedance=r1+jx1\n", + "#hv side impedance referred to lv side is r1'+jx1'=(r1+jx1)/a**2=(0.0075+j0.0115)\n", + "#shunt branch resistance referred to lv side gc-jbm=(0.0035-j0.025)\n", + "#The equivqlent circuit is shown in the diagram\n", + "#subcase 2\n", + "#lv side impedance referred to hv side is r2'+jx2'=a**2*(r2+jx2)=(0.70+j0.90)ohm\n", + "#the magnetising admittance refferred to hv side (gc-jbm)/a**2=(0.000035-j0.00025)\n", + "#the equivalent circuit is as in figure\n", + "#case b\n", + "#for an approximate equivalent circuit the magnetised admittance is neglected from the exact circuit\n", + "#subcase 1\n", + "#equivalent impedance referred to lv side (r2+r1')+j(x2+x1')=(0.0145+j0.0205)ohm\n", + "#equivalent circuit is shown in figure\n", + "#subcase 2\n", + "#equivalent impedance referred to hv side is (r1+r2')+j(x1+x2')=(1.45+j2.05)ohm\n", + "#equivalent circuit is shown in figure\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6:Page number-369" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "yc= 0.0050 S\n", + "gc= 0.0025 S\n", + "bm= 0.0043 S\n", + "req= 0.8500 ohm\n", + "zeq= 1.5000 ohm\n", + "xeq= 1.2359 ohm\n", + "req1= 0.2125 ohm\n", + "xeq1= 0.3090 ohm\n", + "zeq1= 0.3750 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "#from oc test data shunt admittances are determined as follows\n", + "#given\n", + "v1=200\n", + "i0=1\n", + "pc=100\n", + "yc=i0/float(v1)\n", + "print \"yc=\",format(yc,'.4f'),\"S\"\n", + "gc=pc/float(v1**2)\n", + "print \"gc=\",format(gc,'.4f'),\"S\"\n", + "bm=(((0.005**2)-(0.0025**2))**0.5)\n", + "print \"bm=\",format(bm,'.4f'),\"S\"\n", + "#from sc test data\n", + "p=85\n", + "isc=10\n", + "vsc=15\n", + "req=p/float(isc**2)\n", + "print \"req=\",format(req,'.4f'),\"ohm\"\n", + "zeq=vsc/float(isc)\n", + "print \"zeq=\",format(zeq,'.4f'),\"ohm\"\n", + "xeq=(((zeq**2)-(req**2))**0.5)\n", + "print \"xeq=\",format(xeq,'.4f'),\"ohm\"\n", + "#case b\n", + "a=0.5\n", + "#equivalent impedance parameters referred to lv side\n", + "re=(a**2)*req\n", + "print \"req1=\",format(re,'.4f'),\"ohm\"\n", + "xe=(a**2)*xeq\n", + "print \"xeq1=\",format(xe,'.4f'),\"ohm\"\n", + "ze=(a**2)*zeq\n", + "print \"zeq1=\",format(ze,'.4f'),\"ohm\"\n", + "#equivalent circuit referred to lv side is as shown" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8:Page number-376" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n=((10xScos(angle))/(10xScos(angle)+pc+0.0001x2Pcu))\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEPCAYAAABCyrPIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VFX6wPHvS5FeFanSgigKhCIKihBsUdFFXRuiCShN\nlLJYVlQUXVkXXXUFCypWfoIdpEkRDKgI0kIkYEnoHUxogYSU9/fHnWAISZgkM7kzk/fzPPMkuXPn\n3vckcN97zrnnHFFVjDHGmDJuB2CMMSYwWEIwxhgDWEIwxhjjYQnBGGMMYAnBGGOMhyUEY4wxgJ8T\ngogMF5FfRGSdiAz3bLtYRH4WkTUiskJEOvkzBmOMMd7xW0IQkdZAf6ATEA7cICJhwAvAaFVtDzzl\n+dkYY4zLyvnx2OcDy1U1FUBE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QB86VmL4XMR6ZzHxzrj\nJBKA/8O5uIJzoS9ouuCC3iss8Zz3K1U9pqopOHM/Xe55f7iIxAI/4cxM2RK4BIhRZ8bVdOBTH8dk\nzAnl3A7AmGIaDTwH3AUswZlG/SvyWGaQol1Is+/GMzj5BqpSEY6VfbyccQiAiETg9Gd0VtVUEfkO\np0ksd23AkoHxG6shmKAlIucCDVR1Cc4FOvvimdfFeinO9OPgdBYv8fY0nq9bgAs8UwnXBK4oQsgK\nfA/c5JlSuwrOcpVLgOpAsicZnI9To1Gc1QO7i0htz7ohtxXhvMZ4xWoIJpg9hzO9LzjTAk/HWa1t\ndB77DgXeF5FHcBaA6efZ7tUKYaq6TUQ+A9YBm4DVhYw1+zhrROQD/pqX/h1VXSsiG4DBIrIe+A2n\n2QhV3S0iYzw/H8CZvtn6EIxf2PTXxhhjAGsyMsYY42EJwRhjDGAJwRhjjIclBGOMMYAlBGOMMR6W\nEIwxxgCWEIwxxnhYQjDGGAPA/wMqL97FjXaK2wAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x7f42d136e490>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import math\n", + "#case a\n", + "#transformer output=0.01x1000cos(angle)W\n", + "#loss=10xScos(angle)\n", + "#transformer efficiency n=(10xScos(angle)/(10xScos(angle)+pc+0.0001x2Pcu))\n", + "print \"n=((10xScos(angle))/(10xScos(angle)+pc+0.0001x2Pcu))\"\n", + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "x1=20.5\n", + "x2=30\n", + "x3=40\n", + "x4=50\n", + "x5=60.5\n", + "x6=70\n", + "x7=80\n", + "x8=90\n", + "x9=100\n", + "x10=110\n", + "y1=94.3\n", + "y2=95\n", + "y3=96\n", + "y4=96.5\n", + "y5=96.8\n", + "y6=96.9\n", + "y7=97\n", + "y8=97\n", + "y9=97\n", + "y10=97\n", + "plt.plot([x1,x2,x3,x4,x5,x6,x7,x8,x9,x10],[y1,y2,y3,y4,y5,y6,y7,y8,y9,y10],marker='o',color='b',label='0.65')\n", + "p1=120.5\n", + "p2=30\n", + "p3=40\n", + "p4=50\n", + "p5=70\n", + "p6=80\n", + "p7=90\n", + "p8=100\n", + "p9=110\n", + "q1=95.3\n", + "q2=86\n", + "q3=96.7\n", + "q4=97.2\n", + "q5=97.5\n", + "q6=97.5\n", + "q7=97.5\n", + "q8=97.5\n", + "q9=97.5\n", + "plt.plot([p1,p2,p3,p4,p5,p6,p7,p8,p9],[q1,q2,q3,q4,q5,q6,q7,q8,q9],marker='o',color='g',label='0.8')\n", + "x2=[20.5,30,40,50,70,80,90,100,110]\n", + "y2=[96.2,96.6,97.4,97.6,98,98,98,98,98]\n", + "plt.plot(x2,y2,label='pf=1')\n", + "plt.xlabel('% of full load')\n", + "plt.ylabel('% efficiency')\n", + "plt.legend()\n", + "plt.show()\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10:Page number-378\n" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "15306.122449\n", + "306.12244898\n", + "0.971216989926\n" + ] + } + ], + "source": [ + "import math\n", + "#at unity power factor\n", + "op=15000\n", + "n=0.98\n", + "i=op/float(n)\n", + "print i\n", + "loss=i-op\n", + "print loss\n", + "pc=float(loss)/2000 #actually division by 2 but value given only to make pc 0.153 instead of 153\n", + "t=pc*24 #iron loss in a day\n", + "toteng=20+96+108 #sum of energy outputs\n", + "engloss=0.109+1.224+1.632 #sum of energy losses\n", + "n=toteng/float(engloss+toteng+t)\n", + "print n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 6.11:Page number-381" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.9726443769\n", + "30\n", + "0.990625\n" + ] + } + ], + "source": [ + "import math\n", + "kva=10000\n", + "pf=0.8\n", + "iloss=75\n", + "closs=150\n", + "a=0.5\n", + "#case a\n", + "po=kva*pf\n", + "loss=75+150\n", + "n=po/float(po+loss)\n", + "print n\n", + "#case b\n", + "i2=(10*1000)/(200)\n", + "i1=i2+((10*1000)/400)\n", + "kvar=(600*50)/1000\n", + "print kvar\n", + "po=30*0.8\n", + "n=1-(0.225/24)\n", + "print n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12:Page number-382" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sat= 180.0 Kva\n", + "sat= 900.0 kva\n" + ] + } + ], + "source": [ + "import math\n", + "#case 1\n", + "#2300 winding used as secondary\n", + "#given and derived\n", + "st=150\n", + "v1=13800\n", + "v2=2300\n", + "a=(v1-v2)/v2\n", + "b=a+1\n", + "sat=(6*150)/5\n", + "print \"sat=\",format(sat,'.1f'),\"Kva\"\n", + "#case 2\n", + "v1=13.8\n", + "v2=11.5\n", + "a=(v1-v2)/v2\n", + "sat=((1+a)/a)*150\n", + "print \"sat=\",format(sat,'.1f'),\"kva\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13:Page number-391" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "v2l= 440.0 V\n", + "i2p= 86.6 A\n", + "i2l= 150.0 A\n", + "v2p= 254.0 V\n", + "v2l= 440.0 V\n", + "i2p=i2l= 150.0 A\n", + "v2p= 440.0 V\n", + "v2l= 762.1 V\n", + "i2p= 86.6 A\n", + "v2p= 254.0 V\n", + "i2p= 150.0 A\n", + "i2l= 259.8 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given and 1.732 is the value of root 3\n", + "v=6600\n", + "i=10\n", + "n=15\n", + "#case a\n", + "v2l=v/n\n", + "print \"v2l=\",format(v2l,'.1f'),\"V\"\n", + "i1p=10/1.732\n", + "i2p=i1p*n\n", + "print \"i2p=\",format(i2p,'.1f'),\"A\"\n", + "i2l=n*i1p*1.732\n", + "print \"i2l=\",format(i2l,'.1f'),\"A\"\n", + "#case b\n", + "v2p=v/(n*1.732)\n", + "print \"v2p=\",format(v2p,'.1f'),\"V\"\n", + "v2l=v2p*1.732\n", + "print \"v2l=\",format(v2l,'.1f'),\"V\"\n", + "i2l=i2p=n*i\n", + "print \"i2p=i2l=\",format(i2p,'.1f'),\"A\"\n", + "#case c\n", + "v2p=v/n\n", + "print \"v2p=\",format(v2p,'.1f'),\"V\"\n", + "v2l=(v*1.732)/n\n", + "print \"v2l=\",format(v2l,'.1f'),\"V\"\n", + "i1p=i/1.732\n", + "i2p=i2l=(n*i1p)\n", + "print \"i2p=\",format(i2p,'.1f'),\"A\"\n", + "#case d\n", + "v1p=v/1.732\n", + "v2p=v2l=v/(n*1.732)\n", + "print \"v2p=\",format(v2p,'.1f'),\"V\"\n", + "i1p=10\n", + "i2p=i1p*n\n", + "print \"i2p=\",format(i2p,'.1f'),\"A\"\n", + "i2l=i2p*1.732\n", + "print \"i2l=\",format(i2l,'.1f'),\"A\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ihv= 3.69402 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "hp=75\n", + "v=415\n", + "n=0.9\n", + "pf=0.85\n", + "op=75*746 #since its horse power\n", + "ip=op/n\n", + "ilv=ip/(1.732*v*pf) #line current on low voltage start side\n", + "a=(6600*1.732)/415 #given in question\n", + "ihv=ilv/a\n", + "print \"ihv=\",format(ihv,'.5f'),\"A\"\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter7_Iro5ijO.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter7_Iro5ijO.ipynb new file mode 100644 index 00000000..5cff53b6 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter7_Iro5ijO.ipynb @@ -0,0 +1,531 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:Synchronous Machines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1:Page number-412" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 3000.0 rpm\n", + "D= 0.764 m\n", + "output of the alternator= 3505.213 KVA\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "f=150\n", + "p=2\n", + "#assume the diameter of the stator bore is d meter\n", + "n=120*50/2 #where n is rotor speed\n", + "print \"n=\",round(n,0),\"rpm\"\n", + "pi=3.14\n", + "d=(120*60)/(pi*3000) \n", + "print \"D=\",round(d,3),\"m\"\n", + "#case b\n", + "k=2\n", + "l=1\n", + "o=k*d**2*n*l\n", + "print \"output of the alternator=\",round(o,3),\"KVA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2:Page number-423 " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The total number of cycles the clock should perform in 24 hours for correct time is= 4320000.0\n", + "The number of cycles clock performs from 8am to 7pm is= 1977120.0\n", + "The desired average frequency for correct time for remaining 13 hours is= 50.06154\n", + "s= 0.8\n", + "time= 57.6\n" + ] + } + ], + "source": [ + "import math\n", + "#The total number of cycles the clock should perform in 24 hours for correct time is\n", + "t=24*60*60*50\n", + "print \"The total number of cycles the clock should perform in 24 hours for correct time is=\",round(t,0)\n", + "#The number of cycles the clock performs from 8am to 7pm is\n", + "n=(6*49.95+5*49.90)*60*60\n", + "print \"The number of cycles clock performs from 8am to 7pm is=\",round(n,0)\n", + "#the number of cycles required in remaining 13 hours is t-n that is 2342.88*10**3\n", + "a=(2342.88*10**3)/(13*60*60)\n", + "print \"The desired average frequency for correct time for remaining 13 hours is=\",round(a,5)\n", + "#The shortfall in number of cycles from 8am to 7pm\n", + "s=0.05*6+0.10*5\n", + "print \"s=\",round(s,3)\n", + "#The time by which the clock is incorrect at 7pm\n", + "time=(0.8*60*60)/50\n", + "print \"time=\",round(time,5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3:Page number-423" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency= 50.0 Hz\n", + "Phase emf= 2301.696 v\n", + "The line voltage is= 3986.654 v\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "n=500 #speed to rotation\n", + "p=12 #poles\n", + "#case a\n", + "f=n*p/120 #frequency\n", + "print \"frequency=\",round(f,0),\"Hz\"\n", + "#case b\n", + "kp=1 #kp is the winding at full pitch\n", + "#kd is the distribution factor where kd=sin[mk/2]/msin(k/2) where k is a gama function\n", + "#m=108/12*3\n", + "m=3\n", + "#gama or k=180/slots per pole=9 k=20\n", + "#after substituting above values in kd we get kd=0.96\n", + "#z=108*12/3 = 432\n", + "ep=2.22*1*0.96*432*50*50*10**-3\n", + "print \"Phase emf=\",round(ep,3),\"v\"\n", + "#case c\n", + "vl=3**0.5*ep\n", + "print \"The line voltage is=\",round(vl,3),\"v\"\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4:Page number-424" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 600.0 rpm\n", + "phase emf= 1864.44569 v\n", + "the line voltage= 3229.315 v\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "f=50 #frequency\n", + "p=10 #number of poles\n", + "#case a\n", + "n=120*f/p\n", + "print \"n=\",round(n,0),\"rpm\"\n", + "#case b\n", + "#the pitch factor kp=0.966\n", + "#m=2 and gama=180/slots per pole and it is obtained as 30\n", + "#kd=sin[(mgama)/2]/msin(gama/2)=0.966\n", + "z=6*2*10\n", + "ep=z*2.22*0.966*0.966*50*0.15\n", + "print \"phase emf=\",round(ep,5),\"v\"\n", + "#case c\n", + "el=3**0.5*ep\n", + "print \"the line voltage=\",round(el,3),\"v\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5:Page number-436" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5.44650074006\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "vt=1905.26 #at angle 0\n", + "angle=36.87\n", + "ia=43.74 #at angle -36.87\n", + "zs=3.51 #at angle 85.91\n", + "#e=vt+ia*zs\n", + "#(1905.26+43.74*3.51angle(85.91-36.87))\n", + "#1905.26+153.35angle(49.04)\n", + "#1905.26+153.35*(0.6558+j0.7551)\n", + "#=2009.03 angle(3.31)\n", + "p=((2009.03-1905.26)/1905.26)*100\n", + "print p\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6:Page number-439" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.46227272727\n", + "-9.335\n", + "17.7059090909\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "zs=4 # at angle 84.26\n", + "xs=3.98\n", + "impangle=84.26\n", + "#case a\n", + "#vt=2200+j0\n", + "#ia=120\n", + "#e=vt+ia*zs\n", + "#on substituting and calculating we get the value of e as 2298.17 at 12 degrees\n", + "p=((2298.17-2200)/2200)*100\n", + "print p\n", + "#case b\n", + "#performing same functions as above for pf leading 0.8 we get e=1994.63 at 12 degrees\n", + "p=((1994.63-2200)/2200)*100\n", + "print p\n", + "#case c\n", + "#same as above but pf lags by 0.707 and on calculating generates e as 2589.53\n", + "p=((2589.53-2200)/2200)*100\n", + "print p\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7:Page number-444" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "load voltage= 209.4847 v\n", + "the load current is 20.95 at angle -38.65\n", + "The output of generator1= 2094.4 VA\n", + "The output of generator2= 2514.6 VA\n" + ] + } + ], + "source": [ + "import math\n", + "#From the circuit diagram of the figure we can obtain tha following equations based on which the problems are solved\n", + "#eqn 1..........vl=(i1+i2)*zl....the load voltage\n", + "#eqn 2..........vl=e1-i1*z1=e2-i2*z2\n", + "#eqn 3..........i1=(e1-vl)*y1 and i2=(e2-vl)*y2\n", + "#eqn 4..........vl=(e1*y1+e2+y2)/(y1+y2+yl)\n", + "#load voltage case a\n", + "#vl=209.26-j*9.7 in x+iy form and angle is calculated \n", + "vl=(209.26**2+9.7**2)**0.5\n", + "print \"load voltage=\",round(vl,5),\"v\"\n", + "#using eqn 3 the following generator currents are generated\n", + "#i1=7.45-j5.92 for which i1=9.52 at angle -38.45 is generated\n", + "#i2=8.91-j7.17 for which i2=11.43 at angle -38.83 is generated\n", + "#case b\n", + "#the load current il=i1+i2 is obtained as 20.95 at angle -38.65\n", + "print \"the load current is 20.95 at angle -38.65\"\n", + "#case c\n", + "g1=220*9.52\n", + "g2=220*11.43\n", + "print \"The output of generator1=\",round(g1,3),\"VA\"\n", + "print \"The output of generator2=\",round(g2,4),\"VA\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8:Page number-446" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "E= 6600.12121 V\n", + "The power angle=13.63\n", + "Armature current= 295.18199 A\n", + "power factor=0.68\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "#case 1\n", + "v=6600 #voltage\n", + "ir=200 #armature current\n", + "xs=8 #reactance\n", + "e=(v**2+(ir*xs))**0.5\n", + "print \"E=\",round(e,5),\"V\"\n", + "#case 2\n", + "#from triangle in the firgure the power angle is obtained as 13.63\n", + "print \"The power angle=13.63\"\n", + "#case b\n", + "#due to excitation we obtain ix=217.10A\n", + "#case 3\n", + "ix=217.10\n", + "i=((ir**2+ix**2))**0.5\n", + "print \"Armature current=\",round(i,5),\"A\"\n", + "#case 4\n", + "#power factor cos(angle)=ir/i=0.68\n", + "print \"power factor=0.68\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9:Page number-447" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "armature current= 356.6275 A\n", + "power factor= 0.84121\n" + ] + } + ], + "source": [ + "import math\n", + "#this problem has few notations and values taken from problem above\n", + "#case a\n", + "#the generator output becomes 1.5*6600*200\n", + "o=1980 #generator output\n", + "#the power angle is obtaimed as 16.42\n", + "#applying cosine to the triangle in the problem gives ixs=2853.02\n", + "#hence armature current is\n", + "i=2853.02/8\n", + "print \"armature current=\",round(i,5),\"A\"\n", + "#case b\n", + "pf=1980000/(6600*356.63) #power factor=o/(V*I)\n", + "print \"power factor=\",round(pf,5)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10:Page number-454" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power supplied to the motor is= 467500.0 kW\n", + "emf induced=5744.08 at angle -10.39\n", + "emf induced=7051.44 at angle -8.88\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "vl=11000\n", + "il=50\n", + "pf=0.85 #powerfactor\n", + "p=vl*il*pf\n", + "print \"Power supplied to the motor is=\",round(p,5),\"kW\"\n", + "#case b\n", + "vt=6350.85 #at angle 0 \n", + "zs=25.02 #at angle 0\n", + "#subcase 1 powerfactor at 0.85 lag\n", + "#e=vt-ia*zs\n", + "#e=6350.85-50(at angle -31.79)*25.02(at angle 87.71)\n", + "#substituting and solving as in x+iy form we get 5744.08 at angle -10.39 as the value of e\n", + "print \"emf induced=5744.08 at angle -10.39\"\n", + "#subcase 2\n", + "#for a 0.85 lead same process as above is followed except angles are considered positive due to lead\n", + "print \"emf induced=7051.44 at angle -8.88\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11:Page number-455" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input KVA to the motor is= 15.069\n", + "the power factor=0.70\n" + ] + } + ], + "source": [ + "import math\n", + "#given and calculted using regular formulas\n", + "p=14.38\n", + "q=10.78 #reactive power component \n", + "pm=8.95 #mechanical load driven by motor \n", + "#In order to make pf of the circuit load to improve to unity the motor must supply power to the circuit equalling q\n", + "#hence total input power s to the motor maybe written as s=(pm/n)+jQ\n", + "#on sustituting values we get s=10.53+j10.78 KVA\n", + "i=((10.53**2+10.78**2)**0.5)\n", + "print \"input KVA to the motor is=\",round(i,3)\n", + "#from the triangle the angle is obtained as 45.67\n", + "#hence the power factor is cos(45.67)=0.70\n", + "print \"the power factor=0.70\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter8_dRxKPQv.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter8_dRxKPQv.ipynb new file mode 100644 index 00000000..54ea8f65 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter8_dRxKPQv.ipynb @@ -0,0 +1,737 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8:Induction motors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1:Page number-474" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "synchronous speed= 1500.0 rpm\n", + "rotor speed= 1455.0 rpm\n", + "rotor frequency= 0.0 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "f=50\n", + "p=4\n", + "#case a\n", + "s=(120*f)/p #synchronous speed\n", + "print \"synchronous speed=\",round(s,0),\"rpm\"\n", + "#case b\n", + "slip=0.03\n", + "r=s-s*slip #rotor speed\n", + "print \"rotor speed=\",round(r,0),\"rpm\"\n", + "#case c\n", + "r=900 #given speed of rotor\n", + "slip=(s-r)/s #per unit slip\n", + "rf=slip*f\n", + "print \"rotor frequency=\",round(rf,0),\"Hz\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2:Page number-475" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency= 60.0 Hz\n", + "The number of poles of an induction motor is= 6.0\n", + "slip=0.025pu\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "pg=10 #poles of generator\n", + "r=720 #synchronous speed\n", + "f=pg*r/120\n", + "print \"frequency=\",round(f,0),\"Hz\"\n", + "#it has been shown that synchronous motor runs at a speed lower than the synchronous speed.The nearest synchronous speed possible in present case is 1200\n", + "#case a\n", + "r=1200 #synchronous speed possible for present case\n", + "pi=120*f/r #poles of the induction motor\n", + "print \"The number of poles of an induction motor is=\",round(pi,0)\n", + "#case b\n", + "n=1170 #load speed\n", + "slip=(1200-n)/1200 #calculated as 0.025\n", + "print \"slip=0.025pu\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3:Page number-479 " + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The distribution factor=0.96\n", + "0.9408\n", + "flux in the air gap= 0.019 Wb\n", + "1.0\n", + "the induced rotor voltage per phase is= 159.73357 V\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "f=50\n", + "ns=1000\n", + "#m=90/6*3\n", + "m=5\n", + "#angle is obtained as 12\n", + "#x=12\n", + "#angle=(m*x)/2\n", + "#x=30 #assuming for convinience\n", + "#a=math.degrees(30)\n", + "#b=math.radians(a)\n", + "#c=math.sin(b)\n", + "#y=x/2\n", + "#y=6 #assuming for convinience\n", + "#d=math.degrees(y)\n", + "#e=math.radians(c)\n", + "#g=math.sin(e)\n", + "#kd=c/(5*g)\n", + "kd=0.96\n", + "#after calculations\n", + "print \"The distribution factor=0.96\"\n", + "kp=0.98 #pitch factor=cos(20/2)\n", + "#case a\n", + "kw=kd*kp\n", + "print kw\n", + "#case b\n", + "t1=(90*4)/(3*2) #number of turns per stator phase\n", + "e1=415\n", + "flux=415/((3**0.5)*4.44*0.94*50*60)\n", + "print \"flux in the air gap=\",round(flux,3),\"Wb\"\n", + "#case c\n", + "t2=(120*2)/(3*2)\n", + "a=t1/t2 #transformation ratio\n", + "print round(a,5)\n", + "#case d\n", + "#e2=e1/a #the induced rotor voltage per phase\n", + "e2=415/((3**0.5)*1.5)\n", + "print \"the induced rotor voltage per phase is=\",round(e2,5),\"V\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4 " + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "At stand still the rotor current is=3.23A at angle -63.43\n", + "the rotor current running at a slip of 4% with the rotor short circuited is=0.81 at angle -69.44A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "s=1\n", + "#case a\n", + "#the rotor circuit impedance=6+j12 obtained from (0.75+5.25)+j(5+7) as rotor resistance and reactance are 0.5 and 0.75\n", + "#rotor current=e2/z2=3.23 at angle -63.43\n", + "print \"At stand still the rotor current is=3.23A at angle -63.43\"\n", + "#case b\n", + "s=0.04\n", + "#z2=(0.75+j*0.04*5)ohm \n", + "#again e2=s*e2/z2=0.81 at angle -69.44A\n", + "print \"the rotor current running at a slip of 4% with the rotor short circuited is=0.81 at angle -69.44A\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5:Page number-482" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "synchronous speed= 1000.0 rpm\n", + "s=0.025\n", + "power factor of the supply=0.92\n", + "9\n", + "output of the rotor= 9.0 HP\n", + "efficiency= 86.0\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "p=6\n", + "f=50\n", + "pc=1000\n", + "ml=600\n", + "n=975 \n", + "ns=(120*50)/p\n", + "print \"synchronous speed=\",round(ns,0),\"rpm\"\n", + "#s=(ns-n)/ns\n", + "s=0.025\n", + "print \"s=0.025\"\n", + "#the rotor impedance referred to the stator side z2=(2+j0/15)ohm\n", + "#assuming the per phase supply voltage as the reference phasor it is seen that the stator load current is,\n", + "#i1=(114.43-j16.75)ohm which can be written 115.65 at angle -8.33 \n", + "# the current drawn from supply is given by 124.38 at angle -23.07\n", + "#case a\n", + "#power factor of the supply=cos(-23.07)=0.92\n", + "print \"power factor of the supply=0.92\"\n", + "#power input to the motor=(3*415*124.38*0.92)/(3**0.5)=8225 w\n", + "#the input power to the rotor is given by pag=pi-3*i1*i1*0.05-pc=78.93 KW\n", + "pag=78.93\n", + "#the gross mechanical power output\n", + "#pm=(1-s)*pag\n", + "pm=7696\n", + "#case b\n", + "ml=600 #mechanical loss\n", + "o=(pm-ml)/746\n", + "print \"output of the rotor=\",round(o,5),\"HP\"\n", + "#case c\n", + "n=(pm-ml)*100/8225\n", + "print \"efficiency=\",round(n,2)\n", + "#NOTE: The values given in text are calculated wrongly" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6:Page number-483" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "synchrous speed=0.04pu\n", + "rotor speed= 960.0 rpm\n", + "mechanical power developed= 72.0 KW\n", + "r= 1.0 KW\n", + "r2= 0.278 Ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#case a slip\n", + "f=50\n", + "p=6\n", + "ns=(120*f)/p\n", + "#rotor frequency fr=120/60=2 Hz\n", + "fr=2\n", + "#s=fr/f=2/50=0.04\n", + "s=0.04\n", + "print \"synchrous speed=0.04pu\"\n", + "#case b rotor speed\n", + "N=(1-s)*ns\n", + "print \"rotor speed=\",round(N,0),\"rpm\"\n", + "#case c mechanical power developed \n", + "#pag=5/3=25Kw\n", + "pag=25\n", + "pm=3*pag*(1-s)\n", + "print \"mechanical power developed=\",round(pm,0),\"KW\"\n", + "#case d the rotor resistance loss per phase\n", + "r=s*pag\n", + "print \"r=\",round(r,0),\"KW\"\n", + "#case e rotor resistance per phase if rotor current is 60A\n", + "#i2 and r2 are rotor current and resistance respectively\n", + "#i2**2*r2=1000\n", + "#r2=1000/(60*60)\n", + "r2=0.277777\n", + "print \"r2=\",format(r2, '.3f'),\"Ohm\"\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 8.7:Page number-484" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "slip= 0.0415\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "po=60\n", + "e=(3*0.88)\n", + "pi=po/e\n", + "#where pi is power input and po is power otuput and e is the efficiency\n", + "#let the iron loss per phase be X kw. Then mechanical loss=0.25X kw\n", + "#stator resistance loss per phase=rotor resistance loss per phase=X kw\n", + "#air gap per phase pag=input-(iron loss+stator resistance loss+rotor resistance loss)=22.727-3X\n", + "#but pag=20+0.25X\n", + "#on equaling the two 22.727-3X=20+0.25X we get the value of x=0.839kw\n", + "#the value of pag can be found after substituting x is 20.21\n", + "pag=20.21\n", + "rl=0.839 #rotor resistance loss\n", + "s=rl/pag #slip\n", + "print \"slip=\",format(s,'.4f')\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8:Page number-484" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1500\n", + "slip= 0.0400 pu\n", + "rotor resistance loss= 1.083 kw\n", + "total input= 28.833 kw\n", + "86.7052023121\n", + "line current= 44.51 A\n", + "The number of complete cycles of the rotor emf per minute is= 120.0\n" + ] + } + ], + "source": [ + "import math\n", + "#case a slip\n", + "f=50\n", + "p=4\n", + "ns=(120*f)/p #synchronous speed\n", + "print ns\n", + "n=1440\n", + "s=(1500-1440)/float(1500)\n", + "print \"slip=\",format(s,'.4f'),\"pu\"\n", + "#case b rotor resistance loss\n", + "pd=25 #power developed\n", + "ml=1 #mechanical losses\n", + "pm=pd+ml #The total mechanical power developed\n", + "pag=pm/(1-s)\n", + "rl=s*pag\n", + "print \"rotor resistance loss=\",format(rl,'.3f'),\"kw\"\n", + "#case c the total input if stator losses are 1.75 kw\n", + "sl=1.75 #stator loss\n", + "ti=pag+sl\n", + "print \"total input=\",format(ti,'.3f'), \"kw\"\n", + "#case d efficiency\n", + "e=(pd*100)/ti\n", + "print e\n", + "#case e line current\n", + "pf=0.85 #power factor\n", + "e1=440\n", + "l=(ti*1000)/((3**0.5)*e1*pf)\n", + "print \"line current=\",format(l,'.2f'),\"A\"\n", + "#case f\n", + "fr=s*f\n", + "n=fr*60\n", + "print \"The number of complete cycles of the rotor emf per minute is= \",round(n,0)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 8.9:Page number-488" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "torque=51.14Nm\n", + "horse power at full load= 6.99 hp\n", + "max torque=102.71Nm\n", + "speed= 850.0 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "ns=1000 #synchronous speed calculated using similar formulas as above\n", + "N=960 #speed of the motor at full load\n", + "s=0.04 #slip\n", + "r2=0.15\n", + "a=1.5\n", + "x2=1\n", + "rres=r2*a**2\n", + "rrea=x2*a**2\n", + "e2=220/(3**0.5)\n", + "#case a torque at full load\n", + "#tfl=((3*s*rres)*(e2**2)*60)/(2*3.14*1000)*((rres**2)+((s*rrea)**2))\n", + "print \"torque=51.14Nm\"\n", + "#case b metric hp developed at full load\n", + "hpfl=(2*3.14*960*51.14)/(60*735.5)\n", + "print \"horse power at full load=\",format(hpfl,'.2f'),\"hp\"\n", + "#case c maximum torque\n", + "#s=r2/x2\n", + "s=0.15\n", + "#tmax=(3*0.15*(220**2)*0.34*60)/(3*2*3.14*1000)*((0.34**2)+((0.15*2.25)**2))\n", + "print \"max torque=102.71Nm\"\n", + "#case d speed at max torque\n", + "speed=(1-0.15)*1000\n", + "print \"speed=\",round(speed,0),\"rpm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11:Page number-492" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(8.6+8j)\n", + "rotor resistance per phase=3.685\n", + "ir=3.22 at angle -26.56\n" + ] + } + ], + "source": [ + "import math\n", + "zr=complex(0.6,6) #impendance of rotor\n", + "zrh=complex(8,2) #impedance of rheostat\n", + "s=1\n", + "total=zr+zrh\n", + "print total\n", + "v=75/(3**0.5)\n", + "#rc=v/11.75(angle(42.93)) #rotor current per phase\n", + "print \"rotor resistance per phase=3.685\"\n", + "slip=0.05\n", + "zr=complex(0.6,0.3)\n", + "#ir=(s*v)/0.671(angle(26.56))\n", + "print \"ir=3.22 at angle -26.56\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12:Page number-492" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t=65.41Nm\n", + "output= 13.40 hp\n", + "tmax= 838.771 Nm\n", + "speed= 1375.0 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "#case a total torque\n", + "#rotor phase voltage at standstill=400/2.25*3**0.5 =102.64v\n", + "ns=1500 #calculated using formula as above\n", + "e2=102.64\n", + "r2=0.1\n", + "s=0.04\n", + "x2=1.2\n", + "#t=(3*60*(e2**2)*(r2/s))/(2*3.14*1500*((0.1/0.04)**2)+(1.2)**2)\n", + "t=65.41\n", + "print \"t=65.41Nm\"\n", + "#case b\n", + "N=1440 #calculated using same formula as above\n", + "o=(2*3.14*N*t)/60\n", + "#1 metric hp=735.5hp\n", + "output=o/735.5\n", + "print \"output=\",format(output,'.2f'),\"hp\"\n", + "#case c\n", + "#condition for maximum torque is given by x2=r2/s\n", + "tmax=(3*e2**2)/(5*3.14*2*1.2)\n", + "print \"tmax=\",format(tmax,'.3f'),\"Nm\"\n", + "#case d\n", + "s=r2/x2 #for max torque\n", + "speed=(1-s)*1500\n", + "print \"speed=\",round(speed,0),\"rpm\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13:Page number-498" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tst=1.25*tfl\n", + "tst=0.4166*tfl\n", + "tst=0.2*tfl\n", + "tst=0.2*tfl\n" + ] + } + ], + "source": [ + "import math\n", + "#direct online starter case a\n", + "#ist=isc=5*ifl #where ist is starting current and isc is short circuit current\n", + "#tst/tfl=(ist/ifl)**2-->substitute the above equation of ist here where ifl cancels out in numerator and denominator\n", + "#tst=1.25*tfl #tst is starting torque\n", + "print \"tst=1.25*tfl\"\n", + "#case b delta starter\n", + "#ist=(1/sqrt(3))*isc\n", + "#isc=(5*ifl)/sqrt(3)\n", + "#performing same calculation as above we get tst=0.4166*tfl\n", + "print \"tst=0.4166*tfl\"\n", + "#case c auto transformer starter\n", + "#ist=2*ifl\n", + "#tst/tfl=(2/1)**2*0.5\n", + "print \"tst=0.2*tfl\"\n", + "#case d\n", + "#with a rotor resistance starter the effect is same as that of auto transformer starter since in both cases the starting current is reduce to twice the full load current\n", + "print \"tst=0.2*tfl\"\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.08160417592\n" + ] + } + ], + "source": [ + "import math\n", + "isc=150 #short circuit current\n", + "iscp=25/1.732 #isc per phase where 1.732 is the value of root 3\n", + "pv=415/1.732 #per phase voltage\n", + "ist=(iscp*pv)/150\n", + "ifl=(15*735.5)/((415*0.9*0.8*(3**0.5)))\n", + "ratio=ist/ifl\n", + "print ratio\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15:Page number-499" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The starting torque=50.62% of the full load torque\n" + ] + } + ], + "source": [ + "import math\n", + "#assume that voltage applied to the motor is reduced by magnitude of a\n", + "#from the given condition of operation the starting current is ist=4.5*ifl -->1\n", + "#with the reduced voltage applied to the stator the starting current is limited to ist/a A\n", + "#this reduced starting current when transformed to the primary side is further reduced to ist/(a**2) A\n", + "#case a\n", + "#the given condition that the starting current should not increase beyond 2.25 ifl leads to ist/(a**2)=2.25*ifl -->2\n", + "#substitute 1 in 2\n", + "#we get,\n", + "a=1.41\n", + "#motor input current=ist/a=4.5*ifl/1.41=3.18ifl\n", + "#tst/tfl=(((3.18*ifl)/ifl)**2)&sfl\n", + "print \"The starting torque=50.62% of the full load torque\"\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter9_QP9exWK.ipynb b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter9_QP9exWK.ipynb new file mode 100644 index 00000000..9c13416d --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/chapter9_QP9exWK.ipynb @@ -0,0 +1,739 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "# Chapter 9:Direct current machines" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example 9.1:Page number-525" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "phy=0.04\n", + "e= 333.333 V\n", + "n= 150.0 rpm\n", + "e= 400.00 V\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "e=600\n", + "p=6\n", + "n=1500\n", + "z=200\n", + "a=2\n", + "#since e=(phy*n*p*z)/(60*a)\n", + "phy=(e*60*a)/(n*p*z)\n", + "print \"phy=0.04\"\n", + "#case b\n", + "phy=0.05\n", + "p=8\n", + "n=500\n", + "z=800\n", + "a=8\n", + "p=8\n", + "e=(phy*p*n*z)/(60*a)\n", + "print \"e=\",format(e,'.3f'),\"V\"\n", + "#case c\n", + "e=400\n", + "a=2\n", + "n=(e*60*a)/(phy*p*z)\n", + "print \"n=\",format(n,'.1f'),\"rpm\"\n", + "#case d\n", + "phy=0.05\n", + "p=4\n", + "n=800\n", + "z=600\n", + "a=4\n", + "p=4\n", + "e=(phy*n*p*z)/(60*a)\n", + "print \"e=\",format(e,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2:Page number-526 " + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "torque= 48.37 Nm\n", + "power output= 4050.00 W\n" + ] + } + ], + "source": [ + "import math\n", + "d=0.2\n", + "l=0.25\n", + "p=6\n", + "z=250\n", + "bav=0.9\n", + "n=800\n", + "a=2\n", + "ld=50\n", + "phy=0.045 #flux per pole=0.9*0.2*0.25\n", + "e=(phy*p*n*z)/(60*a)\n", + "ia=e/ld\n", + "#case a\n", + "t=(60*e*ia)/(2*3.14*n)\n", + "print \"torque=\",format(t,'.2f'),\"Nm\"\n", + "#case b\n", + "po=e*ia\n", + "print \"power output=\",format(po,'.2f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3:Page number-528" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "e= 218.75 V\n", + "the developer generated torque= 522.49 Nm\n", + "power input= 29687.50 W\n", + "power input= 21666.00 W\n", + "power output= 18145.33 W\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "ia=125 #armature current\n", + "ra=0.15\n", + "v=200\n", + "e=v+ia*ra\n", + "print \"e=\",format(e,'.2f'),\"V\"\n", + "#case b\n", + "n=500\n", + "t=(60*e*ia)/(2*3.14*n)\n", + "print \"the developer generated torque=\",format(t,'.2f'),\"Nm\"\n", + "#case c\n", + "pi=(e*ia)+((ia**2)*ra)\n", + "print \"power input=\",format(pi,'.2f'),\"W\"\n", + "#case d\n", + "e=183.75 #voltage generated at 420 rpm \n", + "ia=108.33 #since generated voltage is less than bus voltage the generator draws current from bus and functions as motor\n", + "#therefore,ia is the current when generator is functioning as motor\n", + "powip=v*ia\n", + "print \"power input=\",format(powip,'.2f'),\"W\"\n", + "powop=(e*ia)-((ia**2)*ra)\n", + "print \"power output=\",format(powop,'.2f'),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4:Page number-538" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "generated emf= 136.50 V\n", + "current= 195.82 A\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "i=250\n", + "v=125\n", + "rl=v/i #load resistance\n", + "gemf=125+200*0.05+1.5\n", + "print \"generated emf=\",format(gemf,'.2f'),\"V\"\n", + "e=(136.5*1200)/1500 #generated emf at 1200rpm\n", + "#let v be the terminal voltage at 1200rpm\n", + "#then armature current ia=v/rl\n", + "#substituting all values in v=e-ia*ra-(voltage drop across the brushes)=97.91\n", + "v=97.91\n", + "i=v*2 #where rl=0.5 in the denominator is written as 2 \n", + "print \"current=\",format(i,'.2f'),\"A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5:Page number-539" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "when i=150 the voltage drop between points a and b is= 3.75 V\n", + "when i=45 the voltage drop between points a and b is= 1.12 V\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "#the external characteristic of the generator,the combined armature and series field resistance is given by ra+rs\n", + "r=0.375 #ra+rs\n", + "#case a\n", + "i=150\n", + "#-0.375+0.4=0.025 the voltage drop\n", + "vab=0.025*150\n", + "print \"when i=150 the voltage drop between points a and b is=\",format(vab,'.2f'),\"V\"\n", + "vab=0.025*45\n", + "print \"when i=45 the voltage drop between points a and b is=\",format(vab,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "power input= 61875.00 W\n", + "The input torque= 679.84 Nm\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "v=250\n", + "e=230\n", + "ia=250\n", + "If=2.5\n", + "il=247.5\n", + "#case a\n", + "po=v*il\n", + "print \"power input=\",format(po,'.2f'),\"W\"\n", + "#case b\n", + "n=800\n", + "t=(60*e*il)/(2*3.14*n)\n", + "print \"The input torque=\",format(t,'.2f'),\"Nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7:page number-540" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "armature current= 51.00 A\n", + "armature voltage= 406.06 V\n" + ] + } + ], + "source": [ + "import math\n", + "#shunt field current\n", + "ish=400/220 #from circuit diagram\n", + "#armature current\n", + "i=50\n", + "ia=i+ish\n", + "print \"armature current=\",format(ia,'.2f'),\"A\"\n", + "#armature voltage\n", + "voldrop=3\n", + "ra=0.04\n", + "rs=0.02\n", + "v=400\n", + "e=v+ia*(ra+rs)+voldrop\n", + "print \"armature voltage=\",format(e,'.2f'),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8:Page number-549" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rse= 2.25 ohm\n", + "n2= 1376.7 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "i=35\n", + "v=220\n", + "ra=0.15\n", + "n1=1600\n", + "#when motor is running at 1200rpm the back emf eb1 is given by eb1=v-(35*0.15)\n", + "eb1=214.75\n", + "#flux phy1 is proportional to armature current ia.Thus, at ia1=35 and ia2=15 n is proportional to eb/phy\n", + "#2=(eb2*phy1)/(phy2*eb1)\n", + "#therefore\n", + "eb2=184.07\n", + "#case a\n", + "#resistance to be connected in series is rse ohm\n", + "ia2=15\n", + "rse=((v-eb2)/ia2)-ra\n", + "print \"rse=\",format(rse,'.2f'),\"ohm\"\n", + "#case b\n", + "eb2=0.5*1.15*214.75\n", + "ia2=50\n", + "rse=((v-eb2)/ia2)-ra\n", + "phy1=35\n", + "eb2=220-50*0.15\n", + "n2=(n1*eb2*phy1)/(1.15*phy1*eb1)\n", + "print \"n2=\",format(n2,'.1f'),\"rpm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " rse= 26.64 ohm\n", + "rse= 5.92 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#case a\n", + "i=60\n", + "eb1=450\n", + "ia=15.18 #derived from problem\n", + "#using formula n2/n1=(eb2*phy1)/(eb1*phy2)\n", + "eb2=45.54\n", + "rse=(eb1-eb2)/ia\n", + "print \"rse=\",format(rse,'.2f'),\"ohm\"\n", + "#case b\n", + "ia=38.97 #derived\n", + "#using the above used formula\n", + "eb2=219.21\n", + "rse=(eb1-eb2)/ia\n", + "print \"rse=\",format(rse,'.2f'),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10:Page number-551" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.1190161333\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived from the circuit in the figure\n", + "ish=2\n", + "ia=77 #75+2\n", + "ra=0.15\n", + "v=200\n", + "e=v+ia*ra\n", + "#when dc machine runs as a motor \n", + "ia=73 #75-2\n", + "eb=v-(ia*ra)\n", + "#n1 and n2 are the speeds at which the motor is operating as a generator and motor\n", + "n1=211.55\n", + "n2=189.05\n", + "p=n1/n2\n", + "print p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11:page number-552" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 467.26 rpm\n" + ] + } + ], + "source": [ + "import math\n", + "#given\n", + "n=500\n", + "v=250\n", + "rsh=80\n", + "ra=0.02\n", + "drop=1.5\n", + "#derived\n", + "ish=3.125 #ish=v/rsh\n", + "il=480 #il=w*1000/v\n", + "ia=483.125 #ia=il+ish\n", + "e=v+ra*ia+2*drop\n", + "il=80\n", + "ia=il-ish\n", + "eb=v-ra*ia-2*drop\n", + "n=(500*eb)/e #e is proportional to n\n", + "print \"n=\",format(n,'.2f'),\"rpm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12:Page number-553" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "resistance to be inserted in the field circuit is= 86.53 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "ish=1\n", + "il=26\n", + "ia=25\n", + "ra=0.4\n", + "#phy1*i1=phy2*i2 and ish2*i2=ish1*i1\n", + "#subtituting values in the above equation we get i2=25/ish2\n", + "eb1=200-ia*ra\n", + "#eb2=200-0.4*i2\n", + "#eb1/eb2=(n1*ish1)/(n2*ish2)\n", + "#190/(200-0.4*25/ish2)=500/(700*ish2)\n", + "#on finding the square root we get the value of ish2 as 0.698A\n", + "ish2=0.698\n", + "totres=200/0.698\n", + "r=totres-200\n", + "print \"resistance to be inserted in the field circuit is=\",format(r,'.2f'),\"ohm\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.13:page number-554" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.797\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "phy=0.015\n", + "p=8\n", + "z=1000\n", + "a=2\n", + "ra=0.4\n", + "rsh=200\n", + "v=400\n", + "ish=2\n", + "ia=25-2\n", + "eb=400-25*0.4\n", + "il=25\n", + "n=(eb*60*a)/(phy*p*z)\n", + "t=(phy*p*z*ia)/(2*3.14*2)\n", + "powdev=eb*ia\n", + "netshaft=powdev-1000 #aggregate losses\n", + "torque=(netshaft*60)/(2*3.14*n)\n", + "hp=netshaft/746\n", + "powinput=v*il\n", + "n=netshaft/powinput\n", + "print n\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.14:page number-557" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R1= 0.69 ohm\n", + "R2= 0.60 ohm\n", + "R3= 0.53 ohm\n", + "R4= 0.46 ohm\n", + "R5= 0.28 ohm\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "v=450\n", + "r=0.25\n", + "i1=160\n", + "i2=125\n", + "r1=450/float(160)\n", + "eb1=v-i2*r1\n", + "#flux decreases by 12% hence eb2=1.12*eb1\n", + "eb2=110.60\n", + "r2=(v-eb2)/i1\n", + "eb3=v-i2*r2\n", + "eb4=1.12*eb3\n", + "r3=(v-eb4)/i1\n", + "eb5=v-i2*r3eb6=1.12*eb5\n", + "r4=(450-eb6)/i1\n", + "eb7=v-i2*r4\n", + "eb8=1.12*eb7\n", + "r5=(v-eb8)/i1\n", + "#resistance of each section of the starter is determined as follows\n", + "R1=r1-r2\n", + "print \"R1=\",format(R1,'.2f'),\"ohm\"\n", + "R2=r2-r3\n", + "print \"R2=\",format(R2,'.2f'),\"ohm\"\n", + "R3=r3-r4\n", + "print \"R3=\",format(R3,'.2f'),\"ohm\"\n", + "R4=r4-r5\n", + "print \"R4=\",format(R4,'.2f'),\"ohm\"\n", + "R5=r5-r\n", + "print \"R5=\",format(R5,'.2f'),\"ohm\"\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.15:Page number-562" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "91.3123872863\n", + "90.9385770538\n", + "93.5453695042\n", + "75.8287544405\n" + ] + } + ], + "source": [ + "import math\n", + "#given and derived\n", + "If=1.6\n", + "ia=300\n", + "loss=640 #400*1.6\n", + "pconst=4140 #sum of core,field and friction losses\n", + "ra=0.08\n", + "ia=301.6\n", + "arloss=7277 #armature loss at full load\n", + "#case a\n", + "po=120*1000\n", + "n=(po/float(po+arloss+pconst))*100\n", + "print n\n", + "arlosshalfload=150+1.6 #il/2+if\n", + "arlossfullload=1838.6 #ia**2*ra\n", + "#case b\n", + "n=((60*1000)/((60*1000)+1838.6+4140))*100\n", + "print n\n", + "#for maximum n ia=il\n", + "ia=(pconst/ra)**0.5\n", + "nmax=((120*1000)/float((120*1000)+2*4140))*100\n", + "print nmax\n", + "maxn=(ia*100)/300\n", + "print maxn\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "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.5" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chap1_gG9EuuG.png b/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chap1_gG9EuuG.png Binary files differnew file mode 100644 index 00000000..767e6eff --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chap1_gG9EuuG.png diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter2_RW9JXUw.png b/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter2_RW9JXUw.png Binary files differnew file mode 100644 index 00000000..a5db4712 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter2_RW9JXUw.png diff --git a/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter6_kNIRtlM.png b/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter6_kNIRtlM.png Binary files differnew file mode 100644 index 00000000..505d8f37 --- /dev/null +++ b/basic_electrical_engineering_by_nagsarkar_and_sukhija/screenshots/chapter6_kNIRtlM.png |