How can I plot the Shockley Queisser Limit?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anelisse Meriles
le 8 Mai 2020
Modifié(e) : Walter Roberson
le 11 Avr 2023
I’ve seen this example on MATLAB but I’m not sure how to make this function to plot.
function[data] = ShockleyQueisser(varargin)
%%%%%%%%%% defaults
sun = 'am1.5';
lossType = 'none';
lossVal = 1;
sweepVar = 'Eg';
sweepVal = linspace(0.4,2,100);
conc = 1;
emAngConc = 1;
qyFunc = @(E,Eg) 1;
TSun = 5780; % only used if 'sun'=='blackbody'
numE = 1000; % only used if 'sun'=='blackbody'
%%%%%%%%%%
%%%%%%%%%% Fundamental Constants
q = 1.602176565e-19;
h = 6.62606957e-34;
kT = 0.026; % technically kT/q, approx T=302K
kB = 1.3806488e-23;
c = 29979245800; % cm/s
%%%%%%%%%%
procArgs(varargin);
% photonFlux has units mA/cm^2/eV (i.e. current density per unit energy)
if(strcmp(sun,'am1.5'))
data = load('spectrum.mat'); % in ./Data
photonFlux = data.photonFlux;
E = data.E;
clear data;
else
E = linspace(0.1, 5, numE);
omegaSun = 6.85e-5; % SQ
photonFlux = omegaSun * 2*1e3*(q^4/h^3/c^2)*E.^2.*exp(-E/(kB*TSun/q)); % extra factor of 1e3*q to get mA
end
% totCurrent = trapz(E, photonFlux) % 69 mA/cm^2, un-comment to verify
totPower = trapz(E, conc * E .* photonFlux); % 100.037 mW/cm^2 if 'am1.5'
fprintf('Total power in solar spectrum: %g mW/cm^2 \n', totPower);
1 commentaire
YaLin
le 11 Avr 2023
I'm running this code, can I ask you some questions? I can't understand the formula inside
Réponse acceptée
Guru Mohanty
le 13 Mai 2020
Hi, I understand you are trying to plot Shockley Queisser. You can plot by these following steps.
clc;clear all;
Eg = linspace(0.4,2,100);
qy = @(E,Eg) floor(E/Eg);
d = ShockleyQueisser('Eg',Eg,'etaInt',0.9,'cm',qy);
figure;
plot(Eg, d.eff);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292677/image.png)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Electrophysiology dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!