MATLAB Answers

simpson 3/8 rule

16 ビュー (過去 30 日間)
Arvind Sharma
Arvind Sharma 2017 年 11 月 13 日
コメント済み: Jan 2017 年 11 月 13 日
% to solve the gain integral using Simson 3/8 rule
%reference - Optical gain spectra of 1.55 mm GaAs/GaN.58yAs1-1.58yBiy/GaAs
%single quantum well
% I. Guizani, C. Bilel, M.M. Habchi, A. Rebey*
K=8.61e-5; %boltzmann constant in eV/K
T=330; %temperature
Efc=1.12; %quasi fermi level of conduction band
Efh=0.04; %quasi fermi level of Valance band
hbar=6.5821e-16; %reduced plancks constant in eV sec
tao=0.1e-13; %transition time in sec
Te1h1=0.8; %transition energy in eV
%---------------------------------------------------%
Temp=(hbar/tao);
a=0; %initial pont
b=0.63; % in eV final point of integration
n=9; %no. of point is multiple of 3
h=((b-a)/n); %step size
sum=0;
%-------------------------------------------%
% As lorenzitian line shape function is a function of
% of integral variable Ep and photon energy E
%and fermi function for both conduction and valance band
% is a function of integral variable Ep
E=0:0.1:1.3;
Ep=0:h:b;
for i =1:length(E)
for j=1:length(Ep)
FCn(j) = (1/(1+exp((Ep(j)-Efc)/(K*T)))); % fermi function for conduction
FVm(j) = (1/(1+exp((Efh-Ep(j))/(K*T)))); %fermi function for valance
LEP(i,j) = (TEMP/((E(i)-Te1h1-EP(j))^2)+(TEMP^2)); %lorenzitian line shape function
OUT(i,j) = EP(j)*(FCn(j) - FVm(j))*LEP(i,j);
end
FINAL(i) = (3*h/8)*(OUT(i,1)+OUT(i,7)+2*(OUT(i,4))+3*(OUT(i,2)+OUT(i,3)+OUT(i,5)));
gain=(FINAL(i)./E(i));
end

  6 件のコメント

表示 3 件の古いコメント
Arvind Sharma
Arvind Sharma 2017 年 11 月 13 日
i am attaching the code file in pdf as i am plotting the curve gain against energy it first increased then decreased
Torsten
Torsten 2017 年 11 月 13 日
If you use MATLAB's "integral" for comparison, you'll get a good impression whether your code is correct or not.
Best wishes
Torsten.
Jan
Jan 2017 年 11 月 13 日
Please attach code as code, not as PDF. Printing to a PDF can e.g. insert line breaks and make it much harder to use the code by copy&paste to create an answer.

サインイン to comment.

回答 (0 件)

サインイン してこの質問に回答します。

タグ


Translated by