summaryrefslogtreecommitdiff
path: root/Material_Science_In_Engineering/ch9.ipynb
blob: 078d890f5daf66a04ce014f153322f1dd7d63206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9 : Microstructural Examination and Non-Destructive Testing"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 9.1 pageno : 228"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "n = 2.**(12-1);\t\t\t#astm no. = 12\n",
      "\t\n",
      "# Calculations\n",
      "#1 sq inch = 645mm**2\n",
      "d = 1./math.sqrt((n/645)*10**4);\t\t\t#grain diameter in mm\n",
      "\n",
      "# Results\n",
      "print \"grain diameter for ASTM no. 12 (in mm)  =  %.4f mm\"%d\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "grain diameter for ASTM no. 12 (in mm)  =  0.0056 mm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 9.2 pageno : 228"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "n = 2**(5-1);\t\t\t#astm no.  =  5 in grain/inch**2\n",
      "\n",
      "# Calculations\n",
      "#Lineal and Areal magnifications are related as *100 Lineal  =  *10000 Areal\n",
      "x = n/(.01*.01);\t\t\t#in grain/inch**2 at 1 x.\n",
      "a = 1./x;       \t\t\t#average area in inch**2\n",
      "a1 = 2.54*2.54*a;\t\t\t#average area in cm.**2\n",
      "l = math.sqrt(x);\t\t\t#grains/inch of length\n",
      "s = (1./l)**2;  \t\t\t#surface area in sq inch\n",
      "s6 = 6.*s;\t\t        \t#surface area of 6 surfaces of cubic grain in sq inch\n",
      "b = 0.5*s6*(l**3);\t\t\t#total boundary area in sq inch\n",
      "b1 = b/(2.54);\t\t\t    #total boundary area in sq cm\n",
      "\n",
      "# Results\n",
      "print \"Average area of one grain (in sq cm)  =  %.2e cm**2\"%a1\n",
      "print \"Boundary Area per cubic centimetre of steel (in sq cm)  =  %.1f cm**2\"%b1\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average area of one grain (in sq cm)  =  4.03e-05 cm**2\n",
        "Boundary Area per cubic centimetre of steel (in sq cm)  =  472.4 cm**2\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}