User Tools

Site Tools


numexercises7_15

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
numexercises7_15 [2014/07/15 08:29]
bogner
numexercises7_15 [2014/07/18 05:04] (current)
schunck
Line 15: Line 15:
 Here, our goal is to do some simple exercises to help us build useful tools such as subroutines to calculate HO wf's and matrix elements $\langle n'​l|V|nl\rangle$ that are useful building blocks for more complicated calculations (e.g., Hartree-Fock calculations of many-body systems). Our ultimate test will be to see if we can get the ground state energy of the hydrogen atom (-.5 in atomic units) when we solve the Schr\"​odinger equation by matrix diagonalization in the HO basis. Here, our goal is to do some simple exercises to help us build useful tools such as subroutines to calculate HO wf's and matrix elements $\langle n'​l|V|nl\rangle$ that are useful building blocks for more complicated calculations (e.g., Hartree-Fock calculations of many-body systems). Our ultimate test will be to see if we can get the ground state energy of the hydrogen atom (-.5 in atomic units) when we solve the Schr\"​odinger equation by matrix diagonalization in the HO basis.
  
-  * In the code {{:​coulomboscrelme.f90.zip|here}},​ find the subroutine that computes the generalized laguerre polynomials $L_n^{l+1/​2}(x)$,​ "​laguerre_general"​. ​+  * In the code {{:​coulomboscrelme.f90.zip|here}},​ find the subroutine that computes the generalized laguerre polynomials $L_n^{l+1/​2}(x)$,​ "​laguerre_general"​. NOTE: this is not a standalone code. Rather, the purpose is to see the simple recursion algorithm for calculating the Laguerre polynomials,​ and by extension $R_{nl}$, which you can then implement according to your own taste.
  
 Recall that the HO wavefunctions are given by  Recall that the HO wavefunctions are given by 
 \begin{equation} \begin{equation}
-R_{nl}(r) = \frac{A_{nl}}{b^{3/​2}}x^le^{-x^2/​2}L_{n}^{l+1/​2}(x^2)\,,+R_{nl}(r) = \frac{A_{nl}}{b^{3/​2}}\xi^le^{-\xi^2/​2}L_{n}^{l+1/​2}(\xi^2)\,,
 \end{equation} \end{equation}
  
-where the oscillator length $b\equiv \sqrt{\hbar/​(m\omega)}$,​ and the dimensionless variable $x\equiv r/b$. The normalization constant is given by+where the oscillator length $b\equiv \sqrt{\hbar/​(m\omega)}$,​ and the dimensionless variable $\xi\equiv r/b$. The normalization constant is given by
  
 \begin{equation} \begin{equation}
Line 29: Line 29:
  
   * Using the uploaded code for guidance, make your own subroutine to calculate ​ $L_{n}^{\alpha}(x)$. Then, using the definition of the HO wf's, make a subroutine/​function to calculate $R_{nl}(r)$. ​   * Using the uploaded code for guidance, make your own subroutine to calculate ​ $L_{n}^{\alpha}(x)$. Then, using the definition of the HO wf's, make a subroutine/​function to calculate $R_{nl}(r)$. ​
 +
 +  * Why should you not calculate the factorial and double factorial functions appearing in $A_{nl}$ naively as they are written? Hint: What happens for large values of $n$ and $l$? How might you avoid this problem? Hint: What is $\log{ABC\cdots}$? ​
  
   * As a check on your code, check the orthogonality of the $R_{nl}$,   * As a check on your code, check the orthogonality of the $R_{nl}$,
Line 36: Line 38:
 \end{equation} \end{equation}
  
-  * As discussed in the HO notes, the "​best"​ type of Gaussian quadrature over HO wf's is Gauss-Laguerre. However, as you see in the code {{:​coulomboscrelme.f90.zip|here}},​ you can use Gauss-Legendre as well. You need to play around to make sure your upper limit $r_{max}$ of your discretization range is sufficiently large. (Note: there are plenty of freely downloadable Gauss-Legendre subroutines.) In this way, the orthogonality check takes the form+  * As discussed in the HO notes, the "​best"​ type of Gaussian quadrature over HO wf's is Gauss-Laguerre. However, as you see in the code {{:​coulomboscrelme.f90.zip|here}},​ you can use Gauss-Legendre as well. You need to play around to make sure your upper limit $r_{max}$ of your discretization range is sufficiently large. (Note: there are plenty of freely downloadable Gauss-Legendre subroutines. Please feel free to use one instead of writing it from scratch.) In this way, the orthogonality check takes the form
    
 \begin{equation} \begin{equation}
Line 43: Line 45:
  
 where the sum is over the N mesh points and $w_{i}$ are the quadrature weights. where the sum is over the N mesh points and $w_{i}$ are the quadrature weights.
 +
 +  * Now, write a subroutine to evaluate the matrix elements $\langle nl|V|n'​l\rangle$ for some arbitrary central two-body potential $V(r)$. ​
 +
 +  * To test your $\langle nl|V|n'​l\rangle$ routine, apply it to the coulomb potential in the hydrogen atom problem. Use atomic units ($\hbar=e=1/​4\pi\epsilon_0=m_e=1$). ​ Now, build the Hamiltonian matrix $\langle nl|H|n'​l\rangle$ (you may take $l=0$) for the hydrogen atom, keeping states $n,​n'<​ N_{max}$. Use the analytic expressions for the K.E. matrix elements in {{:​ho_spherical.pdf|}}. Now diagonalize the matrix to get the ground state energy. ​
 +
 +  * For a given $N_{max}$, repeat the calculation for many different values of oscillator length and plot the ground state versus $b$. Repeat for larger values of $N_{max}$ and put the $E$ versus $b$ curves on the same plot. Are they behaving according to expectation?​ (Hint: the diagonalization in a finite basis is variational.) Should results depend on $b$ as $N_{max}\rightarrow\infty$? ​
 +
 +
numexercises7_15.1405427343.txt.gz ยท Last modified: 2014/07/15 08:29 by bogner