Top Banner
A Matlab GUI for Calculating the Solar Radiation and Shading of Surfaces on the Earth BASTIAN KELLER, ALEXANDRE M. S. COSTA Universidade Estadual de Maringa ´, Av. Colombo 5790, Bloco 104, Maringa ´, PR, CEP 87020-900, Brazil Received 18 December 2007; accepted 29 October 2008 ABSTRACT: Predicting the amount of solar radiation that strikes a surface is of the highest importance in several engineering applications. Just to name a few, solar radiation estimates is fundamental during the design of technologies such as: flat plates and concentrating collectors, solar energy storage devices, solar heaters, and photovoltaic systems. Furthermore, solar radiation estimates are important in energy studies for buildings, as during the cooling load calculation for air conditioning systems. The calculation of the solar radiation and shading involves many equations and a lot of influencing factors must be considered. Therefore, a Matlab GUI was developed that execute the equations and considers all the influencing factors. The program calculates the solar radiation and shadows caused by a rectangle as well as shadows on a rectangle surface caused by fins beside it. The user only has to set few values (like the location, time, etc.) and he can choose between the calculations either for a selectable time of the day or for a completely day. Then the results are plotted either in simple editor frames or in 2D- and 3D-graphics. The program also shows the results of some influencing angles subject to the location of the sun in the sky that can be helpful for many applications. Finally, on the educational side, the Matlab program can be useful for the engineering student performing some what if studies involving solar radiation. ß 2009 Wiley Periodicals, Inc. Comput Appl Eng Educ; Published online in Wiley InterScience (www.interscience.wiley.com); DOI 10.1002/cae.20301 Keywords: solar radiation; shading; sun movement; solar angles INTRODUCTION A star in the universe, the sun is a giant nuclear fusion reactor. Combining hydrogen to form helium, the sun generates a great amount of energy. This energy (called solar radiation) strikes the earth, heats the air, Correspondence to A. M. S. Costa ([email protected]). ß 2009 Wiley Periodicals Inc. 1
12

A Matlab GUI for Calculating the Solar Radiation on Earth

Oct 28, 2014

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A Matlab GUI for Calculating the Solar Radiation on Earth

A Matlab GUI forCalculating the SolarRadiation and Shading ofSurfaces on the Earth

BASTIAN KELLER, ALEXANDRE M. S. COSTA

Universidade Estadual de Maringa, Av. Colombo 5790, Bloco 104, Maringa, PR, CEP 87020-900, Brazil

Received 18 December 2007; accepted 29 October 2008

ABSTRACT: Predicting the amount of solar radiation that strikes a surface is of the

highest importance in several engineering applications. Just to name a few, solar radiation

estimates is fundamental during the design of technologies such as: flat plates and

concentrating collectors, solar energy storage devices, solar heaters, and photovoltaic

systems. Furthermore, solar radiation estimates are important in energy studies for buildings,

as during the cooling load calculation for air conditioning systems. The calculation of the solar

radiation and shading involves many equations and a lot of influencing factors must be

considered. Therefore, a Matlab GUI was developed that execute the equations and considers

all the influencing factors. The program calculates the solar radiation and shadows caused by a

rectangle as well as shadows on a rectangle surface caused by fins beside it. The user only has

to set few values (like the location, time, etc.) and he can choose between the calculations

either for a selectable time of the day or for a completely day. Then the results are plotted

either in simple editor frames or in 2D- and 3D-graphics. The program also shows the results of

some influencing angles subject to the location of the sun in the sky that can be helpful for

many applications. Finally, on the educational side, the Matlab program can be useful for the

engineering student performing some what if studies involving solar radiation. � 2009 Wiley

Periodicals, Inc. Comput Appl Eng Educ; Published online in Wiley InterScience (www.interscience.wiley.com);

DOI 10.1002/cae.20301

Keywords: solar radiation; shading; sun movement; solar angles

INTRODUCTION

A star in the universe, the sun is a giant nuclear fusion

reactor. Combining hydrogen to form helium, the sun

generates a great amount of energy. This energy

(called solar radiation) strikes the earth, heats the air,Correspondence to A. M. S. Costa ([email protected]).

� 2009 Wiley Periodicals Inc.

1

Page 2: A Matlab GUI for Calculating the Solar Radiation on Earth

water, soil, etc and supplies a lot of the energy systems

on earth.

In making energy studies and in the design of

