diff options
36 files changed, 14846 insertions, 0 deletions
diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter11_IzdUFBN.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter11_IzdUFBN.ipynb new file mode 100644 index 00000000..1e08381f --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter11_IzdUFBN.ipynb @@ -0,0 +1,280 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3a4ef8be1017f129a0421c21819212b5457aab0abc06690d5c2563f72500374f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Measurement of Voltages and Currents" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency = 50 Hz\n", + "\n", + "Peak to Peak Voltage = 14 V\n", + "\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page 210" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "10 sin 125.7t Hz\n", + "\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3, Page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "phi = -90 degree\n", + "10 sin 63t-90 Hz\n", + "\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, Page 215" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "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" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(1) P = 2.5 W\n", + "\n", + "(2) Pav = 2.5 W\n", + "\n", + "(3) Pav = 1.25 W\n", + "\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5, Page 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Therefore, Resistor = 510 mOhm\n", + "\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6, Page 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rse = 49.975 KOhm\n", + "\n", + "Therefore, Resistor ~ 50 KOhm\n", + "\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter12_2pkvTOi.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter12_2pkvTOi.ipynb new file mode 100644 index 00000000..0b76bb5c --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter12_2pkvTOi.ipynb @@ -0,0 +1,313 @@ +{ + "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": [ + "#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": [ + "#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 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": [ + "#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": [ + "#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 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 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": { + "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_and_Electronic_Systems_by_Neil_Storey/Chapter13_UcaK0rG.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter13_UcaK0rG.ipynb new file mode 100644 index 00000000..6ed908f9 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter13_UcaK0rG.ipynb @@ -0,0 +1,278 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d756c6c77a4ac290c4965398d89838e2f053a559b464bd46ff8cc1c208f13b8e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Capacitance and Electric Fields" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Charge, q = 100.0 uC\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacitance, C = 31.6 nF\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3, Page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Electric Field Strength, E = 10 ^7 V/m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4, Page 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "D = 75 mC/m^2\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5, Page 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 35 uF\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6, Page 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 7.14 uF\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7, Page 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#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)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E = 50.0 mJ\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter14_7ZhEpxq.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter14_7ZhEpxq.ipynb new file mode 100644 index 00000000..e0d13aee --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter14_7ZhEpxq.ipynb @@ -0,0 +1,268 @@ +{ + "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": [ + "#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": [ + "#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_and_Electronic_Systems_by_Neil_Storey/Chapter15_1u5Qndu.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter15_1u5Qndu.ipynb new file mode 100644 index 00000000..8909aeb0 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter15_1u5Qndu.ipynb @@ -0,0 +1,395 @@ +{ + "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": [ + "#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", + "\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))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + }, + { + "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.10" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16_Z1IANWB.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16_Z1IANWB.ipynb new file mode 100644 index 00000000..7a471548 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16_Z1IANWB.ipynb @@ -0,0 +1,215 @@ +{ + "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": { + "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_and_Electronic_Systems_by_Neil_Storey/Chapter18_64Lv3wy.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter18_64Lv3wy.ipynb new file mode 100644 index 00000000..b24f0f02 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter18_64Lv3wy.ipynb @@ -0,0 +1,158 @@ +{ + "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": [ + "#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": [ + "#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_and_Electronic_Systems_by_Neil_Storey/Chapter19_mSxDpin.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter19_mSxDpin.ipynb new file mode 100644 index 00000000..b87fa7b1 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter19_mSxDpin.ipynb @@ -0,0 +1,113 @@ +{ + "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": [ + "#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": [ + "#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": { + "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_and_Electronic_Systems_by_Neil_Storey/Chapter20_afHh1Ul.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter20_afHh1Ul.ipynb new file mode 100644 index 00000000..960e2bde --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter20_afHh1Ul.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_and_Electronic_Systems_by_Neil_Storey/Chapter21_gzzeK4K.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter21_gzzeK4K.ipynb new file mode 100644 index 00000000..6d1b753b --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter21_gzzeK4K.ipynb @@ -0,0 +1,241 @@ +{ + "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" + ] + }, + { + "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_and_Electronic_Systems_by_Neil_Storey/Chapter22_vCvUGaR.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter22_vCvUGaR.ipynb new file mode 100644 index 00000000..b477d5ec --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter22_vCvUGaR.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_and_Electronic_Systems_by_Neil_Storey/Chapter23_6pRykcG.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter23_6pRykcG.ipynb new file mode 100644 index 00000000..e17dafb8 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter23_6pRykcG.ipynb @@ -0,0 +1,151 @@ +{ + "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": [ + "#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": [ + "#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": [ + "#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_and_Electronic_Systems_by_Neil_Storey/Chapter2_a5yV2Qr.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter2_a5yV2Qr.ipynb new file mode 100644 index 00000000..51be698e --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter2_a5yV2Qr.ipynb @@ -0,0 +1,363 @@ +{ + "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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "#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 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.10" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter5_wnZtP1O.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter5_wnZtP1O.ipynb new file mode 100644 index 00000000..55d66248 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter5_wnZtP1O.ipynb @@ -0,0 +1,253 @@ +{ + "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": [ + "#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": [ + "#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\ng7flQaqFgduWpahUdClFbS7qur3Lem2gQBEEQlAKiEpQoMUKU5CHoAlzSZHwUAiEKPEBQoBQGuB7\n/9h7wuZkn5kzk73n/GbO57XWWZy99+/s8z0/fjnfs3/fvfcoIjAzM2s0qd0BmJlZmpwgzMyslBOE\nmZmVcoIwM7NSThBmZlbKCcLMzEo5QZiZWSknCKuUpNWSNkraIOm5/L9vbXdc7SDpaEn3Slov6VeS\n/k3SjJrf81VJb6vzPaxzTG53ADbhBPCBiLh1qEaStomIV8YopjEnaSZwOfDBiOiX9AbgMKDuzzzk\nla8Tvd+tWj6CsDpoixXSjPzX7SmSHgd+nK+fK+kOSc/kv7bnFV7TLalf0rOS/lXSP0q6It82T9Ka\nhvd4TNIf5c8l6UxJj0j6taSrJHU1xHKipMfzX/dnFfYzSdJZ+Ws3SPqppGmSzpP0tYb3XCrp9JI+\n6AEejYh+gIh4ISK+HxFP5q9bKOk7eVwbJP1M0r6F/e4m6do8tv+U9Ilh4ttD0r/nfX9fvv7YwX6S\n9FlJvwQulXSSpNsbPsfmIw9Jl0k6X9KN+VHg7ZKmSvoHSU9L+rmk32/6f98mDCcIG2t/CMwG3i9p\nd+CHwJci4o3AZ4DvSto1b3sl8FPgzcBXgJN4/S/koX4tfxI4CngPsDvwDHBBQ5uDgVnAHwN/K+nt\n+fpPA8cD8yNiZ+AUYCPZEcGHBl+cx/k+4Nsl778CmC3p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p0TET+SNBu4KytB8BzwkYi4V9I1wH3AOuCe\nwsu+BlyTF6FvKKz/JtnU0Yq8nvErsqOA0rgiYpOk44HzJO1IVvf4Y7KpsRWSNgCXjeQDF/df/nEj\nJJ0ALM33f9MQ7f+A7OjlbElfytsdHhFPjSIm60C+3bd1hHxe/rmI+PoYvd/uwC0RMXss3s+sDp5i\nMquYpD8H7iL7gy1m45aPIMzMrJSPIMzMrJQThJmZlXKCMDOzUk4QZmZWygnCzMxKOUGYmVmp/w9Q\n8qp7rMXCBAAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x8ee1f60>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "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\nCUKS1MoEIUlqZYKQJLUyQahT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K8l8Z3FPnqKr6epJVwF5NP9H01a7Ae6rqp01f\nkeQVwJOr6srRfUrTMUGozzZPM8X01ar6TfP86cDThhLJfYG9gV2Az1fVLcAtSUZv+tjm6cCjkxzW\nLO/S7OtW4OzmC5ckm4DVwPXAT6rqXNj6h1pI8hngbUneALwM2DjGe59aVbcBv0pyDYMv+Z+MtLkn\ng1HTK6vqzKH1lwz30/Aoqlk+CPgTBn/FTRqbCULbo5uGngf466r68HCDJK+d4fW3cef06r1H9vXq\nqvrqyL7WArcMrbqdO//t3G16p6puTvJV4LnAYcD+M8SyxfD+76D93+ZtDOoWBwNntmy/myS7AR8G\nnr3l9tnSuKxBqM/G+ZOT/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 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": [ + "#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_and_Electronic_Systems_by_Neil_Storey/Chapter6_IHeGb5U.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter6_IHeGb5U.ipynb new file mode 100644 index 00000000..4bcd3580 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter6_IHeGb5U.ipynb @@ -0,0 +1,261 @@ +{ + "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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "#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_and_Electronic_Systems_by_Neil_Storey/Chapter8_IbkU2sr.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter8_IbkU2sr.ipynb new file mode 100644 index 00000000..bc1fdb59 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter8_IbkU2sr.ipynb @@ -0,0 +1,175 @@ +{ + "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": [ + "#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": 5, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Resistance = 7.5 mOhm\n", + "\n", + "Input Resistance = 20 GOhm\n" + ] + } + ], + "source": [ + "#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": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Resistance = 7.5 mOhm\n", + "\n", + "Input Resistance = 1 KOhm\n" + ] + } + ], + "source": [ + "#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": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output Resistance = 375 uOhm\n", + "\n", + "Input Resistance = 400 GOhm\n" + ] + } + ], + "source": [ + "#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)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter9_MBMuv9e.ipynb b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter9_MBMuv9e.ipynb new file mode 100644 index 00000000..489ec875 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter9_MBMuv9e.ipynb @@ -0,0 +1,418 @@ +{ + "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": [ + "#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": [ + "#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": [ + "#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": [ + "#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": [ + "\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": [ + "#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": [ + "#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": [ + "#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": [ + "\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": { + "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_and_Electronic_Systems_by_Neil_Storey/screenshots/1.png b/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/1.png Binary files differnew file mode 100644 index 00000000..30eb3a12 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/1.png diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/2.png b/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/2.png Binary files differnew file mode 100644 index 00000000..8cdd1ca3 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/2.png diff --git a/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/3.png b/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/3.png Binary files differnew file mode 100644 index 00000000..1e4ff4d3 --- /dev/null +++ b/Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/3.png diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_ndNKnai.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_ndNKnai.ipynb new file mode 100644 index 00000000..e89d127d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_ndNKnai.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_G92bOqJ.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_G92bOqJ.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_G92bOqJ.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_N0K1mlo.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_N0K1mlo.ipynb new file mode 100644 index 00000000..06fa6f21 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_N0K1mlo.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_M2InnXG.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_M2InnXG.ipynb new file mode 100644 index 00000000..080cbafb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_M2InnXG.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_JPopPWa.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_JPopPWa.ipynb new file mode 100644 index 00000000..a94760d2 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_JPopPWa.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_cKdxsUa.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_cKdxsUa.ipynb new file mode 100644 index 00000000..09420950 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_cKdxsUa.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_m3lhY5f.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_m3lhY5f.ipynb new file mode 100644 index 00000000..d78e1aa8 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_m3lhY5f.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_enki9Zb.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_enki9Zb.ipynb new file mode 100644 index 00000000..87ac24ec --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_enki9Zb.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_OBixdB4.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_OBixdB4.ipynb new file mode 100644 index 00000000..55339520 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_OBixdB4.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/C03ShAC4tgEdbxvtA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSYnuL38Hm15lXABBTFW+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/Chapter8_3bWeJYh.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_3bWeJYh.ipynb new file mode 100644 index 00000000..1204506a --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_3bWeJYh.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_ywK155l.ipynb b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ywK155l.ipynb new file mode 100644 index 00000000..6496faeb --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ywK155l.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_QxuPWeV.png b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_QxuPWeV.png Binary files differnew file mode 100644 index 00000000..c6681894 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_QxuPWeV.png diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_4RN5UYF.png b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_4RN5UYF.png Binary files differnew file mode 100644 index 00000000..d7b1586d --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_4RN5UYF.png diff --git a/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_F1MI2Sb.png b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_F1MI2Sb.png Binary files differnew file mode 100644 index 00000000..ba271472 --- /dev/null +++ b/MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_F1MI2Sb.png diff --git a/Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/README.txt b/Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/README.txt new file mode 100644 index 00000000..3afba665 --- /dev/null +++ b/Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/README.txt @@ -0,0 +1,10 @@ +Contributed By: Nitya L +Course: msc +College/Institute/Organization: Carlson School Of Business +Department/Designation: MSBA +Book Title: Physics For Students Of Science And Engineering Part 2 +Author: D Halliday and R Resnick +Publisher: Toppan, Tokyo, Japan +Year of publication: 1962 +Isbn: 62-15336 +Edition: 2
\ No newline at end of file diff --git a/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/README.txt b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/README.txt new file mode 100644 index 00000000..001fd713 --- /dev/null +++ b/RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/README.txt @@ -0,0 +1,10 @@ +Contributed By: Deepak Singh Attri +Course: mtech +College/Institute/Organization: MNIT Jaipur +Department/Designation: Thermal Engineering +Book Title: RCC Theory and Design +Author: M. G. Shah and C. M. Kale +Publisher: Macmillan, India +Year of publication: 1972 +Isbn: 033390458-3 +Edition: 2
\ No newline at end of file |