{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 6: Classical Statistics and Quantum Statistics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.10: Number_of_microstates_formed_by_particles_obeying_Fermi_Dirac_statistics.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.10: Page-350 (2008)\n", "clc; clear;\n", "g1 = 8, g2 = 10; // Total number of cells in the first and the second compartments respectively\n", "n1 = 3, n2 = 4; // Given number of cells in the first and the second compartments respectively for given macrostate\n", "W_34 = factorial(g1)/(factorial(n1)*factorial(g1 - n1))*factorial(g2)/(factorial(n2)*factorial(g2 - n2)); // Total number of microstates in the macrostate (3, 4)\n", "printf('\nThe total number of microstates in the macrostate (%d, %d) = %d', n1, n2, W_34);\n", "\n", "// Result\n", "// The total number of microstates in the macrostate (3, 4) = 11760 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.11: Fermi_energy_and_internal_energy_for_metallic_silver_at_0_K.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.11: Page-351 (2008)\n", "clc; clear;\n", "h = 6.6e-034; // Planck's constant, Js\n", "m = 9.1e-031; // Mass of an electron, kg\n", "e = 1.6e-019; // Energy equivalent of 1 eV, J\n", "rho = 10.5; // Density of silver, g/cc\n", "A = 108; // Atomic weight of Ag, g/mole\n", "N_A = 6.023e+023; // Avogadro's number\n", "E_F0 = h^2/(8*m)*(3*N_A*rho*1e+006/(%pi*A))^(2/3); // Fermi energy of silver at 0 K, J\n", "U = 3/5*(N_A*rho*1e+006/A)*E_F0; // Internal energy of the electron gas per unit volume at 0 K, J/metre-cube\n", "printf('\nThe Fermi energy of silver at 0 K = %3.1f eV', E_F0/e);\n", "printf('\nThe internal energy of the electron gas per unit volume at 0 K = %4.2e J/cubic-metre', U);\n", "\n", "// Result\n", "// The Fermi energy of silver at 0 K = 5.5 eV\n", "// The internal energy of the electron gas per unit volume at 0 K = 3.07e+010 J/cubic-metre " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.12: Number_of_conduction_electrons_per_cc_in_silver_at_0_K.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.12: Page-351 (2008)\n", "clc; clear;\n", "h = 6.6e-034; // Planck's constant, Js\n", "m = 9.1e-031; // Mass of an electron, kg\n", "e = 1.6e-019; // Energy equivalent of 1 eV, J\n", "E_F0 = 5.48; // Fermi energy of silver at 0 K, eV\n", "N_bar = (8*m/h^2)^(3/2)*%pi/3*(E_F0*e)^(3/2); // Number density of conduction electrons in silver at 0 K, per cc\n", "printf('\nThe number density of conduction electrons in silver at 0 K = %3.1e per cc', N_bar*1e-006);\n", "\n", "// Result\n", "// The number density of conduction electrons in silver at 0 K = 5.9e+022 per cc " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.13: Fermi_energy_of_conduction_electrons_in_cesium.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.13: Page-351 (2008)\n", "clc; clear;\n", "h = 6.6e-034; // Planck's constant, Js\n", "m = 9.1e-031; // Mass of an electron, kg\n", "e = 1.6e-019; // Energy equivalent of 1 eV, J\n", "E_F0_Be = 14.44 // Fermi energy of Be at 0 K, eV\n", "N_bar_Be = 24.2e+022; // Number density of conduction electrons in Be at 0 K, per cc\n", "N_bar_Cs = 0.91e+022; // Number density of conduction electrons in Cs at 0 K, per cc\n", "E_F0_Cs = E_F0_Be*(N_bar_Cs/N_bar_Be)^(2/3); // Fermi energy of conduction electrons in cesium, eV\n", "printf('\nThe Fermi energy of conduction electrons in cesium = %5.3f eV', E_F0_Cs);\n", "\n", "// Result\n", "// The Fermi energy of conduction electrons in cesium = 1.621 eV \n", "// The answer is given wrongly in the textbook" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.1: Probability_of_distribution_of_distinguishable_particles.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.1: Page-345 (2008)\n", "clc; clear;\n", "n = 14; // Total number of particles\n", "C = 2; // Total number of compartments\n", "N_micro = C^n; // Total number of microstates\n", "n1 = [10 7 14]; // Set of number of particles in first compartment\n", "n2 = [4 7 0]; // Set of number of particles in second compartment\n", "for i = 1:1:3\n", " W = factorial(n1(i) + n2(i))/(factorial(n1(i))*factorial(n2(i)));\n", " P = W/N_micro;\n", " printf('\nThe probability of microstate (%d, %d) = %8.6f', n1(i), n2(i), P);\n", "end\n", "\n", "// Result\n", "// The probability of microstate (10, 4) = 0.061096\n", "// The probability of microstate (7, 7) = 0.209473\n", "// The probability of microstate (14, 0) = 0.000061 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6: Most_probable_distribution_for_total_energy.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.6: Page-348 (2008)\n", "clc; clear;\n", "MAX = 10;\n", "// Look for all the possible set of values for n1, n2 and n3\n", "printf('\nThe most probable distribution is for ');\n", "for i = 0:1:5 \n", " for j = 0:1:5\n", " for k = 0:1:5\n", " // Check for the condition and avoid repetition of set of values\n", " if ((i + j + k) == 5) & ((j+2*k) == 3) then \n", " W = factorial(i + j + k)/(factorial(i)*factorial(j)*factorial(k));\n", " if W > MAX then\n", " printf('\nn1 = %d, n2 = %d and n3 = %d', i, j, k);\n", " end\n", " end\n", " end\n", " end\n", "end\n", "\n", "// Result\n", "// The most probable distribution is for \n", "// n1 = 3, n2 = 1 and n3 = 1 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.8: Probability_for_a_Maxwell_Boltzmann_system_to_be_in_given_states.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.8: Page-349 (2008)\n", "clc; clear;\n", "k = 1.38e-016; // Boltzmann constant, erg/K\n", "T = 100; // Given temperature, K\n", "E1 = 0; // Energy of the first state, erg\n", "E2 = 1.38e-014; // Energy of the second state, erg\n", "E3 = 2.76e-014; // Energy of the third state, erg\n", "g1 = 2, g2 = 5, g3 = 4; // Different ways of occuring for E1, E2 and E3 states\n", "P1 = g1*exp(-E1/(k*T)); // Probability of occurence of state E1\n", "P2 = g2*exp(-E2/(k*T)); // Probability of occurence of state E2\n", "P3 = g3*exp(-E3/(k*T)); // Probability of occurence of state E3\n", "PE_3 = P3/(P1+P2+P3); // Probability for the system to be in any one microstates of E3\n", "P0 = P1/(P1+P2+P3); // Probability for the system to be in ground state\n", "printf('\nThe probability for the system to be in any one microstates of E3 = %6.4f', PE_3);\n", "printf('\nThe probability for the system to be in ground state = %5.3f', P0);\n", "\n", "// Result\n", "// The probability for the system to be in any one microstates of E3 = 0.1236\n", "// The probability for the system to be in ground state = 0.457 " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.9: Number_of_microstates_in_the_given_macostate_of_a_Fermi_Dirac_system.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Scilab Code Ex6.9: Page-350 (2008)\n", "clc; clear;\n", "g1 = 6, g2 = 8; // Total number of cells in the first and the second compartments respectively\n", "n1 = 2, n2 = 3; // Given number of cells in the first and the second compartments respectively for given macrostate\n", "W_23 = factorial(g1)/(factorial(n1)*factorial(g1 - n1))*factorial(g2)/(factorial(n2)*factorial(g2 - n2)); // Total number of microstates in the macrostate (2, 3)\n", "printf('\nThe total number of microstates in the macrostate (%d, %d) = %d', n1, n2, W_23);\n", "\n", "// Result\n", "// The total number of microstates in the macrostate (2, 3) = 840 " ] } ], "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 }