solar passive homes and solar collectors as well as in

dimensioning air conditioning systems the total

radiation striking a surface over a specified period

of time is required.

The quantity of solar radiation that strikes a

surface (absorber) depends on different influencing

factors, for example, on the location of the sun in

the sky and the clearness of the atmosphere as well

as on the nature and the orientation of the striking

surface.

Shadows, caused by roofs, fins, buildings, trees or

other things next to the surface, reduces the solar

radiation and therefore the shadows must be consid-

ered during the calculation of the energy that strikes

the surface.

At the beginning of this work the fundamentals of

the solar radiation will be discussed. Then the

required equations will be described, and at the end

the usage of the developed GUI will be explained.

SOLAR RADIATION

Solar radiation is radiant energy emitted by the sun

from a nuclear fusion reaction that creates electro-

magnetic energy. The spectrum of solar radiation is

close to that of a black body with a temperature of

about 5,800 K. About half of the radiation is in the

visible part of the electromagnetic spectrum. The

other half is mostly in the near infrared part, with

some in the ultraviolet part of the spectrum (Fig. 1).

The radiant energy that strikes on a surface is

called the solar irradiation. Beyond the earth atmos-

phere the solar irradiation is almost constant:

Equation (1) shows the value for the solar irradiation

outside the atmosphere:

Gsc ¼ 1; 367W

m2ð1Þ

As will be discussed in the next section, on the earth

surface the solar irradiation depend on further

mechanisms.

INFLUENCING FACTORS OF THE SOLARIRRADIATION

The solar radiation striking a surface on the Earth’s

surface is affected by a number of mechanisms.

As can be seen from Figure 2, a part of the

incident energy is scattered and absorbed by air

molecules, clouds and other particles in the atmos-

phere. The radiation that is not reflected or scattered

and reaches the surface directly is called direct

irradiation GD. The scattered radiation which reaches

the ground is called diffuse irradiation Gd. Some of

the radiation is reflected from the ground onto the

receiver; this is called reflected (or albedo) irradiation

Gr. The total (or global) irradiation Gt that strikes the

absorber is the summation of these three components.

The amount of radiation is also strongly depend-

ent on the lengths of the path of the rays through the

atmosphere (air mass). The air mass the sunrays have

to pass until they strike the surface is in the morning or

evening much more and thereto the irradiation is

much less than at noontime. So the influence of the air

mass is also in coherency with location of the sun in

the sky.

Figure 1 Solar radiation spectrum [1]. Figure 2 Parts of solar radiation.

2 KELLER AND COSTA

Page 3: A Matlab GUI for Calculating the Solar Radiation on Earth

If the absorber surface is not a horizontal surface

the absorber can produce shadows when the sun is

behind the absorber. Similarly, objects around the

absorber can cause shadows on the absorber.

Summarizing the influencing factors of total

radiation are:

1. The effects of the Atmosphere and the Earth.

2. The location of the sun in the sky.

3. The nature and the orientation of the absorber.

These influencing factors are complex and

some of them (e.g., the effect of clouds) are only

approximately to determinate.

EFFECTS OF THE ATMOSPHERE ANDTHE EARTH

The processes affecting the intensity of solar radiation

are scattering, absorption, and reflection. Reflection

occurs in the atmosphere and on the Earth’s surface.

The depletion of the sun’s rays by the earth

atmosphere depends on the composition of the

atmosphere (cloudiness, dust and pollutants present,

atmospheric pressure, and humidity).

The scattering of solar radiation is mainly by

molecules of air and water vapor, by water droplets,

and by dust particles. This process returns about 6% of

the incident radiation to space, and about 20% of the

incident radiation reaches the Earth’s surface as

diffuse solar radiation.

The absorption of solar radiation is mainly by

molecules of ozone and water vapor. Absorption by

ozone takes place in the upper atmosphere at

heights above 40 km. It occurs mainly in the ultra-

violet region of the spectrum, where it is so intense

that very little solar radiation of wavelength less

than 0.3 mm reaches the Earth’s surface. About 3%

of the solar radiation is absorbed in this way. At

low levels in the atmosphere about 14% of the solar

radiation is absorbed by water vapor, mainly in the

near infra-red region of the spectrum. Clouds

absorb very little solar radiation, which explains

why they do not evaporate in sunlight. The effect

of clouds on solar radiation is mainly scattering and

reflection.

The reflection of solar radiation depends on the

nature of the reflecting surface. The fraction of the

solar irradiation that is reflected from the surface of

the Earth is called the albedo of the surface. The total

albedo, which includes all wavelengths, is closely

related to the visible albedo, which includes only light

in the visible region of the spectrum.

If there is cloud between the sun and the point of

observation, then the direct solar irradiation is

weakened or eliminated. Diffuse solar radiation, on

the other hand, may be greater or less in the presence of

cloud than under a clear sky, depending on the type and

amount of the cloud. Thin layers of clouds and

scattered clouds reflecting sunlight, increase the diffuse

solar irradiation. Thick layers of cloud reduce diffuse

solar irradiation. Total solar irradiation is usually

reduced by cloud, but if the sun is shining in a clear

part of the sky and there are brightly illuminated clouds

nearby, then global solar irradiancemay be greater than

it would be under a completely clear sky [2].

The consideration of all these effects is complex,

because there are often many different reflectors

around the absorber and the effects of clouds and other

particles on the solar radiation received at the Earth’s

surface. But there are many recommendations and

publications that are concerned with that Refs. [3�5].

A common method that deals with the prediction of

these effects is the ASHRAE Clear sky model (see

ASHRAE Clear Sky Model Section).

LOCATION OF THE SUN IN THE SKY

The earth revolves around the sun every 365.25 days

in an elliptical orbit and rotates about its own polar

axis, inclined to the ecliptic plane by 23.458, in

approximately 24-h cycles. The direction in which the

polar axis points is fixed in space and is aligned with

the North Star (Polaris) to within about 45 min of arc

(13 mrad).

As can be seen from Figure 3 the tilt of the earth

axis relative to the ecliptic plane produces our seasons

as the earth revolves about the sun.

The location of the sun in the sky above a surface

depends on the day of the year (date) and the time of

the day as well as the location of the surface on the

earth (longitude and latitude). The used angles that

describe the location of the sun are shown in Figure 4.

Figure 3 Circulation of the earth around the sun.

SOLAR RADIATION AND SHADING OF SURFACES 3

Page 4: A Matlab GUI for Calculating the Solar Radiation on Earth

The declination angle d is the angle between a

line connecting the center of the sun and earth and the

projection of that line on the equatorial plane. This

angle varies from þ23.458 till �23.458 throughout

a year. The following equation (developed from work

by Spencer [6]) describes this angle depending of

the day of the year

d ¼ 0:3963723� 22:9132845 cosðNÞ þ 4:0254304

sinðNÞ � 0:387205 cosðNÞ þ 0:05196728 sinð2NÞ� 0:1545267 cosð3NÞ þ 0:08479777 sinð3NÞ ð2Þ

where

N ¼ ðn� 1Þ 360

365

� �ð3Þ

given in degrees, and n is the day of the year,

1� n� 365.

To describe the earth’s rotation about its polar axis,

the hour angle h is used. The hour angle is the angular

distance between the meridian of the absorber and the

meridian whose plane is parallel to the sun rays. This

angle increases by 0.258 everyminute (158 every hour).It depends on the longitude and the time of the day.

Time is generally measured about standard time

zone meridians (Fig. 5). These meridians are located

every 158 from the Greenwich meridian so that

local time changes in 1-h increments from one

standard time zone meridian to the next. The

standard time zone meridians east of Greenwich

have times later than Greenwich time, and the

meridians to the west have earlier times.

To describe the hour angle the Local Solar Time

(LST) is used, because the hour angle is zero at solar

noon (LST: 12:00 h), when the sun reaches its highest

point in the sky. From Equation (4) the LST can be

calculated from the Local Civil Time (LCT) with the

help of a quantity called Equation of Time (EOT):

LST ¼ LCTþ EOT ð4Þ

The EOT is given by [6]:

EOT ¼ 229:2� ð0:000075þ 0:001868 cosðNÞ� 0:032077 sinðNÞ � 0:014615 cosð2NÞ� 0:04089 sinð2NÞÞ ð5Þ

in minutes, with N from Equation (3).The LCTwill be

calculated by:

LCT ¼ Local Standard Time� ðLo� SMÞð4min=degWÞ;

whereas ‘‘Lo’’ is the longitude angle and ‘‘SM’’ is the

corresponding standard meridian; both given in

degrees. In a few countries the Local Standard Time

is raised while the summer period about one hour

(Daylight Saving Time DST). During this period the

