log space for x generation, fermi_from_carrier_density

This commit is contained in:
andy 2021-03-09 10:42:13 +00:00
parent 8e806a7592
commit 393c8605a2
4 changed files with 99 additions and 20 deletions

View File

@ -0,0 +1,18 @@
function carrier_density = carrier_density_from_fermi(fermi)
if fermi > 0
sf = 1;
else
sf = -1;
end
a = 0.246e-9; % lattice constant (m)
t = 2.8; % eV
hbar = 6.626e-34 / (2*pi); % Js
root_3_over_2 = sqrt(3) / 2;
carrier_density = fermi^2 / (pi * (root_3_over_2 * a * ev_to_j(t))^2);
carrier_density = sf * carrier_density;
end

View File

@ -5,22 +5,26 @@
close all; clear all; clc;
DISPLAY_HZ = true;
MAX_F = 1e12; % Hz
F_TOTAL = 1e3;
MAX_Y = 10; % ev
Y_TOTAL = 100;
f_vals = 1:MAX_F/F_TOTAL:MAX_F; % hz
MIN_F = 0;
MAX_F = 15; % Hz
F_TOTAL = 50;
MAX_Y = 30; % carriers
Y_TOTAL = 50;
f_vals = logspace(MIN_F, MAX_F, F_TOTAL); % hz
f_vals = f_vals .* (2*pi); % rads-1
y_vals = 1:MAX_Y/Y_TOTAL:MAX_Y; % ev
y_vals = logspace(0, MAX_Y, Y_TOTAL); % ev
%y_vals = -MAX_Y:2*MAX_Y/Y_TOTAL:MAX_Y; % ev
%y_vals = y_vals + 273.15;
cond = zeros(length(f_vals), length(y_vals));
for freq=1:length(f_vals)
for y=1:length(y_vals)
% omega (rads-1), fermi_level (J), temp (K), scatter_lifetime (s-1)
cond(freq, y) = sheet_conductivity(f_vals(freq), ev_to_j(y_vals(y)), 300, 5e-12);
cond(freq, y) = sheet_conductivity(f_vals(freq), fermi_from_carrier_density(y_vals(y)), 300, 5e-15);
end
end
@ -28,17 +32,35 @@ if DISPLAY_HZ % divide radians back to hertz
f_vals = f_vals ./ (2*pi);
end
surf(f_vals, y_vals, transpose(abs(cond)));
figure(1)
surf(f_vals, y_vals, transpose(real(cond)));
h = gca;
rotate3d on
grid();
set(h, 'xscale', 'log')
title('2D Sheet Conductivity');
ylabel('Fermi Level (ev)');
set(h, 'yscale', 'log')
title('2D Sheet Real Conductivity');
ylabel('Net Carrier Density');
zlabel('Conductivity (S/m)');
if DISPLAY_HZ
xlabel('Frequency (Hz)');
else
xlabel('Frequency (rads-1)');
end
figure(2)
surf(f_vals, y_vals, transpose(imag(cond)));
h = gca;
rotate3d on
grid();
set(h, 'xscale', 'log')
set(h, 'yscale', 'log')
title('2D Sheet Imaginary Conductivity');
ylabel('Net Carrier Density');
zlabel('Conductivity (S/m)');
if DISPLAY_HZ
xlabel('Frequency (Hz)');
else
xlabel('Frequency (rads-1)');
end

View File

@ -2,27 +2,45 @@
%%
%% calculate and present 2D sheet conductivty for graphene
close all; clear all; clc;
close all;clear all; clc;
DISPLAY_HZ = true;
MAX_F = 1e12;
F_TOTAL = 1e4;
MIN_F = 9;
MAX_F = 15;
F_TOTAL = 1e2;
x_vals = 1:MAX_F/F_TOTAL:MAX_F; % hz
x_vals = logspace(MIN_F, MAX_F, F_TOTAL); % hz
x_vals = x_vals .* (2*pi); % rads-1
% omega (rads-1), fermi_level (J), temp (K), scatter_lifetime (s-1)
cond = arrayfun(@(x) sheet_conductivity(x, ev_to_j(3), 300, 5e-12), x_vals);
cond = [];
for x=x_vals
% omega (rads-1), fermi_level (J), temp (K), scatter_lifetime (s-1)
cond = [cond sheet_conductivity(x, ev_to_j(3), 300, 5e-12)];
end
if DISPLAY_HZ % divide radians back to hertz
x_vals = x_vals ./ (2*pi);
end
%plot(x_vals, cond);
semilogx(x_vals, cond);
figure(1);
%plot(x_vals, real(cond));
semilogx(x_vals, real(cond));
grid();
title('2D Sheet Conductivity');
title('2D Sheet Real Conductivity');
ylabel('Conductivity (S/m)');
if DISPLAY_HZ
xlabel('Frequency (Hz)');
else
xlabel('Frequency (rads-1)');
end
figure(2);
%plot(x_vals, imag(cond));
semilogx(x_vals, imag(cond));
grid();
title('2D Sheet Imaginary Conductivity');
ylabel('Conductivity (S/m)');
if DISPLAY_HZ
xlabel('Frequency (Hz)');

View File

@ -0,0 +1,21 @@
function fermi = fermi_from_carrier_density(carrier_density)
if carrier_density > 0
sf = 1;
else
sf = -1;
end
carrier_density = abs(carrier_density);
a = 0.246e-9; % lattice constant (m)
t = 2.8; % eV
hbar = 6.626e-34 / (2*pi); % Js
root_3_over_2 = sqrt(3) / 2;
fermi_velocity_eq = (root_3_over_2 * a * ev_to_j(t))^2;
fermi = sf * sqrt(carrier_density * pi * fermi_velocity_eq);
end