0% found this document useful (0 votes)
5 views

Quantum Mechanics Computation

To solve infinite potential well using numerical method

Uploaded by

sasdg2023
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Quantum Mechanics Computation

To solve infinite potential well using numerical method

Uploaded by

sasdg2023
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Derivation of the Dimensionless

Schrödinger Equation (Particle in a Box)


Equation 1: One-Dimensional Schrödinger Equation
The one-dimensional time-independent Schrödinger equation is written as:

(-ħ² / 2m) (d²ψ(x) / dx²) + V(x)ψ(x) = Eψ(x) (1)

Comment: This is the basic form of the time-independent Schrödinger equation, where ħ is
the reduced Planck's constant, m is the particle's mass, ψ(x) is the wave function, V(x) is the
potential energy, and E is the energy of the system.

Equation 2: Potential for a Particle in a Box


In the case of a particle confined to a one-dimensional box of length L, the potential V(x) is
defined as:

V(x) = 0 for 0 ≤ x ≤ L; V(x) = ∞ elsewhere (2)

Comment: The potential V(x) is zero inside the box (the particle is free to move) and infinite
outside the box (the particle cannot exist outside the box).

Equation 3: Boundary Conditions


The boundary conditions for the particle in a box are:

ψ(0) = ψ(L) = 0 (3)

Comment: These conditions ensure that the wave function vanishes at the boundaries of the
box, which reflects the fact that the particle cannot be found at the walls of the box.

Introducing Dimensionless Variables


To simplify the Schrödinger equation, we introduce dimensionless variables. Let s = x / L
and ε_n = E_n / E, where E is the characteristic energy scale defined as E = ħ² / (mL²). We
also redefine the wave function as φ_n(s) = √L ψ(x).

Equation 4: Rescaled Schrödinger Equation


The rescaled Schrödinger equation is then given by:

(-1/2) (d²φ_n(s) / ds²) + v(s)φ_n(s) = ε_n φ_n(s) (4)

1
Comment: In this form, the potential v(s) is 0 for 0 ≤ s ≤ 1 and infinite elsewhere. This
rescaled equation is dimensionless and simplifies the problem for both analytical and
numerical solutions.

Eigenfunctions and Eigenvalues


The solution for the wave function is assumed to be of the form φ_n(s) = A_n sin(k_n s),
where k_n is the wave number. From the boundary conditions, we obtain the quantized
wave numbers and energies:

k_n = nπ/L (5)


ε_n = n²π²/2 (6)

Comment: These equations describe the quantization of energy levels for the particle in the
box. The energy levels are discrete and increase with n², where n is a positive integer.

Conclusion
This completes the derivation of the dimensional Schrödinger equation for a particle in a
one-dimensional box. The key result is that the energy levels of the particle are quantized,
and the wave functions are sinusoidal within the box.

2
Fortran Program: Project 05
This document contains the Fortran code for the assignment submission. The comments are
color-coded in green for better readability.

!given differential equation for rk method.

real(10) function f1(s, phi, phi2, re, rv)

real(10) :: s, phi, phi2, rv, re

f1 = phi2

end function f1

real(10) function f2(s, phi, phi2, re, rv)

real(10) :: s, phi, phi2, rv, re

f2 = 2.0 * (rv - re) * phi

end function f2

!given potential function

real(10) function potential(s)

real(10) :: s

potential = 0.0

!potential = 50.0 * exp(-(s - 0.5)**2 / 0.08)

end function potential

!using runge_kutta method to solve differential equation.

3
!Variable are used:: re=reduce_energy; rv=reduce_potential; phi2=d(phi)/ds; h=distance
between grid points; n=number of total grid points ;!k1, l1, k2, l2, k3, l3, k4, l4 all are
constant.

subroutine rk(s, phi, phi2, re, rv, write_)

real(10) :: s, phi, phi2, re, rv, f1, f2, potential

real(10) :: k1, l1, k2, l2, k3, l3, k4, l4, h

integer :: n, i, write_

real(10) :: norm_constant

n = 1e4 ; h = 1.0 / n ; s = 0.0

phi = 0.0 ;phi2 = 1.0 ! initialisation of variable .

do i = 1, n

rv = potential(s)

k1 = h * f1(s, phi, phi2, re, rv)

l1 = h * f2(s, phi, phi2, re, rv)

k2 = h * f1(s + h / 2, phi + k1 / 2, phi2 + l1 / 2, re, rv)

l2 = h * f2(s + h / 2, phi + k1 / 2, phi2 + l1 / 2, re, rv)

k3 = h * f1(s + h / 2, phi + k2 / 2, phi2 + l2 / 2, re, rv)

l3 = h * f2(s + h / 2, phi + k2 / 2, phi2 + l2 / 2, re, rv)

k4 = h * f1(s + h, phi + k3, phi2 + l3, re, rv)

l4 = h * f2(s + h, phi + k3, phi2 + l3, re, rv)

4
if (write_ == 1) write(1, *) phi, s

if (write_ == 4)write(4, *) phi, s

