summaryrefslogtreecommitdiff
path: root/Mechanics_of_Structures/Chapter2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Mechanics_of_Structures/Chapter2.ipynb')
-rwxr-xr-xMechanics_of_Structures/Chapter2.ipynb309
1 files changed, 309 insertions, 0 deletions
diff --git a/Mechanics_of_Structures/Chapter2.ipynb b/Mechanics_of_Structures/Chapter2.ipynb
new file mode 100755
index 00000000..42876b36
--- /dev/null
+++ b/Mechanics_of_Structures/Chapter2.ipynb
@@ -0,0 +1,309 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1983ff28cbb6fa2f27736543d13290cc4b84b616fb5e9a5a775ca4d190cec891"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2-Principal planes and principal stress"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Normal stress intensity and Tangential stress intensity and Resultant stress intensity and angle\n",
+ "p_1 = 5.;##principal stress in tons/in^2\n",
+ "p_2 = 5./2.;##principal stress in tons/in^2\n",
+ "theta = 50*math.pi/180;##angle in degrees\n",
+ "p_n = p_1*math.cos(theta)**2+p_2*math.sin(theta)**2;##normal stress intensity\n",
+ "p_t = (p_1-p_2)*math.sin(theta)*math.cos(theta);##tangential stress intensity\n",
+ "p = math.sqrt((p_1*math.cos(theta))**2+(p_2*math.sin(theta))**2);##resultant intensity of stress\n",
+ "alpha = math.atan((p_2*math.sin(theta))/(p_1*math.cos(theta)));##in radians\n",
+ "alpha = alpha*180/math.pi;##in degrees\n",
+ "print'%s %.2f %s'%('Normal stress intensity p_n = ',p_n,' tons/in^2');\n",
+ "print'%s %.2f %s'%('h Tangential stress intensity p_t = ',p_t,' tons/in^2');\n",
+ "print'%s %.2f %s'%(' Resultant stress intensity p = ',p,'tons/in^2');\n",
+ "print'%s %.2f %s'%(' angle alpha p_n = ',alpha,' degrees');\n",
+ "\n",
+ "##there is an error in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normal stress intensity p_n = 3.53 tons/in^2\n",
+ "h Tangential stress intensity p_t = 1.23 tons/in^2\n",
+ " Resultant stress intensity p = 3.74 tons/in^2\n",
+ " angle alpha p_n = 30.79 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The inclination of principal planes to the axis of the bolt and p_2 and Maximum shear stress is p_max and stress which acting alone will produce the same maximum strain \n",
+ "d = 3./4. ;##inches\n",
+ "P = 2.;##tons\n",
+ "Q = 0.5;##tons\n",
+ "m = 4.;\n",
+ "A = 0.25*math.pi*d**2;##in^2\n",
+ "p = P/A ;##tons/in^2\n",
+ "q = Q/A;##tons/in^2\n",
+ "theta = 0.5*math.atan(2.*q/p);##radians\n",
+ "theta1 = theta*180/math.pi;##degrees\n",
+ "theta2 = theta1+90;##degrees\n",
+ "print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',theta1,'degres') \n",
+ "print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',180-theta2,'degrees') \n",
+ "print'%s %.2f %s'%('The inclination of maximum shear planes to the axis of the bolt will be',theta1+45,'degress')\n",
+ "print'%s %.2f %s'%('The inclination of principal planes to the axis of the bolt will be',180-theta2-45,'degrees')\n",
+ "\n",
+ "p_1 = 0.5*p+math.sqrt(0.25*p**2+q**2);##tons/in^2\n",
+ "p_2 = 0.5*p-math.sqrt(0.25*p**2+q**2);##tons/in^2\n",
+ "p_max = 0.5*(p_1-p_2);##tons/in^2\n",
+ "p_s = p_1-(p_2/m);##tons/in^2 \n",
+ "print'%s %.2f %s'%('The principal stresse are given by p_1 =',p_1,'tons/in^2.,tensile')\n",
+ "print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2.,compressive')\n",
+ "print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2 .,compressive');\n",
+ "print'%s %.2f %s'%('Maximum shear stress is p_max =',p_max,'tons/in^2');\n",
+ "print'%s %.2f %s'%('The stress which acting alone will produce the same maximum strain is given by,',p_s,'tons/in^2');\n",
+ "\n",
+ "##there is an error in the answer given in text book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The inclination of principal planes to the axis of the bolt will be 13.28 degres\n",
+ "The inclination of principal planes to the axis of the bolt will be 76.72 degrees\n",
+ "The inclination of maximum shear planes to the axis of the bolt will be 58.28 degress\n",
+ "The inclination of principal planes to the axis of the bolt will be 31.72 degrees\n",
+ "The principal stresse are given by p_1 = 4.79 tons/in^2.,tensile\n",
+ "p_2 = -0.27 tons/in^2.,compressive\n",
+ "p_2 = -0.27 tons/in^2 .,compressive\n",
+ "Maximum shear stress is p_max = 2.53 tons/in^2\n",
+ "The stress which acting alone will produce the same maximum strain is given by, 4.86 tons/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The principal stresses and The maximum shear stress and the planes offering it being inclined and the normal stress intensity \n",
+ "q = 2.;##tons/in^2\n",
+ "p = 5.;##tons/in^2\n",
+ "p_dash = 2.;##tons/in^2\n",
+ "theta = 0.5*math.atan(2*q/(p-p_dash));##radians\n",
+ "theta1 = theta*180/math.pi;##degrees\n",
+ "theta2 = theta1+90;##degrees\n",
+ "p_1 = 0.5*(p+p_dash)+math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
+ "p_2 = 0.5*(p+p_dash)-math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
+ "q_max = 0.5*(p_1-p_2);##tons/in^2\n",
+ "print'%s %.2f %s'%('The principal stresses are p_1 =',p_1,'tons/in^2 .,tensile')\n",
+ "print'%s %.2f %s'%('The principal stresses arep_2 =',p_2,'tons/in^2., tensile');\n",
+ "print'%s %.1f %s'%('The maximum shear stress is',q_max,'tons/in^2.,') \n",
+ "print'%s %.2f %s'%('the planes offering it being inclined at',theta1+45,'degrees') \n",
+ "print'%s %.2f %s'%('the planes offering it being inclined at',theta2+45,'degrees')\n",
+ "print'%s %.2f %s'%('to the plane having the normal stress intensity of',p,'tons/in^2.')\n",
+ "##there is an error in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The principal stresses are p_1 = 6.00 tons/in^2 .,tensile\n",
+ "The principal stresses arep_2 = 1.00 tons/in^2., tensile\n",
+ "The maximum shear stress is 2.5 tons/in^2.,\n",
+ "the planes offering it being inclined at 71.57 degrees\n",
+ "the planes offering it being inclined at 161.57 degrees\n",
+ "to the plane having the normal stress intensity of 5.00 tons/in^2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate theta1 and theta2 and P_1 and P_2 and maximum shear intensity\n",
+ "p_res = 6.;##tons/in^2\n",
+ "p_dash = 4.;##tons/in^2\n",
+ "theta = 30.*math.pi/180.;##degrees\n",
+ "p_n = 4.;##tons/in^2\n",
+ "p = p_res*math.cos(theta);##tons/in^2\n",
+ "q = p_res*math.sin(theta);##tons/in^2\n",
+ "L = 2*q/(p-p_dash);\n",
+ "theta = 0.5*math.atan(2*q/(p-p_dash));\n",
+ "theta1 = theta*180/math.pi;##degrees\n",
+ "theta2 = theta1+90;##degrees\n",
+ "p_1 = 0.5*(p+p_dash)+math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
+ "p_2 = 0.5*(p+p_dash)-math.sqrt(q**2 + 0.25*(p-p_dash)**2);##tons/in^2\n",
+ "p_max = 0.5*(p_1-p_2);##tons/in^2\n",
+ "print'%s %.2f %s'%('Theta1 =',theta1,'degrees') \n",
+ "print'%s %.2f %s'%('Theta2 =',theta2,'degrees')\n",
+ "print'%s %.2f %s'%('p_1 =',p_1,'tons/in^2.,tensile')\n",
+ "print'%s %.2f %s'%('p_2 =',p_2,'tons/in^2.,tensile')\n",
+ "print'%s %.2f %s'%('The maximum shear intensity will be',p_max,'tons/in^2 across the planes of maximum shear.');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theta1 = 39.36 degrees\n",
+ "Theta2 = 129.36 degrees\n",
+ "p_1 = 7.66 tons/in^2.,tensile\n",
+ "p_2 = 1.54 tons/in^2.,tensile\n",
+ "The maximum shear intensity will be 3.06 tons/in^2 across the planes of maximum shear.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate tensiles and compressive \n",
+ "p_1 = 7.;##tons/in^2\n",
+ "p_2 = 4.;##tons/in^2\n",
+ "p_3 = 3.;##tons/in^2\n",
+ "m = 4.;\n",
+ "E = 13000.;##tons/in^2\n",
+ "e_1 = (p_1/E)+(p_2/(m*E))-(p_3/(m*E));\n",
+ "e_2 = (p_2/E)+(p_1/(m*E))+(p_3/(m*E));\n",
+ "e_3 = (p_3/E)-(p_1/(m*E))+(p_2/(m*E));\n",
+ "print'%s %.4f %s'%('e_1 =',e_1,'tensile')\n",
+ "print'%s %.4f %s'%('e_2 =',e_2,'compressive')\n",
+ "print'%s %.4f %s'%('e_3 =',e_3,'tensile')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "e_1 = 0.0006 tensile\n",
+ "e_2 = 0.0005 compressive\n",
+ "e_3 = 0.0002 tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the contraction in the length \n",
+ "a = 2.;##inches\n",
+ "l = 6.;##inches\n",
+ "E = 13000.;##tons/In^2\n",
+ "m = 1./0.3;\n",
+ "P = 20.;##tons\n",
+ "p_1 = P/a**2;##tons/in^2\n",
+ "p_2 = p_1/(2.*(m-1));##tons/in^2\n",
+ "e_1 = (5.-0.6*p_2)/E;##tons/in^2\n",
+ "del_l = e_1*l;##inches\n",
+ "print'%s %.4f %s'%('The contraction in the length del_l =',del_l,'inches');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The contraction in the length del_l = 0.0020 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file