# Chapter 8: Atomic Physics¶

## Example 8.3, Page 285¶

In [1]:
import math

#Variable declaration
delta_E = 0.0021;    # Energy difference for the 3p subshell of sodium, eV
h = 6.62e-034;    # Planck's constant, Js
h_bar = h/(2*math.pi);    # Reduced Planck's constant, Js
e = 1.602e-019;    # Energy equivalent of 1 eV, J
m = 9.11e-031;    # Rest of an an electron, kg
g_s = 2;    # Gyromagnetic ratio due to spin splitting

#Calculations
# As delta_E = g_s*e*h_bar/(2*m)*B, solving for B
B = m*delta_E/h_bar;    # Internal magnetic field causing the LS splitting, T

#Result
print "The internal magnetic field causing the LS splitting = %2d T"%B

The internal magnetic field causing the LS splitting = 18 T


## Example 8.5, Page 289¶

In [2]:
import numpy

l1 = 1;    # Orbital angular momentum quantum number for first electron
l2 = 2;    # Orbital angular momentum quantum number for second electron
s1 = 1./2;    # Spin angular momentum quantum number for first electron
s2 = 1./2;    # Spin angular momentum quantum number for second electron
temp_j = numpy.zeros(15);
cnt = 0;
print ("\nThe all possibe values of the total angular momentum quantum number of J are:");
for L in range(int(abs(l1 - l2)),int(abs(l1 + l2))+1):
for S in range(int(abs(s1 - s2)),int(abs(s1 + s2))+1):
for j in range(abs(L - S),abs(L + S)+1):
temp_j[cnt] = j;
cnt = cnt + 1;

J = -1;
temp_J = sorted(temp_j)
for i in range(len(temp_J)):
if temp_J[i] > J:
J = temp_J[i];
print "%d  "%temp_J[i],;

The all possibe values of the total angular momentum quantum number of J are:
0   1   2   3   4


## Example 8.8, Page 291¶

In [3]:
import math

#Variable declaration
delta_E = 0.0021;    # Energy difference for the 3p subshell of sodium, eV
h = 6.62e-034;    # Planck's constant, Js
h_bar = h/(2*math.pi);    # Reduced Planck's constant, Js
e = 1.602e-019;    # Energy equivalent of 1 eV, J
m = 9.11e-031;    # Rest of an an electron, kg
g_s = 2;    # Gyromagnetic ratio due to spin splitting

#Calculations
# As delta_E = g_s*e*h_bar/(2*m)*B, solving for B
B = m*delta_E/h_bar;    # Internal magnetic field causing the LS splitting, T

#Result
print "The internal magnetic field causing the LS splitting = %2d T"%B

The internal magnetic field causing the LS splitting = 18 T