Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
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 Kommentare
Zahra Kamali Khanghah
Zahra Kamali Khanghah am 1 Mär. 2022
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?
Torsten
Torsten am 1 Mär. 2022
Before calculating Pr, use the line
intf = double(intf)
But you should be able to get intf as 0.5 without symbolic calculations...

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Neelanshu
Neelanshu am 6 Feb. 2024
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.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by