From 1b8e3f3a7721cc0e1b757dd9b9225a8458ffc982 Mon Sep 17 00:00:00 2001 From: Trupti Kini Date: Thu, 29 Dec 2016 23:31:36 +0600 Subject: Added(A)/Deleted(D) following books A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter11_IzdUFBN.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter12_2pkvTOi.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter13_UcaK0rG.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter14_7ZhEpxq.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter15_1u5Qndu.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter16_Z1IANWB.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter18_64Lv3wy.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter19_mSxDpin.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter20_afHh1Ul.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter21_gzzeK4K.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter22_vCvUGaR.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter23_6pRykcG.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter2_a5yV2Qr.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter5_wnZtP1O.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter6_IHeGb5U.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter8_IbkU2sr.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/Chapter9_MBMuv9e.ipynb A Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/1.png A Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/2.png A Electrical_and_Electronic_Systems_by_Neil_Storey/screenshots/3.png A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_ndNKnai.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_G92bOqJ.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_N0K1mlo.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_M2InnXG.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_JPopPWa.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_cKdxsUa.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_m3lhY5f.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_enki9Zb.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_OBixdB4.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_3bWeJYh.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ywK155l.ipynb A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_QxuPWeV.png A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_4RN5UYF.png A MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_F1MI2Sb.png A Physics_For_Students_Of_Science_And_Engineering_Part_2_by_D_Halliday_and_R_Resnick/README.txt A RCC_Theory_and_Design_by_M._G._Shah_and_C._M._Kale/README.txt --- .../Chapter10_ndNKnai.ipynb | 571 ++++++ .../Chapter11_G92bOqJ.ipynb | 654 +++++++ .../Chapter11_N0K1mlo.ipynb | 654 +++++++ .../Chapter1_M2InnXG.ipynb | 373 ++++ .../Chapter2_JPopPWa.ipynb | 1857 ++++++++++++++++++++ .../Chapter3_cKdxsUa.ipynb | 1030 +++++++++++ .../Chapter4_m3lhY5f.ipynb | 1403 +++++++++++++++ .../Chapter5_enki9Zb.ipynb | 774 ++++++++ .../Chapter6_OBixdB4.ipynb | 1593 +++++++++++++++++ .../Chapter8_3bWeJYh.ipynb | 1325 ++++++++++++++ .../Chapter9_ywK155l.ipynb | 466 +++++ .../screenshots/ch1_QxuPWeV.png | Bin 0 -> 47531 bytes .../screenshots/ch_9_4RN5UYF.png | Bin 0 -> 64207 bytes .../screenshots/ch_F1MI2Sb.png | Bin 0 -> 33414 bytes 14 files changed, 10700 insertions(+) create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter10_ndNKnai.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_G92bOqJ.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter11_N0K1mlo.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter1_M2InnXG.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter2_JPopPWa.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter3_cKdxsUa.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter4_m3lhY5f.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter5_enki9Zb.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter6_OBixdB4.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter8_3bWeJYh.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/Chapter9_ywK155l.ipynb create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch1_QxuPWeV.png create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_9_4RN5UYF.png create mode 100644 MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti/screenshots/ch_F1MI2Sb.png (limited to 'MECHANICS_OF_SOLIDS_by_S.S._Bhavikatti') 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 = $('
');\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", + " '');\n", + " var titletext = $(\n", + " '');\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 = $('');\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 = $('');\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 = $('');\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 = $('')\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 = $('');\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 = $('');\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 = $('');\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 = $('');\n", + "\n", + " var fmt_picker = $('');\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", + " '', {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 = $('