summaryrefslogtreecommitdiff
path: root/Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb')
-rw-r--r--Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb248
1 files changed, 248 insertions, 0 deletions
diff --git a/Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb b/Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb
new file mode 100644
index 0000000..c269d82
--- /dev/null
+++ b/Modern_Physics_by_R_A_Serway/10-Statistical_Physics.ipynb
@@ -0,0 +1,248 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Statistical Physics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: Population_of_excited_states_with_respect_to_ground_states_in_Hydrogen.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex10.1: Pg 340 (2005)\n",
+"clc; clear;\n",
+"// Part (a)\n",
+"E1 = -13.6; // Energy of ground state, eV\n",
+"E2 = -3.40; // Energy of first excited state, eV\n",
+"E3 = -1.51; // Energy of second excited state, eV\n",
+"g1 = 2; // Degeneracy for ground state\n",
+"g2 = 8; // Degeneracy for first excited state\n",
+"g3 = 18; // Degeneracy for second excited state\n",
+"kB = 8.617e-05; // Boltzmann constant, eV/K\n",
+"Ta = 300; // Temperature, K\n",
+"// As n_2/n_1 = (g_2*A*e^(-E_2/(k_B*T)))/(g_1*A*e^(-E_1/(k_B*T))), on simplifying we get\n",
+"N21 = (g2/g1)*exp((E1 - E2)/(kB*Ta)); // The population of first excited state w.r.t ground state\n",
+"printf('\nThe population of first excited state w.r.t. ground state at %3d K = %1d', Ta, N21);\n",
+"\n",
+"// Part (b)\n",
+"Tb = 20000; // Temperature, K\n",
+"n21 = (g2/g1)*exp((E1 - E2)/(kB*Tb)); // The population of first excited state w.r.t ground state\n",
+"n31 = (g3/g1)*exp((E1 - E3)/(kB*Tb)); // The population of second excited state w.r.t ground state\n",
+"printf('\nThe population of first excited state w.r.t. ground state at %4d K = %6.4f', Tb, n21);\n",
+"printf('\nThe population of second excited state w.r.t ground state at %4d K = %6.4f', Tb, n31);\n",
+"\n",
+"// Part (c)\n",
+"E_strength = (g3/g2)*exp((E2 - E3)/(kB*Tb)); // Emission strength\n",
+"printf('\nEmission strength of spectral lines = %3.2f', E_strength);\n",
+"\n",
+"// Result\n",
+"// The population of first excited state w.r.t. ground state at 300 K = 0\n",
+"// The population of first excited state w.r.t. ground state at 20000 K = 0.0108\n",
+"// The population of second excited state w.r.t ground state at 20000 K = 0.0081\n",
+"// Emission strength of spectral lines = 0.75 "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: Validity_of_Maxwell_Boltzmann_Statistics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex10.2: Pg 345 (2005)\n",
+"clc; clear;\n",
+"// Part (a)\n",
+"N = 6.02e+23; // Number of molecules at STP\n",
+"m = 3.34e-27; // Mass of H-molecule, kg\n",
+"h_cross = 1.055e-34; // Reduced Plank's constant, J-s\n",
+"V = 22.4e-03; // Volume occupied by molecules at STP, m^3\n",
+"T = 273; // Absolute temperature, K\n",
+"k_B = 13.8e-24; // Boltzmann constant, J/K\n",
+"x_H = N/V*h_cross^3/(8*(m*k_B*T)^(3/2)); // Particle concentration at STP\n",
+"printf('\nx_H = %4.2e', x_H);\n",
+"if (x_H < 1)\n",
+"printf('\nThe criterion for the validity of Maxwell–Boltzmann Statistics is satisfied in hydrogen.');\n",
+"\n",
+"// Part (b)\n",
+"d_Ag = 10.5; // Density of silver, g/m^3\n",
+"M_Ag = 107.9; // Molar weight of silver, g\n",
+"NV_Ag = (d_Ag/M_Ag)*(6.02e+023)*1e+06; // Density of free electrons in silver, electrons/m^3\n",
+"me = 9.109e-031; // Mass of an electron, kg\n",
+"T = 300; // Room temperature, K\n",
+"x_Ag = ((NV_Ag)*h_cross^3)/(8*(me*k_B*T)^(3/2)); // Particle concentration at STP\n",
+"printf('\nx_Ag = %4.2f', x_Ag);\n",
+"if (x_Ag > 1)\n",
+"printf('\nThe criterion for the validity of Maxwell–Boltzmann Statistics does not hold for electrons in silver');\n",
+"\n",
+"// Result\n",
+"// x_H = 8.84e-08\n",
+"// The criterion for the validity of Maxwell–Boltzmann Statistics is satisfied in hydrogen.\n",
+"// x_Ag = 37.13\n",
+"// The criterion for the validity of Maxwell–Boltzmann Statistics does not hold for electrons in silver "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: Photons_in_a_box.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex10.3: Pg 352 (2005)\n",
+"clc; clear;\n",
+"// Part (b)\n",
+"I = integrate('z^2/(exp(z)-1)', 'z', 0, 100); // Integral value\n",
+"k_B = 8.62e-05; // Boltzmann constant, eV/K\n",
+"T = 3000; // Temperature, K\n",
+"h = 4.136e-15; // Plank's constant, eV\n",
+"c = 3e+10; // Velocity of light, cm/s\n",
+"N_V = 8*%pi*((k_B*T)/(h*c))^3*I; // Number of photons/cc\n",
+"printf('\nThe density of photons inside the cavity = %4.2fe+11 photons/cc', N_V*1e-11);\n",
+"\n",
+"// Result\n",
+"// The density of photons inside the cavity = 5.47e+11 photons/cc"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: Specific_Heat_of_Diamond.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex10.4: Pg 356 (2005)\n",
+"clc; clear;\n",
+"\n",
+"// Part (a)\n",
+"k_B = 8.62e-05; // Boltzmann constant, eV/K\n",
+"T_E = 1300; // Temperature, K\n",
+"h_cross = 6.58e-16; // Reduced plank's constant, eV-s\n",
+"omega = (k_B*T_E)/h_cross; // Frequency of vibration of carbon atom in diamond, Hz\n",
+"spacing = (h_cross*omega); // Spacing between adjacent oscillator energy level, eV\n",
+"printf('\nFrequency of vibration of carbon atom in diamond = %4.2e Hz', omega);\n",
+"printf('\nSpacing between adjacent oscillator energy level = %5.3f eV', spacing);\n",
+"\n",
+"// Part (b)\n",
+"T_R = 300; // Room temperature, K\n",
+"p = exp((h_cross*omega)/(k_B*T_R)); // For simplication\n",
+"E_R = (h_cross*omega)/(p-1); // Average energy of oscillator at room temperature, eV\n",
+"T = 1500; // Temperature, K\n",
+"q = exp((h_cross*omega)/(k_B*T)); // For simplication\n",
+"E_bar = (h_cross*omega)/(q-1); // Average energy at 1500 K, eV\n",
+"printf('\nAverage energy of oscillator at room temperature = %7.5f eV', E_R);\n",
+"printf('\nAverage oscillator energy at %4d K = %7.5f eV', T, E_bar);\n",
+"\n",
+"\n",
+"// Result\n",
+"// Frequency of vibration of carbon atom in diamond = 1.70e+14 Hz\n",
+"// Spacing between adjacent oscillator energy level = 0.112 eV\n",
+"// Average energy of oscillator at room temperature = 0.00149 eV\n",
+"// Average oscillator energy at 1500 K = 0.0813 eV"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5: Fermi_Energy_of_Gold.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// Scilab code Ex10.5: Pg 360 (2005)\n",
+"clc; clear;\n",
+"\n",
+"// Part (a)\n",
+"h = 6.625e-34; // Plank's constant, J-s\n",
+"m_e = 9.11e-31; // Mass of electron, kg\n",
+"density = 19.32/(1e-02)^3; // Density of gold, g/m^3\n",
+"weight = 197; // Molar weight, g/mol\n",
+"N_V = (density/weight)*6.02e+23; // Number of electrons per mole\n",
+"E_F = (h^2/(2*m_e*1.6e-19))*((3*(N_V))/(8*%pi))^(2/3); // Fermi energy of Gold at 0 K\n",
+"printf('\nFermi energy of Gold at 0 K = %4.2f eV', E_F); \n",
+"\n",
+"// Part (b)\n",
+"v_F = sqrt((2*E_F*1.6e-19)/m_e); // Fermi speed of Gold at 0 K\n",
+"printf('\nFermi speed of Gold at 0 K = %4.2fe+06 m/s', v_F*1e-06);\n",
+"\n",
+"// Part (c)\n",
+"k_B = 8.62e-05; // Boltzmann constant, eV/K\n",
+"T_F = (E_F)/(k_B); // Fermi temperature for Gold at 0 K, K\n",
+"printf('\nFermi temperature for Gold at 0 K = %5d K', T_F);\n",
+"\n",
+"// Result\n",
+"// Fermi energy of Gold at 0 K = 5.53 eV\n",
+"// Fermi speed of Gold at 0 K = 1.39fe+06 m/s\n",
+"// Fermi temperature for Gold at 0 K = 64201 K"
+ ]
+ }
+],
+"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
+}