{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 3: Crystal Planes and Defects" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.10: Average_energy_required_to_create_Schottky_defect.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.10 :Page-3.16 (2004)\n", "T = 273+25; // Temperature , K\n", "r = 2.82e-10; // Interionic distance, m\n", "N = 4/((2*r)^3); // Density of ion pairs, ion pairs\n", "k = 8.625e-5; // Boltzmann constant, J/K\n", "n = 5e+11; // Density od Schottky effects, per unit volume\n", "E_s = 2*k*T*2.303*log10(N/n); // Average energy required to creat Schottky defect\n", "printf('\nAverage energy required to create Schottky defect = %5.3f eV', E_s);\n", "\n", "// Result \n", "// Average energy required to create Schottky defect = 1.971 eV " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.11: Ratio_of_vacancies_in_metal_to_create_Frenkel_defect.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.11 : Ratio of vacancies in metal to create Frenkel defect:Page-3.18 (2004)\n", "N = 1; // For simplicity assume total number of metal ions to be unity\n", "Ni = 1; // For simplicity assume total number of metal ions to be unity\n", "k = 8.625e-5; // Boltzmann constant, J/K\n", "T1 = 273+20; // First temperature for metal, K\n", "T2 = 300+273; // Second temperature for metal, K\n", "E_v = 1.4; // Average energy required to create a vacancy in metal, eV \n", "n_293 = N*exp(-E_v/(2*k*T1)); // Number of vacancies at 500 K\n", "n_573 = N*exp(-E_v/(2*k*T2)); // Number of vacancies at 500 K\n", "n_ratio1 = n_573/n_293; // Ratio of vacancies in metal \n", "n_ratio2 = n_293/n_573; // Ratio of vacancies in metal \n", "\n", "printf('\nThe ratio 1 of vacancies in metal to create Frenkel defect = %5.3e', n_ratio1);\n", "printf('\nThe ratio 2 of vacancies in metal to create Frenkel defect = %5.3e', n_ratio2);\n", "\n", "// Result \n", "// The ratio 1 of vacancies in metal to create Frenkel defect = 7.558e+05\n", "// The ratio 2 of vacancies in metal to create Frenkel defect = 1.323e-06 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.1: Number_of_atoms_per_square_mm_in_SC.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.1 : Page-3.4 (2004)\n", " // In a SC structure number of planes are having three arrangement (100),(110) and (111)\n", " clc;clear;\n", "a = 1; // For simplicity lattice constant is taken to be unity\n", "A_100 = a^2; // Area of the plane (100), mm^2\n", "N_100 = 1/A_100; // Number of atoms along (100) plane, atoms per square mm\n", "A_110 = sqrt(2)*a^2; // Area of the plane (110), mm^2\n", "N_110 = 1/A_110; // // Number of atoms along (110) plane, atoms per square mm\n", "A_111 = 1/2*a*sqrt(2)*sqrt(2)*a^2*cosd(30); // Area of the plane (110), mm^2\n", "A_111t = 0.5; // Total no of atoms in (111) plane\n", "N_111 = A_111t/A_111; // // Number of atoms along (110) plane, atoms per square mm\n", "printf('\nNumber of atoms along (100) plane= %d /a^2 atoms per square mm', N_100);\n", "printf('\nNumber of atoms along (110) plane= %f atoms per square mm', N_110);\n", "printf('\nNumber of atoms along (111) plane= %5.3f /a^2 atoms per square mm', N_111);\n", "// Result \n", "// Number of atoms along (100) plane= 1 /a^2 atoms per square mm\n", "// Number of atoms along (110) plane= 0.707107 atoms per square mm\n", "// Number of atoms along (111) plane= 0.577 /a^2 atoms per square mm " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.2: Maximum_radius_of_sphere_in_BCC_lattice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.2 : Page-3.5(2004)\n", "clc;clear;\n", "r = 1; // For simplicity assume radius of atom to be unity, unit\n", "a = 4*r/sqrt(3); // Lattice constant, unit\n", "R = (a/2)-r; // R be the radius of interstitial sphere that can fit into void, unit\n", "printf ('\nMaximum Radius of sphere that can fit into BCC = %5.3fr', R);\n", "\n", "// Result\n", "// Maximum Radius of sphere that can fit into BCC = 0.155r " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.3: Volume_change_during_BCC_to_FCC.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.3 : Page-3.6 (2010)\n", "clc;clear;\n", "r1 = 1.258e-10; // Atomic radius in BCC, metre\n", "a1 = 4*r1/sqrt(3); // Lattice constant for BCC, metre \n", "V1 = a1^3; // Volume of unit cell in BCC, metre cube\n", "Vpa = V1/2; // Volume occupied by one atom in BCC, metre cube\n", "r2 = 1.292e-10; // Atomic radius in FCC, metre \n", "a2 = 2*r2*sqrt(2); // Lattice constant for F CC, cube\n", "V2 = a2^3; // Volume of unit cell in FCC, meter cube\n", "Vpa1 = V2/4; // Volume occupied by one atom in FCC, metre cube\n", "dV = (Vpa-Vpa1)/Vpa*100; // Change in volume, percentage\n", "printf('\nChange in volume in percentage = %4.3f percentage', dV);\n", "\n", "// Result \n", "// Change in volume in percentage = 0.493 percentage" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.4: Volume_and_density_of_unit_cell_in_HCP_Zn_structure.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.4 : Page-3.7 (2010)\n", "clc;clear;\n", "a = 0.27e-9; // Lattice constant for BCC, metre \n", "c = 0.494e-9; // Height of the unit cell, metre\n", "M = 65.37; // Atomic weight of zn, kg\n", "N = 6.02e+26; // Avogadro number per k mol\n", "m = 6*M/N; // Mass per unit cell in HCP structure, kg\n", "V = 3*sqrt(3)*a^2*c/2; // Volume of unit cell in HCP, metre cube\n", "rho = m/V; // Density of HCP Zn structure, kg per metrecube\n", "\n", "printf('\nVolume of HCP Zn structure = %4.3e metrecube', V);\n", "printf('\nDensity of HCP Zn structure = %4.0f kg per metrecube', rho);\n", "\n", "// Result \n", "// Volume of HCP Zn structure = 9.356e-29 metrecube\n", "// Density of HCP Zn structure = 6963 kg per metrecube " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.5: Interplanar_spacing_in_110_and_212_planes_in_FCC_lattice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "/// Scilab Code Ex3.5 : Page-3.5 (2004)\n", "clc;clear;\n", "r = 0.1278; // Atomic radius, nm\n", "a = 4*r/sqrt(2); // Lattice constant, nm\n", "h1 = 1, k1 = 1, l1 = 0; // Miller Indices of (110) planes\n", "d_110 = a/sqrt(h1^2 + k1^2 + l1^2); // Interplanar spacing for (110) planes, nm\n", "h2 = 2, k2 = 1, l2 = 2; // Indices of third set of parallel planes\n", "d_212 = a/sqrt(h2^2 + k2^2 + l2^2); // Interplanar spacing for (111) planes, nm\n", "printf('\nInterplanar spacing for (110) planes = %6.4f nm', d_110);\n", "printf('\nInterplanar spacing for (212) planes = %6.4f nm', d_212);\n", "\n", "// Result \n", "// Interplanar spacing for (110) planes = 0.2556 nm\n", "// Interplanar spacing for (212) planes = 0.1205 nm " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.6: Ratio_of_interplanar_spacing_in_SC_lattice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.6 : Page-3.8 (2004)\n", "clc;clear;\n", "a = 1; // For simplicity we assume a to be unity, unit\n", "h1 = 1, k1 = 0, l1 = 0; // Indices of first set of parallel planes\n", "d_100 = a/sqrt(h1^2 + k1^2 + l1^2); // Interplanar spacing for (100) planes, unit\n", "h2 = 1, k2 = 1, l2 = 0; // Indices of second set of parallel planes\n", "d_110 = a/sqrt(h2^2 + k2^2 + l2^2); // Interplanar spacing for (110) planes, unit\n", "h3 = 1, k3 = 1, l3 = 1; // Indices of third set of parallel planes\n", "d_111 = a/sqrt(h3^2 + k3^2 + l3^2); // Interplanar spacing for (111) planes, unit\n", "printf('\nd_100 : d_110 : d_111 = %1d : %4.2f : %4.2f', d_100, d_110, d_111);\n", "\n", "// Result \n", "// d_100 : d_110 : d_111 = 1 : 0.71 : 0.58 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.7: Miller_indices_of_a_plane_in_SC_lattice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.7 : Page-3.8 (2004)\n", "clc;clear;\n", "m = 1; n = 1/2; p = 3; // Coefficients of intercepts along three axes\n", "m_inv = 1/m; // Reciprocate the first coefficient\n", "n_inv = 1/n; // Reciprocate the second coefficient\n", "p_inv = 1/p; // Reciprocate the third coefficient\n", "mul_fact = double(lcm(int32([1, 1, 3]))); // Find l.c.m. of 1, 1 and 3\n", "m1 = m_inv*mul_fact; // Clear the first fraction\n", "m2 = n_inv*mul_fact; // Clear the second fraction\n", "m3 = p_inv*mul_fact; // Clear the third fraction\n", "printf('\nThe required miller indices are : (%d %d %d) ', m1,m2,m3);\n", "\n", "// Result \n", "// The required miller indices are : (3 6 1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.8: Ratio_of_vacancies_in_metal.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.8 : Page-3.13 (2004)\n", "clc;clear;\n", "N = 1; // For simplicity assume total number of metal ions to be unity\n", "e = 1.6e-019; // Electronic charge, C\n", "k = 1.38e-023/e; // Boltzmann constant, eV/K\n", "T1 = 500; // First temperature for metal, K\n", "T2 = 1000; // Second temperature for metal, K\n", "E_v = 1; // Average energy required to create a vacancy in metal, eV \n", "n_500 = N*exp(-E_v/(k*T1)); // Number of vacancies at 500 K\n", "n_1000 = N*exp(-E_v/(k*T2)); // Number of vacancies at 500 K\n", "n_ratio = n_1000/n_500; // Ratio of vacancies in metal \n", "printf('\nThe ratio of vacancies in metal = %5.3e', n_ratio);\n", "\n", "// Result \n", "// The ratio of vacancies in metal = 1.085e+05 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.9: Fraction_of_vacancy_sites_in_metal.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex3.9 : Page-3.14 (2004)\n", "clc;clear;\n", "T1 = 500+273; // First temperature for metal, K\n", "T2 = 1000+273; // Second temperature for metal, K\n", "frac_vac = 1e-010; // n1/N, the fraction of vacancy sites at 500 degree celsius\n", "e = 1.6e-019; // Electronic charge, C\n", "k = 1.38e-023/e; // Boltzmann constant, eV/K\n", "// n1 = N*exp(-E_f/(k*T1)); // Number of vacancies at 500 K\n", "// n2 = N*exp(-E_f/(k*T2)); // Number of vacancies at 500 K, solving for n2/N = x\n", "x = exp((T1/T2)*log(frac_vac));\n", "printf('\nThe fraction of vacancy sites in metal = %6.4e', x);\n", "\n", "// Result \n", "// The fraction of vacancy sites in metal = 8.4670e-07 " ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }