DY(i) = ( Y(i+1) - Y(i) ) / Dx |
D2Y(i) = ( Y(i+1) + Y(i-1) - 2Y(i) ) / (Dx)**2 |
![[Graphics:Numerovmath/numerov_gr_1.gif]](Numerovmath/numerov_gr_1.gif)
![[Graphics:Numerovmath/numerov_gr_4.gif]](Numerovmath/numerov_gr_4.gif)
![[Graphics:Numerovmath/numerov_gr_8.gif]](Numerovmath/numerov_gr_8.gif)
![[Graphics:Numerovmath/numerov_gr_12.gif]](Numerovmath/numerov_gr_12.gif)
program schrodinger c...... Solves the time-independent Schrodinger equation c...... for a potential box. Uses simple finite differences c by Dario Mitnik implicit real*8(a-h,o-z) c....... initial values print*,' give the number of grid points' read*,npts c....... Potential Box print*,' give the size D of the potential box (-D/2 to D/2)' read*,d print*,' give the depth V0 of the potential well' read*,V0 c......... Initial Points print*,' give the initial value of the wavefunction P(0) ' read*,p00 print*,' give the initial value of the derivative at 0 Y(0) ' read*,y00 100 open(unit=10,file='wave.dat',status='unknown') print*,' guess initial energy value' read*,Ener p0 = p00 y0 = y00 c...... Other values dx = D/(2*npts) c...... initial point P(1) p1 = p0 + dx*y0 write(10,55) dx-dx,p0 write(10,55) dx,p1 55 format(2(1x,1pg14.4)) c...... Solving the Schrodinger Equation do 200 i=2,npts*15 V = V0 if (i*dx.le.D/2) V = 0.0 p = (2.0 + dx*dx*(V-Ener))*p1 - p0 write(10,55) dx*i,p p0 = p1 p1 = p 200 continue close(unit=10,status='keep') print*,' Continue? No=0' read*,icont if (icont.ne.0) go to 100 stop end |
c-------finding the energy using the Ridley Method c.......E.C. Ridley, Proc. Cambridge Phil. Soc. 51, 702 (1955). c Delta E = ( logderiv(inwd) - logderiv(outw) ) c ----------------------------------- c ( Intgrl(inwd^2) + Intgrl(outw^2) ) c -------------- -------------- c inwd^2 outw^2 c logderiv(outw) = F'/F at r=rmatch c logderiv(inwd) = G'/G at r=rmatch c Intgrl(outw^2) = Int_{0}^{rmatch}{F^2} c Intgrl(inwd^2) = Int_{rmatch}^{rmax}{G^2} c F is the outward solution and G is the inward solution |