In [3]:
import numpy as np
import matplotlib.pyplot as plt
E = []
l = 1.4e-10 #m
hbar = 1.05457e-34 #J*s
m = 9.109e-31 #kg
N = [1,3,5,7,9] #N = number of C-C bonds
for n in range (1,7):
for i in N:
e = (n**2*np.pi**2*hbar**2*6.2415e18)/(2*m*(i*l)**2)
E.append(e)
plt.scatter(N,E[0:5], label = "n=1")
plt.scatter(N,E[5:10], label = "n=2")
plt.scatter(N,E[10:15], label = "n=3")
plt.scatter(N,E[15:20], label = "n=4")
plt.scatter(N,E[20:25], label = "n=5")
plt.scatter(N,E[25:30], label = "n=6")
plt.xticks(N, ["Ethylene", "Butadiene", "Hexatriene", "Octatriene", "Decapentaene"], rotation = 'vertical')
plt.ylabel('Energy (eV)')
plt.title('Energies of n = 1-6 Particle in a Box')
plt.legend()
plt.show()
In [4]:
import numpy as np
import matplotlib.pyplot as plt
l = 1.4*3 #Angstrom
x = np.linspace(0,l,100)
psi = (2/l)**.5*np.sin(2*np.pi*x/l) #normalized wave function
plt.plot(x,psi,label = '$\Psi_2(x)$')
plt.plot(x,psi**2,label = '$|\Psi_2(x)|^2$')
plt.xlim(0,l)
plt.xlabel('$x(\AA)$')
plt.ylabel('$\Psi_2(x)(\AA^{-1/2})$, $|\Psi_2(x)|^2(\AA^{-1})$')
plt.title('Wavefunction and Probability Distribution of n=2 Butadiene in a Box')
plt.axhline(y=0, color = 'k', linestyle = '--')
plt.axvline(x=l/4, color = 'k', linestyle = '--')
plt.axvline(x=3*l/4, color = 'k', linestyle = '--')
plt.annotate('Most Probable\n Location',xy=(l/4,0),xytext=(1.1,.25), arrowprops = dict(facecolor = 'black'))
plt.annotate('Most Probable Location',xy=(3*l/4,0),xytext=(1.5,.65), arrowprops = dict(facecolor = 'black'))
plt.annotate('Node Location and\nAverage Location',xy=(l/2,0),xytext=(1.5,-.3), arrowprops = dict(facecolor = 'black'))
plt.legend()
plt.show()
In [5]:
import numpy as np
l = 3*1.4e-10 #m, length of the box
hbar = 1.05457e-34 #J*s
me = 9.109e-31 #kg
E13 = ((3**2-1**2)*np.pi**2*hbar**2/2/me/l**2)*6.2415e18
E23 = ((3**2-2**2)*np.pi**2*hbar**2/2/me/l**2)*6.2415e18
lambda13 = 1240/E13 #nm
lambda23 = 1240/E23 #nm
print('From n=1 to n=3, light must have wavelength = {0:.2f}nm. \nFrom n=2 to n=3, light must have wavelength = {1:.2f}nm.'.format(lambda13,lambda23))
$|\langle\psi_1|\hat{x}|\psi_3\rangle|^2$ = $(\int_{0}^{L} \frac{sin(\pi x)}{L} * x * \frac{sin(3\pi x)}{L} dx)^2$
If we assume L = 1 m and integrate, this integral is equal to zero. Therefore, it is "forbidden".
$|\langle\psi_2|\hat{x}|\psi_3\rangle|^2$ = $(\int_{0}^{L} \frac{sin(2\pi x)}{L} * x * \frac{sin(3\pi x)}{L} dx)^2$
If we assume L = 1 m and integrate, this integral is not equal to zero. Therefore, it is "allowed".
In [6]:
import numpy as np
#Heat of Formatin data from NIST
ethylene = 52.4 #kJ/mol
butadiene = 108.8 #kJ/mol
print('According to NIST, the energy of reaction =', butadiene - 2*ethylene, 'kJ/mol.')
l = 1.4e-10 #m, length of C-C bond
hbar = 1.05457e-34 #J*s
me = 9.109e-31 #kg
ethyl_n = 4*1**2 #4 n1 electrons
buta_n = 2*(1**2+2**2) #2 n1 + 1 n2 electrons
Erxn = (buta_n*np.pi**2*hbar**2)/(2*me*(3*l)**2) - (ethyl_n*np.pi**2*hbar**2)/(2*me*l**2) #J/molecule
E_rxn = Erxn*6.022e23/1000 #kJ/mol
print('Using the particle in a box method, the energy of reaction =',round(E_rxn,1),'kJ/mol. ')
print('This model isn\'t perfect beacause the potential is not zero or infinite in real life, \n and the model ignores interaction between nucleus and electrons.')
When wall potential drops from infinity to finite value,
Number of bound states/levels will drop from infinite to finite (molecules will eventually escape the box at high enough energy).
It's possible for electrons to tunnel into once forbidden region.
Energies of bound states decreases.
In [7]:
import numpy as np
MN = 14 #amu
MO = 16 #amu
k = 1594.8 #N/m
l = 1.15077 #Angstroms
conv = 6.022e26 #amu to kg
h = 6.626e-34 # m^2 kg/s
c = 299792458 #m/s, Speed of Light
N = 6.022e23 #molecules/mole
Mred = 1/(1/MN+1/MO) #amu
print('The reduced mass is',round(Mred,2), 'amu.')
vibfreq = 1/(2*np.pi)*np.sqrt(k/Mred*conv/(c**2)/(100**2)) #cm^-1
print('The harmonic vibrational frequency is',round(vibfreq,2), 'cm^-1.')
E0 = .5*h*vibfreq*c*100*N/1000
print('The zero point vibrational energy is', round(E0,2),'kJ/mol.')
In [8]:
MN = 14 #amu
MO = 16 #amu
k = 1594.8 #N/m
hbar = 1.05457e-34 #J*s
conv = 6.022e26 #amu to kg
l = 1.15077e-10 #m
alpha = (hbar**2/Mred/k*conv)**0.25 #m
rmax = l+alpha #m
rmin = l-alpha #m
print('Classical bond length maximum is %e m.'%(rmax))
print('Classical bond length minimum is %e m.'%(rmin))
In [9]:
from sympy import *
a = 1 # in this case, a can be any number
x = Symbol('x')
pi = integrate(1/a/sqrt(pi)*exp(-x**2/a**2),(x,-a,a))
print('The probability of being inside the classical limits is:')
pprint(pi)
print('Therefore, the probability of being outside the classical limits is')
pprint(1-pi)
print('This is equal to 0.1523.')
NO will exhibit an infrared spectrum. Because the molecule is heteronuclear (two ends are not the same), it has a dipole moment. Stretching the bond will change the dipole moment, so the molecule satisfies the gross selection rule.
At 273 K, the most occupied vibrational state is v = 0. Therefore, it will contribute most significantly to the NO spectrum.
Quantitatively, we can prove this using the Boltzmann distribution:
In [10]:
import numpy as np
h = 6.626e-34 # J*s
c = 299792458 #m/s, Speed of Light
T = 273 #K
k = 1.38e-23 #J/K
P = []
for v in [0,1,2,3]:
E = (v+0.5)*h*c*vibfreq*100
P.append(np.exp(-E/k/T))
print('The population of v = [0,1,2,3] is [%.2f,%.2e,%.2e,%.2e]'%(P[0]/sum(P),P[1]/sum(P),P[2]/sum(P),P[3]/sum(P)))
There is only one peak that corresponds to the v0 to v=1 transition. Vibrational frequency is 1904 cm^-1, which is in the IR region.
$-{\frac{\hbar}{2m_e}}{\frac{\partial^2\psi(x,y)}{\partial x^2}}-{\frac{\hbar}{2m_e}}{\frac{\partial^2\psi(x,y)}{\partial y^2}}+{\frac{1}{2}k_xx^2\psi(x,y)}+{\frac{1}{2}k_yy^2\psi(x,y)}=E\psi(x,y) $
$\lim_{x\rightarrow\pm\infty} \psi(x,y)=0\qquad \lim_{y\rightarrow\pm\infty} \psi(x,y)=0$
Because it is separable, energies in $x$ and $y$ are additive.
$E = E_x + E_y = (v_x+\frac{1}{2})h\nu_x + (v_x+\frac{1}{2})h\nu_y$
$\nu_x= \frac{1}{2\pi}\sqrt{\frac{k}{m}}\qquad \nu_y= \frac{1}{2\pi}\sqrt{\frac{4k}{m}} = 2\nu_x$
$E = (v_x+\frac{1}{2})hν+ 2(v_y+\frac{1}{2})hν=(v_x+2v_y+\frac{3}{2})hν,ν=\frac{1}{2\pi}\sqrt{\frac{k}{\mu}}$
In [11]:
import numpy as np
del_E = 0.05*1.60218e-19 #J
h = 6.626e-34 #Planck constant in m^2 kg / s
m = 1.66054e-27 #kg
freq = del_E/h #/s
k = (2*np.pi*freq)**2*m #kg/m/s^2
print('Force constant k is ',round(k,2),'N/m')
Energy | Degeneracy | ($v_x,v_y$) |
---|---|---|
$\frac{3}{2}hν$ | 1 | (0,0) |
$\frac{5}{2}hν$ | 1 | (1,0) |
$\frac{7}{2}hν$ | 2 | (0,1),(2,0) |
$\frac{9}{2}hν$ | 2 | (1,1),(3,0) |
Where $hν$ is = 0.05 eV.
$$ E(0,0) = \frac{1}{2} h \nu_x + \frac{1}{2} h \nu_y = \frac{3h}{4\pi} \sqrt\frac{k}{m} $$$$ E(1,0) = \frac{3}{2} h \nu_x + \frac{1}{2} h \nu_y = \frac{5h}{4\pi} \sqrt\frac{k}{m} $$$$ E(0,1) = \frac{1}{2} h \nu_x + \frac{3}{2} h \nu_y = \frac{7h}{4\pi} \sqrt\frac{k}{m} $$$$ E(1,1) = \frac{3}{2} h \nu_x + \frac{3}{2} h \nu_y = \frac{9h}{4\pi} \sqrt\frac{k}{m} $$$$ E(2,0) = \frac{5}{2} h \nu_x + \frac{1}{2} h \nu_y = \frac{7h}{4\pi} \sqrt\frac{k}{m} $$$$ E(3,0) = \frac{7}{2} h \nu_x + \frac{1}{2} h \nu_y = \frac{9h}{4\pi} \sqrt\frac{k}{m} $$
In [ ]:
In [ ]: