0% found this document useful (0 votes)
26 views2 pages

Solar Assignment With MATLAB Code

The document presents two MATLAB exercises focused on solar radiation analysis. Exercise 1 explores how diffuse (Rd) and reflected (Rr) radiation vary with surface inclination angles, while Exercise 2 examines the variation of beam radiation factor (Rb) with the day of the year for different latitudes and angles. Both exercises include MATLAB code to visualize the results through plots.

Uploaded by

esayas.alemayhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

Solar Assignment With MATLAB Code

The document presents two MATLAB exercises focused on solar radiation analysis. Exercise 1 explores how diffuse (Rd) and reflected (Rr) radiation vary with surface inclination angles, while Exercise 2 examines the variation of beam radiation factor (Rb) with the day of the year for different latitudes and angles. Both exercises include MATLAB code to visualize the results through plots.

Uploaded by

esayas.alemayhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Solar Radiation Exercises with MATLAB

Code
Exercise 1: Variation of Rd and Rr with Inclination Angle β (0°–90°)
This exercise analyzes how the diffuse radiation (Rd) and reflected radiation (Rr)
components vary as the surface inclination β changes. The relations used are:
- Rd = (1 + cos(β)) / 2
- Rr = ρ * (1 - cos(β)) / 2, where ρ is the ground reflectivity.

MATLAB Code:

beta = 0:1:90; % Inclination angle in degrees


beta_rad = deg2rad(beta);
rho = 0.2; % Ground reflectivity

Rd = (1 + cos(beta_rad)) / 2;
Rr = rho * (1 - cos(beta_rad)) / 2;

figure;
plot(beta, Rd, 'b-', 'LineWidth', 2);
hold on;
plot(beta, Rr, 'r--', 'LineWidth', 2);
xlabel('Inclination Angle β (degrees)');
ylabel('Rd and Rr');
legend('Rd', 'Rr');
title('Variation of Rd and Rr with Inclination Angle β');
grid on;

Exercise 2: Variation of Rb with Nth Day of Year for Various Conditions


This exercise evaluates how the beam radiation factor Rb varies with the day of the year,
considering:
1. Different latitudes (15°, 30°, 45°, 60°),
2. Different inclination angles (15°, 30°, 45°, 60°),
3. Different hour angles (0°, 30°, 45°, 60°).
The solar geometry and declination are computed for each day.

MATLAB Code:
N = 1:180;
phi_values = deg2rad([15 30 45 60]);
beta = deg2rad(30);
omega = deg2rad(0);

Rb_all = zeros(length(phi_values), length(N));

for i = 1:length(N)
delta = deg2rad(23.45) * sin(deg2rad(360 * (284 + N(i)) / 365));
for j = 1:length(phi_values)
cos_theta = sin(delta) * sin(phi_values(j) - beta) + ...
cos(delta) * cos(omega) * cos(phi_values(j) - beta);
cos_theta_z = sin(phi_values(j)) * sin(delta) + ...
cos(phi_values(j)) * cos(delta) * cos(omega);
Rb_all[j, i] = cos_theta / cos_theta_z;
end
end

figure;
plot(N, Rb_all);
xlabel('Day of the Year');
ylabel('Rb');
legend('15°', '30°', '45°', '60°');
title('Variation of Rb with Day of Year for Different Latitudes');
grid on;

You might also like