Local Standard Time is:

LocalStandardTime ¼ LocalDST� 1 h ð7Þ

Now the hour angle can be calculated by:

h ¼ 720min� LST

4 degW=min; ð8Þ

where h is given in degree.

Figure 4 Location of the sun in the sky.

4 KELLER AND COSTA

Page 5: A Matlab GUI for Calculating the Solar Radiation on Earth

It is of the greatest importance in solar energy

systems design, to be able to calculate the solar

altitude b and azimuth angles F at any time for any

location on the earth using the fundamental angles (l,

h, and d).The solar altitude is the angle between the sun’s

rays and the projection of that ray on a horizontal

surface. It is given by:

sinðbÞ ¼ cosðlÞ cosðhÞ cosðdÞ þ sinðlÞ sinðdÞ ð9Þ

As can be seen from Figure 4, b is the angle of the sun

above the horizon. When b is positive is day,

otherwise it is night.

The solar azimuth angle F is the angle in the

horizontal plane measured in the clockwise direc-

tion between the north and the projection of the

sun’s rays on that plane. It is related by the other

angles by:

tanðFÞ ¼ sinðhÞ cosðdÞ�sinðlÞ cosðhÞ cosðdÞ þ cosðlÞ sinðdÞ ð10Þ

When taking the inverse of tan(F), F is only in the 1st

and 4th quadrant (�90<F<þ908) of the horizontalsurface. Therefore it is necessary to check which

quadrant F is in. If sz0 < 0 we have to add 1808(F¼Fþ 1808).

ORIENTATION OF THE STRIKINGSURFACE

The angles denoted above, describe the orientation of

the sun in relation to a flat horizontal surface. Often a

surface is tilted and/or has fins that cause shadows and

influences the irradiation. The influence of the

shadows will be described in Shadowing Section.

The auxiliary angles of a tilted surface are depicted in

Figure 6.

a is the tilt angle between the normal of the

horizontal surface and the normal of the tilted surface.

Figure 5 Time zones.

Figure 6 Angles of the striking surface.

SOLAR RADIATION AND SHADING OF SURFACES 5

Page 6: A Matlab GUI for Calculating the Solar Radiation on Earth

It is 908 for a vertical wall and zero for a horizontal

plane.

The surface azimuth c is the angle measured to

the projection of the tilted normal on the horizontal

plane clockwise from the north.

For a vertical or tilted surface the angle measured

in the horizontal plane between the projection of the

sun’s rays on that plane and a normal to the surface is

called the surface solar azimuth g

g ¼ f� c ð11Þ

The angle of incidence y is the angle between the

sun’s ray and the normal to the tilted surface. By

analytic geometry it can be shown:

cosðyÞ ¼ cosðaÞ sinðbÞ þ sinðaÞ cosðbÞ cosðgÞ ð12Þ

If cos(y) is less than zero, the sun is behind the

absorber and there is no direct radiation.

ASHRAE CLEAR SKY MODEL

The value of the solar irradiation at the surface of the

earth on a clear day is given by the ASHRAE Clear

Sky Model [3]. This Model is complex and the

explanations and derivations of the factors and

equations are substantial. Therefore in this section

only the equations and factors of this model, used in

the GUI, will be depicted shortly. They are taken from

Ref. [4].

The model gives an approximation of the

maximum values of the solar irradiation for a given

location and day, by dealing with the following

factors:

A, apparent solar irradiation at air mass

equal to zero;

B, atmospheric extinction coefficient;

C, ratio of diffuse radiation on a horizontal

surface to direct normal irradiation;

CN, clearness number;

g, reflectance factor.

The values of A, B, and C are given in Table 1

from Machler and Iqbal [5] for the 21st day of

each year in the USA.

The data in Table 1 are representative conditions

on average cloudless days. To account for regional

variations of humidity and clearness, ASHRAE

published maps for a parameter called clearness

number CN, for both summer and winter, for different

regions in the USA. This parameter is used to modify

the radiation values obtained from the model. It

considers the depletion of the sun’s rays by the

atmosphere and varies from 0.9 till 1.1. As the exact

values of these factors for other regions of the world

are not known, the previous range of values can be

used as a first approximation.

The reflectance factor considers the reflection of

ground and horizontal surfaces around the absorber.

This factor is seen as an average value of all surfaces

around the absorber. Table 2 shows some typical

values for the sun overhead.

