#Threshold wavelength of tungsten
phi = 4.5*1.6e-019 # Work function for tungesten, joule
h = 6.6e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
# As phi = h*c/L0, solving for L0
L0 = h*c/phi # Threshold wavelength of tungesten, m
print "The threshold wavelength of tungesten = %4d angstrom"% (L0/1e-010)
from math import sqrt
#Maximum velocity of photoelectrons
phi = 4*1.6e-019 # Work function for photoelectric surface, joule
h = 6.6e-034 # Planck's constant, Js
e = 1.6e-019 # Electronic charge, coulomb
m = 9.1e-031 # Mass of the electron, kg
f = 1e+15 # Frequency of incident photons, Hz
c = 3e+08 # Speed of light, m/s
# KE = 1/2*m*v**2 = h*f - phi, solving for v, we have
v = sqrt(2*(h*f - phi)/m) # Maximum velocity of photoelectrons, m/s
print "The maximum velocity of photoelectrons = %5.3e m/s" %v
#Energy of photoelectrons
h = 6.6e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 joule, joule/eV
L = 1800e-010 # Wavelength of incident light, m
L0 = 2300e-010 # Threshold wavelength of tungsten, m
E = h*c*(1/L - 1/L0) # Energy of photoelectrons emitted from tungsten, joule
print "The energy of photoelectrons emitted from tungsten = %3.1f eV"%(E/e)
#Longest wavelength of incident radiation
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
phi = 6*e # Work function of metal, joule
f0 = phi/h # Threshold frequency for metal surface, Hz
L0 = c/f0 # Threshold (Longest) wavelength for metal, m
print "The longest wavelength of incident radiation = %4d angstrom"%(L0/1e-010)
#Threshold frequency and wavelength
h = 6.62e-034 # Planck's constant, Js
phi = 3.31e-019 # Work function of metal, joule
c = 3e+08 # Speed of light, m/s
f0 = phi/h # Threshold frequency for metal surface, Hz
L0 = c/f0 # Threshold wavelength for metal, m
print "The threshold frequency for metal = %1.0e Hz"% f0
print "The threshold wavelength for metal = %4d angstrom"% round(L0/1e-10)
from math import sqrt
#Maximum velocity of emitted electrons
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
m = 9.1e-031 # Mass of an electron, kg
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
L = 4300e-010 # Wavelength of incident light, m
phi = 5*e # Work function of nickel surface, joule
f0 = phi/h # Threshold frequency for nickel, Hz
L0 = c/f0 # Threshold wavelength for nickel, m
print "The threshold wavelength for nickel = %4d angstrom"% (L0/1e-10)
print "Since %4d A < %4d A, the electrons will not be emitted."% (L0/1e-010, L/1e-010)
phi = 2.83*e # Work function of potassium surface, joule
f0 = phi/h # Threshold frequency for potassium, Hz
L0 = c/f0 # Threshold wavelength for potassium, m
print "The threshold wavelength for potassium = %4d angstrom"%(L0/1e-10)
print "Since %4d A > %4d A, the electrons will be emitted."%(L0/1e-010, L/1e-010)
# Now KE = 1/2*m*v0**2 = h*f - h*f0, where v0 is the maximum velocity
# solving for v0, we have
v0 = sqrt(2*h*c/m*(1/L - 1/L0)) # Maximum velocity of photoelectrons, m/s
print "The maximum velocity of photoelectrons = %5.3e m/s"% v0
#Maximum energy of ejected electrons
h = 6.6e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
L = 2537e-010 # Wavelength of incident light, m
L0 = 3250e-010 # Threshold wavelength of silver, m
# As U = h*(f - f0), the kinetic energy of ejected electrons
U = h*c*(1/L - 1/L0) # Maximum energy of ejected electrons, J
print "The maximum energy of ejected electrons = %5.3e J"% U
#Maximum kinetic energy and stopping potential of ejected electrons
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
phi_0 = 1.51*e # Work function of the metal surface, J
L = 4000e-010 # Wavelength of incident light, m
f = c/L # Frequency of incident light, Hz
U = h*f - phi_0 # Maximum kinetic energy of ejected electrons, J
V = U/e # Stopping potential for ejected electrons, volt
print "The maximum energy of ejected electrons = %5.3f eV"%(U/e)
print "The stopping potential of ejected electrons = %5.3f V"%(V)
#Work function of metal
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
V = 1 # Stopping potential for the electrons emitted from the metal, V
L = 2500e-010 # Wavelength of incident light, m
f = c/L # Frequency of incident light, Hz
# Now KE = h*f - phi = e*V, Einstein's Photoelectric equation, solving for phi
phi = h*f - e*V # Work function of metal
print "The work function of metal = %5.3f eV"% (phi/e)
#Energy of electrons emitted from the surface of tungsten
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
L = 1800e-010 # Wavelength of incident light, m
L0 = 2300e-010 # Threshold wavelength of tungsten, m
E = h*c*(1/L - 1/L0) # Einstein's photoelectric equation for kinetic energy of emitted electrons, J
print "The energy of electrons emitted from the surface of tungsten = %3.1f eV"% (E/e)
#Energy of photon
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
L = 1800e-010 # Wavelength of incident light, m
L0 = 2300e-010 # Threshold wavelength of tungsten, m
E = h*c*(1/L - 1/L0) # Einstein's photoelectric equation for kinetic energy of emitted electrons, J
print "The energy of electrons emitted from the surface of tungsten = %3.1f eV"% (E/e)
from math import sqrt
#Velocity of the emitted electron
m = 9.1e-031 # Mass of electron, kg
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
phi = 2.3*e # Work function of metal, J
L = 4300e-010 # Wavelength of incident light, m
# As 1/2*m*v**2 = h*f - phi = h*c/L - phi, Einstein's photoelectric equation
# Solving for v
v = sqrt(2*(h*c/L - phi)/m) # Velocity of emitted electron, m/s
print "The velocity of emitted electron = %4.2e eV"% v
#Energy of a quantum of light
c = 3e+08 # Speed of light, m/s
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
L = 5.3e-07 # Wavelength of incident light, m
E = h*c/L # Energy of the incident light, J
print "The energy of incident light = %4.2f eV"% (E/e)
#Ratio of masses of a proton and an electron
RH = 1.09678e+07 # Rydberg constant for hydrogen, per metre
RHe = 1.09722e+07 # Rydberg constant for helium, per metre
MH_m_ratio = (RH - 1.0/4*RHe)/(RHe - RH) # Ratio of mass of a proton to that of an electron
print "The ratio of mass of a proton to that of an electron = %4d" %MH_m_ratio
from math import pi
#First Bohr Orbit in hydrogen atoms
n = 1 # Principle quantum number of first orbit in H-atom
h = 6.624e-034 # Planck's Constant, Js
c = 3e+08 # Speed of light, m/s
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
Z = 1 # Atomic number of hydrogen
m = 9.1e-031 # Mass of an electron, kg
e = 1.6e-019 # Charge on an electron, coulomb
r = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr's orbit, m
v = Z*e**2/(2*8.85e-012*h*n) # Velocity of electron in the first Bohr orbit, m/s
print "The radius of first Bohr orbit = %5.3f angstrom" %(r/1e-010)
print "The velocity of electron in first Bohr orbit = (1/%3d)c"%(1/v*c)
#Wavelength of Balmer H_beta lines
L_Hb = 6563e-010 # Wavelength of H_beta line, m
R = 1.097e+07 # Rydberg constant, per metre
L1 = 36/(5*R) # Wavenumber of H_alpha line, per metre
L2 = 16/(3*R) # Wavenumber of H_beta line, per metre
L_ratio = L2/L1 # Ratio of wavelengths of H_beta and H_alpha lines
L2 = L_ratio*L1 # Wavelength of Balmer H_beta line, m
print "The wavelength of Balmer H_beta line = %4d angstrom"%(L2/1e-010)
#First excitation energy of hydrogen atoms
n1 = 1.0 # Principle quantum number of first orbit in H-atom
n2 = 2.0 # Principle quantum number of second orbit in H-atom
m = 9.1e-031 # Mass of the electron, C
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.624e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
U = m*e**4/(8*epsilon_0**2*h**2)*(1/n1**2 - 1/n2**2) # First excitation energy of hydrogen atom, J
print "The first excitation energy of hydrogen atom = %5.2f eV"%(U/e)
#Energy difference in the emission or absorption of sodium D1 lines
h = 6.624e-034 # Planck's Constant, Js
c = 3e+08 # Speed of light, m/s
L = 590e-09 # Wavelenght of sodium D1 line, m
E = h*c/L # Energy difference in the emission or absorption of sodium D1 line, J
print "The energy difference in the emission or absorption of sodium D1 line = %4.2e J"% E
#Wavelength of first line of Balmer series
n1 = 2.0 # Ground level of Balmer line in H-atom
n2 = 4.0 # Third level of Balmer line in H-atom
R = 1.097e+07 # Rydberg constant, per metre
L2 = 1.0/((1.0/n1**2 - 1.0/n2**2)*R) # Wavelength of second line of Balmer series, m
n2 = 3 # Second level of Balmer line in H-atom
L1 = 1/((1.0/n1**2 - 1.0/n2**2)*R) # Wavelength of first line of Balmer series, m
L_ratio = L1/L2 # Wavelength ratio of first and second line of Balmer series, m
L2 = 4861 # Given wavelength of second line of Balmer series, angstrom
L1 = L2*L_ratio # Wavelength of first line of Balmer series, angstrom
print "The wavelength of first line of Balmer series = %4d angstrom" %L1
#Minimum energy of the electrons in Balmer series
n1 = 2.0 # Ground level of Balmer line in H-atom
n2 = 3.0 # Second level of Balmer line in H-atom
m = 9.1e-031 # Mass of the electron, C
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.624e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
E = m*e**4/(8*epsilon_0**2*h**2)*(1/n1**2 - 1/n2**2) # Min energy required by electron to correspond to 1st wavenumber of Balmer series, J
print "Minimum energy required by an electron to correspond to first wavenumber of Balmer series = %4.2f"%(E/e)
#Ionization potential of hydrogen atom
m = 9.1e-031 # Mass of the electron, C
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.626e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
phi = m*e**4/(8*epsilon_0**2*h**2) # Work function or ionization energy of hydrogen atom, J
print "The ionization energy of hydrogen atom = %5.2f eV"%(phi/e)
#Wavelength of second number of Balmer series of hydrogen
n1 = 2.0 # Principle quantum number of second orbit in H-atom
n2 = 3.0 # Principle quantum number of third orbit in H-atom
R = 1.097e+07 # Rydberg constant, per metre
L1 = 1/((1/n1**2 - 1/n2**2)*R) # Wavelength of first Balmer line, m
n2 = 4.0 # Principle quantum number of third orbit in H-atom
L2 = 1/((1.0/n1**2 - 1/n2**2)*R) # Wavelength of second Balmer line, m
L_ratio = L2/L1 # Wavelength ratio of second and first line of Balmer series
L1 = 6563e-010 # Given wavelength of first line of Balmer series, m
L2 = L_ratio*L1 # Wavelength of second Balmer line, m
print "The wavelength of second Balmer line = %4e m"%(L2)
#Wavelength of emitted light
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.624e-034 # Planck's Constant, Js
n = 2 # Principal quantum number for second orbit in H-atom
V = 13.6 # Ionization potential of H-atom, V
U1 = -1*V*e # Energy of electron in first orbit, J
U2 = U1/n**2 # Energy of electron in second orbit, J
# As U2 - U1 = h*c/L, solving for L
L = h*c/(U2 - U1) # Wavelength of light emitted in the transition from second orbit to the first orbit, m
print "The wavelength of light emitted in the transition from second orbit to the first orbit = %4d angstrom"%(L/1e-010)
#Radius and speed of electron in the first Bohr orbit
m = 9.1e-031 # Mass of the electron, C
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.626e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
Z = 1;n = 1
r_H = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr orbit, m
v_H = Z*e**2/(2*epsilon_0*n*h) # Velocity of the electron in the first Bohr orbit, m/s
print "The radius of first Bohr orbit = %4.2e m"%(r_H)
print "The velocity of the electron in the first Bohr orbit = %3.1e m/s"%(v_H)
#Radius and velocity of electron for H and He
m = 9.1e-031 # Mass of the electron, kg
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.624e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
c = 3e+08 # Speed of light, m/s
Z = 1; n = 1 # Atomic number and principal quantum number of H-atom
r_H = epsilon_0*n**2*h**2/(pi*m*Z*e**2) # Radius of first Bohr orbit for H-atom, m
v_H = Z*e**2/(2*epsilon_0*n*h) # Velocity of the electron in the first Bohr orbit of H-atom, m/s
print "The radius of first Bohr orbit = %4.2e m"%(r_H)
print "The velocity of the electron in the first Bohr orbit = %3.1e m/s"%(v_H)
print "The velocity of the electron in H-atom compared to the velocity of light = %4.2e"%(v_H/c)
Z = 2 # Atomic number of He-atom
r_He = r_H/Z # Radius of first Bohr orbit for He-atom, m
v_He = 2*v_H # Velocity of the electron in the first Bohr orbit of He-atom, m/s
print "The radius of first Bohr orbit = %4.2e m"%(r_He)
print "The velocity of the electron in the first Bohr orbit = %3.1e m/s"%(v_He)
print "The velocity of the electron in He-atom compared to the velocity of light = %5.3e"%(v_He/c)
#Difference in wavelength in the spectra of hydrogen and deuterium
R_H = 1.097e+07 # Rydberg constant for H-atom, per metre
M_H = 1.0 # Mass of H-atom, amu
M_D = 2*M_H # Mass of D-atom, amu
m = 0.000549*M_H # Mass of an electron, amu
R_D = R_H*(1+m/M_H)/(1+m/M_D) # Rydberg constant for D-atom, per metre
n1 = 2.0; n2 = 3.0 # Principal qunatum numbers for first line of Balmer series
L_H = 1/(R_H*(1/n1**2 - 1/n2**2)) # Wavelength of H-atom, m
L_D = 1/(R_D*(1/n1**2 - 1/n2**2)) # Wavelength of D-atom, m
delta_H = (L_H - L_D)/1e-010 # Difference in wavelength in the spectra of hydrogen and deuterium, angstrom
print "The difference in wavelength in the spectra of hydrogen and deuterium = %3.1f angstrom"% delta_H
#Ionization energy of hydrogen atom with orbiting muon
m = 9.1e-031 # Mass of the electron, kg
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.624e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
m1 = 200*m # Mass of muon, kg
phi1 = m1*e**4/(8*epsilon_0**2*h**2) # Ionization energy of H-atom with muon, J
print "The ionization energy of hydrogen atom with orbiting muon = %4.2e eV"%(phi1/1.6e-019)
# Result
# The ionization energy of hydrogen atom with orbiting muon = 2.71e+003 eV
#Photon emitted by hydrogen atom
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
E1 = -13.6 # Energy of electron in the first orbit of hydrogen atom, eV
n = 2 # Principal quantum number for second orbit
E2 = E1/n**2 # Energy of electron in the second orbit of hydrogen atom, eV
E = (E2 - E1)*e # Energy of photon emitted, joule
P = E/c # Momentum of photon, kg-m/s
L = (h/P)/1e-010 # de_Broglie wavelength of photon, angstrom
print "The energy of photon emitted by hydrogen atom %5.2e J"% E
print "The momentum of photon = %4.2e kg-m/s"% P
print "The de_Broglie wavelength of photon = %4d angstrom"% L
#Energy required to create a vacancy in Cu
n = 1 # Principal quantum number of K shell
Z = 29 # Atomic number of copper
U = 13.6 # Ionization potential of hydrogen atom, eV
E1 = Z**2*U/n**2 # Energy required to create a vacancy in K-shell of copper atom, eV
n = 2 # Principal quantum number of L shell
E2 = Z**2*U/n**2 # Energy required to create a vacancy in K-shell of copper atom, eV
print "The energy required to create a vacancy in K-shell of copper atom = %5.2e eV"% E1
print "The energy required to create a vacancy in L-shell of copper atom = %5.2e eV"% E2
#Excitation potential for mercury
e = 1.6e-019 # Energy equivalent of 1 eV, joule/eV
h = 6.624e-034 # Planck's constant, Js
c = 3e+08 # Speed of light, m/s
L = 2537e-010 # Wavelength of absorbed line of Hg, m
V = h*c/(e*L) # Excitation potential for Hg, v
print "The excitation potential for Hg = %3.1f V"% V
#Atomic number of impurity in Zinc target
L1 = 1.43603e-010 # Wavelength of characteristic K_alpha line from Zn, m
Z1 = 30.0 # Atomic number of zinc
L2 = 0.53832e-010 # Wavelength of unknown line from Zn, m
# As (1/L1)/(1/L2) = (Z1/Z2)**2, solving for Z2
Z2 = Z1*(L1/L2)**(1.0/2) # Atomic number of impurity in Zn target
print "The atomic number of impurity in Zn target = %2d"% round(Z2)
#Mu-mesonic atom subjected to Bohr orbit
Z = 3 # Atomic number of Mu-mesonic atom
m_e = 9.1e-031 # Mass of the electron, kg
e = 1.6e-019 # Charge on an electron, coulomb
h = 6.624e-034 # Planck's Constant, Js
epsilon_0 = 8.85e-012 # Absolute electrical permittivity of free space, coulomb square per newton per metre square
m = 200*m_e # Mass of a muon, kg
# As r_H = epsilon_0***h**2/(pi*m*(e**2) and r = epsilon_0*n**2*h**2/(pi*m*Z*(e**2)
# r = r_H gives
n = sqrt(m/m_e*Z) # Value of n for which r = r_H
n1 = 1.0; n2 = 2.0 # Principal quantum numbers corresponding to first excitation
U = m*e**4*Z**2.0/(8*epsilon_0**2*h**2*1.6e-019)*(1/n1**2-1/n2**2) # First excitation potential of the atom, eV
print "The value of n for which radius of orbit is equal to Bohr radius = %2d"% round(n)
print "The first excitation potential of the atom = %4.2e eV"% U