Finite Square Potential Well
This Octave/Matlab script computes the energy levels of a finite square potential well in 1D. It uses a simple iterative procedure to solve the non-linear analytical equation.
Download
To run this program, download the script and modify the Well width, barrier height, and its effective mass. Then type "finitepotwell" in Octave/Matlab terminal. This is an example of the output:
octave:75> finitepotwell
Computing eigenvalues of a finite potential square well
Well width = 5.200000e-09 m
Barrier height = 0.280000 eV
Well effective mass = 0.213000 m0
Stop when difference is smaller than = 1.000000e-04
------------------------------------------
Computing eigenvalues no: 1
dz = 1.440037
dz = 0.462645
dz = 0.155677
dz = 0.051227
dz = 0.016968
dz = 0.005608
dz = 0.001855
dz = 0.000613
dz = 0.000203
dz = 0.000067
Energy difference from top of barrier: -0.242208
Energy difference from bottom of well: 0.037792
------------------------------------------
Computing eigenvalues no: 2
dz = 2.163174
dz = 1.154316
dz = 0.418823
dz = 0.165087
dz = 0.062529
dz = 0.024017
dz = 0.009174
dz = 0.003512
dz = 0.001343
dz = 0.000514
dz = 0.000197
dz = 0.000075
Energy difference from top of barrier: -0.180957
Energy difference from bottom of well: 0.099043
------------------------------------------