MATLAB Answers

0

Numerical integral over the whole spherical volume of a crystallite

Anil Kumar さんによって質問されました 2019 年 6 月 4 日
最新アクティビティ Anil Kumar さんによって コメントされました 2019 年 6 月 7 日
I am new to matlab. I want to solve the above equation to get the total carrier concentration in the spherical grain volume;
below are the values of the parameters:
Total Volume of the sphere= 4/3*pi*r^3
r= 40*10^-9 %meters
Ld= 18*10^-9 %meters
phi= 20
Nd= 1e23

  0 件のコメント

サインイン to comment.

2 件の回答

Torsten
回答者: Torsten
2019 年 6 月 5 日
 採用された回答

Nd = 1e23;
phi = 20;
Ld = 18e-9;
R = 40e-9;
fun = @(r) 4*pi*r.^2.*(1-exp(phi + 1/6*(r/Ld).^2));
value_integral = Nd*integral(fun,0,R)

  10 件のコメント

Torsten
2019 年 6 月 7 日
Nd = 1e24;
N = 100;
e = 12*1e-12;
R = [10e-9,20e-9,30e-9,40e-9];
Et_Ef = -0.81*1.6*1e-19;
K = 1.3807e-23;
T = 600;
Nt = linspace(1e14,1e16,N);
q = 1.6e-19;
Ld = sqrt(e*K*T/(q^2*Nd));
for j = 1:numel(R)
for i= 1:N
funct = @(r,phi0) (4*pi*(Nd-Nd*exp(-phi0))*r.^2);
equation = @(phi0)integral(@(r)funct(r,phi0),0,R(j))-(4*pi*R(j)^2*Nt(i)/(1+2*exp((Et_Ef + K*T *(phi0 + (1/6)*(R(j)/Ld)^2))/(K*T))));
phi0val(j,i) = fzero(equation,10);
end
end
plot(Nt,phi0val(1,:),Nt,phi0val(2,:),Nt,phi0val(3,:),Nt,phi0val(4,:))
Anil Kumar 2019 年 6 月 7 日
Thanks Sir! I learnt a lot through these queries! Thanks for everything!
Anil Kumar 2019 年 6 月 7 日
I have another issue. I want to integrate "funneff" and want to plot neff against Nt! Problem is that I am not able to integrate the function "funneff". Also how to plot neff v/s Nt ? below is my code. Thanks in advance!
Nd = 1e24;
N = 100;
e = 12*1e-12;
% R = [10e-9,20e-9,30e-9,40e-9];
R = [1e-9,2e-9,3e-9,4e-9,5e-9,6e-9,7e-9,8e-9];
Et_Ef = -1.21*1.6*1e-19;
K = 1.3807e-23;
T = 600;
Nt = linspace(1e13,1e16,N);
q = 1.6e-19;
Ld = sqrt(e*K*T/(q^2*Nd));
for j = 1:numel(R)
for i= 1:N
funct = @(R,phi0) (4*pi*(Nd-Nd*exp(-phi0))*R.^2);
equation = @(phi0)integral(@(R)funct(R,phi0),0,R(j))-(4*pi*R(j)^2*Nt(i)/(1+2*exp((Et_Ef + K*T *(phi0 + (1/6)*(R(j)/Ld)^2))/(K*T))));
%equation = @(phi0)integral(@(r)funct(r,phi0),0,R)-(4*pi*R^2*Nt(i)/(1+2*exp((Et_Ef + K*T *(phi0 + (1/6)*(R/Ld)^2))/(K*T))));
phi0val(j,i) = fzero(equation,40);
%phi0val(i) = fzero(equation,40)
end
end
% plot(Nt,phi0val(1,:))
% hold on
% plot(Nt,phi0val(2,:))
% hold on
% plot(Nt,phi0val(3,:))
% hold on
% plot(Nt,phi0val(4,:))
% hold on
% plot(Nt,phi0val(5,:))
% hold on
% plot(Nt,phi0val(6,:))
% hold on
% plot(Nt,phi0val(7,:))
% hold on
% plot(Nt,phi0val(8,:))
for j = 1:numel(R)
for i=1:N
funneff= @(R)1./(4/3.*pi.*R(j).^3).*(Nd.*exp(-phi0val(j,i))).*R(j).^2
neff(j,i)= integral(funneff,0,R(j),'Arrayvalued',true)
end
end
plot(neff(1,:),phi0val(1,:))
hold on
plot(neff(2,:),phi0val(2,:))
hold on
plot(neff(3,:),phi0val(3,:))
hold on
plot(neff(4,:),phi0val(4,:))
hold on
plot(neff(5,:),phi0val(5,:))
hold on
plot(neff(6,:),phi0val(6,:))
hold on
plot(neff(7,:),phi0val(7,:))
hold on
plot(neff(8,:),phi0val(8,:))

サインイン to comment.


darova
回答者: darova
2019 年 6 月 4 日

Suggestion:
Use integral or trapz

  1 件のコメント

Anil Kumar 2019 年 6 月 5 日
Thank you sir for the suggestion.

サインイン to comment.



Translated by