ECE_456_Reports/PS1/q3.m
2021-02-06 19:54:06 -07:00

33 lines
687 B
Matlab
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% Thermo-electric current
% Physical constants
hbar = 1.054e-34;
q = 1.602e-19;
% Parameters (eV)
kBT_1 = 0.025;
kBT_2 = 0.026;
mu = 0;
gamma_1 = 0.005;
gamma_2 = gamma_1;
gamma_sum = gamma_1 + gamma_2;
% Channel energy levels, varying between -0.25eV and 0.25eV
epsilon = linspace(-0.25, 0.25, 101);
% Energy grid
E = linspace(-1, 1, 501);
% Contact fermi functions
f_1 = 1 ./ (1 + exp((E - mu)./kBT1));
f_2 = 1 ./ (1 + exp((E - mu)./kBT2));
% Iterate through channel energy levels
for n = 1:length(epsilon)
% Compute energy level density functions - integral normalized to unity
D = (gamma./(2*pi))./((E-cal_E(count)).ˆ2+((gamma./2).ˆ2));
D = D./(dE*sum(D));
end