phi = phi + (k1 + 2 * k2 + 2 * k3 + k4) / 6

phi2 = phi2 + (l1 + 2 * l2 + 2 * l3 + l4) / 6

s=i*h

end do

write(4, *);write(4, *)

end subroutine rk

!Bisection method...

!Variable are used:: a,b are initial range used to find final value of energy(c) ; fa,fb,fc are the
value of phi(s) for corresponding energy valu a,b and c; error= a constant ,it's used for to
stop bisection after a certain error which we expect to be;

subroutine bisection(a, b, c)

real(10) :: a, b, c, fa, fb, fc, error=1.0

real(10) :: s, phi2, rv

integer :: write_=4

7 if (error > 1e-17) then

5
call rk(s, fa, phi2, a, rv, write_)

call rk(s, fb, phi2, b, rv, write_);write_ = 7

if (fa * fb < 0.0) then

c = (a + b) / 2

call rk(s, fc, phi2, c, rv, write_)

if (fa * fc < 0.0) then

b=c

else

a=c

end if

else

print*, "please change the range of the energy :("

stop !;goto 8

end if

error = abs(fc)

goto 7

end if

8 end subroutine bisection

6
!screening method:: To findinig range of energy for nth order excited state.

![a1:b1] are energy range and fa1,fb1 is the value of phi for corresponding energy
a1,b1;rv=reduce_potential; phi2=d(phi)/ds

subroutine screening()

real(10) :: a1, b1, fa1, fb1, s, phi2, rv

integer :: energy_state, write_

a1 = 1.0 ;energy_state = 0

do while (energy_state <= 6)

call rk(s, fa1, phi2, a1, rv, write_)

b1 = a1 + 4.0

call rk(s, fb1, phi2, b1, rv, write_)

if (fa1 * fb1 < 0.0) then

print*, "n=", energy_state, "range=", a1, "to", b1

energy_state = energy_state + 1

end if

a1 = b1

end do

end subroutine screening

!normalisation of phi(s) using simpson 1/3 rule

7
subroutine norm(norm_constant)

real(10) :: norm_constant, phi_s(10000), s,sum,h

integer :: i

open(1, file="eigen_function.dat")

open(2, file="norm_eigen_function.dat")

norm_constant = 0.0;s = 1.0;sum=0.0;h=1e-4

do i = 1, 10000

read(1, *) phi_s(i)

end do

do i = 1, 4999

sum = sum+(h/3)*( (phi_s(1 + (2 * i - 2)))**2 + 4 * (phi_s(1 + (2 * i - 1)))**2 +


(phi_s(1 + 2 * i))**2 )

if(i==4999) sum=sum+(h/2)*((phi_s(1+2*i)**2+phi_s(1+(2*i+1))**2))

end do

norm_constant = (1.0 /sum)

8
norm_constant=sqrt(norm_constant)

print*, "norm_constant=", norm_constant

do i = 1, 10000

write(2, *) (s * i * 1e-4), (phi_s(i) * (norm_constant))

end do

end subroutine norm

!main program .... > :)

program sasdg1

real(10) :: s, phi, phi2, re, rv

real(10) :: a, b, c, norm_constant

integer :: write_

open(1, file="eigen_function.dat")

open(2, file="norm_eigen_function.dat")

open(4, file="guess_functon.dat")

call screening()

print*, "type range of the energy :)"

9
read*, a, b

call bisection(a, b, c)

print*, "reduce_energy=", c

write_ = 1

call rk(s, phi, phi2, c, rv, write_)

close(1)

call norm(norm_constant)

close(2)

call system('gnuplot -p "gnuplot04.gnu"')

end program sasdg1

10
REDUCE EIGEN FUNCTION FOR POTENTIAL=0
INSIDE THE BOX.

11
REDUCE EIGEN FUNCTION FOR POTENTIAL=0
INSIDE THE BOX.

12
REDUCE EIGEN FUNCTION FOR POTENTIAL=0
INSIDE THE BOX.

RESULT FOR REDUCE ENERGY.


ENERGY STATE. ANALYTICAL NUMERICAL VALUE
VALUE
Ground State 4.9348022005 4.9348024498

1st Excited State 19.7392088021 19.7392097994

2nd Excited State 44.4132198049 44.4132220488

3rd Excited State 78.9568352087 78.9568391979

13
REDUCE EIGEN FUNCTION FOR
POTENTIAL=50.0*exp(-(s-0.5)**2/0.08)
INSIDE THE BOX.

14
REDUCE EIGEN FUNCTION FOR
POTENTIAL=50.0*exp(-(s-0.5)**2/0.08)
INSIDE THE BOX.

15
REDUCE EIGEN FUNCTION FOR
POTENTIAL=50.0*exp(-(s-0.5)**2/0.08)
INSIDE THE BOX.

RESULT FOR REDUCE ENERGY.


ENERGY STATE. NUMERICAL VALUE.

Ground State 36.4533126715

1st Excited State 41.4778191376

2nd Excited State 72.4518332715

3rd Excited State 104.5439283658

16

You might also like