From df60071cf1d1c18822d34f943ab8f412a8946b69 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Wed, 3 Jun 2015 15:27:17 +0530 Subject: add books --- Testing_the_interface/chapter11_2.ipynb | 516 ++++++++++++++++++++++++++++++++ 1 file changed, 516 insertions(+) create mode 100755 Testing_the_interface/chapter11_2.ipynb (limited to 'Testing_the_interface/chapter11_2.ipynb') diff --git a/Testing_the_interface/chapter11_2.ipynb b/Testing_the_interface/chapter11_2.ipynb new file mode 100755 index 00000000..b7650778 --- /dev/null +++ b/Testing_the_interface/chapter11_2.ipynb @@ -0,0 +1,516 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Columns" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, page no. 763" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "allowable load Pallow using a factor of safety & with respect to Euler buckling of the column\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "E = 29000 # Modulus of elasticity in ksi\n", + "spl = 42 # Proportional limit in ksi\n", + "L = 25 # Total length of coloum in ft\n", + "n = 2.5 # factor of safety\n", + "I1 = 98 # Moment of inertia on horizontal axis\n", + "I2 = 21.7 # Moment of inertia on vertical axis\n", + "A = 8.25 # Area of the cross section\n", + "\n", + "#calculation\n", + "Pcr2 = (4*math.pi**2*E*I2)/((L*12)**2) # Criticle load if column buckles in the plane of paper\n", + "Pcr1 = (math.pi**2*E*I1)/((L*12)**2) # Criticle load if column buckles in the plane of paper\n", + "Pcr = min(Pcr1,Pcr2) # Minimum pressure would govern the design\n", + "scr = Pcr/A # Criticle stress\n", + "Pa = Pcr/n # Allowable load in k\n", + "print \"The allowable load is \", round(Pa), \"k\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The allowable load is 110.0 k\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, page no. 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate minimum required thickness t of the columns\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "L = 3.25 # Length of alluminium pipe in m\n", + "d = 0.1 # Outer diameter of alluminium pipe\n", + "P = 100000 # Allowable compressive load in N\n", + "n =3 # Safety factor for eular buckling\n", + "E = 72e09 # Modulus of elasticity in Pa\n", + "l = 480e06 # Proportional limit\n", + "\n", + "#calculation\n", + "Pcr = n*P # Critice load\n", + "t = (0.1-(55.6e-06)**(1.0/4.0) )/2.0 # Required thickness\n", + "\n", + "tmin = t \n", + "print \"The minimum required thickness of the coloumn is\", round(tmin*1000,2), \"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum required thickness of the coloumn is 6.82 mm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3, page no. 780" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "evaluate the longest permissible length of the bar\n", + "\"\"\"\n", + "\n", + "from sympy import *\n", + "\n", + "#initialisation\n", + "P = 1500 # Load in lb\n", + "e = 0.45 # ecentricity in inch\n", + "h = 1.2 # Height of cross section in inch\n", + "b = 0.6 # Width of cross section in inch\n", + "E = 16e06 # Modulus of elasticity \n", + "my_del = 0.12 # Allowable deflection in inch\n", + "\n", + "#calculation\n", + "L = mpmath.asec(1.2667)/0.06588 # Maximum allowable length possible\n", + "\n", + "#Result\n", + "print \"The longest permissible length of the bar is\", round(L), \"inch\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The longest permissible length of the bar is 10.0 inch\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4, page no. 785" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "maximum compressive stress in the column & the factor of safety\n", + "\"\"\"\n", + "\n", + "from sympy import *\n", + "import math\n", + "\n", + "#initialisation\n", + "L = 25 # Length of coloum in ft\n", + "P1 = 320 # Load in K\n", + "P2 = 40 # Load in K\n", + "E = 30000 # Modulus of elasticity of steel in Ksi\n", + "P = 360 # Euivalent load\n", + "e = 1.5 # Ecentricity of compressive load\n", + "A = 24.1 # Area of the Cross section\n", + "r = 6.05 # in inch\n", + "c = 7.155 # in inch\n", + "sy = 42 # Yeild stress of steel in Ksi\n", + "\n", + "#calculation\n", + "\n", + "smax = (P/A)*(1+(((e*c)/r**2)*mpmath.sec((L/(2*r))*math.sqrt(P/(E*A))))) # Maximum compressive stress\n", + "print \"The Maximum compressive stress in the column \", round(smax,2), \"ksi\"\n", + "# Bisection method method to solve for yeilding\n", + "def stress(a,b,f):\n", + " N = 100\n", + " eps = 1e-5\n", + " if((f(a)*f(b))>0):\n", + " print 'no root possible f(a)*f(b)>0'\n", + " sys.exit()\n", + " if(abs(f(a))0):\n", + " c = (a+b)/2.0\n", + " if(abs(f(c))0):\n", + " print 'no root possible f(a)*f(b)>0'\n", + " sys.exit()\n", + " if(abs(f(a))0):\n", + " c = (a+b)/2.0\n", + " if(abs(f(c))0):\n", + " print 'no root possible f(a)*f(b)>0'\n", + " sys.exit()\n", + " if(abs(f(a))0):\n", + " c = (a+b)/2.0\n", + " if(abs(f(c))