{ "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": {} } ] }