NORMAL DIRECT IRRADIATION

The irradiation that strikes on the absorber directly in

the same direction as the sun’s rays is called normal

direct irradiation GND:

GND ¼ A

eB=sin bCN ð13Þ

This is the basic irradiation and the starting point for

the clear sky model.

DIRECT IRRADIATION

The direct irradiation is the part of the normal direct

irradiation that strikes the surface in the same

Table 1 A, B, and C Coefficients for 21st Day of

Each Month

Month A (W/m2) B C

January 1,202 0.141 0.103

February 1,187 0.142 0.104

March 1,164 0.149 0.109

April 1,130 0.164 0.12

May 1,106 0.177 0.13

June 1,092 0.185 0.137

July 1,093 0.186 0.138

August 1,107 0.182 0.134

September 1,136 0.165 0.121

October 1,166 0.152 0.111

November 1,190 0.142 0.106

December 1,204 0.141 0.103

Table 2 Reflectance Factor �g [2]

Surface �

Vegetation 0.2

Pale soil 0.3

Dark soil 0.1

Water 0.1

6 KELLER AND COSTA

Page 7: A Matlab GUI for Calculating the Solar Radiation on Earth

direction as the normal of the surface. It is calculated

by:

GD ¼ GND cosðyÞ ð14Þ

Because there is no direct irradiation, if cos(y)< 0 is

more convenient to express this equation in computer

programs as:

GD ¼ GND maxðcosðyÞ; 0Þ ð15Þ

DIFFUSE IRRADIATION

The diffuse irradiation is different for horizontal,

vertical and non-vertical surfaces.

1. For horizontal surfaces it is:

Gd ¼ C � GND ð16Þ

2. For non-vertical surfaces it is:

Gd ¼ CGNDFws ð17Þ

with

Fws ¼1þ cosðaÞ

2ð18Þ

Equation (17) can be used for non-vertical and

horizontal surfaces, because Fws¼ 1 when

a¼ 908.3. For vertical surfaces it is calculated by:

Gd ¼ CGND

GdV

GdH

ð19Þ

and GdV/GdH is approximated by:

GdV

GdH

¼ 0:55þ 0:437 cosðyÞ þ 0:313 cos2ðyÞ

ð20Þ

when cos(y)>�0.2;

otherwise,

GdV

GdH

¼ 0:45 ð21Þ

REFLECTED IRRADIATION

The reflected part of the solar radiation is given by:

GR ¼ gFwgðsinðbÞ þ CÞGND ð22Þ

whereas Fws is given by:

Fwg ¼1� cosðaÞ

2ð23Þ

TOTAL IRRADIATION

The total irradiation is the summation of the direct,

diffuse and reflected irradiation:

Gt ¼ Gd þ GD þ Gr ð24Þ

Because of the difference of the diffuse irradiation it is

for non-vertical surfaces:

Gt ¼ ½maxðcosðyÞ; 0Þ þ CFws þ gFwgðsinðbÞþ CÞ�GND ð25Þ

And for vertical surfaces:

Gt¼ maxðcosðyÞ; 0ÞþCGdV

GdH

þgFwgðsinðbÞþCÞ� �

GND

SHADOWING

Whenever the direct radiation does not strike a surface

there would be shadows. Shadows are caused by

objects like trees, buildings, walls, fins, etc. In the

program there are two cases of shadows implemented.

One is the shadow on the absorber, caused by fins

beside it (see Fig. 7a) and the other is the shadow on

the horizontal surface, caused by a rectangle surface

(see Fig. 7b).

Again by analytic geometry the angles e and h

can be calculated by:

sinðhÞ ¼ sinðaÞ sinðbÞ � cosðaÞ cosðgÞ cosðbÞ ð27Þ

sinðeÞ ¼ sinðgÞ cosðbÞcosðhÞ ð28Þ

Thereto the values of the shadow dimension in case

(a) are given by:

y shad ¼ sinðeÞcosðeÞ b ¼ tanðeÞb ð29Þ

and

x shad ¼ sinðhÞcosðhÞ cosðeÞ b ¼ tanðmÞ

cosðeÞ b ð30Þ

The shaded area in case (a) can be calculated by:

A shad ¼ y shady aþ x shad c� y shady x shad

ð31Þ

In case (b) we use the shadow point caused by the

upper left corner of the surface for the calculation of

the shadow coordinates. These coordinates are given

