Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jabir Ali Ouassou committed May 14, 2015
1 parent a21b71e commit ece6ec5
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Created 2015-02-06
% Updated 2015-05-07

function simulate_bilayer_ferromagnet(exchange_strength, exchange_angle, spinorbit_strength, spinorbit_angle)
function simulate_bilayer_spinorbit(exchange_strength, exchange_angle, spinorbit_strength, spinorbit_angle)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEFINE PARAMETERS FOR THE SIMULATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand All @@ -14,7 +14,7 @@ function simulate_bilayer_ferromagnet(exchange_strength, exchange_angle, spinorb
energies = linspace(0.0, 1.5, 26);

% Filename where results will be stored
output = 'simulate_bilayer_ferromagnet.dat';
output = 'simulate_bilayer_spinorbit.dat';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREPARATIONS FOR THE SIMULATION
Expand Down
92 changes: 92 additions & 0 deletions simulate_bilayer_spinorbit_sc.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
% This script simulates the proximity effect in a ferromagnet with SOC.
% [This version of the script performs the calculation self-consistently.]
%
% Written by Jabir Ali Ouassou <[email protected]>
% Created 2015-05-14
% Updated 2015-05-14

function simulate_bilayer_spinorbit_sc(exchange_strength, exchange_angle, spinorbit_strength, spinorbit_angle)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEFINE PARAMETERS FOR THE SIMULATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Vectors of positions and energies that will be used in the simulation
positions = linspace(0, 1, 151);
energies = [linspace(0.001,1.500,501) linspace(1.501,cosh(1/0.2),101)];

% Filename where results will be stored
output = 'simulate_bilayer_spinorbit_sc.dat';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREPARATIONS FOR THE SIMULATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Make sure that all required classes and methods are in the current path
initialize;

% Create a superconductor [d=0.55ξ]
s = Superconductor(positions, energies, 1/0.55^2, 0.2);
s.interface_right = 3;
%s.locked = true;

% Create a ferromagnet [d=0.55ξ]
m = Ferromagnet(positions, energies, 1/0.55^2, [exchange_strength*cos(exchange_angle), exchange_strength*sin(exchange_angle), 0], SpinVector.RashbaDresselhaus(spinorbit_strength, spinorbit_angle));
m.interface_left = 3;
m.update_boundary_left(s);

% This enables or disables various debugging options
s.delay = 0;
s.debug = 1;
s.plot = 0;

m.delay = 0;
m.debug = 1;
m.plot = 0;

% These variables keep track of the density of states
dosM = zeros(1,length(energies));
dosS = zeros(1,length(energies));

dosM0 = ones(1,length(energies));
dosS0 = ones(1,length(energies));

residue = 1;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PERFORM THE SIMULATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tic;
while residue > 1e-3
% Status information
fprintf('[ Time: %2d min ] [ Gap: %.4f ] [ Residue: %.4f ]\n', floor(toc/60), s.gap_max, residue);

% Update the internal state of the normal metal
m.update_boundary_left(s);
m.update;

% Calculate the density of states in the normal metal [left end]
dosM0 = dosM;
for n=1:length(energies)
dosM(n) = m.states(1,n).eval_ldos;
end
fprintf('[ ZEP in ferromagnet: %.6f ]\n\n', dosM(1));

% Update the internal state of the superconductor
s.update_boundary_right(m);
s.update;

% Calculate the density of states in the superconductor [right end]
dosS0 = dosS;
for n=1:length(energies)
dosS(n) = s.states(end,n).eval_ldos;
end
fprintf('[ ZEP in superconductor: %.6f ]\n\n', dosS(1));

% Update the residue
residue = max(max(abs(dosM-dosM0)),max(abs(dosS-dosS0)));

% Save the results of the simulation
save(output);
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% Created 2015-05-06
% Updated 2015-05-07

function simulate_josephson_ferromagnet(phase_difference, exchange_strength, exchange_angle, spinorbit_strength, spinorbit_angle)
function simulate_josephson_spinorbit(phase_difference, exchange_strength, exchange_angle, spinorbit_strength, spinorbit_angle)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEFINE PARAMETERS FOR THE SIMULATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand All @@ -15,7 +15,7 @@ function simulate_josephson_ferromagnet(phase_difference, exchange_strength, exc
energies = linspace(0.0, 1.5, 25);

% Filename where results will be stored
output = 'simulate_josephson_ferromagnet.dat';
output = 'simulate_josephson_spinorbit.dat';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREPARATIONS FOR THE SIMULATION
Expand Down Expand Up @@ -58,4 +58,4 @@ function simulate_josephson_ferromagnet(phase_difference, exchange_strength, exc

% Save the results of the simulation
save(output);
end
end

0 comments on commit ece6ec5

Please sign in to comment.