Skip to content

Commit

Permalink
update H wavefunction
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWAyers committed Feb 4, 2025
1 parent 0e04420 commit f8542d2
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions book/linkedFiles/hydrogenic_wfn_sympy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Z**(3/2)*exp(-Z*r)/sqrt(pi)\n"
"-Z**(7/2)*r**2*exp(I*phi)*exp(-Z*r/3)*sin(theta)*cos(theta)/(81*sqrt(pi))\n"
]
}
],
Expand All @@ -30,21 +30,21 @@
"theta=Symbol(\"theta\", real=True)\n",
"Z=Symbol(\"Z\", positive=True, integer=True, nonzero=True)\n",
"\n",
"print(Psi_nlm(1,0,0,r,phi,theta,Z))"
"print(Psi_nlm(3,2,1,r,phi,theta,Z))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$\\displaystyle \\frac{3}{Z^{2}}$"
"$\\displaystyle \\frac{1701}{Z^{3}}$"
],
"text/plain": [
"3/Z**2"
"1701/Z**3"
]
},
"execution_count": 5,
Expand All @@ -55,13 +55,20 @@
"source": [
"from sympy import integrate, conjugate, pi, oo, sin\n",
"\n",
"wf=Psi_nlm(1,0,0,r,phi,theta,Z)\n",
"wf=Psi_nlm(3,2,1,r,phi,theta,Z)\n",
"\n",
"abs_sqrd=wf*conjugate(wf)\n",
"jacobi=r**2*sin(theta)\n",
"\n",
"integrate(abs_sqrd*jacobi*r**2, (r,0,oo), (phi,0,2*pi), (theta,0,pi))"
"integrate(abs_sqrd*jacobi*r, (r,0,oo), (phi,0,2*pi), (theta,0,pi))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit f8542d2

Please sign in to comment.