{
 "metadata": {
  "name": "",
  "signature": "sha256:832a91ae4051faf82e71f1eeca9ef1ab61ad84ac2a8a6a3e0aeb6be4b007f372"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Ch-11, Theories of inelastic, enelastic and viscoelastic deformation and fracture"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.1 page no- 343"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import sqrt\n",
      "#given\n",
      "#applied stress\n",
      "sigmax=3.5  #MPa\n",
      "#aluminium crystal slips from (111) plane in the direction (110) when the stess is applied to (1-11)\n",
      "#so\n",
      "h1=1\n",
      "k1=1\n",
      "l1=1\n",
      "h2=1\n",
      "k2=-1\n",
      "l2=1\n",
      "#magnitude of plane (111)\n",
      "M1=sqrt(h1**2+k1**2+l1**2)\n",
      "#magnitude of (1-11)\n",
      "M2=sqrt(h2**2+k2**2+l2**2)\n",
      "#direction (110)\n",
      "h3=1\n",
      "k3=1\n",
      "l3=0\n",
      "#magnitude of direction(110)\n",
      "M3=sqrt(h3**2+k3**2+l3**2)\n",
      "#the angle between the planes (111) and (1-11) is \n",
      "cosphie=((h1*h2+k1*k2+l1*l2)/(M1*M2))\n",
      "sinphie=sqrt(1-(cosphie)**2)\n",
      "#similarly angle between the plane (111) and the direction (110) is given by\n",
      "costheta=((h1*h3+k1*k3+l1*l3)/(M1*M3))  \n",
      "#critical resolved shear stress\n",
      "taucr=sigmax*2*sinphie*cosphie*costheta/2  #MPa\n",
      "print \"the critical resolved shear stress is %0.3f MPa\"%(taucr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the critical resolved shear stress is 0.898 MPa\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "exaplme-11.2 page no-351"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "#shera stress\n",
      "tau=715*10**6  #Pa\n",
      "#shear modulus\n",
      "G=25*10**9  #Pa\n",
      "#atomic radius\n",
      "b=4.05*10**-10  #m\n",
      "#as we know that \n",
      "#tau=G*b/l\n",
      "#so\n",
      "l=G*b/tau  #m\n",
      "print \"the length of frank- read source in aluminium crystal is %.10f m\"%(l)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the length of frank- read source in aluminium crystal is 0.0000000142 m\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.2 page no-351"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "#shear modulous\n",
      "G=25*10**9  #Pa\n",
      "#shear stress\n",
      "tau=50*10**6  #Pa\n",
      "#lattice constant of aluminium is\n",
      "a=4.05*10**-10  #m\n",
      "#burger's vector for aluminium is 1/2(110)\n",
      "h=1\n",
      "k=1\n",
      "l=0\n",
      "#atomic radius of aluminium \n",
      "b=a/sqrt(h**2+k**2+l**2) # m\n",
      "#as we know that\n",
      "#tau=G*b/L\n",
      "#so\n",
      "L=G*b/tau  #m\n",
      "#disloaction density is rhoD (let)\n",
      "rhoD =1/L**2  # per m**2   (calculation mistake, there in book formula written is correct but calculation is wrong)\n",
      "print \"the dislocation density is %0.3e per m**2\"%(rhoD)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the dislocation density is 4.877e+13 per m**2\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.4 page no-352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "#burger vector\n",
      "b=4*10**-10  #m\n",
      "#density\n",
      "N=10**13  #lines/m**2\n",
      "#velocity\n",
      "v=10**-5  #m/s\n",
      "#rate of straining\n",
      "epsilonP=N*b*v  #lines/sec\n",
      "print \"the rate of starining is %0.3f lines/sec\"%(epsilonP)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rate of starining is 0.040 lines/sec\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.5 page no-357"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log, exp\n",
      "#given\n",
      "#conventional stress\n",
      "sigmac=98.9  #MPa\n",
      "#conventional strain\n",
      "epsilonc=0.35  #mm/mm\n",
      "#as we know that\n",
      "epsilont=log(1+epsilonc)   #mm/mm\n",
      "#also\n",
      "#sigmac=sigmat*exp(-epsilont)  \n",
      "#so\n",
      "sigmat=sigmac/exp(-epsilont)  #MPa\n",
      "print \"the true strees is %0.3f MPa\\n and true strain is %0.3f mm/mm\"%(sigmat,epsilont)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the true strees is 133.515 MPa\n",
        " and true strain is 0.300 mm/mm\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.6 page no-357"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "#material constant\n",
      "K=500  #MPa\n",
      "#strain hardenening coefficient\n",
      "n=0.20\n",
      "#according to true stress-strain relation\n",
      "#sigmat=d sigmat/d epsilont=d(Kepsilont**n)/d epsilont\n",
      "#so we get\n",
      "#sigmat=n*K*epsilont**(n-1)  -----(1)\n",
      "#also we know that\n",
      "#sigmat=K*epsilont**n  ------------(2)\n",
      "#equating (1) and (2)\n",
      "epsilont=n\n",
      "#also we know that\n",
      "#epsilont=log (1+epsilonc)\n",
      "#so\n",
      "epsilonc=exp(epsilont)-1  \n",
      "#now\n",
      "sigmat=K*epsilont**n  #MPa\n",
      "print \"\"\"the maximum tensile strength %0.3f\n",
      "the linear strain are %0.3f MPa\"\"\"%(epsilonc,sigmat)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the maximum tensile strength 0.221\n",
        "the linear strain are 362.390 MPa\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "exapmle-11.7 page no-363"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "#applied strain\n",
      "epsilon=0.4\n",
      "#immediate stress\n",
      "sigmai=10*10**9  #Pa\n",
      "#after 42 days stress is\n",
      "sigma=5*10**9  #Pa\n",
      "t=42  #days\n",
      "#as we know that\n",
      "#sigma=sigmai*exp(-t/tr)\n",
      "#so\n",
      "tr=t/log(sigmai/sigma)   #days\n",
      "#stress after 90 days\n",
      "t90=90 #days\n",
      "sigma90=sigmai*exp(-t90/tr)*10**-9   #MPa\n",
      "print \"\"\"relaxation time for the tensile stress to decrease from 10 to 5 MPa is %0.3f days\n",
      "the stress after 90 days is %0.3f MPa\"\"\"%(tr,sigma90)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relaxation time for the tensile stress to decrease from 10 to 5 MPa is 60.593 days\n",
        "the stress after 90 days is 2.264 MPa\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.8 page no-370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "#given\n",
      "#crack length of glass piece\n",
      "l=3*10**-6/2  #m divided by 2 because min general we consider 2*l be the length of crack\n",
      "#young modulus\n",
      "E=70*10**9  #Pa\n",
      "#specific surface energy\n",
      "gammae=1.05  #/J/m**2\n",
      "#fracture strength\n",
      "sigmaf=sqrt(2*E*gammae/(pi)/l) #N/m**2\n",
      "#ratio of strength and young's modulus\n",
      "R=sigmaf/E   \n",
      "print \"\"\"fracture strength is %0.3e N/m**2\n",
      "the ratio of strength and youngs modulus is %0.3f\"\"\"%(sigmaf,R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "fracture strength is 1.766e+08 N/m**2\n",
        "the ratio of strength and youngs modulus is 0.003\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "exaple-11.9 page no-370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "#young's modulus\n",
      "E=71*10**9   #Pa\n",
      "#fracture strength\n",
      "sigmaf=115*10**6  #Pa\n",
      "#lenght of crack\n",
      "#2l=6 micro m\n",
      "#so\n",
      "l=6/2*10**-6  #m\n",
      "#as we know that\n",
      "#sigmaf=sqrt(2*E*sigmac/(pi)/l)\n",
      "#so\n",
      "sigmac=(sigmaf)**2*(pi)*l/2/E  #J/m**2 \n",
      "print \"surface energy of the etched glass is %0.3f J/m**2\"%(sigmac)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "surface energy of the etched glass is 0.878 J/m**2\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.10 page no-370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "E=70*10**9  #Pa\n",
      "gammae=0.85  #J/m**2\n",
      "l=2*10**-6  #m\n",
      "#necessary stress to satisfy the griffith's energy\n",
      "sigmaf=sqrt(2*E*gammae/(pi)/l)/10**6 #Pa\n",
      "print \"the necessary stress is %0.3f MPa\"%(sigmaf)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the necessary stress is 137.621 MPa\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "example-11.11 page 371"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "E=72*10**9  #Pa\n",
      "gammae=0.9  #J/m**2\n",
      "sigmaf=17.5*10**6  #Pa\n",
      "#as we know that\n",
      "#sigmaf=sqrt(2*E*gammae/(pi)/l) #N/m**2\n",
      "#so\n",
      "l=2*E*gammae/(pi)/(sigmaf)**2*1000  #mm\n",
      "#length of intenal crack\n",
      "L=2*l  #m\n",
      "print \"\"\"length of crack on the outer surface is %0.3f mm\n",
      "length of crack internally %0.3f mm\"\"\"%(l,L)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "length of crack on the outer surface is 0.135 mm\n",
        "length of crack internally 0.269 mm\n"
       ]
      }
     ],
     "prompt_number": 26
    }
   ],
   "metadata": {}
  }
 ]
}