SOLAR RADIATION AND SHADING OF SURFACES 7

Page 8: A Matlab GUI for Calculating the Solar Radiation on Earth

by:

y0 shad ¼ �c sinðcÞ cosðaÞ þ a

2cosðcÞ

þ �c sinðaÞ sinðhÞ cosðdÞcosðlÞ cosðhÞ cosðdÞ þ sinðlÞ sinðdÞ

ð32Þ

z0 shad ¼ �c cosðcÞ cosðaÞ � a

2sinðcÞ

þ c sinðaÞ½sinðlÞ cosðhÞ cosðdÞ � cosðlÞ sinðdÞ�cosðlÞ cosðhÞ cosðdÞ þ sinðlÞ sinðdÞ

(33)

And the shaded area can be calculated by:

At dawn and dusk the shadowed area normally

appears and disappears continuously. This effect is not

considered in the Matlab program and therefore the

shaded area changes suddenly when b changes

between positives and negatives values (see Fig. 11).

THE MATLAB GUI

For the calculation of the solar radiation and shadows

on the earth the equations described previously must

be solved. This is a very extensive calculation and

therefore the equations are implemented in a Matlab

program. Before the equation can be solved some

initial values must be set. Hence a GUI was built, in

that the user can set the desired values. For a better

understanding some graphics that depict the input

values are implemented. In Figures 8 and 9 the layout

of the Matlab GUI is shown. With this GUI, the

amount of solar radiation that strikes a given surface

in given time in any place on earth can be calculated.

Also, the program allows the calculation of the

shadows on a rectangular absorber caused by fins or

shadows on the horizontal plane caused by a

rectangular surface. Additionally the program shows

the results of the most important angles of the location

of the sun in the sky.

The user has to set the date, what from the

program calculates the day of the year. When the

checkbox ‘‘Calculate 24 hours’’ is not activated the

user can set the time (local standard time) of the day

and the calculation will be executed only for this time.

Then the results will be plotted inside the GUI. By

activating ‘‘Calculate 24 hours’’ the selection of

the time is disabled and the results will be calculated

Figure 7 Shadows (a) on the striking surface and (b) on the horizontal plane.

A shad ¼ a sinðaÞ �c cosðcÞ cosðaÞ � a

2sinðcÞ þ

�c sinðaÞ½�sinðlÞ cosðhÞ cosðdÞþcosðlÞ sinðdÞ�

cosðlÞ cosðhÞ cosðdÞþsinðlÞ sinðdÞ

0BB@

1CCA ð34Þ

8 KELLER AND COSTA

Page 9: A Matlab GUI for Calculating the Solar Radiation on Earth

for every minute of the day, thus for the whole day. In

case of the daylight saving time is official for the

selected date and location, it is important not to forget

to activate the checkbox ‘‘Daylight savings.’’

Further the user has to set the location of the

surface on the earth (‘‘Longitude’’ and ‘‘Latitude’’)

inclusive the corresponding ‘‘Standard-Meridian.’’

For the choice of the orientation of the surface,

one of the three radio buttons (horizontal, vertical, or

tilted surface) must be selected. The Selection of c, a,and is disabled when a horizontal surface is chosen,

because the orientation of the horizontal surface

(c¼ 08, a¼ 908) is set automatically and there is no

reflection on horizontal surfaces. Furthermore it is not

possible to select a, when the surface is as vertical

surface is selected. It is set automatically, too (a¼ 08).For the calculation of the solar irradiation

the factors of the reflection of the ground ‘‘’’ and

the clearness factor ‘‘CN’’ must be chosen. Finally the

user can choose between the units for the irradiation;

Btu/h ft2 or W/m2.

When starting the program the shadow calcula-

tion will not be shown. Not until the checkbox

‘‘Shadow calculation’’ gets activated the shadow

calculation part of the program appears.

By clicking the ‘‘Calculation’’ button the calcu-

lation will be started and the results will be plotted. If

there are incorrect or missing settings, the calculation

Figure 8 The Matlab GUI without shadow calculation.

SOLAR RADIATION AND SHADING OF SURFACES 9

Page 10: A Matlab GUI for Calculating the Solar Radiation on Earth

will be stopped and an error message will be shown.

Then the user has to correct this value and to restart

the calculation.

The results inside the GUI and the plots in

Figures 10b and 11a, shows the angles (y, b, and F)

and the solar irradiation (Gtot, Gdir, Gdif, and Gref).

