sunrise = timeofday(midnight + hours(sr));
ss = 12 + acosd(-tand(phi)*tand(delta))/15 - solarCorr/60;
sunset = timeofday(midnight + hours(ss));
sunrise.Format = 'hh:mm:ss';
sunset.Format = 'hh:mm:ss';
disp('Sunrise = ' + string(sunrise) + '
Sunset = ' + string(sunset))
Sunrise = 04:16:06
Sunset = 19:07:22
Air Mass and Solar Radiation
Include images to illustrate important points in your story. To include an image, copy and paste an
image from another source or go to the Insert tab and click the Image button.
As light from the sun passes through the earth's atmosphere, some of the solar radiation is absorbed.
Air mass is the length of the path of light through the atmosphere (Y) relative to the shortest possible
path (X) when the sun's elevation is 90 ∘ , as shown in the diagram below. It is a function of solar
elevation (α).
The larger the air mass, the less radiation reaches the ground. Calculate the air mass using the
equation
AM =
1
cos(90 − α) + 0 . 5057(6 . 0799 + α)
−1 . 6364 .
Then, calculate the solar radiation reaching the ground (in kilowatts per square meter) using the
empirical equation
sRad = 1 . 353 * 0 . 7
AM 0 . 678 .
AM = 1/(cosd(90-alpha) + 0.50572*(6.07955+alpha)^-1.6354);
solarRad = 1.353*0.7^(AM^0.678);
% kW/m^2
disp(['Air Mass = ' num2str(AM) '
Solar Radiation = ' num2str(solarRad) ' kW/m^2'])
Air Mass = 1.0698
Solar Radiation = 0.93141 kW/m^2
19 Live Scripts and Functions
19-72
ss = 12 + acosd(-tand(phi)*tand(delta))/15 - solarCorr/60;
sunset = timeofday(midnight + hours(ss));
sunrise.Format = 'hh:mm:ss';
sunset.Format = 'hh:mm:ss';
disp('Sunrise = ' + string(sunrise) + '
Sunset = ' + string(sunset))
Sunrise = 04:16:06
Sunset = 19:07:22
Air Mass and Solar Radiation
Include images to illustrate important points in your story. To include an image, copy and paste an
image from another source or go to the Insert tab and click the Image button.
As light from the sun passes through the earth's atmosphere, some of the solar radiation is absorbed.
Air mass is the length of the path of light through the atmosphere (Y) relative to the shortest possible
path (X) when the sun's elevation is 90 ∘ , as shown in the diagram below. It is a function of solar
elevation (α).
The larger the air mass, the less radiation reaches the ground. Calculate the air mass using the
equation
AM =
1
cos(90 − α) + 0 . 5057(6 . 0799 + α)
−1 . 6364 .
Then, calculate the solar radiation reaching the ground (in kilowatts per square meter) using the
empirical equation
sRad = 1 . 353 * 0 . 7
AM 0 . 678 .
AM = 1/(cosd(90-alpha) + 0.50572*(6.07955+alpha)^-1.6354);
solarRad = 1.353*0.7^(AM^0.678);
% kW/m^2
disp(['Air Mass = ' num2str(AM) '
Solar Radiation = ' num2str(solarRad) ' kW/m^2'])
Air Mass = 1.0698
Solar Radiation = 0.93141 kW/m^2
19 Live Scripts and Functions
19-72
