diff options
Diffstat (limited to 'Thermodynamics:_A_Core_Course/CH7.ipynb')
-rw-r--r-- | Thermodynamics:_A_Core_Course/CH7.ipynb | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/Thermodynamics:_A_Core_Course/CH7.ipynb b/Thermodynamics:_A_Core_Course/CH7.ipynb index 71226c1e..fdea70a8 100644 --- a/Thermodynamics:_A_Core_Course/CH7.ipynb +++ b/Thermodynamics:_A_Core_Course/CH7.ipynb @@ -27,10 +27,7 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.1\n",
"\n",
- "#To find the number of ways of distributing N particles\n",
- "#Variable declaration\n",
"N=20 \t\t\t\t#no, of particles\n",
"N1=4 \t\t\t\t#no. of particles in E1 energy level\n",
"N2=4 \t\t\t\t#no. of particles in E2 energy level\n",
@@ -38,7 +35,6 @@ "N4=3 \t\t\t\t#no. of particles in E4 energy level\n",
"N5=3 \t\t\t\t#no. of particles in E5 energy level\n",
"import math\n",
- "#Calculation\n",
"\t\n",
"Nf=math.factorial(N) \n",
"N1f=math.factorial(N1) \n",
@@ -48,7 +44,6 @@ "N5f=math.factorial(N5) \n",
"n=N1f*N2f*N3f*N4f*N5f \n",
"W=Nf/n \t\t\t#no. of ways of distributing\n",
- "#Result\n",
"print\"The no. of ways of distributing the particles is\",W"
],
"language": "python",
@@ -76,16 +71,12 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.2\n",
- "#To find the fraction of molecules present in vibrational level\n",
- "#Variable declaration\n",
"T=298.0 \t\t\t#Temperature [K]\n",
"v=6.5*10**13 \t\t#Frequency in [sec-1]\n",
"\t#Consider zero point energy = 0.\n",
"h=6.627*10**-34 \t#planck's constant[J.s]\n",
"k=1.381*10**-23 \t#Boltzmann constant \n",
"N=1.0 \t\t\t#Since N=summation(gj*exp(-Ej/kT))\n",
- "#Calculation\n",
"\n",
"E1=h*v \t\t\t#for energy level 1[J]\n",
"E2=2*h*v \t\t#for energy level 2[J]\n",
@@ -97,7 +88,6 @@ "N2=(g2*math.exp(-E2/x)) #molecules present in energy level 2\n",
"n1=N1/N \t\t#fraction of molecules present in energy level 1\n",
"n2=N2/N \t\t#fraction of molecules present in energy level 2\n",
- "#Result\n",
"print\"The fraction of molecule s present in energy level 1 is\",'{0:.7f}'.format(round(n1,7)) \n",
"\n",
"\n",
@@ -129,21 +119,16 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.3\n",
- "#To find the ratio of no. of particle per state for two states separated by an energy dE\n",
- "#Variable declaration\n",
"dE=4.3*10**-20 \t\t\t#difference in energy levels[J]\n",
"T1=0.000001 \t\t\t#Initial Temperature[K](approximately zero , needed for \t\t\t\texecution)\n",
"T2=300 \t\t\t\t#Final Temperature[K]\n",
"k=1.381*10**-23 \t\t#Boltzmann constant [J/K]\n",
"import math\n",
- "#Calculation\n",
"\t\n",
"x1=k*T1 \n",
"r1=math.exp(-dE/x1) \n",
"x2=k*T2 \n",
"r2=math.exp(-dE/x2) \n",
- "#Result\n",
"print\"The ratio of no. of particles per state at 0K is\",r1 \n",
"print\"The ratio of no. of particles per state at 300K is\",round(r2,6) "
],
@@ -173,16 +158,12 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.4\n",
- "#To find the no. of atoms in first-excited singlet state\n",
- "#Variable declaration\n",
"T1=273.0 \t\t\t\t#[K]\n",
"T2=14273.0 \t\t\t#[K]\n",
"E1=-13.6 \t\t\t#Energy of ground state [eV]\n",
"k=8.617*10.0**-5.0 \t\t\t#Boltzmann constant[eV/K]\n",
"g2=8.0 \t\t\t\t#total no. of states with energy E2\n",
"g1=2.0 \t\t\t\t#total no. of states with energy E1\n",
- "#Calculation\n",
"import math\n",
"\t\n",
"E2=E1/(2.0**2) \t\t#Energy for n=2 (i.e.E2=E1/n2)\n",
@@ -190,7 +171,6 @@ "r1=(g2/g1)*math.exp(-(E2-E1)/x1) \n",
"x2=k*T2 \n",
"r2=(g2/g1)*math.exp(-(E2-E1)/x2) \n",
- "#Result\n",
"print\"The fraction of atoms present in level n=2 at 273K is\", round(r1,190) \n",
"print\"Therefore total 3*10**25 atoms we say that all are present at ground state\" \n",
"print\"\\n\\nThe fraction of atoms present in level n=2 at 14273 is\",round(r2,3) \n",
@@ -228,19 +208,14 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.5\n",
- "#To find the Temperature at this condition \n",
"\n",
- "#Variable declaration\n",
"r1=0.001 \t\t\t#the population of the states at a higher energy to that at a \t\t\t\tlower energy \n",
"dE=8*10**-20 \t\t\t#The difference in energy[J]\n",
"k=1.381*10**-23 \t\t\t#Boltzmann constant [J/K]\n",
"\n",
- "#Calculation\n",
"\n",
"x=k*math.log(r1) \n",
"T=-dE/x #[K]\n",
- "#Result\n",
"print\"The Temperature at this condition is\",round(T,1),\"K\""
],
"language": "python",
@@ -268,29 +243,18 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.6\n",
- "#To find the entropy of the system\n",
"\n",
- "#section(1)\n",
- "#Variable declaration\n",
- "#The energy levels are not degenerate \n",
"w=1 \t\t\t#no. of ways of distributing the molecules\n",
"k=1.381*10**-23 \t#Boltzmann constant[J/K]\n",
- "#Calculation\n",
"import math\n",
"\t\n",
"S1=k*math.log(w) \t\t#Entropy of system at 0K\n",
"print\"The Entropy of System at 0K and non-degenerate eng level is\",S1,\"J/K/mol\"\n",
"\n",
- "#section(2)\n",
- "#Here the energy levels are degenerate\n",
"n=2 \n",
"R=8.314 #Universal gas constant[J/K/mol]\n",
"\n",
- "#To find the entropy of the system\n",
- "#S=kmath.log(n**N)=>S=R*math.log(n)\n",
"S2=R*math.log(n) #Entropy of the system[J/K/mol]\n",
- "#Result\n",
"print\"\\nThe Entropy of system at 0K and degenerete eng level is\",round(S2,2),\"J/K/mol\""
],
"language": "python",
@@ -320,10 +284,7 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.9\n",
"\n",
- "#To find the Transitional partition function of an oxygen molecule confined in a 1-litre \tvessel at 300K\n",
- "#Variable declaration\n",
"V=0.001 \t\t\t#Volume of vessel[m3]\n",
"T=300 \t\t\t\t#Temperature [K]\n",
"k=1.381*10**-23 \t\t#Boltzmann constant[J/K]\n",
@@ -331,13 +292,11 @@ "h=6.626*10**-34 \t\t#planck's constant[J.s}\n",
"\n",
"\n",
- "#Calculation\n",
"\t\n",
"m=32*1.66*(10**-27) \t\t#mass of oxygen molecule[Kg]\n",
"x=((2*3.14*m*k*T)**(3.0/2.0))*V \n",
"y=h**3 \n",
"zt=x/y \t\t\t\t#Transitional partition function of an oxygen molecule\n",
- "#Result\n",
"print\"The Transitional partition function of an oxygen molecule confined in a 1-litre vessel at 300K is\",zt\n",
"print\"Wrongly calculated in book as 5.328*10^33\""
],
@@ -367,9 +326,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.12\n",
- "#To find the Entropy of argon at 273K and 1 atmospheric pressure\n",
- "#Variable declaration\n",
"R=1.99 \t\t\t#Universal gas constant [cal/K]\n",
"e=2.718 \n",
"V=22414 \t\t#volume[cm3]\n",
@@ -379,13 +335,11 @@ "k=1.381*10**-16 \t#Boltzmann constant[erg/K]\n",
"T=273.2 \t\t#Temperature[K]\n",
"import math\n",
- "#Calculation\n",
"\t\n",
"x=V*(e**2.5) \n",
"y=L*(h**3) \n",
"z=(2*3.14*m*k*T)**1.5 \n",
"S=R*math.log(x*z/y) #Entropy [cal/degree/mol]\n",
- "#Result\n",
"print\"The Entropy of argon at 273K and 1 atm is\",round(S,1),\"cal/degree/mol\""
],
"language": "python",
@@ -413,10 +367,7 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.14\n",
"\n",
- "#To find the rotational entropy and free energy for O2 gas\n",
- "#Variable declaration\n",
"T=298 \t\t\t\t#Temperature[K]\n",
"I=1.9373*10**-46 \t\t#moment of inertia of O2 gas [Kg/m2]\n",
"h=6.626*10**-34 \t\t\t#Planck's constant[J.s]\n",
@@ -424,11 +375,9 @@ "R=8.314 \t\t\t#Universal gas constant[J/K/mol]\n",
"u=2 \t\t\t\t#Homonuclear diatomic molecule\n",
"import math\n",
- "#Calculation\n",
"\t\n",
"Sr=R+R*math.log(8*3.14*3.14*I*k*T/(u*h*h)) #[J/K/mol]\n",
"Gr=-R*0.001*T*math.log(8*3.14*3.14*I*k*T/(u*h*h)) #[KJ/mol]\n",
- "#Result\n",
"print\"The rotational entropy for O2 gas is\",round(Sr,3),\"J/K/mol\"\n",
"print\"The rotational free energy for O2 gas is\",round(Gr,3),\"KJ/mol\"\n"
],
@@ -458,9 +407,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.15\n",
- "#To find the vibrational contribution to the entropy of F2 at 298K\n",
- "#Variable declaration\n",
"T=298 \t\t\t\t#Temperature[K]\n",
"v=892.1*3*10**10 \t\t#frequency[sec-1]\n",
"h=6.626*10**-27 \t\t#Planck's constant [J.s]\n",
@@ -468,13 +414,11 @@ "e=2.718 \n",
"R=1.998 \t\t\t#Universal gas constant[cal/K]\n",
"\t\n",
- "#Calculation\n",
"import math\n",
"x=h*v/(k*T) \n",
"a=R*x*e**-x/(1-e**-x) \t\t#a=E-Eo/T\n",
"b=R*math.log(1-e**-x) \t\t#b=G-Eo/T\n",
"S=a-b \t\t\t\t#[cal/deg]\n",
- "#Result\n",
"print\"The vibrational contribution to the entropy of F2 is\",round(S,4),\"cal/deg APPROX\""
],
"language": "python",
@@ -502,9 +446,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.16\n",
- "#To find the equilibrium constant\n",
- "#Variable declaration\n",
"T=1273 \t\t\t\t#Temperature[K]\n",
"h=6.26*10**-27 \t\t\t#Planck's constant[J.s]\n",
"k=1.381*10**-16 \t\t\t#Boltzmann constant[erg/K]\n",
@@ -517,14 +458,12 @@ "u=2 \t\t\t\t\t#symmetry number\n",
"L=6.023*10**23 \t\t\t\t#avogadro's number\n",
"import math\n",
- "#Calculation\n",
"\t\n",
"p=((3.14*m*k*T)**1.5)/h/h/h \n",
"s=R*u*h*h/L/8/3.14/3.14/I/k \n",
"q=1-(math.exp(-h*v/k/T)) \n",
"r=math.exp(-dE/k/T) \n",
"Kp=p*s*q*r \t\t\t\t#Equilibrium constant \n",
- "#Result\n",
"print\"The equilibrium constant is\",round(Kp,3) "
],
"language": "python",
@@ -552,9 +491,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "#example 7.17\n",
- "#To find the equilibrium constant for isotopic exchange reaction\n",
- "#Variable declaration\n",
"T=298.0 #Temperature[K]\n",
"m1=32.0 \n",
"m2=36.0 \n",
@@ -573,14 +509,12 @@ "vo3=1490.0 #vibration frequency of 18O2 [cm-1]\n",
"dE=0.5*h*c*(2*vo1-vo2-vo3) #[erg]\n",
"r=dE/k/T \n",
- "#Calculation\n",
"import math\n",
"\n",
"a=m3**3/m2**1.5/m1**1.5 \n",
"b=(u3**2)*4/u2/u1 \n",
"c=z3**2/z2/z1 \n",
"Kp=a*b*c*math.exp(-r) \n",
- "#Result\n",
"print\"The value of equilibrium constant for isotopic exchange reaction is\",round(Kp,3) "
],
"language": "python",
|