Skip to content

Latest commit

 

History

History
213 lines (172 loc) · 9.63 KB

HydrogenAtom.md

File metadata and controls

213 lines (172 loc) · 9.63 KB
CurrentModule = Antique

Hydrogen Atom

The hydrogen atom is the simplest Coulomb 2-body system.

Definitions

This model is described with the time-independent Schrödinger equation

$$\hat{H} \psi(\pmb{r}) = E \psi(\pmb{r}),$$

and the Hamiltonian

$$\hat{H} = - \frac{\hbar^2}{2\mu} \nabla^2 + V(r),$$

where $\mu=\left(\frac{1}{m_\mathrm{e}}+\frac{1}{m_\mathrm{p}}\right)^{-1}$ is the reduced mass of electron $\mathrm{e}$ and proton $\mathrm{p}$. $\mu = m_\mathrm{e}$ holds in the limit $m_\mathrm{p}\rightarrow\infty$. The potential includes only Coulomb interaction and it does not include fine or hyperfine interactions in this model. Parameters are specified with the following struct.

Parameters

Antique.HydrogenAtom

Potential

Antique.V(::HydrogenAtom, ::Any)

Eigen Values

Antique.E(::HydrogenAtom)

Eigen Functions

Antique.ψ(::HydrogenAtom, ::Any, ::Any, ::Any)

Radial Functions

Antique.R(::HydrogenAtom, ::Any)

Associated Laguerre Polynomials

Antique.L(::HydrogenAtom, ::Any)

Spherical Harmonics

Antique.Y(::HydrogenAtom, ::Any, ::Any)

Associated Legendre Polynomials

Antique.P(::HydrogenAtom, ::Any)

References

Usage & Examples

[Install Antique.jl](@ref Install) for the first use and run using Antique before each use. The energy E(), wavefunction ψ(), potential V() and some other functions are suppoted. In this system, the model is generated by HydrogenAtom and several parameters Z, Eₕ, mₑ, a₀ and are set as optional arguments.

using Antique
H = HydrogenAtom(Z=1, Eₕ=1.0, a₀=1.0, mₑ=1.0, ℏ=1.0)
; #hide

Parameters:

H.Z
H.Eₕ
H.mₑ
H.a₀
H.ℏ

Eigen values:

E(H, n=1)
E(H, n=2)

Wave length ($n=2\rightarrow1$, the first line of the Lyman series):

Eₕ2nm⁻¹ = 2.1947463136320e-2 # https://physics.nist.gov/cgi-bin/cuu/CCValue?hrminv
println("ΔE = ", E(H,n=2) - E(H,n=1), " Eₕ")
println("λ  = ", ((E(H,n=2)-E(H,n=1))*Eₕ2nm⁻¹)^-1, " nm")

Hyperfine Splitting:

# E. Tiesinga, et al., Rev. Mod. Phys. 93, 025010 (2021) https://doi.org/10.1103/RevModPhys.93.025010
e  = 1.602176634e-19    # C      https://physics.nist.gov/cgi-bin/cuu/Value?e
h  = 6.62607015e-34     # J Hz-1 https://physics.nist.gov/cgi-bin/cuu/Value?h
c  = 299792458          # m s-1  https://physics.nist.gov/cgi-bin/cuu/Value?c
a0 = 5.29177210903e-11  # m      https://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0
μ0 = 1.25663706212e-6   # N A-2  https://physics.nist.gov/cgi-bin/cuu/Value?mu0
μB = 9.2740100783e-24   # J T-1  https://physics.nist.gov/cgi-bin/cuu/Value?mub
μN = 5.0507837461e-27   # J T-1  https://physics.nist.gov/cgi-bin/cuu/Value?mun
ge = 2.00231930436256   #        https://physics.nist.gov/cgi-bin/cuu/Value?gem
gp = 5.5856946893       #        https://physics.nist.gov/cgi-bin/cuu/Value?gp

# D. J. Griffiths, Am. J. Phys. 50, 698 (1982) https://doi.org/10.1119/1.12733
δ = abs(ψ(H,0,0,0))^2
ΔE = 2 / 3 * μ0 * μN * μB * gp * ge * δ * a0^(-3)
println("1/π    = ", 1/π)
println("<δ(r)> = ", δ, " a₀⁻³")
println("<δ(r)> = ", δ * a0^(-3), " m⁻³")
println("ΔE = ", ΔE, " J")
println("ν = ΔE/h = ", ΔE / h * 1e-6, " MHz")
println("λ = hc/ΔE = ", h*c/ΔE*100, " cm")

Potential energy curve:

using CairoMakie

f = Figure()
ax = Axis(f[1,1], xlabel=L"$r~/~a_0$", ylabel=L"$V(r)~/~E_\mathrm{h}$",  limits=(0.0,15.0,-2.0,0.2))
lines!(ax, 0.1:0.01:20, r -> V(H, r))
f

Radial functions:

using CairoMakie
using LaTeXStrings

# setting
f = Figure()
ax = Axis(f[1,1], xlabel=L"$r~/~a_0$", ylabel=L"$r^2|R_{nl}(r)|^2~/~a_0^{-1}$", limits=(0,20,0,0.58))

# plot
ws = []
ls = []
for n in 1:3
  for l in 0:n-1
    w = lines!(
        ax,
        0..20,
        r -> r^2 * R(H,r,n=n,l=l)^2,
        linewidth = 2,
        linestyle = [:solid,:dash,:dot,:dashdot,:dashdotdot][l+1],
        color = n,
        colormap = :tab10,
        colorrange = (1,10)
    )
    push!(ws, w)
    push!(ls, latexstring("n=$n, l=$l"))
  end
end

# legend
axislegend(ax, ws, ls, position=:rt)

f

Wave functions (electron density in $n=5,l=2,m=1$):

using Antique
H = HydrogenAtom(Z=1, Eₕ=1.0, a₀=1.0, mₑ=1.0, ℏ=1.0)
loop(x) = x<-1 ? loop(x+2) : (1<x ? loop(x-2) : x)
myacos(x) = acos(loop(x))
r(x,y,z)  = sqrt(x^2+y^2+z^2)
θ(x,y,z) = x^2+y^2<1e-9 ? 0 : myacos(z/r(x,y,z)) 
φ(x,y,z) = y^2<1e-9 ? 0 : sign(y)*myacos(x/sqrt(x^2+y^2))
P(x,y,z) = abs(ψ(H,r(x,y,z),θ(x,y,z),φ(x,y,z),n=5,l=2,m=1))^2

using CairoMakie
f = Figure(size=(500,500), backgroundcolor=:transparent)
a = Axis(f[1,1], aspect=1)
hidespines!(a)
hidedecorations!(a)
heatmap!(a, -40:0.1:40, -40:0.1:40, (y,z) -> P(0,y,z), colorrange=(0.0,0.00001))
f
save("assets/fig/HydrogenAtom.png", f) # hide
; # hide

Testing

Unit testing and Integration testing were done using computer algebra system (Symbolics.jl) and numerical integration (QuadGK.jl). The test script is here.

using Markdown
using Antique
Markdown.parse(Antique.load("../../test/result/HydrogenAtom.log"))