I am trying to calculate the power of a radiator and the final temperature. the equation is Planck's law I do not know what is wrong with it. could you please help me

3 次查看(过去 30 天)
h=6.626176e-34; %J/s
c=2.99792458e8; %m/s
k=1.380649e-23; %J/K
A=20*1e-4; %m^2
er=0.95; %radation emissivity according to measurement Fig.1 e & f
T=300; %Kelvin,because of the cover and vacuum condition of cooling.
tc=1; % tc=transmittance of the cover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%calculations:
%% radiator
%direction
syms theta
f = (1/2)*sin(2*theta);
intf = int(f,0,pi/2);
%wavelength, Planck's law, Blackbody Values For Vector Lam
Lam=(0:inf).*1e-6; % meters
dLam = Lam(2) - Lam(1); % Delta Lambda
I1 =(2*h*c^2)./((Lam.^5).*(exp((h.*c)./(k.*T.*Lam))-1));
% plotI1 = I1*1e-12;
% plotLam = Lam/1e-6;
% plot(plotLam,plotI1,'linewidth',4)
Ibb=trapz(Lam,I1);
%the power of radiator
Pr = 2*A*pi*intf*Ibb*er; % W. m-2
  5 个评论
Zahra Kamali Khanghah
thanks. As the final answer should be somthing around 330, could you tell me what is the reseason I cannot get it like a usual number?

请先登录,再进行评论。

回答(1 个)

Neelanshu
Neelanshu 2024-2-6
Hi Zahra,
I understand from your query that you are interested in finding the reason why you're not getting a numeric value for the power of the radiator.
You can follow these steps to ensure you get a numeric value for the power :
  • As Torsten pointed out you need to change the "Lam" variable range to a vector of finite range and convert "intf" variable to double datatype.
intf = double(intf)
  • Additionally you have to choose a very small starting value for "Lam" variable instead of 0. In MATLAB, division by zero leads to a NaN value for I1, which propagates when it undergoes numerical integration.
% Define wavelength range, starting from a small positive number to avoid division by zero
Lam = linspace(1e-10, 1e-6, 10000); % Meters
By making these adjustments, you should be able to obtain a numeric value for the power.
Hope this helps.

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by