Ian Jauslin
summaryrefslogtreecommitdiff
blob: fd1d492ef104e43fb837db36685a5ff296522864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using QuadGK
using SpecialFunctions
using FFTW

# numerical values
hbar=6.58e-16 # eV.s
m=9.11e-31 # kg
Vn=9 # eV
En=14e9 # V/m
Kn=4.5 # eV

V=1
E=En*hbar/(2*Vn^1.5*m^0.5)*sqrt(1.60e-19)
k0=sqrt(Kn/Vn)

# rescale x to nm
nm_scale=sqrt(2*m*Vn)/hbar*1e9*sqrt(1.60e-19)

# cutoffs
p_cutoff=20*k0
p_npoints=256

# airy approximations
airy_threshold=30
airy_order=5

# xbounds
xmax=10
xmin=-10
x_npoints=200

include("FN_base.jl")

# compute asymptotic values
ps_asym=Array{Complex{Float64}}(undef,x_npoints)
dps_asym=Array{Complex{Float64}}(undef,x_npoints)
for i in 1:x_npoints
  x=xmin+(xmax-xmin)*i/x_npoints
  ps_asym[i]=psi_pole(x,k0,E,V)
  dps_asym[i]=dpsi_pole(x,k0,E,V)
end

# print asymptotic values
for i in 1:x_npoints
  print((xmin+(xmax-xmin)*i/x_npoints)*nm_scale,' ',abs(ps_asym[i])^2,' ',J(ps_asym[i],dps_asym[i]),'\n')
end