![]() |
GPUE
v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
|
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} | |
| axis | ( | ) |
| and extended by | ( | Dr? | ) |
| % Ek | ( | ii | ) |
| end ekc | ( | ii | ) |
| eki | ( | ii | ) |
| % figure | ( | 4 | ) |
| % end % figure | ( | 5 | ) |
| legend | ( | {' $E^ c(k)$',' $E^ i(k)$'} | , |
| 'FontSize' | , | ||
| 20 | , | ||
| 'FontWeight' | , | ||
| 'bold' | , | ||
| 'Interpreter' | , | ||
| 'latex' | |||
| ) |
|
virtual |
| pcolor | ( | abs(u_x.^ 2+u_y.^ 2) | ) |
| Latin Modern latex print | ( | '-dpng' | , |
| '-r300' | |||
| ) |
Referenced by plot::parse_args(), plot::plot_var_range(), plot::plot_wfc(), plot::plot_wfc_k(), plot::plot_wfc_phase(), gen_data::proj_2d(), gen_data::proj_k2d(), gen_data::proj_phase_2d(), gen_data::wfc_com(), gen_data::wfc_density(), and gen_data::wfc_phase().

| set | ( | gca | , |
| 'DefaultTextInterpreter' | , | ||
| 'Latex' | |||
| ) |
| set | ( | gca | , |
| 'TickLabelInterpreter' | , | ||
| 'latex' | |||
| ) |
| title | ( | '|U|' | ) |
| title | ( | ) |
| % title | ( | 'EK' | ) |
| % title | ( | 'eki' | ) |
| % v_x | ( | find(v_x==0) | ) |
| v_y | ( | find(v_y==0) | ) |
| Latin Modern xlabel | ( | ' $x$ ' | [m], |
| 'Interpreter' | , | ||
| 'latex' | |||
| ) |
| Latin Modern xlabel | ( | ' $k$ ' | [m$^{-1}$], |
| 'Interpreter' | , | ||
| 'latex' | |||
| ) |
Definition at line 7 of file quKineticSpec.m.
| colorbar |
Definition at line 55 of file quKineticSpec.m.
| dimSize = size(Psir) |
Definition at line 73 of file quKineticSpec.m.
| div =1 |
Definition at line 101 of file quKineticSpec.m.
Definition at line 17 of file quKineticSpec.m.
| drawnow =hist(abs(Psir.^2)) |
Definition at line 98 of file quKineticSpec.m.
| Ec = 0.5*abs(uc_x.^2 + uc_y.^2) |
Definition at line 70 of file quKineticSpec.m.
| Ei = 0.5*abs(ui_x.^2 + ui_y.^2) |
Definition at line 71 of file quKineticSpec.m.
| end figure |
Definition at line 75 of file quKineticSpec.m.
| FontName |
Definition at line 78 of file quKineticSpec.m.
| Latin Modern FontSize |
Definition at line 78 of file quKineticSpec.m.
| function[varargout] |
Definition at line 1 of file quKineticSpec.m.
| % % 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.
Definition at line 99 of file quKineticSpec.m.
| % ii =1 |
Definition at line 102 of file quKineticSpec.m.
| shading interp |
Definition at line 55 of file quKineticSpec.m.
| Latin Modern Interpreter |
Definition at line 80 of file quKineticSpec.m.
| k_mag = sqrt(kx.^2 + ky.^2) |
Definition at line 26 of file quKineticSpec.m.
| % for kk |
Definition at line 103 of file quKineticSpec.m.
Definition at line 25 of file quKineticSpec.m.
| kMax = max(max(k_mag)) |
Definition at line 27 of file quKineticSpec.m.
Definition at line 19 of file quKineticSpec.m.
| kxmkym = kxm.*kym |
Definition at line 60 of file quKineticSpec.m.
Definition at line 20 of file quKineticSpec.m.
| latex |
Definition at line 76 of file quKineticSpec.m.
| np1 =unwrap(phase,[],1) |
Definition at line 39 of file quKineticSpec.m.
| np2 =unwrap(phase,[],2) |
Definition at line 40 of file quKineticSpec.m.
| colorbar off |
Definition at line 83 of file quKineticSpec.m.
| % % % Velocity field calculation % phase = angle(Psir) |
Definition at line 37 of file quKineticSpec.m.
| % Psik = fftn(Psir) |
Definition at line 30 of file quKineticSpec.m.
| rDim = size(Psir) |
Definition at line 14 of file quKineticSpec.m.
| Latin Modern Roman |
Definition at line 78 of file quKineticSpec.m.
| axis square |
Definition at line 75 of file quKineticSpec.m.
| TickLabelInterpreter |
Definition at line 76 of file quKineticSpec.m.
Definition at line 57 of file quKineticSpec.m.
| u_ky = fftn(u_y) |
Definition at line 58 of file quKineticSpec.m.
| u_x =exp(q*1i*angle(Psir)).*abs(Psir).*(v_x) |
Definition at line 52 of file quKineticSpec.m.
| u_y =exp(q*1i*angle(Psir)).*abs(Psir).*(v_y) |
Definition at line 53 of file quKineticSpec.m.
Definition at line 61 of file quKineticSpec.m.
Definition at line 62 of file quKineticSpec.m.
| uc_x = ifft2(uc_kx) |
Definition at line 67 of file quKineticSpec.m.
| uc_y = ifft2(uc_ky) |
Definition at line 67 of file quKineticSpec.m.
Definition at line 64 of file quKineticSpec.m.
Definition at line 65 of file quKineticSpec.m.
| ui_x = ifft2(ui_kx) |
Definition at line 68 of file quKineticSpec.m.
| ui_y = ifft2(ui_ky) |
Definition at line 68 of file quKineticSpec.m.
Definition at line 46 of file quKineticSpec.m.
Definition at line 45 of file quKineticSpec.m.
| xDim = rDim(1) |
Definition at line 14 of file quKineticSpec.m.
Definition at line 74 of file quKineticSpec.m.
| yDim = rDim(2) |
Definition at line 14 of file quKineticSpec.m.