diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | db0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch) | |
tree | b95975d958cba9af36cb1680e3f77205354f6512 /sample_notebooks/PreetiRani/ch6.ipynb | |
parent | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff) | |
download | Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2 Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip |
add books
Diffstat (limited to 'sample_notebooks/PreetiRani/ch6.ipynb')
-rw-r--r-- | sample_notebooks/PreetiRani/ch6.ipynb | 367 |
1 files changed, 367 insertions, 0 deletions
diff --git a/sample_notebooks/PreetiRani/ch6.ipynb b/sample_notebooks/PreetiRani/ch6.ipynb new file mode 100644 index 00000000..c3a88008 --- /dev/null +++ b/sample_notebooks/PreetiRani/ch6.ipynb @@ -0,0 +1,367 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2286c67a37dc36a4b2463b6ff90eb31f4de0251dedc09d4493cdbe015dfacf59" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter06 : Levers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-1 : page 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "Del=10 \n", + "k=500 \n", + "W=k*Del \n", + "#Let load arm be l1\n", + "l1=200 \n", + "#Let effort arm be l2\n", + "l2=500 \n", + "P=W*l1/l2 \n", + "Ro=sqrt(W**2+P**2) \n", + "Ta=40 \n", + "d=sqrt(Ro*4/(2*pi*Ta)) \n", + "d=10 \n", + "pb=10 \n", + "d1=sqrt(Ro/(pb*1.5)) \n", + "d1=20 \n", + "l=1.5*d \n", + "t=10 \n", + "T=Ro*4/(2*pi*d1**2) \n", + "M=(Ro/2*(l/2+t/3))-(Ro/2*l/4) \n", + "sigb=32*M/(pi*d1**3) \n", + "sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "P=Ro/(l*d1) \n", + "D=2*d1 \n", + "\n", + "# Output\n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"D is %0.1f mm \"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d1 is 20.0 mm \n", + "D is 40.0 mm \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-2 : page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "d1=80 \n", + "p=0.981 \n", + "Ta=40 \n", + "siga=80 \n", + "pa=15 \n", + "W=pi*(d1**2)*p/4 \n", + "P=W/8 \n", + "Ws=W-P \n", + "d=sqrt(W*4/(pi*2*Ta)) \n", + "l=1.5*d \n", + "D=2*d \n", + "T=W/(2*pi*pa**2/4) \n", + "M1=P*(700-87.5-(D/2)) \n", + "h=50 \n", + "b=h/4 \n", + "Z=b*h**2/6 \n", + "sigb=M1/Z \n", + "pmax=80 \n", + "T=2465.6/h**2 \n", + "pmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "\n", + "# Output\n", + "print \"h is %0.2f mm \"%h \n", + "print \"pmax is %0.2f MPa \"%pmax\n", + " \n", + "#The difference in the value of pmax is due to rounding-off the digits." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h is 50.00 mm \n", + "pmax is 74.43 MPa \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-3 : page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "P=((4*360)+(2*360))/900 \n", + "Fv=4-2 \n", + "Fh=P \n", + "Fr=sqrt(Fv**2+Fh**2) \n", + "P1=4*0.36/0.9 \n", + "Rf=sqrt(4**2+1.6**2) \n", + "d=sqrt(Rf*10**3/(15*1.25)) \n", + "d=16 \n", + "l=1.25*d \n", + "T=Rf*10**3*4/(2*pi*d**2) \n", + "D=2*d \n", + "M1=Rf*10**3*(360-(D/2)) \n", + "pa=15 \n", + "h=80 \n", + "b=h/4 \n", + "Z=b*h**2/6 \n", + "sigb=M1/Z \n", + "T=4310/(b*h) \n", + "pmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "\n", + "# Output\n", + "print \"P is %0.1f KN \"%P \n", + "print \"pmax is %0.2f MPa \"%pmax" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P is 2.0 KN \n", + "pmax is 69.53 MPa \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-4 : page 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "l=360 \n", + "P=400 \n", + "Mh=2*P*l/3 \n", + "sigb=50 \n", + "l1=60 \n", + "d=(Mh*32/(pi*l1))**(1/3) \n", + "d=30 \n", + "L=420 \n", + "siga=60 \n", + "H=20 \n", + "B=H/3 \n", + "Mx=P*(L-H/2) \n", + "Tx=2*P*l/3 \n", + "sigb1=Mx*18/H**3 \n", + "Td=P/(B*H) \n", + "Tr=17.17*Tx/H**4 \n", + "T=Tr+Td \n", + "sigmax=(sigb1/2)+sqrt((sigb1/2)**2+T**2) \n", + "Tmax=sqrt((sigb1/2)**2+T**2) \n", + "T=P*L \n", + "M=P*(l1+(2/3*l)) \n", + "Te=sqrt(T**2+M**2) \n", + "Ta=40 \n", + "D=(Te*16/(pi*Ta))**(1/3) \n", + "D=round(D) #Rounding off \n", + "# Output\n", + "print \"d is %0.1f mm \"%d \n", + "print \"D is %0.1f mm \"%D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 30.0 mm \n", + "D is 1.0 mm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-5 : page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "l2=300 \n", + "l=450 \n", + "P=400 \n", + "Mx=2*P*l2/3 \n", + "siga=80 \n", + "dh=(Mx*32/(pi*siga))**(1/3) \n", + "dh=22 \n", + "L=(2*l2/3)+l \n", + "T=P*L \n", + "Ta=40 \n", + "d=(T*16/(pi*Ta))**(1/3) \n", + "d=35 \n", + "d1=1.6*d \n", + "Th=T*16*d1/(pi*(d1**4-d**4)) \n", + "l1=1.5*d \n", + "My=P*(L-(d1/2)) \n", + "B=dh \n", + "H=sqrt(3.66*75) \n", + "H=30 \n", + "Mz=P*l1/2 \n", + "Te=sqrt(T**2+Mz**2) \n", + "d2=(Te*16/(pi*Ta))**(1/3) \n", + "d2=32 \n", + "b=d/4 \n", + "b=round(b)\n", + "t=d/6 \n", + "t=round(t)\n", + "# Output\n", + "print \"d is %0.1f mm \"%d \n", + "print \"dh is %0.1f mm \"%dh \n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"l1 is %0.1f mm \"%l1 \n", + "print \"d2 is %0.1f mm \"%d2 \n", + "print \"b is %0.1f mm \"%b \n", + "print \"t is %0.1f mm \"%t " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 35.0 mm \n", + "dh is 22.0 mm \n", + "d1 is 56.0 mm \n", + "l1 is 52.5 mm \n", + "d2 is 32.0 mm \n", + "b is 8.0 mm \n", + "t is 5.0 mm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "sum 6-6 : page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt, pi\n", + "L=450 \n", + "P=700 \n", + "T=P*L \n", + "Ta=50 \n", + "d=(T*16/(pi*Ta))**(1/3) \n", + "d=32 \n", + "d1=1.6*d \n", + "d1=52 #Rounding off to nearest whole number\n", + "l1=1.25*d \n", + "My=P*(L-d1/2) \n", + "sigb=65 \n", + "H=(My*18/sigb)**(1/3) \n", + "H=45 \n", + "B=H/3 \n", + "T1=P/(B*H) \n", + "sigmax=(sigb/2)+sqrt((sigb/2)**2+T**2) \n", + "Mx=P*l1/2 \n", + "Te=sqrt((T)**2+(Mx**2)) \n", + "d2=(Te*16/(pi*Ta))**(1/3) \n", + "d2=d2+6 \n", + "d2=round(d2)\n", + "# utput\n", + "print \"d is %0.1f mm \"%d \n", + "print \"d1 is %0.1f mm \"%d1 \n", + "print \"l1 is %0.1f mm \"%l1 \n", + "print \"B is %0.1f mm \"%B \n", + "print \"H is %0.1f mm \"%H \n", + "print \"d2 is %0.1f mm \"%d2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "d is 32.0 mm \n", + "d1 is 52.0 mm \n", + "l1 is 40.0 mm \n", + "B is 15.0 mm \n", + "H is 45.0 mm \n", + "d2 is 7.0 mm \n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |