30 lines
1.5 KiB
Matlab
30 lines
1.5 KiB
Matlab
function VDk = calculateVDCutoff(this,Params,Transf,TransfRad)
|
|
% makes the dipolar interaction matrix, size numel(Params.kr) * numel(Params.kz)
|
|
% Rmax and Zmax are the interaction cutoffs
|
|
% VDk needs to be multiplied by Cdd
|
|
% approach is that of Lu, PRA 82, 023622 (2010)
|
|
|
|
Zcutoff = Params.Lz/2;
|
|
alph = acos((Transf.KX*sin(Params.theta)*cos(Params.phi)+Transf.KY*sin(Params.theta)*sin(Params.phi)+Transf.KZ*cos(Params.theta))./sqrt(Transf.KX.^2+Transf.KY.^2+Transf.KZ.^2));
|
|
alph(1) = pi/2;
|
|
|
|
% Analytic part of cutoff for slice 0<z<Zmax, 0<r<Inf Ronen, PRL 98, 030406 (2007)
|
|
cossq = cos(alph).^2;
|
|
VDk = cossq-1/3;
|
|
sinsq = 1 - cossq;
|
|
VDk = VDk + exp(-Zcutoff*sqrt(Transf.KX.^2+Transf.KY.^2)).*( sinsq .* cos(Zcutoff * Transf.KZ) - sqrt(sinsq.*cossq).*sin(Zcutoff * Transf.KZ) );
|
|
|
|
% Nonanalytic part
|
|
% For a cylindrical cutoff, we need to construct a kr grid based on the 3D parameters using Bessel quadrature
|
|
VDkNon = this.calculateNumericalHankelTransform(TransfRad.kr, TransfRad.kz, TransfRad.Rmax, Zcutoff);
|
|
|
|
% Interpolating the nonanalytic part onto 3D grid
|
|
fullkr = [-flip(TransfRad.kr)',TransfRad.kr'];
|
|
[KR,KZ] = ndgrid(fullkr,TransfRad.kz);
|
|
[KX3D,KY3D,KZ3D] = ndgrid(ifftshift(Transf.kx),ifftshift(Transf.ky),ifftshift(Transf.kz));
|
|
KR3D = sqrt(KX3D.^2 + KY3D.^2);
|
|
fullVDK = [flip(VDkNon',2),VDkNon']';
|
|
VDkNon = interpn(KR,KZ,fullVDK,KR3D,KZ3D,'spline',0); %Last argument is -1/3 for full VDk. 0 for nonanalytic piece?
|
|
VDkNon = fftshift(VDkNon);
|
|
|
|
VDk = VDk + VDkNon; |