diff options
author | kinitrupti | 2017-05-12 18:40:35 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:40:35 +0530 |
commit | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch) | |
tree | 9806b0d68a708d2cfc4efc8ae3751423c56b7721 /Mechanical_Metallurgy | |
parent | 1b1bb67e9ea912be5c8591523c8b328766e3680f (diff) | |
download | Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2 Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip |
Revised list of TBCs
Diffstat (limited to 'Mechanical_Metallurgy')
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_1.ipynb | 73 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_11.ipynb | 165 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_12.ipynb | 346 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_13.ipynb | 181 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_14.ipynb | 90 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_15.ipynb | 294 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_16.ipynb | 131 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_17.ipynb | 239 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_18.ipynb | 94 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_19.ipynb | 145 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_2.ipynb | 251 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_20.ipynb | 109 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_21.ipynb | 252 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_3.ipynb | 212 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_4.ipynb | 82 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_5.ipynb | 74 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_6.ipynb | 223 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_7.ipynb | 113 | ||||
-rwxr-xr-x | Mechanical_Metallurgy/Chapter_8.ipynb | 255 |
19 files changed, 0 insertions, 3329 deletions
diff --git a/Mechanical_Metallurgy/Chapter_1.ipynb b/Mechanical_Metallurgy/Chapter_1.ipynb deleted file mode 100755 index 7660f24c..00000000 --- a/Mechanical_Metallurgy/Chapter_1.ipynb +++ /dev/null @@ -1,73 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 1: Introduction"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 1.1, Shear Stress, Page No. 16"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Shear Stress Required to nucleate a grain boundary crack in high temperature deformation = 158.887 MPa\n"
- ]
- }
- ],
- "source": [
- "#variable declaration\n",
- "from math import pi\n",
- "from math import sqrt\n",
- "y_b=2;\n",
- "G=75;\n",
- "G=G*10**9; #conversion to Pa\n",
- "L=0.01;\n",
- "L=L*10**-3; #conversion to m\n",
- "nu=0.3;\n",
- "\n",
- "#calculation\n",
- "T=sqrt((3*pi*y_b*G)/(8*(1-nu)*L));\n",
- "T=T/10**6;\n",
- "\n",
- "#result\n",
- "print ('Shear Stress Required to nucleate a grain boundary crack in high temperature deformation = %g MPa') %(T)"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_11.ipynb b/Mechanical_Metallurgy/Chapter_11.ipynb deleted file mode 100755 index c0c024dd..00000000 --- a/Mechanical_Metallurgy/Chapter_11.ipynb +++ /dev/null @@ -1,165 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 11: Fracture Mechanics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 11.1, Fracture Toughness, Page No. 354"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Since Fracture Toughness of the material is = 172.852 MPa\n",
- " and the applied stress is 172 MPa thus the flaw will propagate as a brittle fracture\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import sqrt\n",
- "from math import pi\n",
- "from math import cos\n",
- "\n",
- "#variable declaration\n",
- "a=5;\n",
- "a=a*10**-3; #conversion to m\n",
- "t=1.27; #in cm\n",
- "t=t*10**-2; #conversion to m\n",
- "def sec(x):\n",
- " return 1/cos(x);\n",
- "\n",
- "#calculation\n",
- "K_Ic=24;\n",
- "sigma=K_Ic/(sqrt(pi*a)*sqrt(sec(pi*a/(2*t))));\n",
- "\n",
- "#result\n",
- "print('Since Fracture Toughness of the material is = %g MPa\\n and the applied stress is 172 MPa thus the flaw will propagate as a brittle fracture')%(sigma);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 11.2, Fracture Toughness, Page No. 354"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Critical Crack depth = 15.4981 mm\n",
- "which is greater than the thickness of the vessel wall, 12mm\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "K_Ic=57;\n",
- "sigma0=900;\n",
- "sigma=360;\n",
- "Q=2.35;\n",
- "\n",
- "#calculation\n",
- "a_c=K_Ic**2*Q/(1.21*pi*sigma**2);\n",
- "a_c=a_c*1000; #conversion to mm\n",
- "\n",
- "#result\n",
- "print('\\nCritical Crack depth = %g mm\\nwhich is greater than the thickness of the vessel wall, 12mm')%(a_c);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 11.3, Plasticity, Page No. 361"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Plastic zone size = 0.113177 mm\n",
- "Stress Intensity Factor = 42.8659 MPa m^(1/2)\n",
- "\n",
- "\n",
- "Note: Calculation Errors in book\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "a=10;\n",
- "a=a*10**-3; #conversion to m\n",
- "sigma=400;\n",
- "sigma0=1500;\n",
- "\n",
- "#calculation\n",
- "rp=sigma**2*a/(2*pi*sigma0**2);\n",
- "rp=rp*1000; #conversion to mm\n",
- "K=sigma*sqrt(pi*a);\n",
- "K_eff=sigma*sqrt(pi*a)*sqrt(a+pi*rp);\n",
- "\n",
- "#result\n",
- "print('\\nPlastic zone size = %g mm\\nStress Intensity Factor = %g MPa m^(1/2)\\n\\n\\nNote: Calculation Errors in book')%(rp,K_eff);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_12.ipynb b/Mechanical_Metallurgy/Chapter_12.ipynb deleted file mode 100755 index ac9b05ec..00000000 --- a/Mechanical_Metallurgy/Chapter_12.ipynb +++ /dev/null @@ -1,346 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 12: Fatigue of Metals"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 12.1, Mean Stress, Page No. 387"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Bar Diameter = 1.45673 in\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "sigma_u=158; # in ksi\n",
- "sigma0=147; # in ksi\n",
- "sigma_e=75; # in ksi\n",
- "l_max=75; # in ksi\n",
- "l_min=-25; # in ksi\n",
- "sf=2.5;\n",
- "\n",
- "#calculation\n",
- "sigma_m=(l_max+l_min)/2;\n",
- "sigma_a=(l_max-l_min)/2;\n",
- "sigma_e=sigma_e/sf;\n",
- "A=sigma_a/sigma_e+sigma_m/sigma_u;\n",
- "D=sqrt(4*A/pi);\n",
- "\n",
- "#result\n",
- "print('\\nBar Diameter = %g in')%(D);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 12.2, Low Cycle Fatigue, Page No. 391"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "d_e_e = 0.000681818\n",
- "d_e_p = 0.000608182\n",
- "Number of Cycles = 48884 cycles\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "sigma_b=75.0;\n",
- "e_b=0.000645;\n",
- "e_f=0.3;\n",
- "E=22*10**4;\n",
- "c=-0.6;\n",
- "\n",
- "#calculation\n",
- "d_e_e=float(2*sigma_b/E);\n",
- "d_e_p=2*e_b-d_e_e;\n",
- "N=((d_e_p/(2*e_f))**(1/c))/2;\n",
- "\n",
- "#result\n",
- "print('\\nd_e_e = %g\\nd_e_p = %g\\nNumber of Cycles = %g cycles')%(d_e_e,d_e_p,N);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 12.3, Fatigue Crack Proportion, Page No. 401"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Fatigue Cycles = 261417 cycles\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "ai=0.5;\n",
- "ai=ai*10**-3; #conversion to m\n",
- "sigma_max=180.0;\n",
- "Kc=100.0;\n",
- "alpha=1.12;\n",
- "p=3.0;\n",
- "A=6.9*10**-12;\n",
- "\n",
- "#calculation\n",
- "af=(Kc/(sigma_max*alpha))**2/pi;\n",
- "Nf=float(af**(1-(p/2))-ai**(1-(p/2)))/float((1-p/2)*A*(sigma_max**3)*(pi**(p/2))*(alpha**p));\n",
- "\n",
- "#result\n",
- "print('Fatigue Cycles = %g cycles')%(Nf);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 12.4, Stress Concentration of Fatigue, Page No. 404"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Mean Stress = 25464.8 psi\n",
- "Fluctuating Bending Stress = 33658.4 psi\n",
- "Effective Maximum Stress = 59123.2 psi\n",
- "Effective Minimum Stress = 8193.63 psi\n",
- "sigma_a = 39834.1 psi\n",
- "\n",
- "\n",
- "Note: Calculation Errors in the book\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "from math import sqrt\n",
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "rho=0.0004;\n",
- "S_u=190000;\n",
- "M=200;\n",
- "Pm=5000;\n",
- "D=0.5;\n",
- "dh=0.05;\n",
- "r=dh/2;\n",
- "Kt=2.2;\n",
- "\n",
- "#calculation\n",
- "Kf=1+(Kt-1)/(1+sqrt(rho/r));\n",
- "q=(Kf-1)/(Kt-1);\n",
- "A=pi/4*D**2;\n",
- "sigma_m=Pm/A;\n",
- "I=pi/64*D**4;\n",
- "sigma_a=Kf*((M*D)/(2*I));\n",
- "sigma_max=sigma_a+sigma_m;\n",
- "sigma_min=sigma_a-sigma_m;\n",
- "sigma_e=S_u/2;\n",
- "sigma_a1=sigma_e/Kf*(1-sigma_m/S_u);\n",
- "\n",
- "#result\n",
- "print('\\nMean Stress = %g psi\\nFluctuating Bending Stress = %g psi\\nEffective Maximum Stress = %g psi\\nEffective Minimum Stress = %g psi\\nsigma_a = %g psi\\n\\n\\nNote: Calculation Errors in the book')%(sigma_m,sigma_a,sigma_max,sigma_min,sigma_a1);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 12.5, Infinite Life Design, Page No. 422"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Fatigue Limit = 14245.3 psi\n"
- ]
- }
- ],
- "source": [
- "\n",
- "#variable declaration\n",
- "Kt=1.68;\n",
- "q=0.9;\n",
- "sigma_ed=42000;\n",
- "Cs=0.9;\n",
- "Cf=0.75;\n",
- "Cz=0.81;\n",
- "\n",
- "#calculation\n",
- "Kf=q*(Kt-1)+1;\n",
- "sigma_e=sigma_ed*Cs*Cf*Cz;\n",
- "sigma_en=sigma_e/Kf;\n",
- "\n",
- "#result\n",
- "print('\\nFatigue Limit = %g psi')%(sigma_en);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 12.6, Local Strain method, Page No. 424"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false,
- "scrolled": true
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Number of cycles = 14785.5 cycles\n",
- "Fatigue damage per cycle = 6.7634e-05\n",
- "Number of cycles with correction of mean stress= 129289 cycles\n",
- "Fatigue damage per cycle with correction of mean stress= 7.7346e-06 damage per year\n",
- "Shaft will fail in 2.2446 days\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from scipy.optimize import fsolve\n",
- "\n",
- "#variable declaration\n",
- "K=189;\n",
- "n=0.12;\n",
- "ef=1.06;\n",
- "sigma_f=190;\n",
- "b=-0.08;\n",
- "c=-0.66;\n",
- "E=30000000.0;\n",
- "E=E/1000; #conversion to ksi\n",
- "s=200.0;\n",
- "sigma_m=167.0;\n",
- "sigma_a=17.0;\n",
- "se=s**2/E;\n",
- "\n",
- "#calculation\n",
- "def f(ds):\n",
- " return (ds**2)/(2*E)+(ds**((1+n)/n))/((2*K)**(1/n))-se/2;\n",
- "ds=fsolve(f,1)\n",
- "de=se/ds;\n",
- "def f1(N2):\n",
- " return (N2**(b))*(sigma_f/E)+ef*(N2**(c))-de/2;\n",
- "N2=fsolve(f1,1);\n",
- "N_1=N2/2;\n",
- "de_e2=sigma_a/E;\n",
- "def f2(N2):\n",
- " return (N2**b)*((sigma_f-sigma_m)/E)+ef*(N2**c)-de_e2;\n",
- "N2=fsolve(f2,1);\n",
- "N_2=N2/2;\n",
- "C_pd=2*60*60*8;\n",
- "f=N_2/C_pd;\n",
- "\n",
- "#result\n",
- "print('\\nNumber of cycles = %g cycles\\nFatigue damage per cycle = %g\\nNumber of cycles with correction of mean stress= %g cycles\\nFatigue damage per cycle with correction of mean stress= %g damage per year\\nShaft will fail in %g days')%(N_1,1/N_1,N_2,1/N_2,f);\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_13.ipynb b/Mechanical_Metallurgy/Chapter_13.ipynb deleted file mode 100755 index cc8ad5e6..00000000 --- a/Mechanical_Metallurgy/Chapter_13.ipynb +++ /dev/null @@ -1,181 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 13: Creep and Stress Rupture"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 13.1, Engineering Creep, Page No. 461"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "-----------------------------------------------------------\n",
- "\n",
- "Temperature\tCreep Strength, psi\tWorking Stress, psi\n",
- "\n",
- "------------------------------------------------------------\n",
- "\n",
- "1100 F\t\t\t30000\t\t\t10000\n",
- "\n",
- "\n",
- "1500 F\t\t\t4000\t\t\t1333\n",
- "\n"
- ]
- }
- ],
- "source": [
- "\n",
- "#variable declaration\n",
- "sf=3;\n",
- "per=1/1000;\n",
- "T=[1100, 1500];\n",
- "C=[30000, 4000]; \n",
- "W=[0, 0];\n",
- "#calculation\n",
- "W[0]=C[0]/sf;\n",
- "W[1]=C[1]/sf;\n",
- "\n",
- "#result\n",
- "print('\\n-----------------------------------------------------------\\n');\n",
- "print('Temperature\\tCreep Strength, psi\\tWorking Stress, psi\\n');\n",
- "print('------------------------------------------------------------');\n",
- "print('\\n1100 F\\t\\t\\t%i\\t\\t\\t%i\\n')%(C[0],W[0]);\n",
- "print('\\n1500 F\\t\\t\\t%i\\t\\t\\t%i\\n')%(C[1],W[1]);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 13.2, Engineering Creep, Page No. 461"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Activation Energy = 157867 cal/mol\n",
- "\n",
- "\n",
- "\n",
- "Note: Calculation Errors in book\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "def C(f):\n",
- " return (f-32)*5/9;\n",
- "R=1.987;\n",
- "T2=1300;\n",
- "T1=1500;\n",
- "\n",
- "#calculation\n",
- "T2=C(T2)+273.15;\n",
- "T1=C(T1)+273.15;\n",
- "e2=0.0001;\n",
- "e1=0.4;\n",
- "Q=R*log(e1/e2)/(1/T2-1/T1);\n",
- "\n",
- "#result\n",
- "print('\\nActivation Energy = %g cal/mol')%(Q)\n",
- "print('\\n\\n\\nNote: Calculation Errors in book');"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 13.3, Prediction of long time properties, Page No. 464"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "At T = 1200 F, P = 41500\n",
- "At T = 1600 F, P = 51500\n",
- "And from the master ploy of Astroploy, corresponding stress required are sigma = 78000 psi and sigma = 11000 psi\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import log10\n",
- "\n",
- "#variable declaration\n",
- "t=10**5;\n",
- "C1=20;\n",
- "T1=1200;\n",
- "T2=1600;\n",
- "\n",
- "#calculation\n",
- "P_1200=(T1+460)*(log10(t)+C1);\n",
- "P_1600=(T2+460)*(log10(t)+C1);\n",
- "\n",
- "#result\n",
- "print('\\nAt T = 1200 F, P = %g\\nAt T = 1600 F, P = %g\\nAnd from the master ploy of Astroploy, corresponding stress required are sigma = 78000 psi and sigma = 11000 psi')%(P_1200,P_1600);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_14.ipynb b/Mechanical_Metallurgy/Chapter_14.ipynb deleted file mode 100755 index bd230ae6..00000000 --- a/Mechanical_Metallurgy/Chapter_14.ipynb +++ /dev/null @@ -1,90 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 14: Brittle Fracture and Impact Testing"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 14.1, Stress Corrosion Cracking, Page No. 494"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Estimated Life = 11.5741 days\n",
- "\n",
- "\n",
- "\n",
- "---------------------------------\n",
- "Stress, MPa\tCrack Length, mm\n",
- "---------------------------------\n",
- "\n",
- "\t500\t\t0.105226\n",
- "\n",
- "\t300\t\t0.292296\n",
- "\n",
- "\t100\t\t2.63066\n",
- "\n",
- "---------------------------------\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "cg=0.01;\n",
- "gr=10**-8;\n",
- "\n",
- "#calculation\n",
- "l=cg/(gr*3600*24);\n",
- "K_l_SCC=10;\n",
- "a_sigma2=K_l_SCC**2/(1.21*pi);\n",
- "s=[500,300,100];\n",
- "\n",
- "#result\n",
- "print('\\nEstimated Life = %g days')%(l);\n",
- "print('\\n\\n\\n---------------------------------\\nStress, MPa\\tCrack Length, mm\\n---------------------------------\\n');\n",
- "for i in range (0,3):\n",
- " print('\\t%g\\t\\t%g\\n')%(s[i],a_sigma2*1000/s[i]**2);\n",
- "print('---------------------------------');"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_15.ipynb b/Mechanical_Metallurgy/Chapter_15.ipynb deleted file mode 100755 index 4b4e7632..00000000 --- a/Mechanical_Metallurgy/Chapter_15.ipynb +++ /dev/null @@ -1,294 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 15: Fundamentals of Metalworking"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 15.1, Mechanics of Metal Working, Page No. 506"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Enginering Strain = 1\n",
- "True Strain = 0.693147\n",
- "Reduction = 1\n",
- "\n",
- "\n",
- "Enginering Strain = -0.5\n",
- "True Strain = -0.693147\n",
- "Reduction = -1\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "\n",
- "#For Bar which is double in length\n",
- "#variable declaration 1\n",
- "L2=2;\n",
- "L1=1;\n",
- "\n",
- "#calculation 1\n",
- "e=(L2-L1)/L1;\n",
- "e1=log(L2/L1);\n",
- "r=1-L1/L2;\n",
- "\n",
- "#result 1\n",
- "print('\\nEnginering Strain = %g\\nTrue Strain = %g\\nReduction = %g')%(e,e1,r);\n",
- "\n",
- "\n",
- "\n",
- "#For bar which is halved in length\n",
- "#variable declaration 2\n",
- "L1=1;\n",
- "L2=0.5;\n",
- "\n",
- "#calculation 2\n",
- "e=(L2-L1)/L1;\n",
- "e1=log(L2/L1);\n",
- "r=1-L1/L2;\n",
- "\n",
- "#result 2\n",
- "print('\\n\\nEnginering Strain = %g\\nTrue Strain = %g\\nReduction = %g')%(e,e1,r);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 15.2, Mechanics of Metal Working, Page No. 511"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Plastic work done in 1st step = 39752.1 lb/in^2\n",
- "Plastic work done in 2nd step = 97934.8 lb/in^2\n",
- "\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from scipy.integrate import quad\n",
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "D0=25.0;\n",
- "D1=20.0;\n",
- "D2=15.0;\n",
- "def integrand(e):\n",
- " return 200000*e**0.5\n",
- "\n",
- "#calculation\n",
- "ep1=log((D0/D1)**2);\n",
- "U1,U1_err=quad(integrand,0,ep1);\n",
- "ep2=log((D1/D2)**2);\n",
- "U2,U2_err=quad(integrand,ep1,ep1+ep2);\n",
- "\n",
- "#result\n",
- "print('\\nPlastic work done in 1st step = %g lb/in^2\\nPlastic work done in 2nd step = %g lb/in^2\\n')%(U1,U2);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 15.3, Hodography, Page No. 517"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Pressure = 2.88675\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import sin\n",
- "from math import radians\n",
- "\n",
- "#variable declaration\n",
- "alpha=60;\n",
- "\n",
- "#calculation\n",
- "r=radians(alpha);\n",
- "mu=1/sin(r);\n",
- "p_2k=mu*5/2;\n",
- "\n",
- "#result\n",
- "print('Pressure = %g')%(p_2k);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 15.4, Temperature in Metalworking, Page No. 526"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Temperature Rise for aluminium = 78.4808 C\n",
- "Temperature Rise for titanium = 162.686 C\n",
- "\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "Al_s=200;\n",
- "Al_e=1;\n",
- "Al_p=2.69;\n",
- "Al_c=0.215;\n",
- "Ti_s=400;\n",
- "Ti_e=1;\n",
- "Ti_p=4.5;\n",
- "Ti_c=0.124;\n",
- "J=4.186;\n",
- "b=0.95;\n",
- "\n",
- "#calculation\n",
- "Al_Td=Al_s*Al_e*b/(Al_p*Al_c*J);\n",
- "Ti_Td=Ti_s*Ti_e*b/(Ti_p*Ti_c*J);\n",
- "\n",
- "#result\n",
- "print('\\nTemperature Rise for aluminium = %g C\\nTemperature Rise for titanium = %g C\\n')%(Al_Td,Ti_Td);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 15.5, Friction and Lubrication, Page No. 546"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "For OD after deformation being 70 mm, Di = 22.3607 mm\n",
- "Precent change in inside diameter = 25.4644 percent\n",
- "Peak pressure = 1.93531\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "For OD after deformation being 81.4 mm, Di = 35.0137 mm\n",
- "Precent change in inside diameter = -16.7124 percent\n",
- "Peak pressure = 1.17321\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "Do=60;\n",
- "Di=30;\n",
- "def1=70;\n",
- "def2=81.4;\n",
- "h=10;\n",
- "a=30;\n",
- "\n",
- "#calculation1\n",
- "di=sqrt((Do**2-Di**2)*2-def1**2);\n",
- "pr=(Di-di)/Di*100;\n",
- "m=0.27;\n",
- "p_s=1+2*m*a/(sqrt(3)*h);\n",
- "\n",
- "#result 1\n",
- "print('\\nFor OD after deformation being 70 mm, Di = %g mm\\nPrecent change in inside diameter = %g percent\\nPeak pressure = %g')%(di,pr,p_s);\n",
- "\n",
- "#calculation 2\n",
- "di=sqrt(def2**2-(Do**2-Di**2)*2);\n",
- "pr=(Di-di)/Di*100;\n",
- "m=0.05;\n",
- "p_s=1+2*m*a/(sqrt(3)*h);\n",
- "\n",
- "#result 2\n",
- "print('\\n\\n\\n\\nFor OD after deformation being 81.4 mm, Di = %g mm\\nPrecent change in inside diameter = %g percent\\nPeak pressure = %g')%(di,pr,p_s);\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_16.ipynb b/Mechanical_Metallurgy/Chapter_16.ipynb deleted file mode 100755 index df731606..00000000 --- a/Mechanical_Metallurgy/Chapter_16.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 16: Forging"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 16.1, Forging in Plain Strain, Page No. 574"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "At the centerline of the slab = 63044.5 psi\n",
- "\n",
- "\n",
- "Pressure Distributon from the centerline:\n",
- "\n",
- "---------------------------------\n",
- "\n",
- "x\tp (ksi)\t\tt_i (ksi)\n",
- "\n",
- "---------------------------------\n",
- "\n",
- "0\t63.0445\t\t15.7611\n",
- "\n",
- "0.25\t38.2384\t\t9.55961\n",
- "\n",
- "0.5\t23.1928\t\t5.7982\n",
- "\n",
- "0.75\t14.0671\t\t3.51678\n",
- "\n",
- "1\t8.53215\t\t2.13304\n",
- "\n",
- "1.25\t5.17501\t\t1.29375\n",
- "\n",
- "1.5\t3.1388\t\t0.7847\n",
- "\n",
- "1.75\t1.90378\t\t0.475945\n",
- "\n",
- "2\t1.1547\t\t0.288675\n",
- "\n",
- "---------------------------------\n",
- "\n",
- "\n",
- "For sticking friction:\n",
- "p_max = 10.3923 ksi\n",
- "\n",
- "\n",
- "The Forging load = 62.7695 tons\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "from math import exp\n",
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "sigma=1000;\n",
- "mu=0.25;\n",
- "a=2;\n",
- "b=6;\n",
- "h=0.25;\n",
- "x=0;\n",
- "mu=0.25;\n",
- "\n",
- "#calculation\n",
- "p_max=2*sigma*exp(2*mu*(a-x)/h)/sqrt(3);\n",
- "print('\\nAt the centerline of the slab = %g psi\\n')%(p_max);\n",
- "print('\\nPressure Distributon from the centerline:');\n",
- "print('\\n---------------------------------\\n');\n",
- "print('x\\tp (ksi)\\t\\tt_i (ksi)\\n');\n",
- "print('---------------------------------\\n');\n",
- "while x<=2:\n",
- " p=2*sigma*exp(2*mu*(a-x)/h)/(1000*sqrt(3)); #in ksi\n",
- " t_i=mu*p;\n",
- " print('%g\\t%g\\t\\t%g\\n')%(x,p,t_i);\n",
- " x+=0.25;\n",
- "print('---------------------------------\\n');\n",
- "k=sigma/sqrt(3);\n",
- "x=0;\n",
- "p_max1=2*sigma*((a-x)/h+1)/sqrt(3);\n",
- "x1=a-h/(2*mu)*log(1/(2*mu));\n",
- "p=2*sigma*(a/(2*h)+1)/sqrt(3);\n",
- "P=2*p*a*b;\n",
- "P=P*0.000453; #conversion to metric tons\n",
- "\n",
- "#result\n",
- "print('\\nFor sticking friction:\\np_max = %g ksi')%(p_max1/1000);\n",
- "print('\\n\\nThe Forging load = %g tons')%(P);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_17.ipynb b/Mechanical_Metallurgy/Chapter_17.ipynb deleted file mode 100755 index b223cd0f..00000000 --- a/Mechanical_Metallurgy/Chapter_17.ipynb +++ /dev/null @@ -1,239 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 17: Rolling of Metals"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 17.1, Forces in rolling, Page No. 596"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Maximum possible reduction when mu is 0.08 = 0.0768 in\n",
- "\n",
- "Maximum possible reduction when mu is 0.5 = 3 in\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import atan\n",
- "\n",
- "#variable declaration\n",
- "mu1=0.08;\n",
- "mu2=0.5;\n",
- "R=12;\n",
- "\n",
- "#calculation\n",
- "alpha=atan(mu1);\n",
- "dh1=mu1**2*R;\n",
- "dh2=mu2**2*R;\n",
- "\n",
- "#result\n",
- "print('\\nMaximum possible reduction when mu is 0.08 = %g in\\n')%(dh1);\n",
- "print('Maximum possible reduction when mu is 0.5 = %g in')%(dh2);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 17.2, Rolling Load, Page No. 598"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Rolling Load = 3039.51 kips\n",
- "\n",
- "Rolling Load if sticking friction occurs = 5509.54 kips\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import sqrt\n",
- "from math import exp\n",
- "\n",
- "#variable declaration\n",
- "h0=1.5;\n",
- "mu=0.3;\n",
- "D=36;\n",
- "s_en=20;\n",
- "s_ex=30;\n",
- "\n",
- "#calculation\n",
- "h1=h0-0.3*h0;\n",
- "dh=h0-h1;\n",
- "h_=(h1+h0)/2;\n",
- "Lp=sqrt(D/2*dh);\n",
- "Q=mu*Lp/h_;\n",
- "sigma0=(s_en+s_ex)/2;\n",
- "P=sigma0*(exp(Q)-1)*s_ex*Lp/Q;\n",
- "Ps=sigma0*(Lp/(4*dh)+1)*s_ex*Lp;\n",
- "\n",
- "#result\n",
- "print('\\nRolling Load = %g kips')%(P);\n",
- "print('\\nRolling Load if sticking friction occurs = %g kips')%(Ps);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 17.3, Rolling Load, Page No. 599"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "P2 = 1410.35\n",
- "R2 = 18.6281\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "from math import sqrt\n",
- "from math import exp\n",
- "\n",
- "#variable declaration\n",
- "h0=1.5;\n",
- "mu=0.3;\n",
- "D=36;\n",
- "s_en=20;\n",
- "s_ex=30;\n",
- "C=3.34*10**-4;\n",
- "P_=1357;\n",
- "\n",
- "#calculation\n",
- "h1=h0-0.3*h0;\n",
- "dh=h0-h1;\n",
- "h_=(h1+h0)/2;\n",
- "R=D/2;\n",
- "R1=R*(1+C*P_/(s_ex*(dh)));\n",
- "Lp=sqrt(R1*dh);\n",
- "Q=mu*Lp/h_;\n",
- "sigma0=(s_en+s_ex)/2;\n",
- "P2=sigma0*(exp(Q)-1)*s_ex*Lp/Q;\n",
- "P2=P2*0.45359 #conversion to tons\n",
- "R2=R*(1+C*P2/(s_ex*(dh)));\n",
- "\n",
- "#result\n",
- "print('\\nP2 = %g\\nR2 = %g')%(P2,R2);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 17.4, Torque and Horsepower, Page No. 614"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Rolling Load = 540.012\n",
- "Horsepower = 1713.63\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import sqrt\n",
- "from math import pi\n",
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "w=12;\n",
- "hi=0.8;\n",
- "hf=0.6;\n",
- "D=40;\n",
- "N=100;\n",
- "\n",
- "#calculation\n",
- "R=D/2;\n",
- "dh=abs(hf-hi);\n",
- "e1=log(hi/hf);\n",
- "r=(hi-hf)/hi;\n",
- "sigma=20*e1**0.2/1.2;\n",
- "Qp=1.5;\n",
- "P=2*sigma*w*sqrt(R*(hi-hf))*Qp/sqrt(3);\n",
- "a=0.5*sqrt(R*dh);\n",
- "a=a/12; #conversion to ft\n",
- "hp=4*pi*a*P*N*1000/33000;\n",
- "\n",
- "#result\n",
- "print('\\nRolling Load = %g\\nHorsepower = %g')%(P,hp);\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_18.ipynb b/Mechanical_Metallurgy/Chapter_18.ipynb deleted file mode 100755 index 8fcdfd7b..00000000 --- a/Mechanical_Metallurgy/Chapter_18.ipynb +++ /dev/null @@ -1,94 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 18: Extrusion"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 18.1, Extrusion Process, Page No. 629"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Force required for the Operation = 3827.95 metric tons\n",
- "\n",
- "\n",
- "Note: Slight calculation errors in book\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "from math import radians\n",
- "from math import tan\n",
- "from math import sqrt\n",
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "def cot(x):\n",
- " return 1/tan(x);\n",
- "Db=6;\n",
- "Df=2;\n",
- "L=15;\n",
- "v=2;\n",
- "alpha=60;\n",
- "mu=0.1;\n",
- "\n",
- "#calculations\n",
- "R=Db**2/Df**2;\n",
- "e=6*v*log(R)/Db\n",
- "sigma=200*e**0.15;\n",
- "alpha=radians(alpha);\n",
- "B=mu*cot(alpha);\n",
- "p_d=sigma*((1+B)/B)*(1-R**B);\n",
- "p_d=abs(p_d);\n",
- "t_i=sigma/sqrt(3);\n",
- "p_e=p_d+4*t_i*L/Db;\n",
- "p_e=p_e*145.0377; #conversion to psi\n",
- "A=pi*Db**2/4;\n",
- "P=p_e*A;\n",
- "P=P*0.000453; #conversion to metric tons\n",
- "\n",
- "#result\n",
- "print('\\nForce required for the Operation = %g metric tons\\n\\n\\nNote: Slight calculation errors in book')%(P);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_19.ipynb b/Mechanical_Metallurgy/Chapter_19.ipynb deleted file mode 100755 index 33c96b04..00000000 --- a/Mechanical_Metallurgy/Chapter_19.ipynb +++ /dev/null @@ -1,145 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 19: Drawing of Rods, Wires and Tubes"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 19.1, Analysis of Wiredrawing, Page No. 640"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Drawing Stress = 240.422 MPa\n",
- "Drawing Force = 12.0849 kN\n",
- "Power = 36.2548 kW\n",
- "Horsepower = 48.599 hp\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "from math import radians\n",
- "from math import tan\n",
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "def cot(x):\n",
- " return 1/tan(x);\n",
- "Ab=10;\n",
- "r=0.2;\n",
- "alpha=12;\n",
- "mu=0.09;\n",
- "n=0.3;\n",
- "K=1300;\n",
- "v=3;\n",
- "\n",
- "#calculation\n",
- "alpha=radians(alpha);\n",
- "B=mu*cot(alpha/2);\n",
- "e1=log(1/(1-r));\n",
- "sigma=K*e1**0.3/(n+1);\n",
- "Aa=Ab*(1-r);\n",
- "sigma_xa=sigma*((1+B)/B)*(1-(Aa/Ab)**B);\n",
- "Aa=pi*Aa**2/4;\n",
- "Pd=sigma_xa*Aa;\n",
- "Pd=Pd/1000; #conversion to kilo units\n",
- "P=Pd*v;\n",
- "H=P/0.746;\n",
- "\n",
- "#result\n",
- "print('\\nDrawing Stress = %g MPa\\nDrawing Force = %g kN\\nPower = %g kW\\nHorsepower = %g hp')%(sigma_xa,Pd,P,H);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 19.2, Analysis of Wiredrawing, Page No. 645"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "By First Approximation, r = 0.514412\n",
- "By Second Approximation, r = 0.830601\n"
- ]
- }
- ],
- "source": [
- "from math import radians\n",
- "from math import tan\n",
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "def cot(x):\n",
- " return 1/tan(x);\n",
- "alpha=12;\n",
- "r=0.2;\n",
- "mu=0.09;\n",
- "n=0.3;\n",
- "K=1300;\n",
- "v=3;\n",
- "\n",
- "#calculation\n",
- "alpha=radians(alpha);\n",
- "B=mu*cot(alpha/2);\n",
- "e1=log(1/(1-r));\n",
- "sigma_xa=K*e1**0.3/(n+1);\n",
- "r1=1-((1-(B/(B+1)))**(1/B));\n",
- "e=log(1/(1-r1));\n",
- "sigma0=1300*e**0.3;\n",
- "r2=1-(1-((sigma0/sigma_xa)*(B/(B+1)))**(1/B));\n",
- "\n",
- "#result\n",
- "print('\\nBy First Approximation, r = %g\\nBy Second Approximation, r = %g')%(r1,r2);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_2.ipynb b/Mechanical_Metallurgy/Chapter_2.ipynb deleted file mode 100755 index 535881a6..00000000 --- a/Mechanical_Metallurgy/Chapter_2.ipynb +++ /dev/null @@ -1,251 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 2: Stress and Strain Relationships for Elastic Behavior"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 2.1, State of Stress in two dimensions, Page No. 25"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "sigma_x= -12.5 MPa\n",
- "sigma_y= -2.5 MPa\n",
- "T_xy= 57.5 MPa\n",
- "sigma_y`= -65 MPa\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import sin\n",
- "from math import cos\n",
- "from math import radians\n",
- "from numpy.linalg import inv\n",
- "import numpy as np\n",
- "\n",
- "#variable declaration\n",
- "sigma_x=25;\n",
- "sigma_y=5;\n",
- "theta=45;\n",
- "sigma_x_=50;\n",
- "T_x_y_=5;\n",
- "\n",
- "#calculation\n",
- "theta=radians(theta);\n",
- "A=[[(sigma_x+sigma_y)/2+(sigma_x-sigma_y)/2*cos(2*theta),sin(2*theta)],[(sigma_y-sigma_x)/2*sin(2*theta),cos(2*theta)]];\n",
- "B=[[sigma_x_],[T_x_y_]];\n",
- "X=np.dot(inv(A),B);\n",
- "p=X[0];\n",
- "T_xy=X[1];\n",
- "sigma_x1=sigma_x*p;\n",
- "sigma_y1=sigma_y*p;\n",
- "sigma_y_=sigma_x1+sigma_y1-sigma_x_;\n",
- "\n",
- "#result\n",
- "print ('\\nsigma_x= %g MPa\\nsigma_y= %g MPa\\nT_xy= %g MPa\\nsigma_y`= %g MPa') %(sigma_x1,sigma_y1,T_xy,sigma_y_);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 2.2, State of Stress in three dimensions, Page No. 29"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "sigma0 = 360 MPa\n",
- "\n",
- "sigma1 = -280 MPa\n",
- "\n",
- "sigma2 = -160 MPa\n"
- ]
- }
- ],
- "source": [
- "import numpy as np\n",
- "\n",
- "#variable declaration\n",
- "A=[[0,-240,0],[-240,200,0],[0,0,-280]];\n",
- "\n",
- "#calcualtion\n",
- "p=[1, -(A[0][0]+A[1][1]+A[2][2]), (A[0][0]*A[1][1]+A[1][1]*A[2][2]+A[0][0]*A[2][2]-A[1][0]**2-A[2][1]**2-A[2][0]**2), -(A[0][0]*A[1][1]*A[2][2]+2*A[1][0]*A[2][1]*A[2][0]-A[0][0]*A[2][1]**2-A[1][1]*A[2][0]**2-A[2][2]*A[1][0]**2)];\n",
- "X=np.roots(p);\n",
- "\n",
- "#result\n",
- "for i in range (0,3):\n",
- " print('\\nsigma%i = %g MPa')%(i,X[i]);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 2.3, Calculation of Stresses from elastic strains, Page No. 52"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "sigma1 = 971.833 MPa\n",
- "sigma2 = 520.705 MPa\n",
- "\n",
- "\n",
- "Note: Slight calculation errors in Book\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "E=200;\n",
- "nu=0.33;\n",
- "e1=0.004;\n",
- "e2=0.001;\n",
- "\n",
- "#calculation\n",
- "sigma1=E*(e1+nu*e2)/(1-nu**2);\n",
- "sigma2=E*(e2+nu*e1)/(1-nu**2);\n",
- "sigma1=sigma1*1000; #conversion to MPa\n",
- "sigma2=sigma2*1000; #conversion to MPa\n",
- "\n",
- "#result\n",
- "print('\\nsigma1 = %g MPa\\nsigma2 = %g MPa\\n')%(sigma1,sigma2);\n",
- "print('\\nNote: Slight calculation errors in Book')"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 2.4, Elastic Anisotropy, Page No. 60"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "For Iron:\n",
- "\n",
- "\n",
- "E_111 = 2.72727 x 10^11 Pa\n",
- "E_100 = 1.25 x 10^11 Pa\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "For Tungten:\n",
- "\n",
- "\n",
- "E_111 = 3.84615 x 10^11 Pa\n",
- "E_100 = 3.84615 x 10^11 Pa\n",
- "\n",
- "Therefore tungsten is elastically isotropic while iron is elasitcally anisotropic\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "from math import sqrt\n",
- "S11_Fe=0.8;\n",
- "S12_Fe=-0.28;\n",
- "S44_Fe=0.86;\n",
- "S11_W=0.26;\n",
- "S12_W=-0.07;\n",
- "S44_W=0.66;\n",
- "D_100_l=1;\n",
- "D_100_m=0;\n",
- "D_100_n=0;\n",
- "D_110_l=1/sqrt(2);\n",
- "D_110_m=1/sqrt(2);\n",
- "D_110_n=0;\n",
- "D_111_l=1/sqrt(3);\n",
- "D_111_m=1/sqrt(3);\n",
- "D_111_n=1/sqrt(3);\n",
- "\n",
- "#calculation\n",
- "Fe_E_111=1/(S11_Fe-2*((S11_Fe-S12_Fe)-S44_Fe/2)*(D_111_l**2*D_111_m**2+D_111_n**2*D_111_m**2+D_111_l**2*D_111_n**2));\n",
- "Fe_E_100=1/(S11_Fe-2*((S11_Fe-S12_Fe)-S44_Fe/2)*(D_100_l**2*D_100_m**2+D_100_n**2*D_100_m**2+D_100_l**2*D_100_n**2));\n",
- "W_E_111=1/(S11_W-2*((S11_W-S12_W)-S44_W/2)*(D_111_l**2*D_111_m**2+D_111_n**2*D_111_m**2+D_111_l**2*D_111_n**2));\n",
- "W_E_100=1/(S11_W-2*((S11_W-S12_W)-S44_W/2)*(D_100_l**2*D_100_m**2+D_100_n**2*D_100_m**2+D_100_l**2*D_100_n**2));\n",
- "\n",
- "#result\n",
- "print '\\nFor Iron:\\n\\n'\n",
- "print 'E_111 = %g x 10^11 Pa\\nE_100 = %g x 10^11 Pa\\n' %(Fe_E_111,Fe_E_100)\n",
- "print '\\n\\n\\nFor Tungten:\\n\\n'\n",
- "print 'E_111 = %g x 10^11 Pa\\nE_100 = %g x 10^11 Pa\\n\\nTherefore tungsten is elastically isotropic while iron is elasitcally anisotropic' %(W_E_111,W_E_100)\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_20.ipynb b/Mechanical_Metallurgy/Chapter_20.ipynb deleted file mode 100755 index 90519f65..00000000 --- a/Mechanical_Metallurgy/Chapter_20.ipynb +++ /dev/null @@ -1,109 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 20: Sheet-Metal Forming"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 20.1, Deep Drawing, Page No. 672"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Limiting ratio = 1.98104\n"
- ]
- }
- ],
- "source": [
- "from math import log\n",
- "\n",
- "#variable declaration\n",
- "le=0.3;\n",
- "wd=-0.16;\n",
- "\n",
- "#calcualtion\n",
- "l_l0=1+le;\n",
- "w_w0=1+wd;\n",
- "R=log(1/w_w0)/log((w_w0)*l_l0);\n",
- "\n",
- "#result\n",
- "print('\\nLimiting ratio = %g')%(R);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 20.2, Forming Limit Criteria, Page No. 675"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Major Strain = 80 percent \n",
- "Minor Strain = -20 percent\n"
- ]
- }
- ],
- "source": [
- "#variable declaration\n",
- "d=0.1;\n",
- "mj_d=0.18;\n",
- "mn_d=0.08;\n",
- "\n",
- "#calculation\n",
- "e1=(mj_d-d)/d;\n",
- "e2=(mn_d-d)/d;\n",
- "\n",
- "#result\n",
- "print('\\nMajor Strain = %g percent \\nMinor Strain = %g percent')%(e1*100,e2*100);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_21.ipynb b/Mechanical_Metallurgy/Chapter_21.ipynb deleted file mode 100755 index 1f68c4e7..00000000 --- a/Mechanical_Metallurgy/Chapter_21.ipynb +++ /dev/null @@ -1,252 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 21: Machining of Metals"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 21.1, Mechanics of Machining, Page No. 685"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Shear Plane Angle for 1040 steel= 22.2946 deg\n",
- "\n",
- "Shear Plane Angle for Copper = 10.6433 deg\n"
- ]
- }
- ],
- "source": [
- "from scipy.optimize import fsolve\n",
- "from math import radians, degrees, pi, cos, sin\n",
- "\n",
- "#variable declaration\n",
- "a=6;\n",
- "sigma_s=60000.0;\n",
- "su_s=91000.0;\n",
- "sigma_c=10000.0;\n",
- "su_c=30000;\n",
- "a=radians(a);\n",
- "\n",
- "\n",
- "#calculation\n",
- "def s(fi):\n",
- " return cos(fi-a)*sin(fi)-sigma_s/su_s*(cos(pi/4-a/2)*sin(pi/4+a/2))\n",
- "def c(fi):\n",
- " return cos(fi-a)*sin(fi)-sigma_c/su_c*(cos(pi/4-a/2)*sin(pi/4+a/2))\n",
- "fi1=fsolve(s,0);\n",
- "fi2=fsolve(c,0);\n",
- "fi1=degrees(fi1);\n",
- "fi2=degrees(fi2);\n",
- "\n",
- "#result\n",
- "print('\\nShear Plane Angle for 1040 steel= %g deg')%(fi1);\n",
- "print('\\nShear Plane Angle for Copper = %g deg')%(fi2);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 21.2, Mechanics of Machining, Page No. 687"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Slip plane angle = 33.1927 deg\n",
- "Percentage of total energy that goes into friction = 30.918 percent\n",
- "Percentage of total energy that goes into shear = 69.082 percent\n",
- "Total energy per unit volume = 0.197285 hp min/in^3\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "from math import sin\n",
- "from math import cos\n",
- "from math import tan\n",
- "from math import atan\n",
- "from math import radians\n",
- "from math import sqrt\n",
- "from math import degrees\n",
- "\n",
- "#variable declaration\n",
- "v=500;\n",
- "alpha=6;\n",
- "b=0.4;\n",
- "t=0.008;\n",
- "Fv=100;\n",
- "Fh=250;\n",
- "L=20;\n",
- "rho=0.283;\n",
- "m=13.36;\n",
- "m=m/454; #conversion to lb\n",
- "\n",
- "#calculation\n",
- "tc=m/(rho*b*L);\n",
- "r=t/tc;\n",
- "alpha=radians(alpha);\n",
- "fi=atan(r*cos(alpha)/(1-r*sin(alpha)));\n",
- "#fi=degrees(fi);\n",
- "mu=(Fv+Fh*tan(alpha))/(Fh-Fv*tan(alpha));\n",
- "be=atan(mu);\n",
- "Pr=sqrt(Fv**2+Fh**2);\n",
- "Ft=Pr*sin(be);\n",
- "p_fe=Ft*r/Fh;\n",
- "Fs=Fh*cos(fi)-Fv*sin(fi);\n",
- "vs=v*cos(alpha)/cos(fi-alpha);\n",
- "p_se=Fs*vs/(Fh*v);\n",
- "U=Fh*v/(b*t*v);\n",
- "U=U/33000; #conversion to hp\n",
- "U=U/12; #conversion of ft units to in units\n",
- "fi=degrees(fi);\n",
- "\n",
- "#result\n",
- "print('\\nSlip plane angle = %g deg\\nPercentage of total energy that goes into friction = %g percent\\nPercentage of total energy that goes into shear = %g percent\\nTotal energy per unit volume = %g hp min/in^3')%(fi,p_fe*100,p_se*100,U);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 21.3, Tool Materials and Tool Life, Page No. 698"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "For High Speed steel tool, increase in tool life is given by: t2 = 322.54 t1\n",
- "\n",
- "For Cemented carbide tool, increase in tool life is given by: t2 = 10.0794 t1\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "d=0.5;\n",
- "\n",
- "#calculation\n",
- "t1=(1/d)**(1/0.12);\n",
- "t2=(1/d)**(1/0.3);\n",
- "\n",
- "#result\n",
- "print('\\nFor High Speed steel tool, increase in tool life is given by: t2 = %g t1')%(t1);\n",
- "print('\\nFor Cemented carbide tool, increase in tool life is given by: t2 = %g t1')%(t2);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 21.4, Grinding Processes, Page No. 703"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Tangential force = 24 N\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "U=40;\n",
- "uw=0.3;\n",
- "b=1.2;\n",
- "v=30;\n",
- "d=0.05;\n",
- "\n",
- "#calculation\n",
- "b=b*10**-3; #conversion to m\n",
- "d=d*10**-3; #conversion to m\n",
- "U=U*10**9; #conversion to Pa\n",
- "M=uw*b*d;\n",
- "P=U*M;\n",
- "F=P/v;\n",
- "\n",
- "#result\n",
- "print('Tangential force = %g N')%(F);\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_3.ipynb b/Mechanical_Metallurgy/Chapter_3.ipynb deleted file mode 100755 index 3168a0f9..00000000 --- a/Mechanical_Metallurgy/Chapter_3.ipynb +++ /dev/null @@ -1,212 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 3: Elements of the Theory of Plasticity"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 3.1, True Stress and True Strain, Page No. 76"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Engineering Stress at maximum load = 99852.1 psi\n",
- "True Fracture Stress = 112785 psi\n",
- "True Strain at fracture = 0.344939\n",
- "Engineering strain at fracture = 0.411903\n"
- ]
- }
- ],
- "source": [
- "from math import pi\n",
- "from math import log\n",
- "from math import exp\n",
- "\n",
- "#variable declaration\n",
- "D_i=0.505;\n",
- "L=2;\n",
- "P_max=20000;\n",
- "P_f=16000;\n",
- "D_f=0.425;\n",
- "\n",
- "#calculation\n",
- "E_St= P_max*4/(pi*D_i**2);\n",
- "T_fr_St= P_f*4/(pi*D_f**2);\n",
- "e_f=log(D_i**2/D_f**2);\n",
- "e=exp(e_f)-1;\n",
- "\n",
- "#result\n",
- "print('\\nEngineering Stress at maximum load = %g psi\\nTrue Fracture Stress = %g psi\\nTrue Strain at fracture = %g\\nEngineering strain at fracture = %g')%(E_St,T_fr_St,e_f,e);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 3.2, Yielding Criteria for Ductile Metals, Page No. 78"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Since the calculated value of sigma0 = 224.054 MPa, which is less than the yield strength of the aluminium alloy\n",
- "Thus safety factor is = 2.23161\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "sigma00=500;\n",
- "sigma_z=-50;\n",
- "sigma_y=100;\n",
- "sigma_x=200;\n",
- "T_xy=30;\n",
- "T_yz=0;\n",
- "T_xz=0;\n",
- "\n",
- "#calculation\n",
- "sigma0=sqrt((sigma_x-sigma_y)**2+(sigma_y-sigma_z)**2+(sigma_z-sigma_x)**2+6*(T_xy**2+T_yz**2+T_xz**2))/sqrt(2);\n",
- "s=sigma00/sigma0;\n",
- "\n",
- "#result\n",
- "print('\\nSince the calculated value of sigma0 = %g MPa, which is less than the yield strength of the aluminium alloy\\nThus safety factor is = %g')%(sigma0,s);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 3.3, Tresca Criterion, Page No. 81"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Since the calculated value of sigma0 = 250 MPa, which is less than the yield strength of the aluminium alloy\n",
- "Thus safety factor is = 2\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "sigma00=500;\n",
- "sigma_z=-50;\n",
- "sigma_y=100;\n",
- "sigma_x=200;\n",
- "T_xy=30;\n",
- "T_yz=0;\n",
- "T_xz=0;\n",
- "\n",
- "#calculation\n",
- "sigma0=sigma_x-sigma_z;\n",
- "s=sigma00/sigma0;\n",
- "\n",
- "#result\n",
- "print('\\nSince the calculated value of sigma0 = %g MPa, which is less than the yield strength of the aluminium alloy\\nThus safety factor is = %g')%(sigma0,s);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 3.4, Levy-Mises Equation, Page No. 91"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Plastic Strain = 0.199532\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "r_t=20;\n",
- "p=1000;\n",
- "\n",
- "#calculation\n",
- "sigma1=p*r_t;\n",
- "sigma1=sigma1/1000; #conversion to ksi\n",
- "sigma=sqrt(3)*sigma1/2;\n",
- "e=(sigma/25)**(1/0.25);\n",
- "e1=sqrt(3)*e/2;\n",
- "\n",
- "#result\n",
- "print('\\nPlastic Strain = %g')%(e1);\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_4.ipynb b/Mechanical_Metallurgy/Chapter_4.ipynb deleted file mode 100755 index 4d124b41..00000000 --- a/Mechanical_Metallurgy/Chapter_4.ipynb +++ /dev/null @@ -1,82 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 4: Plastic Deformation of Single Crystals"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 4.1, Critical Resolved Shear Stress for Slip, Page No. 125"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Tensile Stress applied = 14.6969 MPa\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "import numpy as np\n",
- "\n",
- "#variable declaration\n",
- "a=[1,-1,0];\n",
- "n=[1,-1,-1];\n",
- "s=[0,-1,-1];\n",
- "Tr=6;\n",
- "\n",
- "#calculation\n",
- "cos_fi=np.dot(a,n)/(sqrt(a[0]**2+a[1]**2+a[2]**2)*sqrt(n[0]**2+n[1]**2+n[2]**2));\n",
- "cos_lm=np.dot(a,s)/(sqrt(a[0]**2+a[1]**2+a[2]**2)*sqrt(s[0]**2+s[1]**2+s[2]**2));\n",
- "sigma=Tr/(cos_fi*cos_lm);\n",
- "\n",
- "#result\n",
- "print('Tensile Stress applied = %g MPa')%(sigma);"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_5.ipynb b/Mechanical_Metallurgy/Chapter_5.ipynb deleted file mode 100755 index 50279cb5..00000000 --- a/Mechanical_Metallurgy/Chapter_5.ipynb +++ /dev/null @@ -1,74 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 5: Dislocation theory"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 5.1, Forces Between Dislocations, Page No. 166"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "The Total force on the dislocation is = 1.32629e-07 N\n"
- ]
- }
- ],
- "source": [
- "#variable declaration\n",
- "from math import pi\n",
- "G=40;\n",
- "G=G*10**9; #conversion to N/m^2\n",
- "b=2.5;\n",
- "b=b*10**-10; #conversion to m\n",
- "r=1200;\n",
- "r=r*10**-10; #conversion to m\n",
- "l=0.04;\n",
- "l=l*10**-3; #conversion to m\n",
- "\n",
- "#calculation\n",
- "F=G*b**2/(2*pi*r);\n",
- "Ft=F*l;\n",
- "\n",
- "#result\n",
- "print('The Total force on the dislocation is = %g N')%(Ft);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_6.ipynb b/Mechanical_Metallurgy/Chapter_6.ipynb deleted file mode 100755 index f1ec6bb6..00000000 --- a/Mechanical_Metallurgy/Chapter_6.ipynb +++ /dev/null @@ -1,223 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 6: Strengthening Mechanisms"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 6.1, Grain Size Measurement, Page No. 193"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Yield Stress = 254.464 MPa\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "sigma_i=150;\n",
- "k=0.7;\n",
- "n=6;\n",
- "\n",
- "#calculation\n",
- "N_x=2**(n-1);\n",
- "N=N_x/(0.01)**2; #in grains/in^2\n",
- "N=N*10**6/25.4**2; # in grains/m^2\n",
- "D=sqrt(1/N);\n",
- "sigma0=sigma_i+k/sqrt(D);\n",
- "\n",
- "#result\n",
- "print ('\\nYield Stress = %g MPa')%(sigma0);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 6.2, Strengthing Mechanism, Page No. 219"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Particle Spacing = 2.3e-08 m\n",
- "Particle Size = 7.35948e-10 m\n"
- ]
- }
- ],
- "source": [
- "#variable declaration\n",
- "sigma0=600;\n",
- "G=27.6;\n",
- "G=G*10**9 #conversion to Pa\n",
- "b=2.5*10**-8;\n",
- "b=b*10**-2; #conversion to m\n",
- "T0=sigma0/2;\n",
- "T0=T0*10**6; #conversion to Pa\n",
- "\n",
- "#calculation\n",
- "lambda1=G*b/T0;\n",
- "Cu_max=54;\n",
- "Cu_eq=4;\n",
- "Cu_min=0.5;\n",
- "rho_al=2.7;\n",
- "rho_theta=4.43;\n",
- "wt_a=(Cu_max-Cu_eq)/(Cu_max-Cu_min);\n",
- "wt_theta=(Cu_eq-Cu_min)/(Cu_max-Cu_min);\n",
- "V_a=wt_a/rho_al;\n",
- "V_theta=wt_theta/rho_theta;\n",
- "f=V_theta/(V_a+V_theta);\n",
- "r=(3*f*lambda1)/(4*(1-f));\n",
- "\n",
- "#result\n",
- "print('\\nParticle Spacing = %g m\\nParticle Size = %g m')%(lambda1,r);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 6.3, Fiber Strengthing, Page No. 222"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Ec for 10 vol% = 92 GPa\n",
- "\n",
- "\n",
- "Ec for 60 vol% = 252 GPa\n",
- "\n"
- ]
- }
- ],
- "source": [
- "#variable declaration\n",
- "Ef=380;\n",
- "Em=60;\n",
- "\n",
- "#calculation\n",
- "#Case 1\n",
- "f_f1=0.1;\n",
- "Ec1=Ef*f_f1+(1-f_f1)*Em;\n",
- "\n",
- "#Case 2\n",
- "f_f2=0.6;\n",
- "Ec2=Ef*f_f2+(1-f_f2)*Em;\n",
- "\n",
- "#result\n",
- "print('\\nEc for 10 vol%% = %g GPa\\n')%(Ec1);\n",
- "print('\\nEc for 60 vol%% = %g GPa\\n')%(Ec2);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 6.4, Load Transfer, Page No. 225"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "sigma_cu = 2.55 GPa for L=100um\n",
- "\n",
- "sigma_cu = 0.596875 GPa for L=2mm\n"
- ]
- }
- ],
- "source": [
- "#variable declaration\n",
- "sigma_fu=5;\n",
- "sigma_fu=sigma_fu*10**9; #Conversion to Pa\n",
- "sigma_m=100;\n",
- "sigma_m=sigma_m*10**6; #Conversion to Pa\n",
- "T0=80;\n",
- "T0=T0*10**6; #Conversion to Pa\n",
- "f_f=0.5;\n",
- "d=100;\n",
- "d=d*10**-6;\n",
- "B=0.5;\n",
- "L1=10;\n",
- "L1=L1*10**2; #conversion to m\n",
- "Lc=sigma_fu*d/(2*T0);\n",
- "sigma_cu1=sigma_fu*f_f*(1-Lc/(2*L1))+sigma_m*(1-f_f);\n",
- "sigma_cu1=sigma_cu1*10**-9;\n",
- "print('\\nsigma_cu = %g GPa for L=100um\\n')%(sigma_cu1);\n",
- "\n",
- "L2=2;\n",
- "L2=L2*10**-3; #conversion to m\n",
- "sigma_cu2=sigma_fu*f_f*(1-Lc/(2*L2))+sigma_m*(1-f_f);\n",
- "sigma_cu2=sigma_cu2*10**-9;\n",
- "print('sigma_cu = %g GPa for L=2mm')%(sigma_cu2);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_7.ipynb b/Mechanical_Metallurgy/Chapter_7.ipynb deleted file mode 100755 index 9111bb76..00000000 --- a/Mechanical_Metallurgy/Chapter_7.ipynb +++ /dev/null @@ -1,113 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 7: Fracture"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 7.1, Cohesive Strength, Page No. 245"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Cohesive strength of a silica fiber = 24.367 GPa\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "E=95;\n",
- "E=E*10**9;\n",
- "Ys=1000;\n",
- "Ys=Ys*10**-3; #conversion to J/m^2\n",
- "a0=1.6;\n",
- "a0=a0*10**-10; #conversion to m\n",
- "\n",
- "#calculation\n",
- "sigma_max=sqrt(E*Ys/a0)\n",
- "sigma_max=sigma_max*10**-9;\n",
- "\n",
- "#result\n",
- "print('Cohesive strength of a silica fiber = %g GPa')%(sigma_max);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 7.2, Fracture Stress, Page No. 246"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Fracture Stress = 100 MPa\n"
- ]
- }
- ],
- "source": [
- "from math import sqrt\n",
- "\n",
- "#variable declaration\n",
- "E=100;\n",
- "E=E*10**9;\n",
- "Ys=1;\n",
- "a0=2.5*10**-10;\n",
- "c=10**4*a0;\n",
- "\n",
- "#calculation\n",
- "sigma_f=sqrt(E*Ys/(4*c));\n",
- "sigma_f=sigma_f*10**-6;\n",
- "\n",
- "#result\n",
- "print('Fracture Stress = %g MPa')%(sigma_f);"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Mechanical_Metallurgy/Chapter_8.ipynb b/Mechanical_Metallurgy/Chapter_8.ipynb deleted file mode 100755 index 9609602d..00000000 --- a/Mechanical_Metallurgy/Chapter_8.ipynb +++ /dev/null @@ -1,255 +0,0 @@ -{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Chapter 8: The Tension Test"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Example 8.1, Standard properties of the material, Page No. 281"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "Ultimate Tensile Strength = 92363.2 psi\n",
- "0.2 percent offset yield strength = 74889.1 psi\n",
- "Breaking Stress = 80880.2 psi\n",
- "Elongation = 26.5 percent\n",
- "Reduction of Area = 61.092 percent\n",
- "\n",
- "\n",
- "Note: Slight Computational Errors in book\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import pi\n",
- "\n",
- "#variable declaration\n",
- "D=0.505;\n",
- "Lo=2;\n",
- "Lf=2.53;\n",
- "Py=15000;\n",
- "Pmax=18500;\n",
- "Pf=16200;\n",
- "D_f=0.315;\n",
- "\n",
- "#calculation\n",
- "A0=pi*D**2/4;\n",
- "Af=pi*D_f**2/4;\n",
- "s_u=Pmax/A0;\n",
- "s0=Py/A0;\n",
- "s_f=Pf/A0;\n",
- "e_f=(Lf-Lo)/Lo;\n",
- "q=(A0-Af)/A0;\n",
- "\n",
- "#result\n",
- "print('\\nUltimate Tensile Strength = %g psi\\n0.2 percent offset yield strength = %g psi\\nBreaking Stress = %g psi\\nElongation = %g percent\\nReduction of Area = %g percent\\n\\n\\nNote: Slight Computational Errors in book')%(s_u,s0,s_f,e_f*100,q*100);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 8.2, True Strain, Page No. 288"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "True Strain to fracture using changes in length = 0.405465\n",
- "True Strain to fracture using changes in area = 0.405465\n",
- "\n",
- "\n",
- "\n",
- "For More ductile metals\n",
- "True Strain to fracture using changes in length = 0.729961\n",
- "True Strain to fracture using changes in diameter = 0.940007\n"
- ]
- }
- ],
- "source": [
- "\n",
- "from math import log\n",
- "\n",
- "#case 1\n",
- "#variable declaration\n",
- "Af=100.0;\n",
- "Lf1=60.0;\n",
- "A0=150.0;\n",
- "L01=40.0;\n",
- "Lf=83.0;\n",
- "L0=40.0;\n",
- "Df=8.0;\n",
- "D0=12.8;\n",
- "\n",
- "#calculation\n",
- "L1=float (Lf1/L01);\n",
- "A1=float (A0/Af);\n",
- "ef11=log(L1);\n",
- "ef21=log(A1);\n",
- "L2=(Lf/L0);\n",
- "D2=D0/Df;5\n",
- "ef12=log(L2);\n",
- "ef22=2*log(D2);\n",
- "\n",
- "#result\n",
- "print('\\nTrue Strain to fracture using changes in length = %g\\nTrue Strain to fracture using changes in area = %g')%(ef11,ef21);\n",
- "print('\\n\\n\\nFor More ductile metals\\nTrue Strain to fracture using changes in length = %g\\nTrue Strain to fracture using changes in diameter = %g')%(ef12,ef22);\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 8.3, Ultimate Tensile Strength, Page No. 290"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Ultimate Tensile Strength = 99729.2 psi\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "from math import exp\n",
- "\n",
- "#variable declaration\n",
- "def sigma(e):\n",
- " return 200000*e**0.33;\n",
- "E_u=0.33;\n",
- "\n",
- "#calculation\n",
- "sigma_u=sigma(E_u);\n",
- "s_u=sigma_u/exp(E_u);\n",
- "\n",
- "#result\n",
- "print('Ultimate Tensile Strength = %g psi')%(s_u);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Example 8.4, Effect of Strain Rate, Page No. 298"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n",
- "At 70deg F\n",
- "\n",
- "sigma_a = 10.2 ksi\n",
- "sigma_b = 13.8229 ksi\n",
- "sigma_b/sigma_a = 1.35519\n",
- "\n",
- "\n",
- "\n",
- "At 825deg F\n",
- "\n",
- "sigma_a = 2.1 ksi\n",
- "sigma_b = 5.54906 ksi\n",
- "sigma_b/sigma_a = 2.64241\n",
- "\n"
- ]
- }
- ],
- "source": [
- "\n",
- "\n",
- "#variable declaration\n",
- "C_70=10.2;\n",
- "C_825=2.1;\n",
- "m_70=0.066;\n",
- "m_825=0.211;\n",
- "e1=1;\n",
- "e2=100;\n",
- "\n",
- "#calculation 1\n",
- "print('\\nAt 70deg F\\n');\n",
- "sigma_a=C_70*e1**m_70;\n",
- "sigma_b=C_70*e2**m_70;\n",
- "\n",
- "#result 1\n",
- "print('sigma_a = %g ksi\\nsigma_b = %g ksi\\nsigma_b/sigma_a = %g\\n')%(sigma_a,sigma_b,sigma_b/sigma_a);\n",
- "\n",
- "\n",
- "#calculation 2\n",
- "print('\\n\\nAt 825deg F\\n');\n",
- "sigma_a=C_825*e1**m_825;\n",
- "sigma_b=C_825*e2**m_825;\n",
- "\n",
- "#result 2\n",
- "print('sigma_a = %g ksi\\nsigma_b = %g ksi\\nsigma_b/sigma_a = %g\\n')%(sigma_a,sigma_b,sigma_b/sigma_a);\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 2",
- "language": "python",
- "name": "python2"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
|