{

 "metadata": {

  "name": "",

  "signature": "sha256:12bc74eaed4218a18fa109df85a443dc199f78a3b2cafffe1198babaf1458444"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter08:Deformation of Metals"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.1:pg-175"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Example 8.1: critical resolved shear stress of silver\n",

      " \n",

      "\n",

      "Ts=15;#tensile stress in Mpa\n",

      "d=[1,1,0];\n",

      "d1=[1,1,1];\n",

      "csda=((d[0]*d1[0])+(d[1]*d1[1])+(d[2]*d1[2]))/((math.sqrt(d[0]**2+d[1]**2+d[2]**2))*math.sqrt(d1[0]**2+d1[1]**2+d1[2]**2));#angle degree\n",

      "d2=[0,1,1];\n",

      "csdb=((d[0]*d2[0])+(d[1]*d2[1])+(d[2]*d2[2]))/((math.sqrt(d[0]**2+d[1]**2+d[2]**2))*math.sqrt(d2[0]**2+d2[1]**2+d2[2]**2));#angle degree\n",

      "t=Ts*csda*csdb;#critical resolved shear stress in MPa\n",

      "print round(t,2),\"= critical resolved shear stress in MPa\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "6.12 = critical resolved shear stress in MPa\n"

       ]

      }

     ],

     "prompt_number": 11

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.2:pg-186"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Example 8.2: yield strength of material\n",

      " \n",

      "import numpy.linalg as lin\n",

      "import math\n",

      "ys1=115;# yeild strength in MN/mm**2\n",

      "ys2=215;# yeild strength in MN/mm**2\n",

      "d1=0.04;#diamtere in mm\n",

      "d2=0.01;#diamtere in mm\n",

      "A=numpy.array([[2 ,10], [1 ,10]]);\n",

      "B=numpy.array([230,215]);\n",

      "x=lin.solve(A,B)\n",

      "si=x[0];# in MN/mm**2\n",

      "k=x[1];#\n",

      "d3=0.016;#in mm\n",

      "sy= si +(k/math.sqrt(d3));#yeild strength for a grain size in MN/mm**2\n",

      "print round(sy,1),\"=yeild strength for a grain size in MN/mm**2\"\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "173.1 =yeild strength for a grain size in MN/mm**2\n"

       ]

      }

     ],

     "prompt_number": 1

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.3:pg-186"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Example 8.3: yield strength of material\n",

      "import numpy.linalg as lin\n",

      "import math\n",

      "ys1=120;# yeild strength in MN/mm**2\n",

      "ys2=220;# yeild strength in MN/mm**2\n",

      "d1=0.04;#diamtere in mm\n",

      "d2=0.01;#diamtere in mm\n",

      "A=numpy.array([[2 ,10], [1 ,10]]);\n",

      "B=numpy.array([240,220]);\n",

      "x=lin.solve(A,B)\n",

      "si=x[0];# in MN/mm**2\n",

      "k=x[1];#\n",

      "d3=0.025;#in mm\n",

      "sy= si +(k/math.sqrt(d3));#yeild strength for a grain size in MN/mm**2\n",

      "print round(sy,1),\"= yeild strength for a grain size in MN/mm**2\"\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "146.5 = yeild strength for a grain size in MN/mm**2\n"

       ]

      }

     ],

     "prompt_number": 2

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex18.4:pg-193"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Example 8.4 : grain diameter\n",

      "import math \n",

      "\n",

      "#given data :\n",

      "N=9; # ASTM number\n",

      "m=8*2**N; # no. of grains [er square millimetre\n",

      "grain=1/math.sqrt(m);\n",

      "print round(grain,4),\"=the grain diameter(mm)  \"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "0.0156 =the grain diameter(mm)  \n"

       ]

      }

     ],

     "prompt_number": 2

    }

   ],

   "metadata": {}

  }

 ]

}