Skip to content

Commit 4c96f24

Browse files
committedApr 20, 2024
Fix the unit of V in HydrogenAtom
1 parent df8a4d5 commit 4c96f24

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/HydrogenAtom.jl

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ function V(model::HydrogenAtom, r)
1414
# end
1515
Z = model.Z
1616
a₀ = model.a₀
17-
return -Z/abs(r/a₀)
17+
Eₕ = model.Eₕ
18+
return Eₕ*-1*Z/abs(r/a₀)
1819
end
1920

2021
function E(model::HydrogenAtom; n=1)
@@ -27,8 +28,6 @@ function ψ(model::HydrogenAtom, r, θ, φ; n=1, l=0, m=0)
2728
# if r<0
2829
# throw(DomainError(r, "r=$r is out of the domain (0≦r)"))
2930
# end
30-
Z = model.Z
31-
a₀ = model.a₀
3231
return R(model, r, n=n, l=l) * Y(model, θ, φ, l=l, m=m)
3332
end
3433

0 commit comments

Comments
 (0)