Figure 10a shows the movement of the sun during the

chosen day above the selected location. By activating

the checkbox ‘‘Additional results’’ the results of GND,

GdH, GdV/GdH or Fws, d, EOT and LSTwill be plotted.

Figure 9 The Matlab GUI with shadow calculation.

Figure 10 Result figures: (a) sun movement and (b) angles.

10 KELLER AND COSTA

Page 11: A Matlab GUI for Calculating the Solar Radiation on Earth

Because d and EOTare constant during a day, they are

only shown in the inside the GUI.

When the ‘‘shadow calculation’’ is activated the

user can choose between different shadow results,

whereby he can choose the size of a rectangular

surface by setting the width ‘‘a’’ and the length ‘‘c.’’

If there is no fin activated the shadows on the

horizontal plane (C0), caused of the surface with the

selected orientation, will be calculated (see Fig. 7b).

Then the shadow coordinates of the upper left corner

of surface (y0 and z0) will be shown.

Not until one fin is selected (‘‘Top Fin,’’ ‘‘Bottom

Fin,’’ ‘‘Left Fin,’’ ‘‘Right Fin’’) the program calcu-

lates the shadows on the surface caused by the

selected fins (see Fig. 7a). In this case only positive

values of the shadow coordinates (jxj, jyj) are shown.Further the results of the shaded area ‘‘Ashad’’

and the ratio of the shaded area to the surface area

‘‘Asurf’’ (Ashad/Asurf) are calculated.

CONCLUSION

The solar irradiation that strikes a surface depends on

the effects of the atmosphere and the earth, the

location of the sun in the sky and the orientation of the

absorber surface. The ASHRAE clear sky model deals

with these influence factors and allows the prediction

of the solar irradiation approximately. Objects beside

the absorber cause shadows that reduce the total

irradiation. Therefore the nature around and of the

absorber should be considered in making solar energy

studies, too.

The consideration of all influence factors causes

more than 20 equations and a lot of distinction cases

that are implemented in a Matlab .m-file in con-

junction with a GUI. The program calculates the solar

angles by a given date, time and Location and allows

the prediction of the solar radiation approximately by

selecting few values (time, date, location, surface

orientation, , CN, surface nature). Additionally the

calculation of shadows caused by a rectangle as well

as shadows on a rectangle surface caused by fins

beside it is implemented. Therefore the program can

be an advantage support in making solar energy

studies and related applications.

REFERENCES

[1] Wikipedia, http://en.wikipedia.org/wiki/Special:Search?

search¼solarþRadiation&go¼Go, state 07.12.2007.

[2] R. H. B. Exell, ‘‘The Intensity of Solar Radiation’’,

King Mongkut’s University of Technology Thonburi,

2000. http://www.jgsee.kmutt.ac.th/exell/Solar/Intensity.

html.

[3] ASHRAE Handbook, Fundamentals Volume, Chapter

30 ‘‘Fenestration’’, American Society of Heating,

Refrigerating and Air-Conditioning Engineers, Inc.,

Atlanta, GA, 2001.

[4] F. C. Mcquiston, J. D. Parker, and J. Spitler, Heating,

ventilating, and air conditioning: analysis and design,

John Wiley & Sons, USA, 2000, pp. 181�197.

[5] M. A. Machler and M. Iqbal, A modification of the

ASHRAE clear sky model, ASHRAE Trans 1985.

[6] J. W. Spencer, Fourier series representation of the

position of the Sun, John Wiley & Sons, USA, 1971,

p. 172.

Figure 11 Result figures: (a) solar radiation and (b) shadows.

SOLAR RADIATION AND SHADING OF SURFACES 11

Page 12: A Matlab GUI for Calculating the Solar Radiation on Earth

BIOGRAPHIES

Bastian Keller is a visiting student from

University of Stuttgart. Soon, he will receive

his degree in Electrical Engineering. His

research interests include numerical simula-

tion, and scientific and educational software.

Alexandre Marconi de Souza da Costa is

an adjunct professor in the Mechanical

Engineering Department at the State Uni-

versity of Maringa (UEM), Brazil. He

received his MSc and PhD in Mechanical

Engineering from Campinas State University

(UNICAMP), Brazil. One year of his PhD

work was spent at University of California at

San Diego (UCSD). His research interests

includes numerical simulation, HVAC, and scientific and educa-

tional software.

12 KELLER AND COSTA