GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
quKineticSpec.m File Reference

Go to the source code of this file.

Functions

and extended by (Dr?) Lee James O 'Riordan. % Ek
 
id no ()
 
dx *xDim pi ()
 
v_x (find(v_x==0))
 
 v_y (find(v_y==0))
 
figure (4)
 
 pcolor (abs(u_x.^ 2+u_y.^ 2))
 
 title ('|U|')
 
 pcolor (xx, xx, log10(Ec))
 
 title (['Comp ', int2str(iii)]) set(gca
 
 set (gca, 'DefaultTextInterpreter', 'Latex') set(gca
 
Latin Modern xlabel (' $x$ [m] ', 'Interpreter', 'latex') ylabel(' $y$ [m] '
 
Latin Modern latex print ('-dpng','-r300', ['./Comp_CBAR_', int2str(iii),'.png'])
 
 pcolor (xx, xx, log10(Ei))
 
end ekc (ii)
 
 eki (ii)
 
 loglog (k_mag(1:(xDim/2-1)), ekc, k_mag(1:(xDim/2-1)), eki, 'LineWidth', 2)
 
axis ([1e4 1e7 5e-18 1e-10])
 
title ('EK')
 
 legend ({' $E^ c(k)$',' $E^ i(k)$'}, 'FontSize', 20, 'FontWeight', 'bold', 'Interpreter', 'latex')
 
 set (gca, 'TickLabelInterpreter', 'latex')
 
Latin Modern xlabel (' $k$ [m$^{-1}$] ', 'Interpreter', 'latex') ylabel(' $E(k)$ [a.u.] '
 
vline (2 *pi/hl, 'r', 'Healing')
 
loglog (k_mag(1:511), eki, 'LineWidth', 2)
 
title ('eki')
 
Ek (ii)
 
% end % figure (5)
 
loglog (k_mag(1:511), Ek)
 

Variables

 function [varargout]
 
avg = perform angled average. Likely always want this to be yes
 
% % iii output index for naming the figure files Useful when looped with % kinSpec script % Setup % hbar =1.05457e-34
 
 rDim = size(Psir)
 
 xDim = rDim(1)
 
 yDim = rDim(2)
 
 dky = 2*pi/(dx*yDim)
 
 kx = [linspace(0,(xDim/2-1)*dkx,xDim/2) linspace(-xDim/2*dkx,-dkx,xDim/2)]'
 
 ky = [linspace(0,(yDim/2-1)*dky,yDim/2) linspace(-yDim/2*dky,-dky,yDim/2)]'
 
% % k km_mag = sqrt(kxm.^2 + kym.^2)
 
 k_mag = sqrt(kx.^2 + ky.^2)
 
 kMax = max(max(k_mag))
 
Psik = fftn(Psir)
 
% % % Velocity field calculation % phase = angle(Psir)
 
 np1 =unwrap(phase,[],1)
 
 np2 =unwrap(phase,[],2)
 
 v_y = (hbar/m)*(velnp1y)
 
 v_x = (hbar/m)*(velnp2x)
 
 u_x =exp(q*1i*angle(Psir)).*abs(Psir).*(v_x)
 
 u_y =exp(q*1i*angle(Psir)).*abs(Psir).*(v_y)
 
shading interp
 
 colorbar
 
axis square u_kx = fftn(u_x)
 
 u_ky = fftn(u_y)
 
 kxmkym = kxm.*kym
 
 uc_kx =(kxm.^2.*u_kx + kxm.*kym.*u_ky)./(km_mag.^2+1e-100)
 
 uc_ky =(kxm.*kym.*u_kx + kym.^2.*u_ky)./(km_mag.^2+1e-100)
 
 ui_kx = u_kx - uc_kx
 
 ui_ky = u_ky - uc_ky
 
 uc_x = ifft2(uc_kx)
 
 uc_y = ifft2(uc_ky)
 
 ui_x = ifft2(ui_kx)
 
 ui_y = ifft2(ui_ky)
 
 Ec = 0.5*abs(uc_x.^2 + uc_y.^2)
 
 Ei = 0.5*abs(ui_x.^2 + ui_y.^2)
 
 dimSize = size(Psir)
 
 xx = linspace(-(dimSize(1)/2)*dx,(dimSize(1)/2)*dx,dimSize(1))
 
 figure
 
axis square
 
 TickLabelInterpreter
 
 latex
 
 FontName
 
Latin Modern Roman
 
Latin Modern FontSize
 
Latin Modern Interpreter
 
colorbar off
 
 drawnow =hist(abs(Psir.^2))
 
 hl = hbar/sqrt(m*2*(C(1))*1e6*(4*pi*hbar*hbar*4.67e-9/m)*sqrt(m*(100)/(2*pi*hbar)))
 
 div =1
 
 ii =1
 
for kk
 
 varargout = {Ec,Ei,ekc,eki,k_mag}
 

Function Documentation

◆ axis()

axis ( )

◆ by()

and extended by ( Dr?  )

◆ Ek()

% Ek ( ii  )

◆ ekc()

end ekc ( ii  )

◆ eki()

eki ( ii  )

◆ figure() [1/2]

% figure ( )

◆ figure() [2/2]

% end % figure ( )

◆ legend()

legend ( {' $E^ c(k)$',' $E^ i(k)$'}  ,
'FontSize ,
20  ,
'FontWeight'  ,
'bold'  ,
'Interpreter ,
'latex  
)

◆ loglog() [1/3]

loglog ( k_mag(1:(xDim/2-1))  ,
ekc  ,
k_mag(1:(xDim/2-1))  ,
eki  ,
'LineWidth ,
 
)

◆ loglog() [2/3]

% loglog ( k_mag(1:511)  ,
eki  ,
'LineWidth ,
 
)

◆ loglog() [3/3]

% loglog ( k_mag(1:511)  ,
Ek   
)

◆ no()

id no ( )
virtual

◆ pcolor() [1/3]

pcolor ( abs(u_x.^ 2+u_y.^ 2)  )

◆ pcolor() [2/3]

pcolor ( xx  ,
xx  ,
log10(Ec  
)

◆ pcolor() [3/3]

pcolor ( xx  ,
xx  ,
log10(Ei  
)

◆ pi()

dx*xDim pi ( )
virtual

◆ print()

◆ set() [1/2]

set ( gca  ,
'DefaultTextInterpreter'  ,
'Latex'   
)

◆ set() [2/2]

set ( gca  ,
'TickLabelInterpreter ,
'latex  
)

◆ title() [1/4]

title ( '|U|'  )

◆ title() [2/4]

title ( )

◆ title() [3/4]

% title ( 'EK'  )

◆ title() [4/4]

% title ( 'eki )

◆ v_x()

% v_x ( find(v_x==0)  )

◆ v_y()

v_y ( find(v_y==0)  )

◆ vline()

% vline ( 2 *pi hl,
'r ,
'Healing'   
)

◆ xlabel() [1/2]

Latin Modern xlabel ( ' $x$ '  [m],
'Interpreter ,
'latex  
)

◆ xlabel() [2/2]

Latin Modern xlabel ( ' $k$ '  [m$^{-1}$],
'Interpreter ,
'latex  
)

Variable Documentation

◆ avg

if avg = perform angled average. Likely always want this to be yes

Definition at line 7 of file quKineticSpec.m.

◆ colorbar

colorbar

Definition at line 55 of file quKineticSpec.m.

◆ dimSize

dimSize = size(Psir)

Definition at line 73 of file quKineticSpec.m.

◆ div

div =1

Definition at line 101 of file quKineticSpec.m.

◆ dky

dky = 2*pi/(dx*yDim)

Definition at line 17 of file quKineticSpec.m.

◆ drawnow

drawnow =hist(abs(Psir.^2))

Definition at line 98 of file quKineticSpec.m.

◆ Ec

Ec = 0.5*abs(uc_x.^2 + uc_y.^2)

Definition at line 70 of file quKineticSpec.m.

◆ Ei

Ei = 0.5*abs(ui_x.^2 + ui_y.^2)

Definition at line 71 of file quKineticSpec.m.

◆ figure

end figure

Definition at line 75 of file quKineticSpec.m.

◆ FontName

FontName

Definition at line 78 of file quKineticSpec.m.

◆ FontSize

Latin Modern FontSize

Definition at line 78 of file quKineticSpec.m.

◆ function

function[varargout]
Initial value:
= quKineticSpec(Psir,m,dx,q,avg,iii)
% QUKINETICSPEC Evalutes the quantum kinetic energy spectrum [PRA 89, 053631 (2014)]
% Built on work by Dr A. White
tuple dx
Definition: en.py:59
and extended by(Dr?) Lee James O 'Riordan. % Ek
A
Definition: GPE_2d.m:67
hold on q
Definition: velField.m:38
% Used for determining interaction strength of system % % Constants required for simulation m
Definition: GPE_2d.m:13
hold on
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % phase singularity for vortex creation annihilation for iii
Definition: GPE_2d.m:37
% avg
Definition: quKineticSpec.m:7

Definition at line 1 of file quKineticSpec.m.

◆ hbar

% % iii output index for naming the figure files Useful when looped with % kinSpec script % Setup % hbar =1.05457e-34

Definition at line 13 of file quKineticSpec.m.

◆ hl

hl = hbar/sqrt(m*2*(C(1))*1e6*(4*pi*hbar*hbar*4.67e-9/m)*sqrt(m*(100)/(2*pi*hbar)))

Definition at line 99 of file quKineticSpec.m.

◆ ii

% ii =1

Definition at line 102 of file quKineticSpec.m.

◆ interp

shading interp

Definition at line 55 of file quKineticSpec.m.

◆ Interpreter

Latin Modern Interpreter

Definition at line 80 of file quKineticSpec.m.

◆ k_mag

k_mag = sqrt(kx.^2 + ky.^2)

Definition at line 26 of file quKineticSpec.m.

◆ kk

% for kk
Initial value:
=1:length(k_mag)/2-1
indX=find( k_mag(kk)<=km_mag & k_mag(kk+1) > km_mag)
for kk
k_mag
Definition: quKineticSpec.m:26
% % k km_mag
Definition: quKineticSpec.m:25
length
Definition: vort.py:75

Definition at line 103 of file quKineticSpec.m.

◆ km_mag

% % k km_mag = sqrt(kxm.^2 + kym.^2)

Definition at line 25 of file quKineticSpec.m.

◆ kMax

kMax = max(max(k_mag))

Definition at line 27 of file quKineticSpec.m.

◆ kx

kx = [linspace(0,(xDim/2-1)*dkx,xDim/2) linspace(-xDim/2*dkx,-dkx,xDim/2)]'

Definition at line 19 of file quKineticSpec.m.

◆ kxmkym

kxmkym = kxm.*kym

Definition at line 60 of file quKineticSpec.m.

◆ ky

ky = [linspace(0,(yDim/2-1)*dky,yDim/2) linspace(-yDim/2*dky,-dky,yDim/2)]'

Definition at line 20 of file quKineticSpec.m.

◆ latex

latex

Definition at line 76 of file quKineticSpec.m.

◆ np1

np1 =unwrap(phase,[],1)

Definition at line 39 of file quKineticSpec.m.

◆ np2

np2 =unwrap(phase,[],2)

Definition at line 40 of file quKineticSpec.m.

◆ off

colorbar off

Definition at line 83 of file quKineticSpec.m.

◆ phase

% % % Velocity field calculation % phase = angle(Psir)

Definition at line 37 of file quKineticSpec.m.

◆ Psik

% Psik = fftn(Psir)

Definition at line 30 of file quKineticSpec.m.

◆ rDim

rDim = size(Psir)

Definition at line 14 of file quKineticSpec.m.

◆ Roman

Latin Modern Roman

Definition at line 78 of file quKineticSpec.m.

◆ square

axis square

Definition at line 75 of file quKineticSpec.m.

◆ TickLabelInterpreter

TickLabelInterpreter

Definition at line 76 of file quKineticSpec.m.

◆ u_kx

axis square u_kx = fftn(u_x)

Definition at line 57 of file quKineticSpec.m.

◆ u_ky

u_ky = fftn(u_y)

Definition at line 58 of file quKineticSpec.m.

◆ u_x

u_x =exp(q*1i*angle(Psir)).*abs(Psir).*(v_x)

Definition at line 52 of file quKineticSpec.m.

◆ u_y

u_y =exp(q*1i*angle(Psir)).*abs(Psir).*(v_y)

Definition at line 53 of file quKineticSpec.m.

◆ uc_kx

uc_kx =(kxm.^2.*u_kx + kxm.*kym.*u_ky)./(km_mag.^2+1e-100)

Definition at line 61 of file quKineticSpec.m.

◆ uc_ky

uc_ky =(kxm.*kym.*u_kx + kym.^2.*u_ky)./(km_mag.^2+1e-100)

Definition at line 62 of file quKineticSpec.m.

◆ uc_x

uc_x = ifft2(uc_kx)

Definition at line 67 of file quKineticSpec.m.

◆ uc_y

uc_y = ifft2(uc_ky)

Definition at line 67 of file quKineticSpec.m.

◆ ui_kx

ui_kx = u_kx - uc_kx

Definition at line 64 of file quKineticSpec.m.

◆ ui_ky

ui_ky = u_ky - uc_ky

Definition at line 65 of file quKineticSpec.m.

◆ ui_x

ui_x = ifft2(ui_kx)

Definition at line 68 of file quKineticSpec.m.

◆ ui_y

ui_y = ifft2(ui_ky)

Definition at line 68 of file quKineticSpec.m.

◆ v_x

v_x = (hbar/m)*(velnp2x)

Definition at line 46 of file quKineticSpec.m.

◆ v_y

v_y = (hbar/m)*(velnp1y)

Definition at line 45 of file quKineticSpec.m.

◆ varargout

varargout = {Ec,Ei,ekc,eki,k_mag}

Definition at line 124 of file quKineticSpec.m.

◆ xDim

xDim = rDim(1)

Definition at line 14 of file quKineticSpec.m.

◆ xx

xx = linspace(-(dimSize(1)/2)*dx,(dimSize(1)/2)*dx,dimSize(1))

Definition at line 74 of file quKineticSpec.m.

◆ yDim

yDim = rDim(2)

Definition at line 14 of file quKineticSpec.m.