diff options
Diffstat (limited to 'Materials_science_and_engineering_an_introduction/CH3.ipynb')
-rw-r--r-- | Materials_science_and_engineering_an_introduction/CH3.ipynb | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Materials_science_and_engineering_an_introduction/CH3.ipynb b/Materials_science_and_engineering_an_introduction/CH3.ipynb index c521d51b..eeb7447f 100644 --- a/Materials_science_and_engineering_an_introduction/CH3.ipynb +++ b/Materials_science_and_engineering_an_introduction/CH3.ipynb @@ -27,20 +27,13 @@ "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"
@@ -71,25 +64,15 @@ "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"
],
@@ -118,20 +101,16 @@ "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",
@@ -159,17 +138,13 @@ "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"
],
@@ -198,16 +173,11 @@ "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",
@@ -242,21 +212,16 @@ "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",
@@ -284,18 +249,14 @@ "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"
],
@@ -324,25 +285,19 @@ "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"
|