{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 9: X Rays" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.1: highest_order_of_reflectio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_1,pg 237\n", "\n", "d=4.255*10^-10\n", "\n", "lam=1.549*10^-10//wavelength of K-copper line\n", "\n", "n=1//theta is smallest when n=1\n", "\n", "theta=asin(lam/(2*d))//glancing angle\n", "\n", "theta=theta*(180/%pi)\n", "\n", "//max value of sin(theta)=1\n", "\n", "//for highest order\n", "\n", "nmax=((2*d)/lam)//highest bragg's order\n", "\n", "printf('smallest glancing angle\n')\n", "\n", "printf('theta=%.2f deg.',theta)\n", "\n", "printf('\nmaximum order of reflection\n')\n", "\n", "printf('nmax=%.2f',nmax)\n", "\n", "printf('\nsince fraction is meaningless for order nmax=5')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.2: find_plancks_constant.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_2,pg 237\n", "\n", "V=60*10^3\n", "\n", "c=3*10^8\n", "\n", "e=1.6*10^-19\n", "\n", "lam=0.194*10^-10//min. wavelength of x-rays\n", "\n", "h=(lam*e*V)/c\n", "\n", "printf('plancks constant\n')\n", "\n", "disp(h)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.3: find_wavelength_and_maximum_order_of_reflection.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_3,pg 238\n", "\n", "//for 110 plane\n", "\n", "a=3*10^-10//lattice parameter\n", "\n", "d=(a/sqrt(2))//d110=(a/sqrt((1^2)+(1^2)+0))\n", "\n", "theta=12.5*(%pi/180)//glancing angle\n", "\n", "n=1\n", "\n", "lam=2*d*sin(theta)//wavelength of x-ray\n", "\n", "nmax=((2*d)/lam)//highest order\n", "\n", "printf('wavelength of x-ray beam\n')\n", "\n", "disp(lam)\n", "\n", "printf('\nhighest braggs order\n')\n", "\n", "printf('nmax=%.2f',nmax)\n", "\n", "printf('\nfraction is meaningless so nmax=4')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.4: find_plancks_constant.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_4,pg 238\n", "\n", "d=2.81*10^-10\n", "\n", "theta=14*(%pi/180)//glancing angle\n", "\n", "lam=2*d*sin(theta)//min. wavelength\n", "\n", "e=1.6*10^-19\n", "\n", "V=9100\n", "\n", "c=3*10^8\n", "\n", "h=(lam*e*V)/c\n", "\n", "printf('plancks constant\n')\n", "\n", "disp(h)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.5: find_wavelength_of_line_A.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_5,pg 238\n", "\n", "//for line A-> 2*d*sin(thetaA)=lamA(n=1)\n", "\n", "thetaA=30*(%pi/180)//glancing angle for line A\n", "\n", "//for line B-> 2*d*sin(thetaB)=3*lamB(n=3)\n", "\n", "thetaB=60*(%pi/180)\n", "\n", "lamB=0.97*10^-10\n", "\n", "d=(3*lamB)/(2*sin(thetaB))\n", "\n", "lamA=2*d*sin(thetaA)//wavelength of line A\n", "\n", "printf('wavelength of line A\n')\n", "\n", "disp(lamA)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.6: find_wavelength_of_x_rays.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_6,pg 239\n", "\n", "a=3.615*10^-10\n", "\n", "d111=a/sqrt(1+1+1)//for 111 plane \n", "\n", "theta=21.7*(%pi/180)//converting into radian\n", "\n", "lam=2*d111*sin(theta)\n", "\n", "printf('wavelength of X-rays\n')\n", "\n", "disp(lam)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.7: find_min_wavelength_and_glancing_angle.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_7,pg 239\n", "\n", "V=50*10^3\n", "\n", "lam=(12400/V)*10^-10\n", "\n", "n=4//FCC crystal\n", "\n", "m=74.6\n", "\n", "N=6.022*10^26\n", "\n", "rho=1.99*10^3\n", "\n", "a=(((n*m)/(N*rho))^(1/3))\n", "\n", "//for kcl ionic crystal\n", "\n", "d=a/2\n", "\n", "theta=asin(lam/(2*d))\n", "\n", "theta=theta*(180/%pi)\n", "\n", "printf('min. wavelength of spectrum from tube\n')\n", "\n", "disp(lam)\n", "\n", "printf('glancing angle for that wavelength\n')\n", "\n", "printf('theta=%.2f deg.',theta)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.8: identify_type_of_crystal.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_8,pg 239\n", "\n", "//from bragg's law\n", "\n", "//2*d*sin(theta)=n*lam\n", "\n", "n=1\n", "\n", "theta1=5.4*(%pi/180)\n", "\n", "theta2=7.6*(%pi/180)\n", "\n", "theta3=9.4*(%pi/180)\n", "\n", "d100=lam/2*sin(theta1)\n", "\n", "d110=lam/2*sin(theta2)\n", "\n", "d111=lam/2*sin(theta3)\n", "\n", "printf('ratio of interplannar spacing \n(1/d100):(1/d110):(1/d111)=')\n", "\n", "printf('%.2f:',sin(theta1));printf('%.2f:',sin(theta2));printf('%.2f',sin(theta3));\n", "\n", "printf('\nas ratio (1/d100):(1/d110):(1/d111)=1:sqrt(2):sqrt(3)this relation is valid for simple cubic crystal therefore, this is a SCC crystal')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 9.9: find_interplannar_spacing.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//chapter9,Example9_9,pg 240\n", "\n", "lam=0.58*10^-10\n", "\n", "theta1=6.5*(%pi/180)\n", "\n", "theta2=9.15*(%pi/180)\n", "\n", "theta3=13*(%pi/180)\n", "\n", "//from bragg's law\n", "\n", "d1=lam/(2*sin(theta1))*10^10\n", "\n", "d2=lam/(2*sin(theta2))*10^10\n", "\n", "d3=lam/(2*sin(theta3))*10^10\n", "\n", "printf('interplannar spacing of crystal\n')\n", "\n", "printf('%.2f:',d1);printf('%.2f:',d2);printf('%.2f',d3);" ] } ], "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 }