{
 "metadata": {
  "name": "",
  "signature": "sha256:ccc34ac1a23df3ea87c02161eb6957101119525a84db5440299d3d3e0c490bb9"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11 :\n",
      "Deformation of Materials"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1 Page No : 369"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "h_1 = 1;\n",
      "k_1 = 1;\n",
      "l_1 = 1;\n",
      "#Miller indices of slip plane\n",
      "h_2 = 1;\n",
      "k_2 = -1;\n",
      "l_2 = 1;\n",
      "#Miller indices of stress plane\n",
      "h_3 = 1;\n",
      "k_3 = 1;\n",
      "l_3 = 0;\n",
      "\n",
      "# Calculation\n",
      "#Miller indices of slip direction\n",
      "A = (h_1*h_2+k_1*k_2+l_1*l_2)/(((h_1**2+k_1**2+l_1**2)**(1./2))*((h_2**2+k_2**2+l_2**2)**(1./2)));\t\t\t#Value of math.cos(x) where x  = angle between slip plane and stress plane\n",
      "B = (h_1*h_3+k_1*k_3+l_1*l_3)/(((h_1**2+k_1**2+l_1**2)**(1./2))*((h_3**2+k_3**2+l_3**2)**(1./2)));\t\t\t#Value of math.cos(y) where y  = angle between slip direction and stress direction\n",
      "C = (1-A**2)**(1./2);\t\t\t#Value of math.sin(x)\n",
      "stress = 3.5;\t\t\t#Applied Stress in Mpa\n",
      "T_cr = stress*A*B*C;\t\t\t#Critical resolved shear stress(in MPa)\n",
      "\n",
      "# Results\n",
      "print 'Critical resolved shear stress in = %.3f MPa'%T_cr\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical resolved shear stress in = 0.898 MPa\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.3 Page No : 370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "D = 0.022;\t\t\t#Grain diameter(in mm)\n",
      "d = D*10**(-3);\t\t\t#Grain diameter(in m)\n",
      "K = 0.63;\t\t\t#Constant(in MNm**(-3/2))\n",
      "\n",
      "# Calculation\n",
      "sigma_i = 80;\t\t\t#in MNm**-2\n",
      "sigma_y = sigma_i+K*d**(-1./2);\t\t\t#Yield stress for a polycrystalline alloy\n",
      "\n",
      "# Results\n",
      "print 'Yield stress for a polycrystalline alloy in = %.2f MN/m**2'%sigma_y\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Yield stress for a polycrystalline alloy in = 214.32 MN/m**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.4 Page No : 370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "sigma_y1 = 120;\t\t\t#primary yield strength of polycrystalline material(in MN*m**-2)\n",
      "sigma_y2 = 220;\t\t\t#increased yield strength of polycrystalline material(in MN*m**-2)\n",
      "d_1 = 0.04*10**(-3);\t\t\t#primary grain diameter(in meter)\n",
      "d_2 = 0.01*10**(-3);\t\t\t#grain diameter after decreasing(in meter)\n",
      "\n",
      "# Calculation\n",
      "#sigma_y1 = sigma_i+K*(d_1)**(-1/2)\n",
      "#sigma_y2 = sigma_i+K*(d_2)**(-1/2)\n",
      "#putting the values and solving the equation\n",
      "K = (220-120)/((d_2**(-1./2))-((d_1**(-1./2))));\t\t\t#consmath.tant(in MN*m(-3/2))\n",
      "sigma_i = sigma_y1-K*(d_1)**(-1./2);\t\t\t#in MN*m**-2\n",
      "d = 1./((10**4)*(256./645))**(1./2);\t\t\t#grain diameter for grain size ASTM 9(in mm)\n",
      "D = d*10**(-3);\t\t\t                        #grain diameter for grain size ASTM 9(in meter)\n",
      "sigma_y = sigma_i+K*(D)**(-1./2);\t\t\t#Yield stress for a polycrystalline alloy for grain size ASTM 9(in MN*m**-2)\n",
      "\n",
      "# Results\n",
      "print 'Yield stress for a polycrystalline alloy for grain size ASTM 9 in = %.0f MN*m**-2'%round(sigma_y)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Yield stress for a polycrystalline alloy for grain size ASTM 9 in = 179 MN*m**-2\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}