diff options
Diffstat (limited to 'Applied_Physics_i_by_I_A_Shaikh')
4 files changed, 5577 insertions, 0 deletions
diff --git a/Applied_Physics_i_by_I_A_Shaikh/1-Crystallography.ipynb b/Applied_Physics_i_by_I_A_Shaikh/1-Crystallography.ipynb new file mode 100644 index 0000000..14d34af --- /dev/null +++ b/Applied_Physics_i_by_I_A_Shaikh/1-Crystallography.ipynb @@ -0,0 +1,2374 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Crystallography" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_10: calculate_free_electron_concentration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_10,pg 1-62\n", +"\n", +"A=63.546 //atomic weight of Cu\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"p=8930 //Density\n", +"\n", +"n=1.23 //no.of electron per atom\n", +"\n", +"//density=mass/volume\n", +"\n", +"//therfore 1/volume=density/mass\n", +"\n", +"//since electron concentration is needed, let us find out no of atoms/volume(x)\n", +"\n", +"x=N*p/A\n", +"\n", +"//now one atom contribute n=1.23 electron\n", +"\n", +"//therefore x atoms contribute y no of free electron\n", +"\n", +"y=x*n\n", +"\n", +"printf('free electron concentration=')\n", +"\n", +"disp(y)\n", +"\n", +"printf('electron/m^3')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_11: calculate_Y_and_Z_intercept.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_11,pg 1-62\n", +"\n", +"//primitive vectors\n", +"\n", +"a=1.5 //in amstrong unit\n", +"\n", +"b=2 //in amstrong unit\n", +"\n", +"c=4 //in amstrong unit\n", +"\n", +"//miller indices of the plane\n", +"\n", +"h=3\n", +"\n", +"k=2\n", +"\n", +"l=6\n", +"\n", +"//therefore intercepts are a/h,b/k,c/l\n", +"\n", +"x=a/h\n", +"\n", +"y=b/k\n", +"\n", +"z=c/l\n", +"\n", +"//this gives intercepts along x axis as x amstrong but it is given that plane cut x axis at 1.2 amstrong .\n", +"\n", +"t=1.5/x\n", +"\n", +"//this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", +"\n", +"n=t*y //Y intercept\n", +"\n", +"p=t*z //Z intercept\n", +"\n", +"printf(' 1) Y intercept=')\n", +"\n", +"disp(n)\n", +"\n", +"printf('amstrong')\n", +"\n", +"printf(' 2)Z intercept=')\n", +"\n", +"disp(p)\n", +"\n", +"printf('amstrong')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_12: calculate_Number_of_atom_per_unit_cell.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_12,pg 1-63\n", +"\n", +"ro=7.87 //density of metal\n", +"\n", +"A=55.85 //atomic wt of metal\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"a=2.9*10^-8 //lattice constant of metal\n", +"\n", +"n=(N*(a^3)*ro)/A\n", +"\n", +"printf('Number of atom per unit cell of a metal=')\n", +"\n", +"disp(int32(n))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_13: calculate_Lattice_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_13,pg 1-63\n", +"\n", +"n=2 //BCC structure\n", +"\n", +"ro=9.6*10^2 //density of sodium crystal\n", +"\n", +"A=23 //atomic weight of sodium crystal\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"a=((n*A)/(N*ro))^(1/3)\n", +"\n", +"printf('Lattice constant=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_15: calculate_Number_of_atom_per_unit_cell_and_atomic_radius.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_15,pg 1-64\n", +"\n", +"ro=2.7*10^3 //density of metal\n", +"\n", +"A=27 //atomic wt of metal\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"a=4.05*10^-10 //lattice constant of metal\n", +"\n", +"n=(N*(a^3)*ro)/A\n", +"\n", +"printf('1) Number of atom per unit cell of a metal=')\n", +"\n", +"disp(int32(n))\n", +"\n", +"r=sqrt(2)*a/4 //radius of metal\n", +"\n", +"printf('2) atomic radius of a metal=')\n", +"\n", +"disp(r)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_16: calculate_Lattice_constant_and_APF.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_16,pg 1-64\n", +"\n", +"n=2 //BCC structure\n", +"\n", +"ro=5.98*10^3 //density of chromium\n", +"\n", +"A=50 //atomic wt of chromium\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"a=((n*A)/(N*ro))^(1/3)\n", +"\n", +"printf(' 1) Lattice constant=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('m')\n", +"\n", +"//for BCC\n", +"\n", +"r=sqrt(3)*a/4 //radius of chromium\n", +"\n", +"APF=(n*(4/3)*%pi*(r^3))/(a^3)\n", +"\n", +"printf(' 2) A.P.F. for chromium=')\n", +"\n", +"disp(APF)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_17: calculate_Lattice_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_17,pg 1-65\n", +"\n", +"n=4 //FCC structure\n", +"\n", +"ro=6250 //density\n", +"\n", +"M=60.2 //molecular weight\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"a=((n*M)/(N*ro))^(1/3)\n", +"\n", +"printf('Lattice constant=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_19: calculate_wavlength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_19,pg 1-66\n", +"\n", +"a=2.82*10^-9 //lattice constant\n", +"\n", +"n=2 //FCC crystal\n", +"\n", +"t=17.167 //glancing angle in degree\n", +"\n", +"q=%pi/180*t //glancing angle in radians\n", +"\n", +"//assuming reflection in (1,0,0) plane\n", +"\n", +"h=1\n", +"\n", +"k=0\n", +"\n", +"l=0\n", +"\n", +"d=a/sqrt(h^2+k^2+l^2)\n", +"\n", +"//using Bragg's law , 2*d*sin(q)=n*la\n", +"\n", +"la=2*d*sin(q)/n\n", +"\n", +"printf('wavlength of X-ray=')\n", +"\n", +"disp(la)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_1: calculate_lattice_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_1,pg 1-58\n", +"\n", +"n=4 //FCC structure\n", +"\n", +"ro=2180 //density of NaCl\n", +"\n", +"M=23+35.5 //molecular weight of NaCl\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"a=((n*M)/(N*ro))^(1/3)\n", +"\n", +"printf('Lattice constant=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_20: calculate_Lattice_constant_and_atomic_radius.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_20,pg 1-66\n", +"\n", +"n=8 //Diamond structure\n", +"\n", +"ro=2.33*10^3 //density of diamond\n", +"\n", +"M=28.9 //atomic weight of diamond\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"a=((n*M)/(N*ro))^(1/3)\n", +"\n", +"printf(' 1) Lattice constant=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('m')\n", +"\n", +"r=sqrt(3)*a/8 //radius of diamond structure\n", +"\n", +"printf(' 2) atomic radius of a metal=')\n", +"\n", +"disp(r)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_21: calculate_mass_of_one_atom.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_21,pg 1-66\n", +"\n", +"n=2 //BCC structure\n", +"\n", +"ro=8.57*10^3 //density of chromium\n", +"\n", +"d=2.86*10^-10 //nearest atoms distance\n", +"\n", +"//d=sqrt(3)/2*a\n", +"\n", +"a=2*d/sqrt(3)\n", +"\n", +"//now use formulae a^3*ro=n*A/N\n", +"\n", +"//therefore a^3*ro/n=mass of unit cell/(no of atoms pre unit cell)=mass of one atom\n", +"\n", +"m=a^3*ro/n\n", +"\n", +"printf('mass of one atom=')\n", +"\n", +"disp(m)\n", +"\n", +"printf('kg')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_2: calculate_Lattice_constant_and_diameter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_2,pg 1-58\n", +"\n", +"n=4 //FCC structure\n", +"\n", +"ro=8.9 //density of Cu atom\n", +"\n", +"A=63.55 //atomic weight of Cu atom\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"a=((n*A)/(N*ro))^(1/3)\n", +"\n", +"printf(' 1) Lattice constant=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('cm')\n", +"\n", +"r=sqrt(2)*a/4 //radius of Cu atom\n", +"\n", +"d=2*r //diameter of Cu atom\n", +"\n", +"printf(' 2) Diameter of Cu atom=')\n", +"\n", +"disp(d)\n", +"\n", +"printf('cm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_3: calculate_Density_of_diamond.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_3,pg 1-59\n", +"\n", +"n=8 //diamond structure\n", +"\n", +"A=12.01 //atomic wt\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"a=3.75*10^-8 //lattice constant of diamond\n", +"\n", +"ro=(n*A)/(N*(a^3))\n", +"\n", +"printf('Density of diamond=')\n", +"\n", +"disp(ro)\n", +"\n", +"printf('gm/cc')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_4: calculate_miller_indices.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_4,pg 1-59\n", +"\n", +"//intercept of planeare in proportion 3a:4b:infinity (plane parallel to z axis)\n", +"\n", +"//as a,b and c are basic vectors the proportin of intercepts 3:4:infinity\n", +"\n", +"//therefore reciprocal\n", +"\n", +"r1=1/3\n", +"\n", +"r2=1/4\n", +"\n", +"r3=0\n", +"\n", +"//taking LCM\n", +"\n", +"v=int32([3,4])\n", +"\n", +"l=double(lcm(v))\n", +"\n", +"m1=(l*r1)\n", +"\n", +"m2=(l*r2)\n", +"\n", +"m3=(l*r3)\n", +"\n", +"printf('miler indices=')\n", +"\n", +"disp(m3,m2,m1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_5: calculate_miller_indices.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_5,pg 1-59\n", +"\n", +"//intercept of planeare in proportion 3a:-2b:3/2c\n", +"\n", +"//as a,b and c are basic vectors the proportin of intercepts 3:-2:3/2\n", +"\n", +"//therefore reciprocal\n", +"\n", +"r1=1/3\n", +"\n", +"r2=-1/2\n", +"\n", +"r3=2/3\n", +"\n", +"//taking LCM\n", +"\n", +"v=int32([3,2,3/2])\n", +"\n", +"l=double(lcm(v))\n", +"\n", +"m1=(l*r1)\n", +"\n", +"m2=(l*r2)\n", +"\n", +"m3=(l*r3)\n", +"\n", +"printf('miler indices=')\n", +"\n", +"disp(m3,m2,m1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_6: calculate_ratio_of_intercepts.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_6,pg 1-59\n", +"\n", +"//if a plane cut at length m,n,p on the three crystal axes,then\n", +"\n", +"//m:n:p=xa:yb:zc\n", +"\n", +"//when primitive vectors of unit cell and numbers x,y,z,are related to miller indices (h,k,l)of the plane by relation\n", +"\n", +"//1/x:1/y:1/z=h:k:l\n", +"\n", +"//since a=b=c (crystal is simple cubic)\n", +"\n", +"//and (h,k,l)=(1,2,3)\n", +"\n", +"//therefore reciprocal\n", +"\n", +"r1=1/1\n", +"\n", +"r2=1/2\n", +"\n", +"r3=1/3\n", +"\n", +"//taking LCM\n", +"\n", +"v=int32([1,2,3])\n", +"\n", +"l=double(lcm(v))\n", +"\n", +"m=(l*r1)\n", +"\n", +"n=(l*r2)\n", +"\n", +"p=(l*r3)\n", +"\n", +"printf('ratio of intercepts=')\n", +"\n", +"disp(m)\n", +"\n", +"disp(n)\n", +"\n", +"disp(p)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_7: calculate_y_and_z_intercepts.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_7,pg 1-60\n", +"\n", +"//primitive vectors\n", +"\n", +"a=1.2 //in amstrong unit\n", +"\n", +"b=1.8 //in amstrong unit\n", +"\n", +"c=2 //in amstrong unit\n", +"\n", +"//miller indices of the plane\n", +"\n", +"h=2\n", +"\n", +"k=3\n", +"\n", +"l=1\n", +"\n", +"//therefore intercepts are a/h,b/k,c/l\n", +"\n", +"x=a/h\n", +"\n", +"y=b/k\n", +"\n", +"z=c/l\n", +"\n", +"//this gives intercepts along x axis as x amstrong but it is given tthat plane cut x axis at 1.2 amstrong .\n", +"\n", +"t=1.2/x\n", +"\n", +"//this shows that the plane under consideration is another plane which is parallel to it(to keep miller indices same)\n", +"\n", +"n=t*y //Y intercept\n", +"\n", +"p=t*z //Z intercept\n", +"\n", +"printf(' 1) Y intercept=')\n", +"\n", +"disp(n)\n", +"\n", +"printf('amstrong')\n", +"\n", +"printf(' 2)Z intercept=')\n", +"\n", +"disp(p)\n", +"\n", +"printf('amstrong')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_8: calculate_radius.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_8,pg 1-61\n", +"\n", +"//the interplanar spacing of plane\n", +"\n", +"h=1\n", +"\n", +"k=1\n", +"\n", +"l=0\n", +"\n", +"d=2 //interpanar spacing in amstrong unit\n", +"\n", +"//we know that d=a/sqrt(h^2+k^2+l^2) therefore\n", +"\n", +"a=d*sqrt(h^2+k^2+l^2)\n", +"\n", +"//for FCC structure\n", +"\n", +"r=sqrt(2)*a/4\n", +"\n", +"printf('radius r=')\n", +"\n", +"disp(r)\n", +"\n", +"printf('amstrong')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14_9: calculate_density_and_diameter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_14_9,pg 1-61\n", +"\n", +"n=4 //for FCC structure\n", +"\n", +"//the interplanar spacing of plane\n", +"\n", +"h=1\n", +"\n", +"k=1\n", +"\n", +"l=1\n", +"\n", +"d=2.08*10^-10 //distance\n", +"\n", +"A=63.54 //atomic weight of Cu\n", +"\n", +"N=6.023*10^26 //amstrong no\n", +"\n", +"//we know that d=a/sqrt(h^2+k^2+l^2) therefore\n", +"\n", +"a=d*sqrt(h^2+k^2+l^2)\n", +"\n", +"//also (a^3*q)=n*A/N\n", +"\n", +"q=n*A/(N*a^3)\n", +"\n", +"printf(' 1)density=')\n", +"\n", +"disp(q)\n", +"\n", +"printf('kg/m^3')\n", +"\n", +"//for FCC structure\n", +"\n", +"r=sqrt(2)*a/4\n", +"\n", +"d=r*2\n", +"\n", +"printf(' 2)radius r=')\n", +"\n", +"disp(r)\n", +"\n", +"printf('m')\n", +"\n", +"printf(' 3)diameter d=')\n", +"\n", +"disp(d)\n", +"\n", +"printf('m')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_10: calculate_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_10,pg 1-73\n", +"\n", +"//for line -A\n", +"\n", +"n1=1 //1st order maximum\n", +"\n", +"q1=30 //glancing angle in degree\n", +"\n", +"//using Bragg's law for line A n1*l1=2*d1*sin(q1)\n", +"\n", +"//d1=n1*l1/(2*sin(q1))\n", +"\n", +"//for line B\n", +"\n", +"l2=0.97 //wavelength in amstrong unit\n", +"\n", +"n2=3 //1st order maximum\n", +"\n", +"q2=60 //glancing angle in degree\n", +"\n", +"//using Bragg's law for line B n2*l2=2*d2*sin(q2)\n", +"\n", +"//since for both lines A and B we use same plane of same crystal,therefore\n", +"\n", +"//d1=d2\n", +"\n", +"//therefore equution became n2*l2=2*n1*l1/(2*sin(q1))*sin(q2)\n", +"\n", +"//by arranging terms we get\n", +"\n", +"\n", +"l1=n2*l2*2*sind(q1)/(2*n1*sind(q2))\n", +"\n", +"printf('wavelength of the line A=')\n", +"\n", +"disp(l1)\n", +"\n", +"printf('amstrong')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_11: calculate_glancing_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_11,pg 1-74\n", +"\n", +"n=1 //first order minimum\n", +"\n", +"d=5.5*10^-11 //atomic spacing\n", +"\n", +"e=1.6*10^-19 //charge on one electron\n", +"\n", +"Ee=10*10^3 //energy in eV\n", +"\n", +"E=e*Ee //energy in Joule\n", +"\n", +"m=9.1*10^-31 //mass of elelctron\n", +"\n", +"h=6.63*10^-34 //plank's constant\n", +"\n", +"l=h/sqrt(2*m*E) //wavelength\n", +"\n", +"//using Bragg's law\n", +"\n", +"Q=asind((n*l)/(2*d)) //glancing angle\n", +"\n", +"printf('glancing angle=')\n", +"\n", +"disp(Q)\n", +"\n", +"printf('degree')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_12: calculate_glancing_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_12,pg 1-74\n", +"\n", +"a=2.814*10^-10 //lattice constant\n", +"\n", +"//for rock salt\n", +"\n", +"d=a/2 //interplaner spacing\n", +"\n", +"n=1 //first order maximum\n", +"\n", +"l=1.541*10^-10 //wavelength of rock salt crystal\n", +"\n", +"//using Bragg's law\n", +"\n", +"m=asin((n*l)/(2*d)) //glancing angle\n", +"\n", +"Q=m*180/%pi\n", +"\n", +"printf('glancing angle=')\n", +"\n", +"disp(Q)\n", +"\n", +"printf('degree')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_1: calculate_glancing_angle_and_highest_order.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_1,pg 1-68\n", +"\n", +"d=4.255*10^-10 //interplaner spacing\n", +"\n", +"l=1.549*10^-10 //wavelength of x ray\n", +"\n", +"//part 1: for smallest glancing angle(n=1)\n", +"\n", +"n1=1\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"q=asind(n1*l/(2*d))\n", +"\n", +"printf(' 1)glancing angle=')\n", +"\n", +"disp(q)\n", +"\n", +"printf('degree')\n", +"\n", +"//part 2: for highst order\n", +"\n", +"//for highest order sin(q) not exceed one i.e maximum value is one\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"n2=2*d/l //since sin(q)is one\n", +"\n", +"printf(' 2)highest order possible =')\n", +"\n", +"disp(floor(n2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_2: calculate_glancing_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_2,pg 1-69\n", +"\n", +"a=2.125*10^-10 //lattice constant\n", +"\n", +"d=a/2 //interplaner spacing\n", +"\n", +"n=2 //second order maximum\n", +"\n", +"l=0.592*10^-10 //wavelength of rock salt crystal\n", +"\n", +"//using Bragg's law\n", +"\n", +"m=asin((n*l)/(2*d)) //glancing angle\n", +"\n", +"Q=m*180/%pi\n", +"\n", +"printf('glancing angle=')\n", +"\n", +"disp(Q)\n", +"\n", +"printf('degree')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_3: calculate_second_order_reflection_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_3,pg 1-69\n", +"\n", +"n1=1 //for 1st order\n", +"\n", +"n2=2 //for 2nd order\n", +"\n", +"t=3.4 //angle where 1st order reflection done\n", +"\n", +"t1=t*%pi/180 //convert degree to radian\n", +"\n", +"m=sin(t1)\n", +"\n", +"//but from Bragg's law\n", +"\n", +"//n*l=2*d*sin(t)\n", +"\n", +"//for for constant distance(d) and wavelength(l) \n", +"\n", +"//order(n) is directly proportionl to sine of angle i.e (sin(t))\n", +"\n", +"//n1/n2=sin(t1)/sin(t2)\n", +"\n", +"//assume sin(t2)=a\n", +"\n", +"a=n2/n1*m\n", +"\n", +"t2=asind(a) //taking sin inverese in degree\n", +"\n", +"printf('second order reflection take place at an angle=')\n", +"\n", +"disp(t2)\n", +"\n", +"printf('degree')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_4: calculate_shortest_wavelength_and_glancing_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_4,pg 1-70\n", +"\n", +"V=50*10^3 //operating voltage of x-ray\n", +"\n", +"M=74.6 //molecular weight\n", +"\n", +"p=1.99*10^3 //density\n", +"\n", +"n=4 //no of atoms per unit cell(for FCC structure)\n", +"\n", +"h=6.63*10^-34 //plank's constant\n", +"\n", +"c=3*10^8 //velocity \n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"//step 1:clculating shortest wavelength\n", +"\n", +"l=h*c/(e*V)\n", +"\n", +"printf(' 1)shortest wavelength=')\n", +"\n", +"disp(l)\n", +"\n", +"printf('m')\n", +"\n", +"//step:2 calculating distance(d)\n", +"\n", +"//now a^3*p=n*M/N therefore,\n", +"\n", +"a=(n*M/(N*p))^(1/3)\n", +"\n", +"//since KCl is ionic crystal herefore,\n", +"\n", +"d=a/2\n", +"\n", +"//step 3: calculaing glancing angle\n", +"\n", +"//using Bragg's law\n", +"\n", +"//n*l=2*d*sin(t)\n", +"\n", +"//assume sin(t)=a, wavelength is minimum i.e l and n=1\n", +"\n", +"n=1\n", +"\n", +"a=n*l/(2*d)\n", +"\n", +"t=asind(a) //taking sin inverese in degree\n", +"\n", +"printf(' 2) glancing angle=')\n", +"\n", +"disp(t)\n", +"\n", +"printf('degree')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_5: find_possible_solution_of_planes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_5,pg 1-70\n", +"\n", +"n=1 //first order maximum\n", +"\n", +"l=0.82*10^-10 //wavelength of X ray\n", +"\n", +"qd=7 //glancing angle in degree\n", +"\n", +"qm=51/60 //glancing angle in minute\n", +"\n", +"qs=48/3600 //glancing angle in second\n", +"\n", +"q=qd+qm+qs //total glancin angle in degree\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"d=n*l/(2*sind(q))\n", +"\n", +"a=3*10^-10 //lattice constant\n", +"\n", +"//we know that d=a/root(h^2+k^2+l^2)\n", +"\n", +"//assume root(h^2+k^2+l^2) =m\n", +"\n", +"//arranging terms we get\n", +"\n", +"m=a/d\n", +"\n", +"printf('square root(h^2+k^2+l^2)=') \n", +"\n", +"disp(int32(m))\n", +"\n", +"printf('hence possible solutions are (100),(010),(001)')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_6: calculate_cubic_lattice_structure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_6,pg 1-71\n", +"\n", +"n=1 //first order maximum\n", +"\n", +"l=%i //wavelength of X ray\n", +"\n", +"//part 1:for(100)\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"q1=5.4 //glancing angle in degree\n", +"\n", +"dl1=n*l/(2*sind(q1))\n", +"\n", +"//part 2:for(110)\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"q2=7.6 //glancing angle in degree\n", +"\n", +"dl2=n*l/(2*sind(q2))\n", +"\n", +"//part 3:for(111)\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"q3=9.4 //glancing angle in degree\n", +"\n", +"dl3=n*l/(2*sind(q3))\n", +"\n", +"//for taking ratio divide all dl by dl1\n", +"\n", +"d1=dl1/dl1\n", +"\n", +"d2=dl2/dl1\n", +"\n", +"d3=dl3/dl1\n", +"\n", +"printf('cubic lattice structure is=')\n", +"\n", +"disp(d3,d2,d1)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_7: calculate_lattice_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_7,pg 1-71\n", +"\n", +"n=1 //first order maximum\n", +"\n", +"l=1.54*10^-10 //wavelength of rock salt crystal\n", +"\n", +"q=21.7 //glancing angle in degree\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"d=n*l/(2*sind(q))\n", +"\n", +"printf('lattice constant of crystal=')\n", +"\n", +"disp(d)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_8: calculate_glancing_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_8,pg 1-72\n", +"\n", +"a=2.814*10^-10 //lattice constant\n", +"\n", +"//the interplanar spacing of plane\n", +"\n", +"h=1\n", +"\n", +"k=0\n", +"\n", +"l=0\n", +"\n", +"d=a/sqrt(h^2+k^2+l^2)\n", +"\n", +"n=2 //first order maximum\n", +"\n", +"l=0.714*10^-10 //wavelength of X-ray crystal\n", +"\n", +"//using Bragg's law\n", +"\n", +"m=asin((n*l)/(2*d)) //glancing angle\n", +"\n", +"Q=m*180/%pi\n", +"\n", +"printf('glancing angle=')\n", +"\n", +"disp(Q)\n", +"\n", +"printf('degree')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15_9: calculate_wavelength_and_glancing_angle_and_highest_order.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_15_9,pg 1-72\n", +"\n", +"d=2.82*10^-10 //interplaner spacing\n", +"\n", +"t=10 //glancing angle\n", +"\n", +"//for part 1\n", +"\n", +"n=1 //first order maximum\n", +"\n", +"//using Bragg's law n*l=2*d*sin(t)\n", +"\n", +"l=2*d*sind(t)/n\n", +"\n", +"printf(' 1)wavelength=')\n", +"\n", +"disp(l)\n", +"\n", +"printf('meter')\n", +"\n", +"//for part 2\n", +"\n", +"n1=2\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"q=asind(n1*l/(2*d))\n", +"\n", +"printf(' 2)glancing angle=')\n", +"\n", +"disp(q)\n", +"\n", +"printf('degree')\n", +"\n", +"//for part 3\n", +"\n", +"//for highest order sin(q) not exceed one i.e maximum value is one\n", +"\n", +"//using Bragg's law n*l=2*d*sin(q)\n", +"\n", +"n2=2*d/l //since sin(q)is one\n", +"\n", +"printf(' 3)highest order possible =')\n", +"\n", +"disp(floor(n2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16_1: calculate_ratio_of_vacancies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_16_1,pg 1-75\n", +"\n", +"Ev=1.08 //average energy required to creaet a vacancy\n", +"\n", +"k=1.38*10^-23 //boltzman constant in J/K\n", +"\n", +"e=1.6*10^-19 //charge on 1 electron\n", +"\n", +"K=k/e //boltzman constant in eV/K\n", +"\n", +"//for a low concentration of vacancies a relation is\n", +"\n", +"//n=Nexp(-Ev/KT)\n", +"\n", +"//since total no atom is 1 hence N=1\n", +"\n", +"//at 1000k\n", +"\n", +"T1=1000 //temperature\n", +"\n", +"n1=exp(-Ev/(K*T1))\n", +"\n", +"//at 500k\n", +"\n", +"T2=500 //temperature\n", +"\n", +"n2=exp(-Ev/(K*T2))\n", +"\n", +"v=(n1)/(n2) //ratio of vacancies\n", +"\n", +"printf('ratio of vacancies=')\n", +"\n", +"disp(v)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16_2: calculate_ratio_of_vacancies_to_no_of_atom.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_16_2,pg 1-75\n", +"\n", +"Ev=1.95 //average energy required to creaet a vacancy\n", +"\n", +"k=1.38*10^-23 //boltzman constant in J/K\n", +"\n", +"e=1.6*10^-19 //charge on 1 electron\n", +"\n", +"K=k/e //boltzman constant in eV/K\n", +"\n", +"T=500 //temperature\n", +"\n", +"//for a low concentration of vacancies a relation is\n", +"\n", +"//n=Nexp(-Ev/KT)\n", +"\n", +"m=exp(-Ev/(K*T)) //ratio of no of vacancies to no of atoms n/N\n", +"\n", +"printf('ratio of no of vacancies to no of atoms=')\n", +"\n", +"disp(m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16_3: calculate_ratio_of_vacancies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_16_3,pg 1-76\n", +"\n", +"Ev=1.8 //average energy required to creaet a vacancy\n", +"\n", +"k=1.38*10^-23 //boltzman constant in J/K\n", +"\n", +"e=1.6*10^-19 //charge on 1 electron\n", +"\n", +"K=k/e //boltzman constant in eV/K\n", +"\n", +"//for a low concentration of vacancies a relation is\n", +"\n", +"//n=Nexp(-Ev/KT)\n", +"\n", +"//ratio of vacancy is n/N assume be r=exp(-Ev/KT)\n", +"\n", +"//since total no atom is 1 hence N=1\n", +"\n", +"//at 1000k\n", +"\n", +"t1=-119 //temperature in degree\n", +"\n", +"T1=t1+273 //temperature in kelvine\n", +"\n", +"r1=exp(-Ev/(K*T1))\n", +"\n", +"printf('1)ratio of vacancies at -119 degree=')\n", +"\n", +"disp(r1)\n", +"\n", +"//at 500k\n", +"\n", +"t2=80 //temperature in degree\n", +"\n", +"T2=t2+273 //temperature in kelvine\n", +"\n", +"r2=exp(-Ev/(K*T2))\n", +"\n", +"v=(r1)/(r2) //ratio of vacancies\n", +"\n", +"printf('2)ratio of vacancies at 80 degree=')\n", +"\n", +"disp(r2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16_4: calculate_no_of_frankel_defects.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_16_4,pg 1-76\n", +"\n", +"Ev=1.5 //energy of formaton of frankel defect\n", +"\n", +"k=1.38*10^-23 //boltzman constant in J/K\n", +"\n", +"e=1.6*10^-19 //charge on 1 electron\n", +"\n", +"K=k/e //boltzman constant in eV/K\n", +"\n", +"T=700 //temperature\n", +"\n", +"N=6.023*10^26 //avogadro's no\n", +"\n", +"//for a low concentration of vacancies a relation is\n", +"\n", +"//n=Nexp(-Ev/KT)\n", +"\n", +"m=exp(-Ev/(2*K*T)) //ratio of no of vacancies to no of atoms n/N\n", +"\n", +"qs=5.56 //specific density\n", +"\n", +"q=5.56*10^3 //real density ke/m^3\n", +"\n", +"M=0.143 //molecular weight in kg/m^3\n", +"\n", +"ma=M/N //mass of one molecule\n", +"\n", +"v=ma/q //vol of one molecule\n", +"\n", +"//v volume containe 1 molecule\n", +"\n", +"//therefore 1 m^3 containe x molecule\n", +"\n", +"x=1/v\n", +"\n", +"d=m*x //defect per m^3\n", +"\n", +"dm=d*10^-9 //defect per mm^3\n", +"\n", +"printf('number of frankel defects per mm^3=')\n", +"\n", +"disp(dm)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_1: calculate_Unit_cell_dimension.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_1,pg 1-14\n", +"\n", +"A=26.98 //atomic weight of Al\n", +"\n", +"N=6.023*10^26 //Avogadro's number\n", +"\n", +"p=2700 //Density\n", +"\n", +"n=4 //FCC structure\n", +"\n", +"a=(n*A/(N*p))^(1/3)\n", +"\n", +"printf('Unit cell dimension of Al=')\n", +"\n", +"disp(a)\n", +"\n", +"printf('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_2: calculate_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_2,pg 1-15\n", +"\n", +"As=28.1 //atomic weight of Si\n", +"\n", +"Ag=69.7 //atomic weight of Ga\n", +"\n", +"Aa=74.9 //atomic weight of As\n", +"\n", +"as=5.43*10^-8 //lattice constant of Si\n", +"\n", +"aga=5.65*10^-8 //lattice constant of GaAs\n", +"\n", +"ns=8 //no of atoms/unit cell in Si\n", +"\n", +"nga=4 //no of atoms/unit cell in GaAs\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"//p=(n*A)/(N*a^3) this is formula for density\n", +"\n", +"//for Si\n", +"\n", +"ps=(ns*As)/(N*as^3)\n", +"\n", +"printf(' 1) Density of Si=')\n", +"\n", +"disp(ps)\n", +"\n", +"printf('gm/cm^3')\n", +"\n", +"//for GaAs\n", +"\n", +"Aga=Ag+Aa //molecular wt of GaAs\n", +"\n", +"pga=(nga*Aga)/(N*aga^3)\n", +"\n", +"printf(' 2) Density of GaAs=')\n", +"\n", +"disp(pga)\n", +"\n", +"printf('gm/cm^3')\n", +"\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_3: calculate_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_3,pg 1-16\n", +"\n", +"A=63.5 //atomic weight of Cu\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"n=4 //FCC structure\n", +"\n", +"r=1.28*10^-8 //atomic radius of Cu\n", +"\n", +"//for FCC\n", +"\n", +"a=4*r/(sqrt(2)) //lattice constant\n", +"\n", +"p=(n*A)/(N*a^3)\n", +"\n", +"printf('Density of Cu=')\n", +"\n", +"disp(p)\n", +"\n", +"printf('gm/cm^3')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_4: calculate_APF.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_4,pg 1-17\n", +"\n", +"A=50 //atomic weight of chromium\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"p=5.96 //Density\n", +"\n", +"n=2 //BCC structure\n", +"\n", +"//step 1 : claculation for lattice constant (a)\n", +"\n", +"a=(n*A/(N*p))^(1/3)\n", +"\n", +"//step 2 : radius of an atom in BCC\n", +"\n", +"r=sqrt(3)*a/4\n", +"\n", +"//step 3 : Atomic packing factor (APF)\n", +"\n", +"APF=n*((4/3)*%pi*r^3)/a^3\n", +"\n", +"printf('Atomic packing factor (APF)=')\n", +"\n", +"disp(APF)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_5: calculate_no_of_unit_cell.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_5,pg 1-17\n", +"\n", +"A=120 //atomic weight of chromium\n", +"\n", +"N=6.023*10^23 //Avogadro's number\n", +"\n", +"p=5.2 //Density\n", +"\n", +"n=2 //BCC structure\n", +"\n", +"m=20 //mass\n", +"\n", +"//step 1 : claculation for volume of unit cell(a^3)\n", +"\n", +"a=(n*A/(N*p))\n", +"\n", +"//step 2 : volume of 20 gm of the element\n", +"\n", +"v=m/p\n", +"\n", +"//step 3 :no of unit cell\n", +"\n", +"x=v/a\n", +"\n", +"printf('no of unit cell=')\n", +"\n", +"disp(x)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_6: calculate_no_of_atoms_per_meter_cube.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_6,pg 1-18\n", +"A=132.91 //atomic weight of chromium\n", +"N=6.023*10^26 //Avogadro's number\n", +"p=1900 //Density\n", +"a=6.14*10^-10 //lattice constant\n", +"//step 1 : type of structure\n", +"n=(p*N*a^3)/A\n", +"printf('n =')\n", +"disp(round(n))\n", +"printf('BCC structure')\n", +"//step 2: no of atoms/m^3\n", +"x=n/a^3\n", +"printf(' no of atoms/m^3=')\n", +"disp(x)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3_7: calculate_no_of_unit_cell.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_3_6,pg 1-18\n", +"\n", +"a=0.4049*10^-9 //lattice constant\n", +"\n", +"t=0.006*10^-2 //thickness of Al foil\n", +"\n", +"A=50*10^-4 //Area of foil\n", +"\n", +"V1=a^3 //volume of unit cell\n", +"\n", +"V=A*t //volume of the foil\n", +"\n", +"N=V/V1 //no of unit cell in the foil\n", +"\n", +"printf('no of unit cell in the foil=')\n", +"\n", +"disp(N)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5_1: calcukate_critical_radius_ratio_of_ligancy_three.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_5_1,pg 1-29\n", +"\n", +"//refer diagram from textbook\n", +"\n", +"//on joining centre of 3 anions,an equilateral triangle is formed and on joining centres of any anion and cation a right angle triangle ABC os formed\n", +"\n", +"//where AC=rc+ra\n", +"\n", +"//and BC=ra\n", +"\n", +"//m(angle (ACB))=30 degree\n", +"\n", +"//therefore cos (30)=ra/(rc+ra)\n", +"\n", +"//assume rc/ra=r\n", +"\n", +"r=(1-cosd(30))/cosd(30) //by arrangimg terms we get value of r\n", +"\n", +"printf('critical radius ratio of ligancy 3=')\n", +"\n", +"disp(r)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5_2: calculate_critical_radius_ratio_for_ligancy_six.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_5_2,pg 1-30\n", +"\n", +"//refer diagram from textbook\n", +"\n", +"//in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", +"\n", +"//join cation anion centres E and B and complete the triangle EBF\n", +"\n", +"//in triangle EBF m(angle F)=90 and EF=BF\n", +"\n", +"//m(angle B)=m(angle E)=45\n", +"\n", +"//and EB=rc+ra and BF=ra\n", +"\n", +"//cos(45)=ra/(rc+ra)\n", +"\n", +"//assume rc/ra=r\n", +"\n", +"r=(1-cosd(45))/cosd(45) //by arrangimg terms we get value of r\n", +"\n", +"printf('critical radius ratio for ligancy 6 =')\n", +"\n", +"disp(r)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5_3: calculate_critical_radius_ratio_for_octohedral.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_5_3,pg 1-30\n", +"\n", +"//refer diagram from textbook\n", +"\n", +"//since plane is square hence it is same as ligancy 6\n", +"\n", +"//in the said arrangement a cation is squeezed into 4 anions in a plane and 5th anion is in upper layer and 6th in bottom layer \n", +"\n", +"//join cation anion centres E and B and complete the triangle EBF\n", +"\n", +"//in triangle EBF m(angle F)=90 and EF=BF\n", +"\n", +"//m(angle B)=m(angle E)=45\n", +"\n", +"//and EB=rc+ra and BF=ra\n", +"\n", +"//cos(45)=ra/(rc+ra)\n", +"\n", +"//assume rc/ra=r\n", +"\n", +"r=(1-cosd(45))/cosd(45) //by arrangimg terms we get value of r\n", +"\n", +"printf('critical radius ratio for ligancy 8 =')\n", +"\n", +"disp(r)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5_4: calculate_critical_radius_ratio_for_ligancy_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_5_4,pg 1-31\n", +"\n", +"//a tetrahedron CAEH can be considered with C as the apex of the tetrahedron.\n", +"\n", +"//the edges AE,AH and EH of the tetrahedron will then be the face of the cube faces ABEF,ADHF,EFHG resp.\n", +"\n", +"//from fig\n", +"\n", +"//AO=ra+rc and AJ=ra\n", +"\n", +"//AE=root(2)*a and AG=root(3)*a\n", +"\n", +"//AO/AJ=AG/AE=(ra+rc)/ra=root(3)*a/root(2)*a\n", +"\n", +"//assume rc/ra=r\n", +"\n", +"r=(sqrt(3)-sqrt(2))/sqrt(2)\n", +"\n", +"printf('critical radius ratio for ligancy 4 =')\n", +"\n", +"disp(r)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5_5: calculate_critical_radius_ratio_for_ligancy_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_5_5,pg 1-32\n", +"\n", +"//ligancy 8 represents cubic arrangment .8 anions are at the corners and touch along cube edgs.Along the body diagonal the central cation and the corner anion are in contact.\n", +"\n", +"//cube edge=2*ra\n", +"\n", +"//refer diagram from textbook\n", +"\n", +"//and body diagonal=root(3)*cube edge=root(3)[2*(rc+ra)]\n", +"\n", +"//assume rc/ra=r\n", +"\n", +"r=sqrt(3)-1\n", +"\n", +"printf('critical radius ratio of ligancy 8=')\n", +"\n", +"disp(r)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5_6: calculate_critical_radius_ratio_for_ligancy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_5_6,pg 1-32\n", +"\n", +"//for an ionic crystal exibiting HCP structure the arrangment of ions refere from textbook\n", +"\n", +"//at centre we have a cation with radius rc=OA\n", +"\n", +"//it is an touch with 6 anions with radius ra=AB\n", +"\n", +"//OB=OC=ra+rc\n", +"\n", +"//intrangle ODB ,m(angle (OBC))=60 degree ,m(angle (ODB))=90 degree\n", +"\n", +"//therefore cos(60)=BD/OB=AB/(OA+OB)=ra/(rc+ra)\n", +"\n", +"//assume rc/ra=r\n", +"\n", +"r=(1-cosd(60))/cosd(60) //by arrangimg terms we get value of r\n", +"\n", +"printf('critical radius ratio 0f HCP structure=')\n", +"\n", +"disp(r)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6_2: calculate_miller_indices_of_plane.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_6_2,pg 1-35\n", +"\n", +"//intercept of planeare in proportion a,b/3,2*c\n", +"\n", +"//as a,b and c are basic vectors the proportin of intercepts 1:1/3:2\n", +"\n", +"//therefore reciprocal\n", +"\n", +"r1=1\n", +"\n", +"r2=3\n", +"\n", +"r3=1/2\n", +"\n", +"//taking LCM\n", +"\n", +"v=int32([2,1])\n", +"\n", +"l=double(lcm(v))\n", +"\n", +"m1=(l*r1)\n", +"\n", +"m2=(l*r2)\n", +"\n", +"m3=(l*r3)\n", +"\n", +"printf('miler indices=')\n", +"\n", +"disp(m3,m2,m1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6_4: calculate_interplanar_spacing.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-1,Example1_6_4,pg 1-38\n", +"\n", +"r=1.414 //atomic radius in amstrong unit\n", +"\n", +"//for FCC structure\n", +"\n", +"a=4*r/sqrt(2)\n", +"\n", +"//part 1: plane(2,0,0)\n", +"\n", +"//the interplanar spacing of plane\n", +"\n", +"h1=2\n", +"\n", +"k1=0\n", +"\n", +"l1=0\n", +"\n", +"//we know that d=a/sqrt(h^2+k^2+l^2)\n", +"\n", +"d1=a/sqrt(h1^2+k1^2+l1^2)\n", +"\n", +"printf(' 1)interplanar spacing for (2,0,0) plane=')\n", +"\n", +"disp(d1)\n", +"\n", +"printf('amstrong')\n", +"\n", +"//part 2: plane(1,1,1)\n", +"\n", +"//the interplanar spacing of plane\n", +"\n", +"h2=1\n", +"\n", +"k2=1\n", +"\n", +"l2=1\n", +"\n", +"//we know that d=a/sqrt(h^2+k^2+l^2)\n", +"\n", +"d2=a/sqrt(h2^2+k2^2+l2^2)\n", +"\n", +"printf(' 2)interplanar spacing for(1,1,1) plane=')\n", +"\n", +"disp(d2)\n", +"\n", +"printf('amstrong')" + ] + } +], +"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 +} diff --git a/Applied_Physics_i_by_I_A_Shaikh/2-Semiconductor_Physics.ipynb b/Applied_Physics_i_by_I_A_Shaikh/2-Semiconductor_Physics.ipynb new file mode 100644 index 0000000..042e19e --- /dev/null +++ b/Applied_Physics_i_by_I_A_Shaikh/2-Semiconductor_Physics.ipynb @@ -0,0 +1,813 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Semiconductor Physics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21_1: calculate_mobility_of_electro.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_21_1,pg 2-47\n", +"\n", +"ro=1.72*10^-8 //resistivity of Cu\n", +"\n", +"s=1/ro //conductivity of Cu\n", +"\n", +"n=10.41*10^28 //no of electron per unit volume\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"u=s/(n*e)\n", +"\n", +"printf('mobility of electron in Cu =')\n", +"\n", +"disp(u)\n", +"\n", +"printf('m^2/volt-sec')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21_2: calculate_Resistivity_of_Cu.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_21_2,pg 2-47\n", +"\n", +"m=63.5 //atomic weight\n", +"\n", +"u=43.3 //mobility of electron\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"N=6.02*10^23 //Avogadro's number\n", +"\n", +"d=8.96 //density\n", +"\n", +"Ad=N*d/m //Atomic density\n", +"\n", +"n=1*Ad\n", +"\n", +"ro=1/(n*e*u)\n", +"\n", +"printf('Resistivity of Cu =')\n", +"\n", +"disp(ro)\n", +"\n", +"printf('ohm-cm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21_3: calculate_Resistivity_of_Ge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_21_3,pg 2-47\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"ne=2.5*10^19 //density of carriers\n", +"\n", +"nh=ne //for intrinsic semiconductor\n", +"\n", +"ue=0.39 //mobility of electron\n", +"\n", +"uh=0.19 //mobility of hole\n", +"\n", +"s=ne*e*ue+nh*e*uh //conductivity of Ge\n", +"\n", +"ro=1/s //resistivity of Ge\n", +"\n", +"printf('Resistivity of Ge =')\n", +"\n", +"disp(ro)\n", +"\n", +"printf('ohm-m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21_5: calculate_Ratio_between_conductivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_21_5,pg 2-48\n", +"\n", +"Eg=1.2 //energy gap\n", +"\n", +"T1=600 //temperature\n", +"\n", +"T2=300 //temperature\n", +"\n", +"//since ue>>uh for intrinsic semiconductor\n", +"\n", +"//s=ni*e*ue\n", +"\n", +"K=8.62*10^-5 //Boltzman constant\n", +"\n", +"s=%s\n", +"\n", +"s1=s*exp((-Eg)/(2*K*T1))\n", +"\n", +"s2=s*exp((-Eg)/(2*K*T2))\n", +"\n", +"m=(s1/s2)\n", +"\n", +"printf('Ratio between conductivity =')\n", +"\n", +"disp(m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21_6: calculate_conductivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_21_6,pg 2-49\n", +"\n", +"c=5*10^28 //concentration of Si atoms\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"u=0.048 //mobility of hole\n", +"\n", +"s=4.4*10^-4 //conductivity of Si\n", +"\n", +"//since millionth Si atom is replaced by an indium atom\n", +"\n", +"n=c*10^-6\n", +"\n", +"sp=u*e*n //conductivity of resultant\n", +"\n", +"printf('conductivity =')\n", +"\n", +"disp(sp)\n", +"\n", +"printf('mho/m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21_7: calculate_hole_concentration_and_mobility.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_21_7,pg 2-49\n", +"\n", +"m=28.1 //atomic weight of Si\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"N=6.02*10^26 //Avogadro's number\n", +"\n", +"d=2.4*10^3 //density of Si\n", +"\n", +"p=0.25 //resistivity\n", +"\n", +"//no. of Si atom/m^3\n", +"\n", +"Ad=N*d/m //Atomic density\n", +"\n", +"//impurity level is 0.01 ppm i.e. 1 atom in every 10^8 atoms of Si\n", +"\n", +"n=Ad/10^8 //no of impurity atoms\n", +"\n", +"//since each impurity produce 1 hole\n", +"\n", +"nh=n\n", +"\n", +"printf('1) hole concentration =')\n", +"\n", +"disp(n)\n", +"\n", +"printf('holes/m^3')\n", +"\n", +"up=1/(e*p*nh)\n", +"\n", +"printf(' 2) mobility =')\n", +"\n", +"disp(up)\n", +"\n", +"printf('m^2/volt.sec') " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22_1: calculate_probability_of_an_electron.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_22_1,pg 2-50\n", +"\n", +"t=27 //temp in degree \n", +"\n", +"T=t+273 //temp in kelvin\n", +"\n", +"K=8.62*10^-5 //Boltzman constant in eV\n", +"\n", +"Eg=1.12 //Energy band gap\n", +"\n", +"//For intrensic semiconductor (Ec-Ev)=Eg/2\n", +"\n", +"//let (Ec-Ev)=m\n", +"\n", +"m=Eg/2\n", +"\n", +"a=(m/(K*T))\n", +"\n", +"//probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", +"\n", +"p=1/(1+exp(a))\n", +"\n", +"\n", +"printf('probability of an electron being thermally excited to conduction band=')\n", +"\n", +"disp(p)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22_2: calculate_probability_of_an_electron.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_22_2,pg 2-50\n", +"\n", +"T=300 //temp in kelvin\n", +"\n", +"K=8.62*10^-5 //Boltzman constant in eV\n", +"\n", +"m=0.012 //energy level(Ef-E)\n", +"\n", +"a=(m/(K*T))\n", +"\n", +"//probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", +"\n", +"p=1/(1+exp(a))\n", +"\n", +"p1=1-p\n", +"\n", +"printf('probability of an energy level not being occupied by an electron=')\n", +"\n", +"disp(p1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22_3: calculate_probability_of_an_electron.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_22_3,pg 2-51\n", +"\n", +"t=20 //temp in degree \n", +"\n", +"T=t+273 //temp in kelvin\n", +"\n", +"K=8.62*10^-5 //Boltzman constant in eV\n", +"\n", +"Eg=1.12 //Energy band gap\n", +"\n", +"//For intrensic semiconductor (Ec-Ev)=Eg/2\n", +"\n", +"//let (Ec-Ev)=m\n", +"\n", +"m=Eg/2\n", +"\n", +"a=(m/(K*T))\n", +"\n", +"//probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", +"\n", +"p=1/(1+exp(a))\n", +"\n", +"\n", +"printf('probability of an electron being thermally excited to conduction band=')\n", +"\n", +"disp(p)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22_4: calculate_energy_for_different_probability.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_22_4,pg 2-51\n", +"\n", +"T=300 //temp in kelvin\n", +"\n", +"K=8.62*10^-5 //Boltzman constant in eV\n", +"\n", +"Eg=2.1 //Energy band gap\n", +"\n", +"//probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))\n", +"\n", +"m=K*T\n", +"\n", +"//for f(E)=0.99\n", +"\n", +"p1=0.99\n", +"\n", +"b=1-1/p1\n", +"\n", +"a=log(b) //a=(E-2.1)/m\n", +"\n", +"E=2.1+m*a\n", +"\n", +"printf('1) Energy for which probability is 0.99=')\n", +"\n", +"disp(real(E))\n", +"\n", +"printf('eV')\n", +"\n", +"//for f(E)=0.01\n", +"\n", +"p2=0.01\n", +"\n", +"b2=1-1/p2\n", +"\n", +"a1=log(b2) //a=(E-2.1)/m\n", +"\n", +"E1=2.1+m*a1\n", +"\n", +"printf('2)Energy for which probability is 0.01=')\n", +"\n", +"disp(real(E1))\n", +"\n", +"printf('eV')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_1: calculate_Potential_barrier_for_Ge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_1,pg 2-52\n", +"\n", +"ni=2.4*10^19 //density of intrensic semiconductor\n", +"\n", +"n=4.4*10^28 //no atom in Ge crystal\n", +"\n", +"Nd=n/10^6 //density\n", +"\n", +"Na=Nd\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"T=300 //temerature at N.T.P.\n", +"\n", +"K=1.38*10^-23 //Boltzman constant\n", +"\n", +"Vo=(K*T/e)*log(Na*Nd/(ni^2))\n", +"\n", +"printf('Potential barrier for Ge =')\n", +"\n", +"disp(Vo)\n", +"\n", +"printf('Volts')\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_2: calculate_Hall_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_2,pg 2-52\n", +"\n", +"B=0.6 //magnetic field\n", +"\n", +"d=5*10^-3 //distancebetween surface\n", +"\n", +"J=500 //current density\n", +"\n", +"Nd=10^21 //density\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"Vh=(B*J*d)/(Nd*e) //due to Hall effect\n", +"\n", +"printf('Hall voltage =')\n", +"\n", +"disp(Vh)\n", +"\n", +"printf('Volts')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_3: calculate_Hall_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_3,pg 2-53\n", +"\n", +"Rh=6*10^-7 //Hall coefficient\n", +"\n", +"B=1.5 //magnetic field\n", +"\n", +"I=200 //current in strip\n", +"\n", +"W=1*10^-3 //thickness of strip\n", +"\n", +"Vh=Rh*(B*I)/W //due to Hall effect\n", +"\n", +"printf('Hall voltage =')\n", +"\n", +"disp(Vh)\n", +"\n", +"printf('Volt')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_4: calculate_Resistivity_of_P_type_silico.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_4,pg 2-53\n", +"\n", +"Rh=2.25*10^-5 //Hall coefficient\n", +"\n", +"u=0.025 //mobility of hole\n", +"\n", +"r=Rh/u\n", +"\n", +"printf('Resistivity of P type silicon =')\n", +"\n", +"disp(r)\n", +"\n", +"printf('ohm-m')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_5: calculate_hall_voltage_hall_coefficient_and_hall_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_5,pg 2-53\n", +"\n", +"B=0.55 //magnetic field\n", +"\n", +"d=4.5*10^-3 //distancebetween surface\n", +"\n", +"J=500 //current density\n", +"\n", +"n=10^20 //density\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"Rh=1/(n*e) //Hall coefficient\n", +"\n", +"Vh=Rh*B*J*d //Hall voltage\n", +"\n", +"printf(' 1) Hall voltage =')\n", +"\n", +"disp(Vh)\n", +"\n", +"printf('Volts')\n", +"\n", +"printf(' 2) Hall coefficient =')\n", +"\n", +"disp(Rh)\n", +"\n", +"printf('m^3/C')\n", +"\n", +"u=0.17 //mobility of electrom\n", +"\n", +"m=atan(u*B)\n", +"\n", +"a=m*180/%pi //conversion randian into degree\n", +"\n", +"printf(' 3) Hall angle =')\n", +"\n", +"disp(a)\n", +"\n", +"printf('degree')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_6: calculate_density_and_mobility.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_6,pg 2-54\n", +"\n", +"Rh=3.66*10^-4 //Hall coefficient\n", +"\n", +"r=8.93*10^-3 //resistivity \n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"//Hall coefficient Rh=1/(n*e)\n", +"\n", +"n=1/(Rh*e) //density\n", +"\n", +"printf(' 1) density(n) =')\n", +"\n", +"disp(n)\n", +"\n", +"printf('/m^3')\n", +"\n", +"u=Rh/r //mobility of electron\n", +"\n", +"printf(' 2) mobility (u) =')\n", +"\n", +"disp(u)\n", +"\n", +"printf('m^2/v-s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23_7: calculate_Hall_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_23_7,pg 2-55\n", +"\n", +"B=0.2 //magnetic field\n", +"\n", +"e=1.6*10^-19 //charge on electron\n", +"\n", +"ue=0.39 //mobility of electron\n", +"\n", +"l=0.01 //length\n", +"\n", +"A=0.001*0.001 //cross section area of bar\n", +"\n", +"V=1*10^-3 //Applied voltage\n", +"\n", +"d=0.001 //sample of width \n", +"\n", +"r=1/(ue*e) //resistivity\n", +"\n", +"R=r*l/A //resistance of Ge bar\n", +"\n", +"//using ohm's law\n", +"\n", +"I=V/R\n", +"\n", +"Rh=r*ue //hall coefficient\n", +"\n", +"//using formulae for hall effect\n", +"\n", +"J=I/A //current density\n", +"\n", +"Vh=Rh*B*J*d\n", +"\n", +"printf('Hall voltage =')\n", +"\n", +"disp(Vh)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.24_1: calculate_fermi_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-2,Example2_24_1,pg 2-55\n", +"\n", +"x1=0.4 //difference between fermi level and conduction band(Ec-Ef)\n", +"\n", +"T=300 //temp in kelvin\n", +"\n", +"K=8.62*10^-5 //Boltzman constant in eV\n", +"\n", +"//ne=N*e^(-(Ec-Ef)/(K*T))\n", +"\n", +"//ne is no of electron in conduction band\n", +"\n", +"//since concentration of donor electron is doubled\n", +"\n", +"a=2 //ratio of no of electron\n", +"\n", +"//let x2 be the difference between new fermi level and conduction band(Ec-Ef')\n", +"\n", +"x2=-log(a)*(K*T)+x1 //arranging equation ne=N*e^(-(Ec-Ef)/(K*T))\n", +"\n", +"printf('Fermi level will be shifted towards conduction band by')\n", +"\n", +"disp(x2)\n", +"\n", +"printf('eV')" + ] + } +], +"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 +} diff --git a/Applied_Physics_i_by_I_A_Shaikh/3-Dielectric_And_Magnetic_Materials.ipynb b/Applied_Physics_i_by_I_A_Shaikh/3-Dielectric_And_Magnetic_Materials.ipynb new file mode 100644 index 0000000..e7d7b69 --- /dev/null +++ b/Applied_Physics_i_by_I_A_Shaikh/3-Dielectric_And_Magnetic_Materials.ipynb @@ -0,0 +1,1129 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Dielectric And Magnetic Materials" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_10: calculate_Horizontal_component_of_magnetic_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_10,pg 3-38\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"B=10.9*10^-5 //flux density\n", +"\n", +"H=B/u0 //magnetic field\n", +"\n", +"printf('Horizontal component of magnetic field =')\n", +"\n", +"disp(H)\n", +"\n", +"printf('A-m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_11: calculate_current_required.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_11,pg 3-39\n", +"\n", +"phi=5.9*10^-3 //magnetic flux\n", +"\n", +"ur=900 //relative permeability of material\n", +"\n", +"n=700 //number of turns\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"A=60*10^-4 //cross section area of ring\n", +"\n", +"l=2 //mean circumference of ring\n", +"\n", +"B=phi/A //flux density\n", +"\n", +"H=B/(u0*ur) //magnetic field\n", +"\n", +"At=H*l //Amp-turns required\n", +"\n", +"I=At/n //current required\n", +"\n", +"printf('Current required to produce a flux=')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Amp')\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_12: calculate_Current_required.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_12,pg 3-39\n", +"\n", +"phi=2.7*10^-3 //magnetic flux\n", +"\n", +"A=25*10^-4 //cross section area of ring\n", +"\n", +"r=25*10^-2 //mean circumference of ring\n", +"\n", +"la=10^-3 //air gap\n", +"\n", +"ur=900 //relative permeability of material\n", +"\n", +"n=400 //number of turns\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"d=40*10^-2 //mean diameter of ring\n", +"\n", +"li=2*%pi*r //mean circumference of ring\n", +"\n", +"B=phi/A //flux density\n", +"\n", +"//for air gap\n", +"\n", +"Ha=B/(u0) //magnetic field for air gap\n", +"\n", +"//for iron ring\n", +"\n", +"Hi=B/(u0*ur) //magnetic field for iron ring\n", +"\n", +"//therefore, Amp turn in air gap\n", +"\n", +"Ata=Ha*la //Amp-turns required\n", +"\n", +"//therefore, Amp-turn in ring\n", +"\n", +"Ati=Hi*li //Amp-turns required\n", +"\n", +"//therrfore total mmf required\n", +"\n", +"mmf=Ata+Ati\n", +"\n", +"//Current required\n", +"\n", +"I=mmf/n //current required\n", +"\n", +"printf('Current required =')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Amp')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_13: calculate_1_magnetic_intensity_2_magnetization_3_Relative_Permeability.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_13,pg 3-40\n", +"\n", +"n1=10 //no of turns per cm\n", +"\n", +"i=2 //current\n", +"\n", +"B=1 //flux density\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"n=n1*100 //no turns per m\n", +"\n", +"H=n*i\n", +"\n", +"printf(' 1) magnetic intensity =')\n", +"\n", +"disp(H)\n", +"\n", +"printf('Amp-turn/meter')\n", +"\n", +"//calculation for magnetization\n", +"\n", +"I=B/u0-H\n", +"\n", +"printf(' 2) magnetization =')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Amp-turn/meter')\n", +"\n", +"//relative permeability\n", +"\n", +"ur=B/(u0*H)\n", +"\n", +"printf(' 3) Relative Permeability of the ring =')\n", +"\n", +"disp(int(ur))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_14: calculate_Loss_of_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_14,pg 3-40\n", +"\n", +"m=40 //wt of the core\n", +"\n", +"d=7.5*10^3 //density of iron\n", +"\n", +"n=100 //frequency\n", +"\n", +"V=m/d //volume of the iron core\n", +"\n", +"E1=3800*10^-1 //loss of energy in core per cycles/cc\n", +"\n", +"E2=E1*V //loss of energy in core per cycles\n", +"\n", +"N=60*n //no of cycles per minute\n", +"\n", +"E=E2*N //loss of energy per minute\n", +"\n", +"printf('Loss of energy per minute =')\n", +"\n", +"disp(E)\n", +"\n", +"printf('Joule')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_15: calculate_various_parameter_of_magnetic_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_15,pg 3-40\n", +"\n", +"l=30*10^-2 //length of ring\n", +"\n", +"A=1*10^-4 //cross section area of ring\n", +"\n", +"i=0.032 //current\n", +"\n", +"phi=2*10^-6 //magnetic flux\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"N=300 //no of turns in the coil\n", +"\n", +"//1) flux density\n", +"\n", +"B=phi/A //flux density\n", +"\n", +"printf('1) Flux density in the ring =')\n", +"\n", +"disp(B)\n", +"\n", +"printf('Wb/m^2')\n", +"\n", +"//2) magnetic intensity of ring\n", +"\n", +"n=N/l //no of turns per unit length\n", +"\n", +"H=n*i //magnetic intensity\n", +"\n", +"printf(' 2) magnetic intensity =')\n", +"\n", +"disp(H)\n", +"\n", +"printf('Amp-turn/meter')\n", +"\n", +"//3) permeability and relative permeability of the ring\n", +"\n", +"u=B/H\n", +"\n", +"printf(' 3) Permeability of the ring =')\n", +"\n", +"disp(u)\n", +"\n", +"printf('Wb/A-m')\n", +"\n", +"ur=u/u0\n", +"\n", +"printf(' 4) Relative Permeability of the ring =')\n", +"\n", +"disp(ur)\n", +"\n", +"//4)Susceptibility\n", +"\n", +"Xm=ur-1\n", +"\n", +"printf('5) magnetic Susceptibility of the ring =')\n", +"\n", +"disp(Xm)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_16: calculate_loss_of_energy_per_hour.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_16,pg 3-41\n", +"\n", +"E=3000 //loss of energy per cycle per cm^3\n", +"\n", +"m=12*10^3 //wt of the core\n", +"\n", +"d=7.5 //density of iron\n", +"\n", +"n=50 //frequency\n", +"\n", +"V=m/d //volume of the core\n", +"\n", +"El=E*V*n*60*60 //loss of energy per hour\n", +"\n", +"printf('Loss of energy per hour =')\n", +"\n", +"disp(El)\n", +"\n", +"printf('Erg')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_17: calculate_Hysteresis_power_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_17,pg 3-41\n", +"\n", +"n=50 //frequency\n", +"\n", +"V=10^-3 //volume of the specimen\n", +"\n", +"//Area of B-H loop\n", +"\n", +"A=0.5*10^3*1\n", +"\n", +"P=n*V*A\n", +"\n", +"printf('Hysteresis power loss =')\n", +"\n", +"disp(P)\n", +"\n", +"printf('Watt')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_18: calculate_current_required.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_18,pg 3-42\n", +"\n", +"phi=1.5*10^-4 //magnetic flux\n", +"\n", +"ur=900 //relative permeability of material\n", +"\n", +"n=600 //number of turns\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"A=5.8*10^-4 //cross section area of ring\n", +"\n", +"d=40*10^-2 //mean diameter of ring\n", +"\n", +"li=%pi*d //mean circumference of ring\n", +"\n", +"la=5*10^-3 //air gap\n", +"\n", +"B=phi/A //flux density\n", +"\n", +"//for air gap\n", +"\n", +"Ha=B/(u0) //magnetic field for air gap\n", +"\n", +"//for iron ring\n", +"\n", +"Hi=B/(u0*ur) //magnetic field for iron ring\n", +"\n", +"//therefore, Amp turn in air gap\n", +"\n", +"Ata=Ha*la //Amp-turns required\n", +"\n", +"//therefore, Amp-turn in ring\n", +"\n", +"Ati=Hi*li //Amp-turns required\n", +"\n", +"//therrfore total mmf required\n", +"\n", +"mmf=Ata+Ati\n", +"\n", +"//Current required\n", +"\n", +"I=mmf/n //current required\n", +"\n", +"printf('Current required =')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Amp')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_19: calculate_reluctance_and_mmf.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_19,pg 3-42\n", +"\n", +"la=1*10^-2 //air gap\n", +"\n", +"r=0.5 //radius of ring\n", +"\n", +"A=5*10^-4 //cross section area of ring\n", +"\n", +"i=5 //current\n", +"\n", +"u=6*10^-3 //permeability of iron\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"N=900 //no of turns in the coil\n", +"\n", +"//let reluctance of iron ring with air gap be S\n", +"\n", +"S=la/(u0*A)+(2*%pi*r-la)/(u*A)\n", +"\n", +"printf(' 1) Reluctance =')\n", +"\n", +"disp(S)\n", +"\n", +"printf('A-T/Wb')\n", +"\n", +"mmf=N*i\n", +"\n", +"printf(' 2) m.m.f =')\n", +"\n", +"disp(mmf)\n", +"\n", +"printf('Amp-turn')\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_1: calculate_resultant_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_1,pg 3-35\n", +"\n", +"A=650*10^-6 //area\n", +"\n", +"d=4*10^-3 //seperation of plate\n", +"\n", +"Q=2*10^-10 //charge\n", +"\n", +"er=3.5 //relative permitivity\n", +"\n", +"e0=8.85*10^-12 //absolute permitivity\n", +"\n", +"V=(Q*d)/(e0*er*A)\n", +"\n", +"printf('voltage across capacitor =')\n", +"\n", +"disp(V)\n", +"\n", +"printf('Volt')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_20: calculate_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_20,pg 3-43\n", +"\n", +"//the magnetization force is given by,\n", +"\n", +"//H=NI/l\n", +"\n", +"H=5*10^3 //coercivity of bar magnet\n", +"\n", +"l=10*10^-2 //length of solenoid\n", +"\n", +"N=50 //number of turns\n", +"\n", +"I=l*H/N\n", +"\n", +"printf('current =')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Ampere')\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_21: calculate_Reluctance_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_21,pg 3-43\n", +"\n", +"ur=380 //relative permeability of air\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"A=5*10^-4 //cross section area of ring\n", +"\n", +"n=200 //number of turns\n", +"\n", +"d=20*10^-2 //mean diameter of ring\n", +"\n", +"l=%pi*d //mean circumference of ring\n", +"\n", +"phi=2*10^-3 //magnetic flux\n", +"\n", +"S=l/(u0*ur*A) //reluctance\n", +"\n", +"//using ohm's law for magnetic circuit\n", +"\n", +"//phi=N*I/S\n", +"\n", +"I=S*phi/n\n", +"\n", +"printf(' 1) Reluctance =')\n", +"\n", +"disp(S)\n", +"\n", +"printf('A-T/Wb')\n", +"\n", +"\n", +"printf(' 2) current =')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Ampere')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_22: calculate_various_parameter_of_magnetic_field.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_22,pg 3-43\n", +"\n", +"ur=1 //relative permeability of air\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"A=6*10^-4 //cross section area of torroid\n", +"\n", +"n=500 //number of turns\n", +"\n", +"r=15*10^-2 //radius of torroid\n", +"\n", +"I=4 //current in coil\n", +"\n", +"l=2*%pi*r //mean circumference of torroid\n", +"\n", +"MMF=n*I\n", +"\n", +"printf('1) MMF (NI) =')\n", +"\n", +"disp(MMF)\n", +"\n", +"printf('AT')\n", +"\n", +"R=l/(u0*ur*A) //Reluctance\n", +"\n", +"printf(' 2) Reluctance (R) =')\n", +"\n", +"disp(R)\n", +"\n", +"printf('AT/Wb')\n", +"\n", +"phi=MMF/R //flux\n", +"\n", +"printf(' 3) Magnetic flux =')\n", +"\n", +"disp(phi)\n", +"\n", +"printf('Wb')\n", +"\n", +"B=phi/A //flux density\n", +"\n", +"printf(' 4) Flux density =')\n", +"\n", +"disp(B)\n", +"\n", +"printf('Wb/m^2')\n", +"\n", +"H=B/(u0*ur) //magnetic field intensity\n", +"\n", +"printf(' 5) Magnetic field intensity =')\n", +"\n", +"disp(H)\n", +"\n", +"printf('A/m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_23: calculate_Number_of_AmpereTurns.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_23,pg 3-44\n", +"\n", +"phi=10^-3 //magnetic flux\n", +"\n", +"ur=1000 //relative permeability of iron\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"A=5*10^-4 //cross section area of ring\n", +"\n", +"la=2*10^-3 //air gap\n", +"\n", +"d=20*10^-3 //mean diameter of ring\n", +"\n", +"li=%pi*d-la //mean circumference of ring\n", +"\n", +"//using KVL for magnetic circuit\n", +"\n", +"//AT(total)=AT(iron)+AT(air gap)\n", +"\n", +"ATt=(phi/(u0*A))*((li/ur)+la)\n", +"\n", +"printf('Number of Ampere-Turns required =')\n", +"\n", +"disp(round(ATt))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_24: calculate_intensity_magnetization_and_flux_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_24,pg 3-44\n", +"\n", +"X=0.5*10^-5 //susceptibility of material\n", +"\n", +"H=10^6 //magnetic field strength\n", +"\n", +"I=X*H //intensity of magnetization\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"B=u0*(H+I) //flux density\n", +"\n", +"printf(' 1) intensity magnetization =')\n", +"\n", +"disp(I)\n", +"\n", +"printf('Amp/m')\n", +"\n", +"printf(' 2) flux density in the material =')\n", +"\n", +"disp(B)\n", +"\n", +"printf('wb/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_2: find_capacitance_of_capacitor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_2,pg 3-36\n", +"\n", +"A=2000*10^-6 //area\n", +"\n", +"d=0.5*10^-6 //seperation of plate\n", +"\n", +"er=8 //relative permitivity\n", +"\n", +"e0=8.85*10^-12 //absolute permitivity\n", +"\n", +"C=(e0*er*A)/d\n", +"\n", +"printf('capacitance for capacitor =')\n", +"\n", +"disp(C)\n", +"\n", +"printf('Faraday')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_3: calculate_relative_permittivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_3,pg 3-36\n", +"\n", +"E=1000 //electric field\n", +"\n", +"P=4.3*10^-8 //polarization\n", +"\n", +"e0=8.854*10^-12 //absolute permitivity\n", +"\n", +"er=(P/(e0*E))+1 //as P/E=e0(er-1)\n", +"\n", +"printf('relative permittivity =')\n", +"\n", +"disp(er)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_4: ratio_of_two_capacitor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_4,pg 3-36\n", +"\n", +"//As C=e0*er*A/d\n", +"\n", +"e0=%e //absolute permitivity\n", +"\n", +"Ag=%s\n", +"\n", +"Ap=Ag //Assuming Area of glass plate and plastic film is same\n", +"\n", +"//for glass\n", +"\n", +"erg=6 //relative permitivity\n", +"\n", +"dg=0.25 //thickness\n", +"\n", +"Cg=e0*erg*Ag/dg\n", +"\n", +"//for plastic film\n", +"\n", +"erp=3 //relative permitivity\n", +"\n", +"dp=0.1 //thickness\n", +"\n", +"Cp=e0*erp*Ap/dp\n", +"\n", +"m=Cg/Cp\n", +"\n", +"printf('since Cg/Cp=')\n", +"\n", +"disp(m)\n", +"\n", +"printf('plastic film holds more charge')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_5: calculate_electronic_polarizability_and_radius_of_He_atom.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_5,pg 3-37\n", +"\n", +"N=2.7*10^25 //no of atoms per m^3\n", +"\n", +"er=1.0000684 //dielectric constant of He atom at NTP\n", +"\n", +"e0=8.854*10^-12 //absolute permitivity\n", +"\n", +"a=e0*(er-1)/N //electronic polarizability\n", +"\n", +"printf('1) electronic polarizability=')\n", +"\n", +"disp(a)\n", +"\n", +"R=(a/(4*%pi*e0))^(1/3) //radius of helium atom\n", +"\n", +"printf('2) radius of He atoms =')\n", +"\n", +"disp(R)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_6: calculate_electric_susceptibility.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_6,pg 3-37\n", +"\n", +"er=1.000014 //dielectric constant of He atom at NTP\n", +"\n", +"Xe=er-1 //electric susceptibility\n", +"\n", +"printf('electric susceptibility =')\n", +"\n", +"disp(Xe)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_7: calculate_relative_permeability.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_7,pg 3-37\n", +"\n", +"T=300 //temperature of paramagnetic material\n", +"\n", +"X=3.7*10^-3 //susceptibility of material\n", +"\n", +"C=X*T //using Curie's law\n", +"\n", +"T1=250 //temperature\n", +"\n", +"T2=600 //temperature\n", +"\n", +"u1=C/T1 //relative permeability of material at 250k\n", +"\n", +"u2=C/T2 //relative permeability of material at 350k\n", +"\n", +"printf('relative permeability at temp 250K=')\n", +"\n", +"disp(u1)\n", +"\n", +"printf('relative permeability at temp 600K =')\n", +"\n", +"disp(u2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_8: calculate_Temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_8,pg 3-38\n", +"\n", +"u=0.8*10^-23 //magnetic dipole moment of an atom \n", +"\n", +"B=0.8 //magnetic field\n", +"\n", +"K=1.38*10^-23 //boltzmann constant\n", +"\n", +"T=(2*u*B)/(3*K) //temperature\n", +"\n", +"printf('Temperature at which average thermal energy of an atom is equal to magntic energy=')\n", +"\n", +"disp(T)\n", +"\n", +"printf('K')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_9: calculate_magnetization_of_paramagnetic_material.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-3,Example3_17_9,pg 3-38\n", +"\n", +"B=0.5 //magnetic field\n", +"\n", +"t=27 //temperature in degree celcius\n", +"\n", +"T=273+t //temperature in kelvin\n", +"\n", +"u0=4*%pi*10^-7 //permeability of free space\n", +"\n", +"C=2*10^-3 //Curie's constant\n", +"\n", +"M=(C*B)/(u0*T) //magnetization of material\n", +"\n", +"printf('magnetization of paramagnetic material =')\n", +"\n", +"disp(M)\n", +"\n", +"printf('A/m')" + ] + } +], +"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 +} diff --git a/Applied_Physics_i_by_I_A_Shaikh/4-Acoustics_and_Ultrasonics.ipynb b/Applied_Physics_i_by_I_A_Shaikh/4-Acoustics_and_Ultrasonics.ipynb new file mode 100644 index 0000000..44762f5 --- /dev/null +++ b/Applied_Physics_i_by_I_A_Shaikh/4-Acoustics_and_Ultrasonics.ipynb @@ -0,0 +1,1261 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Acoustics and Ultrasonics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11_1: calculate_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_11_1,pg 4-17\n", +"\n", +"d=8900 //density\n", +"\n", +"Y=20.8*10^10 //Young's modulus\n", +"\n", +"n=40*10^3 //frequency of wave\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"l=(k/(2*n))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"printf('length =')\n", +"\n", +"disp(l)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12_1: calculate_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_12_1,pg 4-20\n", +"\n", +"d=2.65*10^3 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"n=1*10^6 //frequency of wave\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"t=(k/(2*n))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"printf('thickness =')\n", +"\n", +"disp(t)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_10: calculate_depth_of_seabed_and_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_10,pg 4-31\n", +"\n", +"f=0.07*10^6 //frequency\n", +"\n", +"t=0.65 //time\n", +"\n", +"v=1700 //velocity of sound\n", +"\n", +"d=v*t/2 //depth of seabed\n", +"\n", +"printf('1) depth of seabed =')\n", +"\n", +"disp(d)\n", +"\n", +"printf('meter')\n", +"\n", +"l=v/f //wavelength\n", +"\n", +"printf('2) wavelength =')\n", +"\n", +"disp(l)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_11: calculate_natural_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_11,pg 4-31\n", +"\n", +"t=1*10^-3 //thicknesss of crystal\n", +"\n", +"d=2.65*10^3 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"n=(k/(2*t))*sqrt(Y/d) //formula of natural frequency\n", +"\n", +"printf(' natural frequency =')\n", +"\n", +"disp(n)\n", +"\n", +"printf('Hz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_12: calculate_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_12,pg 4-32\n", +"\n", +"d=2650 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"//case 1\n", +"\n", +"n1=3.8*10^6 //frequency of wave\n", +"\n", +"t1=(k/(2*n1))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"printf('1) thickness =')\n", +"\n", +"disp(t1)\n", +"\n", +"printf('meter')\n", +"\n", +"//case 2\n", +"\n", +"n2=300*10^3 //frequency of wave\n", +"\n", +"t2=(k/(2*n2))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"printf('2) thickness =')\n", +"\n", +"disp(t2)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_13: calculate_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_13,pg 4-32\n", +"\n", +"d=2650 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"n=2*10^6 //frequency of wave\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"t=(k/(2*n))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"printf('thickness =')\n", +"\n", +"disp(t)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_14: calculate_distance_between_two_ships.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_14,pg 4-33\n", +"\n", +"f=50*10^3 //frequency\n", +"\n", +"v1=348 //velocity of ultrasound in atmosphere\n", +"\n", +"v2=1392 //velocity of ultrasound in sea water\n", +"\n", +"t=2 //time difference\n", +"\n", +"//distance is constant hence v1*t1=v2*t2\n", +"\n", +"m=v2/v1 //assuming constant as m\n", +"\n", +"//(t1-t2=d) and (t1=m*t2) therefore\n", +"\n", +"t2=t/(m-1)\n", +"\n", +"d=v2*t2 //distance between two ship\n", +"\n", +"printf('distance between two ships =')\n", +"\n", +"disp(d)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_15: calculate_natural_frequency_and_change_in_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_15,pg 4-34\n", +"\n", +"//for case1\n", +"t1=2*10^-3 //thicknesss of plate\n", +"\n", +"d=2.65*10^3 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"n1=(k/(2*t1))*sqrt(Y/d) //formula of natural frequency\n", +"\n", +"printf(' 1)natural frequency =')\n", +"\n", +"disp(n1)\n", +"\n", +"printf('Hz')\n", +"\n", +"//for case2\n", +"\n", +"n2=3*10^6 //frequency\n", +"\n", +"t2=(k/(2*n2))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"t=t1-t2 //change in thickness\n", +"\n", +"printf(' 2)change in thickness =')\n", +"\n", +"disp(t)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_16: calculate_depth_of_sea_bed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_16,pg 4-34\n", +"\n", +"S=10 //salinity\n", +"\n", +"t=2 //time\n", +"\n", +"T=20 //temperature\n", +"\n", +"v=1510+1.14*S+4.21*T-0.037*T^2 //velocity of ultrasound in sea\n", +"\n", +"d=v*t/2 //depth of sea bed\n", +"\n", +"printf('depth of sea bed =')\n", +"\n", +"disp(d)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_17: calculate_depth_of_sea_bed_and_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_17,pg 4-35\n", +"\n", +"S=29 //salinity\n", +"\n", +"t=2 //time\n", +"\n", +"l=0.01 //wavelength\n", +"\n", +"T=30 //temperature\n", +"\n", +"v=1510+1.14*S+4.21*T-0.037*T^2 //velocity of ultrasound in sea\n", +"\n", +"d=v*t/2 //depth of sea bed\n", +"\n", +"printf('1)depth of sea bed =')\n", +"\n", +"disp(d)\n", +"\n", +"printf('meter')\n", +"\n", +"f=v/l //frequency\n", +"\n", +"printf('2) frequency =')\n", +"\n", +"disp(f)\n", +"\n", +"printf('Hz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_18: calculate_real_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_18,pg 4-35\n", +"\n", +"v1=5.9*10^3 //velocity of UW in mild steel\n", +"\n", +"v2=4.3*10^3 //velocity of UW in brass\n", +"\n", +"t2=15*10^-3 //thickness of brass plate\n", +"\n", +"t1=v2*t2/v1 //since ve;ocity is inversly proportional to thickness\n", +"\n", +"printf('real thickness =')\n", +"\n", +"disp(t1)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_19: calculate_thickness_of_crystal.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_19,pg 4-36\n", +"\n", +"t1=4*10^-3 //thickness of 1st crystal\n", +"\n", +"n1=400*10^3 //frequency of 1st crystal\n", +"\n", +"n2=500*10^3 //frequency of 2nd crystal\n", +"\n", +"t2=n1*t1/n2 //since frquency is inversly proportional to thickness\n", +"\n", +"printf('thickness of 2nd crystal =')\n", +"\n", +"disp(t2)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_1: calculate_Reverberation_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_1,pg 4-25\n", +"\n", +"l=20 //length of room\n", +"\n", +"b=15 //bredth of room\n", +"\n", +"h=10 //height of room\n", +"\n", +"V=l*b*h //volume of room\n", +"\n", +"a=0.106 //absorption coefficient\n", +"\n", +"S=2*(l*b+b*h+h*l) //surface area of hall\n", +"\n", +"T=(0.161*V)/(a*S) //Reverberation time,using Sabine's formula\n", +"\n", +"printf('Reverberation time =')\n", +"\n", +"disp(T)\n", +"\n", +"printf('sec')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_20: calculate_distance_at_which_defect_has_occurred.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_20,pg 4-36\n", +"\n", +"t2=30*10^-6 //pulse arrival time of defective steel bar\n", +"\n", +"t1=80*10^-6 //pulse arrival time of non defective steel bar\n", +"\n", +"d=40*10^-2 //bar thickness\n", +"\n", +"x=(t2/t1)*d\n", +"\n", +"printf('distance at which defect has occurred =')\n", +"\n", +"disp(x)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_21: calculate_echo_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_21,pg 4-37\n", +"\n", +"d=18*10^-3 //thickness\n", +"\n", +"v=5.9*10^3 //velocity\n", +"\n", +"t=(2*d)/v //echo time\n", +"\n", +"printf('echo time =')\n", +"\n", +"disp(t)\n", +"\n", +"printf('sec')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_22: calculate_frquency_of_vibration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_22,pg 4-37\n", +"\n", +"t=1*10^-3 //thickness of quartz crystal\n", +"\n", +"//given t=l/2\n", +"\n", +"l=t*2 //wavelength\n", +"\n", +"Y=7.9*10^10 //young's module of crystal\n", +"\n", +"p=2650 //density of crystal\n", +"\n", +"v=sqrt(Y/p) //velocity of vibration\n", +"\n", +"n=v/l //frequency of vibration\n", +"\n", +"printf('frquency of vibration =')\n", +"\n", +"disp(n)\n", +"\n", +"printf('Hz')\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_23: calculate_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_23,pg 4-38\n", +"\n", +"d=7.23*10^3 //density\n", +"\n", +"Y=11.6*10^10 //Young's modulus\n", +"\n", +"n=20*10^3 //frequency of wave\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"l=(k/(2*n))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"printf('length =')\n", +"\n", +"disp(l)\n", +"\n", +"printf('meter')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_24: calculate_natural_frequency_and_change_in_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_24,pg 4-38\n", +"\n", +"//for case1\n", +"t1=2*10^-3 //thicknesss of plate\n", +"\n", +"d=2.65*10^3 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"n1=(k/(2*t1))*sqrt(Y/d) //formula of natural frequency\n", +"\n", +"printf(' 1)natural frequency =')\n", +"\n", +"disp(n1)\n", +"\n", +"printf('Hz')\n", +"\n", +"//for case2\n", +"\n", +"n2=3*10^6 //frequency\n", +"\n", +"t2=(k/(2*n2))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"t=t1-t2 //change in thickness\n", +"\n", +"printf(' 2)change in thickness =')\n", +"\n", +"disp(t)\n", +"\n", +"printf('meter')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_25: calculate_average_absorption_coefficien_and_total_absorption.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_25,pg 4-39\n", +"\n", +"l=20 //length of room\n", +"\n", +"b=15 //bredth of room\n", +"\n", +"h=10 //height of room\n", +"\n", +"V=l*b*h //volume of room\n", +"\n", +"S=2*(l*b+b*h+h*l) //surface area of hall\n", +"\n", +"T=3 //Reverberation time\n", +"\n", +"a=(0.161*V)/(T*S) //using Sabine's formula\n", +"\n", +"printf('1) average absorption coefficient =')\n", +"\n", +"disp(a)\n", +"\n", +"m=a*S //total absorption\n", +"\n", +"printf('2) total absorption of surface =')\n", +"\n", +"disp(m)\n", +"\n", +"printf('m^2/sec')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_26: calculate_natural_frequency_and_change_in_thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_26,pg 4-39\n", +"\n", +"//for case1\n", +"t1=1.8*10^-3 //thicknesss of plate\n", +"\n", +"d=2.65*10^3 //density\n", +"\n", +"Y=8*10^10 //Young's modulus\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"n1=(k/(2*t1))*sqrt(Y/d) //formula of natural frequency\n", +"\n", +"printf(' 1)natural frequency =')\n", +"\n", +"disp(n1)\n", +"\n", +"printf('Hz')\n", +"\n", +"//for case2\n", +"\n", +"n2=2*10^6 //frequency\n", +"\n", +"t2=(k/(2*n2))*sqrt(Y/d) //arranging formula of natural frequency\n", +"\n", +"t=t1-t2 //change in thickness\n", +"\n", +"printf(' 2)change in thickness =')\n", +"\n", +"disp(t)\n", +"\n", +"printf('meter')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_27: calculate_Youngs_modulus.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_27,pg 4-39\n", +"\n", +"n=0.4999*10^6 //frequency\n", +"\n", +"t=5.5*10^-3 //thicknesss of plate\n", +"\n", +"d=2.65*10^3 //density\n", +"\n", +"k=1 //consider 1st harmonic\n", +"\n", +"Y=4*(t^2)*(n^2)*d/k //arranging formula of natural frequency\n", +"\n", +"printf('Youngs modulus =')\n", +"\n", +"disp(Y)\n", +"\n", +"printf('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_2: calculate_change_in_intensity_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_2,pg 4-26\n", +"\n", +"m=%i //original sound intensity\n", +"\n", +"n=1000*%i //increased intensity value\n", +"\n", +"l=10*log10(n/m) //change in intensity level\n", +"\n", +"printf('change in intensity level =')\n", +"\n", +"disp(l)\n", +"\n", +"printf('dB')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_3: clculate_average_sound_absorption_coefficient_and_reverberation_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_3,pg 4-26\n", +"\n", +"S1=220 //wall area\n", +"\n", +"a1=0.03 //absorption coefficient for the wall\n", +"\n", +"S2=120 //floor area\n", +"\n", +"a2=0.8 //absorption coefficient for the floor\n", +"\n", +"S3=120 //ceiling area\n", +"\n", +"a3=0.06 //absorption coefficient for the ceiling\n", +"\n", +"V=600 //volume of room\n", +"\n", +"S=S1+S2+S3 //total surface area\n", +"\n", +"a=(a1*S1+a2*S2+a3*S3)/S //average sound absorption coefficient\n", +"\n", +"printf('1) average sound absorption coefficient =')\n", +"\n", +"disp(a)\n", +"\n", +"T=(0.161*V)/(a*S) //Reverberation time,using Sabine's formula\n", +"\n", +"printf('2) Reverberation time =')\n", +"\n", +"disp(T)\n", +"\n", +"printf('sec')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_4: calculate_average_absorption_coefficient.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_4,pg 4-27\n", +"\n", +"V=5500 //volume\n", +"\n", +"T=2.3 //Reverberation time\n", +"\n", +"S=750 //sound absorption coefficient\n", +"\n", +"a=(0.161*V)/(S*T) //using Sabine's formula\n", +"\n", +"printf('average absorption coefficient =')\n", +"\n", +"disp(a)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_5: claculate_average_absorption_coefficient_and_area_of_floor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_5,pg 4-27\n", +"\n", +"l=20 //length of room\n", +"\n", +"b=12 //bredth of room\n", +"\n", +"h=12 //height of room\n", +"\n", +"V=l*b*h //volume of room\n", +"\n", +"S=2*(l*b+b*h+h*l) //surface area of hall\n", +"\n", +"T1=2.5 //Reverberation time\n", +"\n", +"a=(0.161*V)/(T1*S) //using Sabine's formula\n", +"\n", +"printf('1) average absorption coefficient =')\n", +"\n", +"disp(a)\n", +"\n", +"a1=0.5 //absorption coefficient\n", +"\n", +"T2=2 //Reverberation time\n", +"\n", +"S1=(0.161*V/(a1-a))*(1/T2-1/T1)\n", +"\n", +"printf('2) carpet area required =')\n", +"\n", +"disp(S1)\n", +"\n", +"printf('m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_6: calculate_reverberation_time_for_various_case.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_6,pg 4-28\n", +"\n", +"Ac=10*12 //area of carpet covering entire floor\n", +"\n", +"ac=0.06 //absorption coefficient of carpet\n", +"\n", +"aS1=Ac*ac //absorption due to carpet\n", +"\n", +"Af=10*12 //area of false celling\n", +"\n", +"af=0.03 //absorption coefficient of celling\n", +"\n", +"aS2=Af*af //absorption due to celling\n", +"\n", +"As=100*1 //area of cushioned sets\n", +"\n", +"as=1 //absorption coefficient of cushion sets\n", +"\n", +"aS3=As*as //absorption due to cusion sets\n", +"\n", +"Aw=346*1 //area of walls covered with absorbent\n", +"\n", +"aw=0.2 //absorption coefficient of walls\n", +"\n", +"aS4=Aw*aw //absorption due to walls\n", +"\n", +"Ad=346*1 //area of wooden door\n", +"\n", +"ad=0.2 //absorption coefficient of wooden door\n", +"\n", +"aS5=Ad*ad //absorption due to wooden door\n", +"\n", +"aS=aS1+aS2+aS3+aS4 //total absorption\n", +"\n", +"ap=0.46 //absorption coefficient of audience/person\n", +"\n", +"l=12 //assuming length of wall\n", +"\n", +"b=10 //assuming breadth of wall\n", +"\n", +"h=8 //assuming height of wall\n", +"\n", +"V=l*b*h //volume of hall\n", +"\n", +"//case 1 :(no one inside/emptey hall)\n", +"\n", +"T1=(0.161*V)/aS //reverberation time\n", +"\n", +"printf(' 1)reverberation time of empty hall =')\n", +"\n", +"disp(T1)\n", +"\n", +"printf('sec')\n", +"\n", +"//case 2 :(50 person inside hall)\n", +"\n", +"T2=(0.161*V)/(aS+50*0.46) //reverberation time\n", +"\n", +"printf(' 2)reverberation time of hall with 50 person =')\n", +"\n", +"disp(T2)\n", +"\n", +"printf('sec')\n", +"\n", +"//case 2 :(100 person inside hall/full capacity of hall)\n", +"\n", +"T3=(0.161*V)/(aS+100*0.46) //reverberation time\n", +"\n", +"printf(' 3)reverberation time of hall with 100 person =')\n", +"\n", +"disp(T3)\n", +"\n", +"printf('sec')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_7: calculate_average_absorption_coefficient_and_total_absorption.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_7,pg 4-30\n", +"\n", +"l=20 //length of room\n", +"\n", +"b=15 //bredth of room\n", +"\n", +"h=5 //height of room\n", +"\n", +"V=l*b*h //volume of room\n", +"\n", +"S=2*(l*b+b*h+h*l) //surface area of hall\n", +"\n", +"T=3.5 //Reverberation time\n", +"\n", +"a=(0.161*V)/(T*S) //using Sabine's formula\n", +"\n", +"printf('1) average absorption coefficient =')\n", +"\n", +"disp(a)\n", +"\n", +"avg=a*S //average total absorption\n", +"\n", +"printf('2) average total absorption =')\n", +"\n", +"disp(avg)\n", +"\n", +"printf('m^2.S')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_8: calculate_change_in_reverberation_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_8,pg 4-30\n", +"\n", +"l=20 //length of room\n", +"\n", +"b=15 //bredth of room\n", +"\n", +"h=10 //height of room\n", +"\n", +"V=l*b*h //volume of room\n", +"\n", +"a=0.1 //absorption coefficient\n", +"\n", +"S=2*(l*b+b*h+h*l) //surface area of hall\n", +"\n", +"T1=(0.161*V)/(a*S) //Reverberation time,using Sabine's formula\n", +"\n", +"printf('1) Reverberation time =')\n", +"\n", +"disp(T1)\n", +"\n", +"printf('sec')\n", +"\n", +"a2=0.66 //absorption coefficient of curtain cloth\n", +"\n", +"S2=100 //surface area of a curtain cloth\n", +"\n", +"T2=(0.161*V)/(a*S+a2*S2*2) //Reverberation time,using Sabine's formula\n", +"\n", +"T=T1-T2 //change in Reverberation time\n", +"\n", +"printf('2) change in Reverberation time =')\n", +"\n", +"disp(T)\n", +"\n", +"printf('sec')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15_9: calculate_average_absorption_coefficient_and_reverberation_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter-4,Example4_15_9,pg 4-30\n", +"\n", +"S1=220 //wall area\n", +"\n", +"a1=0.03 //absorption coefficient for the wall\n", +"\n", +"S2=120 //floor area\n", +"\n", +"a2=0.8 //absorption coefficient for the floor\n", +"\n", +"S3=120 //ceiling area\n", +"\n", +"a3=0.06 //absorption coefficient for the ceiling\n", +"\n", +"V=600 //volume of room\n", +"\n", +"S=S1+S2+S3 //total surface area\n", +"\n", +"a=(a1*S1+a2*S2+a3*S3)/S //average sound absorption coefficient\n", +"\n", +"printf('1) average sound absorption coefficient =')\n", +"\n", +"disp(a)\n", +"\n", +"T=(0.161*V)/(a*S) //Reverberation time,using Sabine's formula\n", +"\n", +"printf('2) Reverberation time =')\n", +"\n", +"disp(T)\n", +"\n", +"printf('sec')" + ] + } +], +"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 +} |