diff options
Diffstat (limited to 'Materials_science_and_engineering_an_introduction/CH3.ipynb')
-rw-r--r-- | Materials_science_and_engineering_an_introduction/CH3.ipynb | 376 |
1 files changed, 376 insertions, 0 deletions
diff --git a/Materials_science_and_engineering_an_introduction/CH3.ipynb b/Materials_science_and_engineering_an_introduction/CH3.ipynb new file mode 100644 index 00000000..c521d51b --- /dev/null +++ b/Materials_science_and_engineering_an_introduction/CH3.ipynb @@ -0,0 +1,376 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Metallic Crystal Structure"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page No: 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determination of FCC Unit Cell Volume\n",
+ "\n",
+ "#Given\n",
+ "#For FCC a=2*R*math.sqrt(2)\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Calculation \n",
+ "R=Symbol('R') \n",
+ "#Edge Length\n",
+ "a=2*R*round(math.sqrt(2),2)\n",
+ "#Volume determination\n",
+ "V=a**3\n",
+ "\n",
+ "#result\n",
+ "print\"Volume is\",V,\" m**3\"\n",
+ "print\"which is also equal to 16*sqrt(2)*R**3\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume is 22.425768*R**3 m**3\n",
+ "which is also equal to 16*sqrt(2)*R**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.2 Page No: 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Computation of the Atomic Packing Factor for FCC\n",
+ "\n",
+ "#Given\n",
+ "#for FCC no. of atoms are 4\n",
+ "n=4\n",
+ "#For FCC a=2*R*math.sqrt(2)\n",
+ "R=1 #say\n",
+ "\n",
+ "#Calculation\n",
+ "#Edge Length\n",
+ "a=2*R*math.sqrt(2)\n",
+ "#Volume determination of cube\n",
+ "Vc=a**3\n",
+ "#Volume of sphere\n",
+ "Vs=n*4*math.pi*R**3/3.0\n",
+ "#Atomic packing Fraction\n",
+ "APF=Vs/Vc\n",
+ "\n",
+ "#Result\n",
+ "print\"Atomic packing fraction is\",round(APF,2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Atomic packing fraction is 0.74\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page No: 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Theoretical Density Computation for Copper\n",
+ "\n",
+ "#Given\n",
+ "R=1.28*10**-8 #Atomic radius in cm\n",
+ "A_Cu=63.5 #Atomic wt of copper\n",
+ "n=4 #For FCC\n",
+ "Na=6.023*10**23 #Avogadro no.\n",
+ "\n",
+ "#Calculation\n",
+ "a=2*R*math.sqrt(2)\n",
+ "Vc=a**3\n",
+ "den=n*A_Cu/(Vc*Na)\n",
+ "\n",
+ "#result\n",
+ "print\"Density is \",round(den,2),\"g/cm**3\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density is 8.89 g/cm**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.6 Page No: 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determination of Directional Indices\n",
+ "\n",
+ "#Given\n",
+ "#Projection of given vector\n",
+ "a=1/2.0\n",
+ "b=1\n",
+ "c=0\n",
+ "\n",
+ "x=[2*a,2*b,2*c]\n",
+ "\n",
+ "#Result\n",
+ "print\"The intercept for the given plane is\",x\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The intercept for the given plane is [1.0, 2, 0]\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.8 Page No: 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determination of Directional Indices for a Hexagonal Unit Cell\n",
+ "\n",
+ "#Given\n",
+ "#Projection in terms of unit cell parameter\n",
+ "du=1\n",
+ "dv=1\n",
+ "dw=1\n",
+ "\n",
+ "#Calculation\n",
+ "#For hexagonal system\n",
+ "u=(2*du-dv)/3.0\n",
+ "v=(2*dv-du)/3.0\n",
+ "t=-(u+v)\n",
+ "w=dw\n",
+ "\n",
+ "x=[3*u,3*v,3*t,3*w]\n",
+ "print\"The indices for the given directions are\",x\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The indices for the given directions are [1.0, 1.0, -2.0, 3]\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.9 Page No: 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determination of Planar (Miller) Indices\n",
+ "\n",
+ "#Given\n",
+ "a=-1\n",
+ "b=1/2.0\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "#Reciprocal\n",
+ "l=0 #Reciprocal of infinity\n",
+ "m=1/a\n",
+ "n=1/b\n",
+ "x=[l,m,n]\n",
+ "\n",
+ "#Result\n",
+ "print\"The intercept for the given plane is\",x\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The intercept for the given plane is [0, -1, 2.0]\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.11 Page No: 59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Determination of Miller\u2013Bravais Indices for a Plane Within a Hexagonal Unit Cell\n",
+ "\n",
+ "#Intersection in terms of lattics Parameters\n",
+ "h=1 #Reciprocal of intersection point\n",
+ "k=-1\n",
+ "l=1\n",
+ "i=-(h+k)\n",
+ "\n",
+ "#Calculation\n",
+ "x=[h,k,i,l]\n",
+ "\n",
+ "#Result\n",
+ "print\"The indices of plane are\",x\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The indices of plane are [1, -1, 0, 1]\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 3.12 Page No: 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Interplanar Spacing\n",
+ "\n",
+ "#Given\n",
+ "a=0.2866 #Lattice parameter in nm\n",
+ "h=2\n",
+ "k=2\n",
+ "l=0\n",
+ "\n",
+ "#Calculation\n",
+ "import math\n",
+ "#(a)\n",
+ "d_hkl=a/(math.sqrt(h**2+k**2+l**2))\n",
+ "\n",
+ "#(b)Diffraction Angle Computations\n",
+ "lam=0.1790 #Wavelength in nm\n",
+ "n=1\n",
+ "theta=math.asin(n*lam/(2*d_hkl))\n",
+ "\n",
+ "#Result\n",
+ "print\"(a)Interplanar spacing is \",round(d_hkl,4),\"nm\"\n",
+ "print\"(b)Diffraction angle is \",round(2*theta*(180/math.pi),1),\"degree\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Interplanar spacing is 0.1013 nm\n",
+ "(b)Diffraction angle is 124.1 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |