You are on page 1of 36

DanBoiler

Formulas for Solar


Energy calculations

June 2017
PT DanBoiler
DanBoiler is an Engineering company CitraGran, Gate Walk No.36-38
specialized in Boilers and Power plant Jl. Alternatif Cibubur Km.4
Technology Jakarta, Indonesia
Tel. +62 21 2906671
Web www.danboiler.com
About the author

The author Palle Wendelboe has more than three decades of experience with design of
convention boilers and energy systems and more than one decade with design of Solar
energy systems.

Educational background is a Masters degree in mechanical engineering from DTU in


Copenhagen, Denmark and teaching experience from Aalborg University, Denmark.

Palle Wendelboe is presently operating the boiler and Engineering company


DanBoiler involved in boilers and energy systems.

A number of Solar Energy plants has been designed and proven successful operation.
The plants includes Solar Towers with variable working mediums, steam generators
for Thermal Oil or Molten salts. A number of studies and simulations has been
performed for leading energy companies.

The Scope of DanBoiler includes basic and detailed design and engineering from
concept until workshop drawings.

Many projects has been performed in close cooperation with the Danish Solar Energy
company Aalborg CSP.

About this booklet

This booklet an in introduction to basic formulas applied in solar energy calculations


and an easy reference for Engineers designing Solar energy systems and simulations.

The first chapters 1 to 5 provides an easy overview of basic formulas and chapter
6,7,8 and 9 is examples of how the theory can be applied to some common Solar
energy systems: Flat panel receiver for hot water, Parabolic Trough and finally
Central Receiver Tower systems.

PT DanBoiler
DanBoiler is an Engineering company CitraGran, Gate Walk No.36-38
specialized in Boilers and Power plant Jl. Alternatif Cibubur Km.4
Technology Jakarta, Indonesia
Tel. +62 21 2906671
Web www.danboiler.com
PT DanBoiler
Ruko Gate walk Blok UR 36-38 , CitraGran,
Jl. Alternatif Cibubur Km.4, Jakarta, Indonesia
Tel. (+62) 21 29066671- Fax (+62) 21 29066672
E-mail: danboiler@danboiler.com Web: www.danboiler.com

Formulas for Solar Energy calculations

List of content Page

CONVENTIONS AND SYMBOLS 2

1 ENERGY FROM THE SUN 5

1.1 Extraterrestrial Solar irradiance


1.2 Hottel clear day DNI formula
1.3 Solar Irradiance data in general

2 POSITION OF THE SUN 7

2.1 Problem definition


2.2 Simple formulation (for Dec and W)
2.3 Accurate formulation (for Dec and GHA)
2.4 Position of Sun (Z, H and Az)
2.5 Sun up and down and Meridian passage

3 DAY OF YEAR 11

4 TIME CONVERSION 12

5 ANGLE CONVERSION 13

6 EXAMPLE OF SUN POSITION AND DNI 14

6 FLAT PLATE COLLECTOR 15

7 PARABOLIC TROUGH COLLECTOR 18

8 CENTRAL TOWER RECEIVER 24

REFERENCES 31

Appendix A: Day of year calculation


Appendix B: Accurate sun position calculation

Palle Wendelboe
Copyright June 2017
CONVENTIONS AND SYMBOLS

Coordinate system X = North


Y = Zenith (up)
Z = East

Pi = 3.141592654

Plant or observer position

Observers latitude (+N/-S) B (decimal deg)


Observers longitude (+W/-E) L (decimal deg)
Observer or plant elevation EY (km)

Time zone (+W/-E) Ltz (decimal deg)

Time
Year YYYY
Month (from 1 to 12) MM
Day (1 to number of days in month) DD
Hour TH
Minute TM
Second TS

Position of Sun
Declination (+N/-S) Dec (angle)
Local hour angle W (angle)
Greenwich hour angle GHA (angle)
Azimuth (compass course) Az (angle)
Zenith distance Z (angle)
Height over horizon H (angle)
Direction to sun vector S(Sx,Sy,Sz)

Solar radiation
Extraterrestrial Solar radiance Io (kW/m2)
Direct normal irradiance (DNI) Ibn (kW/m2)
Diffuse radiation component Idif (kW/m2)

Weather data
Ambient temperature Ta (oC)
Sky temperature Tsky (oC)
Visibility Vis (km)
Wind velocity in 10m elevation Wind10 (m/s)
Wind velocity in elevation H WindH (m/s)

Page 2 of 34
Collector information

No of collector units Np (qty)


Aperture area each unit Ap (m2)
Tracking or tilt angle Beta (angle)
Tracking axis direction Gama (angle)
Incident angle Teta (angle)
Medium inlet temperature Tm1
Medium outlet temperature Tm2
Medium mean temperature Tm = (Tm1+Tm2)/2
Flow in collector pipes total Mflow
Specific heat of medium Cp
Collector efficiency E (%)

Position of Sun definitions

Page 3 of 34
Azimuth: Az = Compass direction to Sun
View looking down on earth

Zenith distance Z and height over horizon H

Page 4 of 34
1 ENERGY FROM THE SUN

1.1 Extraterrestrial Solar irradiance

Extraterrestrial Solar irradiance (kW/m2) outside the earth atmosphere at day (Nday) of
the year (from ref.2)

Io= 1.367 F (1.1)

where

F = 1.00011 + 0.034221 cos(Delta) + 0.00128 sin(Delta)


+ 0.000719 cos(2 Delta) + 0.000077 sin(2 Delta)

Delta = 2 Pi Nday / 365

Page 5 of 34
1.2 Hottel clear day DNI formula

Estimated clear day DNI on ground level depends on

Extraterrestrial Solar radiance Io (kW/m2)


Plant elevation EY (km)
Sun zenith distance Z (angle)
Visibility Vis (km)

DNI = Ibn (kW/m2) at ground level after passing through atmosphere (from ref.1)

Ibn = Io [ao + a1 Exp(-k / Cos(Z)] (1.2)

Attenuation in atmosphere for 5 km visibility

ao = 0.2538 - 0.0063 (6 - EY) 2


a1 = 0.7678 + 0.001 (6.5 - EY)2
k = 0.249 + 0.081 (2.5 - EY)2

Attenuation in atmosphere for 23 km visibility

ao = 0.4237 - 0.00821 (6 - EY)2


a1 = 0.5055 + 0.00595 (6.5 - EY)2
k = 0.2711 + 0.01858 (2.5 - EY)2

Proposed method of interpolation for visibility (by author):


From Hottel clear day formula by linear interpolate for visibility between 5 and 23 km
For visibility above 35 km, use 35 km value (only extrapolate up to 35 km)

Ibn = Ibn5 + (Vis - 5) (Ibn23 - Ibn5) / (23 - 5) (1.3)

1.3 Solar Irradiance data in general

For solar energy calculations it is recommended to source historical data for the actual
site or to measure data.

For reflective collection system using mirrors the relevant data is the beam radiation
DNI = Ibn (Direct Normal Irradiance kW/m2) which has a well defined direction from
the sun.

Page 6 of 34
For non reflective collectors the diffuse irradiance Idif (kW/m2) is relevant also.
GHI is the total irradiance on a horizontal surface (direct + diffuse)

2 POSITION OF THE SUN

2.1 Problem definition


Given:

Position B and L of observer


Time zone Ltz

Year YYYY
Month MM
Day DD

Local time Hour TH


Minute TM
Second TS

Needed Position of sun

Declination Dec (angle)


Local hour angle W (angle)

Page 7 of 34
2.2 Simple formulation (for Dec and W)
Calculation according to ref.1. All angles are in radians.

Nday is day of year start from 1st January (see chapter 3):

Nday = DayOfYear(MM, DD,YYYY)

Equation of time EOT in decimal minutes:

EOT = 0.258 Cos(X) - 7.416 Sin(X) - 3.648 Cos(2X) - 9.228 Sin(2X)

with X = 2 Pi (Nday - 1) / 365.242 (2.1)

Declination in radians

Dec = Asin(0.39795 Cos(0.98563 (Nday - 173) Pi / 180)) (2.2)

Conversion TimeLocal to TimeSolar from Eq(4.1) (daylight time not considered)

TimeSolar = TimeLocal + EOT / 60 + (Ltz - L) / 15 (2.3)

Calculation of the Sun hour angle in radians

W = Pi (TimeSolar - 12) / 12 (2.4)

2.3 Accurate formulation (for Dec and GHA)

An accurate calculation of the Sun position might be needed, for example for control
purpose. A method is shown in Appendix B of this report in visual basic code.

(Dec) is declination (=Latitude of GP) and (GHA) is Greenwich hour angle


(=Longitude of GP) for the sun Grounding Point (GP) at any given time.

GP is intersection at earth surface between line passing through the sun and earth
centers.

The method is accurate within 0.2 minutes of arc.

Page 8 of 34
2.4 Position of Sun (Z, H, GHA and Az)

First determine Dec and W from either simple (Chapter 2.2) or Dec and GHA from
accurate (Chapter 2.3) method

Zenith distance in radians

Z = Acos(sin(B) sin(Dec) + cos(B) cos(Dec) cos(W)) (2.5)

Sun elevation over horizon in radians

H= Pi / 2 - Z (2.6)

The sun's Greenwich Hour angle (=GP Longitude grounding point)

GHA = L - W (2.7)

Azimuth in radians, from north (compass course)

CA = (Sin(Dec) Cos(B) - Cos(Dec) Cos(W) Sin(B)) / Cos(H) (2.8)


If CA < -1 Then CA = -1
If CA > 1 Then CA = 1
Az = Acos(CA)
If Sin(W) > 0 Then Az = 2 Pi - Az

Vector to sun

Sx = cos(H) cos(Az) (2.9)


Sy= sin(H)
Sz = cos(H) sin(Az)

2.5 Sun up and down and Meridian passage

First find Equation of time for day in minutes from (2.1)

Hour angle in radians for sun up and down on that day

Wss = Acos(-Tan(B) tan(Dec)) (2.10)

Calculate length of day in decimal hours

HourPerday = 2 (Wss 180 / Pi) / 15 (2.11)

Page 9 of 34
Time difference (Timelocal-Timesolar) in hours

Dtime = -EOT / 60 - (Ltz - L) / 15 (2.12)

Local time for events in decimal hours

TimeSunRise = Dtime + 12 - HourPerDay / 2 (2.12)


TimeNoon = Dtime + 12
TimeSunSet = Dtime + 12 + HourPerDay / 2

For very accurate prediction of the meridian passage calculate the time (GMT) when
the GHA is equal to the observers longitude (from Appendix B)

Page 10 of 34
3 DAY OF YEAR

Day of year Nday start with 1st of January each year. The calculation is simple
considering the number of days in each month.

Jan 31
Feb 28 (but 29 if leap year)
Mar 31
Apr 30
May 31
Jun 30
Jul 31
Aug 31
Sep 30
Oct 31
Nov 30
Dec 31

In Appendix A is shown a visual basic function to calculate the number of days


considering leap years as optional.

Page 11 of 34
4 TIME CONVERSION
The sun is not moving around the earth at an exact constant angle speed. For that
reason it is practical to use the equation of time EOT. EOT is the difference between
the actual sun and a theoretical sun moving at 15o angle per hour.

Using the concept of solar time (Timesolar) is practical. The sun will pass the meridian
each day at solar time 12:00:00 and for all practical purpose move 15o angle per hour.

TimeLocal = TimeSolar - EOT / 60 - (Ltz - L) / 15 (4.1)

In (4.1) day light saving time is not considered. For solar calculations it is simpler to
use the local time not corrected for day light saving.

Time can be specified in

• Decimal hour
• Hours, Minutes and Seconds

For computerized methods conversion can be done as explained below:

Convert from decimal hours (Time) to hours (TH) Minutes (TM) and Seconds (TS)

TH = Int(Time)
TM = Int(60 (Time - TH))
TS = 3600 (Time - TH - TM/60)

Example Time = 11.235

TH = Int(11.235) = 11
TM = Int(60x(11.235-11))=14
TS = 3600 (11.235-11-14/60) = 6

Convert from (TH) minutes (TM) and Seconds (TS) to decimal hour (Time)

Time = TH + TM/60 + TS/3600

Example TH=11, TM=14, TS=6

Time = 11 + 14/60 + 6/3600 = 11.235

Page 12 of 34
5 ANGLE CONVERSION

Angles can be measure in either

• Decimal degree (Angle)


• Degree, decimal minutes (D and Md)
• Degree, Minutes, Seconds (D, M and S)

Convert from decimal degree (Angle) to degree (D) and decimal minutes (Md)

D= Int(Angle)
Md = 60 (Angle - D)

Example Angle = 23.553

D = Int(23.553) = 23
Md = 60 (23.553-23) = 33.18

Convert from decimal degree (Angle) to degree (D) and minutes (M) and seconds (S)

D= Int(Angle)
M= Int(60(Angle-D))
S = 3600 (Angle-D-M/60)

Example Angle = 23.553

D = Int(23.553) = 23
M = Int(60(23.553-23))=33
S = 3600 (23.553-23-33/60) = 10.8

Page 13 of 34
6 EXAMPLE OF SUN POSITION AND DNI

All below data are calculated with the formulas in this book

Page 14 of 34
7 FLAT PLATE COLLECTOR

The flat plate collector is used for heating water or fluids to moderate temperatures
normally not more than 80 to 100oC above ambient temperatures.

Incident angle (Teta) for the beam part of radiation

The flat plate collector will normally be installed in a tilted position with angle Beta.

If the normal vector to the flat surface (aperture) is N(Nx,Ny,Nz) then the incident
angle is found from:

cos(Teta) = Nx Sx + Ny Sy + Nz Sz (7.1)

With vector to sun

Sx = cos(H) cos(Az)
Sy= sin(H)
Sz = cos(H) sin(Az)

Most of the panel is tilted at an angle Beta with normal vector in the X-Y plane so
For the northern hemisphere facing south and for the southern hemisphere facing
north:

Nx = sin(Beta) (=North component)


Ny= cos(Beta) (=Up component)
Nz= 0 (=East component)

cos(Teta)= sin(Beta) cos(H) cos(Az) + cos(Beta) sin(H) (7.2)

To get the correct result in (6.2) insert (Beta) negative for northern hemisphere and
(Beta) positive for the southern hemisphere plants. Often the panel is tilted at the
same angle as the latitude (Beta same as B as absolute value)

Page 15 of 34
Incident heat input on a flat panel

The incident heat input is

Qin = Np Ap I (7.3)

With

I = Ibn Kb + Idif (7.4)

Kb=Kb(Teta) is correction factor for incident angle of beam radiation to be informed


by supplier. If factor is unknown use cos(Teta).

Flat Collector Efficiency

Heat absorbed is

Qout = Qin E = Np Ap I E (7.5)

Collector efficiency can be calculated as

E = Eo - a (Tm-Ta) / I - b (Tm-Ta)2/ I (7.6)

Efficiency curves for type GK3003 from GREENoneTEC

Curve 1 GK3003 Single glass: E = 0.857 - 3.083 (Tm-Ta)/I - 0.013 (Tm-Ta)2/I

Page 16 of 34
Curve 2 Gk3003 Double glass: E = 0.814 - 2.102 (Tm-Ta)/I - 0.016 (Tm-Ta)2/I

Angle correction factor to used in Eq. (6.4)

Example 6.1 - Flat plate collector

Problem
A flat plate collector type GK3003 with single glass heat water from 70oC to 80oC
with an ambient temperature of 25oC. Aperture area is 12.35m2 .The direct beam
irradiance is 950 W/m2 with an incident angle of 40o. The indirect irradiance is 70
W/m2. Calculate the efficiency and the heat absorbed.

Solution:

Given: Tm=(70+80)/2=75oC
Ta=25oC
(Tm - Ta) = 50oC

Irradiance

I = 950 x 0.95 + 70 = 973 W/m2 from eq.(7.6)

Efficiency

E = 0.857 - 3.083 x 50 / 973 - 0.013 x 502 / 973 = 0.665 from curve 1

Heat absorbed

Qout = 12.35 x 0.665 x 973 = 7991 W

Page 17 of 34
8 PARABOLIC TROUGH COLLECTOR

A Parabolic Trough collector is a line type concentrator with a single tracking axis.
Because of the concentration it can operate with higher fluid temperature than the flat
panels. Working medium can be water/steam, hot thermal oil (HTF) or Molten salt.

The trough can have orientation

• North-South (angle Gama= 0o)


• East-West (angle Gama=90o)
• Any intermediate angle (Gama between 0o and 90o)

Nominal heat input from DNI=Ibn and aperture Ap in Np units

Qin = Ap Np Ibn (8.1)

Heat input actual irradiated into aperture is

Qinr = Qin cos(Teta) = Ap Np Ibn cos(Teta) (8.2)

Page 18 of 34
where (1-cos(Teta) ) is the cosine loss.

Tracking angle Beta is

Beta = Atan[sin(Az - Gama)/ tan(H)] (8.3)

Incident angle Teta is

Teta= Acos[Sqr(1 - cos(Az - Gama) 2 cos(H) 2)] (8.4)

For practical purpose the collector efficiency can be estimated from the approximate
method described in ref.1:

E = Eo - a (Tm-Ta)/I - b(Tm-Ta)2 /I (8.5)

where the factors Eo, a and b are based on supplier information or test results and
fitted to match real values as close as possible.

Example of fitted curves (top) and actual curves (bottom) The fitted curves using
Eq.(7.5) with Eo=0.74, a=0.03 and b=0.00036. (the actual curves are from National
Renewable Energy report October 2003 and the fit by author)

Page 19 of 34
Once the collector efficiency is known the total heat output can be calculated:

Qout = E Qinr= E Ap Np Ibn cos(Teta) (8.6)

This output is the heat transfer to the working medium in the collector pipe

Qout = Mflow Cp (Tm2 - Tm1) (8.8)

where the Cp value is approx

Cp=4.19 kJ/kgK for water


Cp= 2.4 kJ/kgK for thermal oil
Cp= 1.5 kJ/kgK for Molten nitrate salt

Example 7.1 Parabolic Trough HTF plant in Spain

All calculation in this example is based on the previous formulas and made in
standard Microsoft Excel using Visual Basic macros.

For a power plant near Seville in Spain parabolic trough collectors are heating
HTF from 300 to 390oC. With 25.2 km of though installed we like to estimate the
heat captured on a clear day for three days of the year: Summer, winter and
equinoxes at spring and fall.

Page 20 of 34
Performance hour by hour for Summer (21 June)

Page 21 of 34
Performance hour by hour for Spring (21 March)

Performance hour by hour for Winter (22 December)

Page 22 of 34
Summary of performance for clear days:

Thermal output at noon Thermal output for day Thermal oil


MW MWh flow
kg/s
Summer 94 1024 435
Spring and fall 73 651 337
Winter 35 228 162

Note that for this location the peak output comes close to 0.650 MW per 1000 m2 of
parabolic trough aperture area.

Page 23 of 34
9 CENTRAL TOWER RECEIVER

A central tower receiver use heliostats to focus on the receiver located in the top of a
tower. The peak heat flux on the receiver is typically in the range from 500 to 1100
kW/m2 depending on the medium. The medium can be water/steam or molten salt.

The position of the sun can be calculated from the previous equations, but the
formulas for heat transfer are outside the scope of this booklet.

For illustration purpose an example is shown. The example is for a tower steam
receiver in Australia:

Example 9.1 - Steam Tower Receiver 35 MW for factory in Australia

This example is based on the previous formulas and made in standard Microsoft
Excel using Visual Basic macros. However some formulas for heat transfer in the
central tower receiver is not included.

A factory in south of Australia needs 35 MW peak load of saturated steam at 12


bar. (approx 55 t/h) Suggest a design of a Solar tower steam boiler with such
capacity. A heliostat field with an approximate area of 51,000 m2 operating with
a solar steam boiler installed in a 100 m tall tower.

Estimate the heat captured on a clear day for three days of the year: Summer, winter
and equinoxes at spring and fall.

Estimate the annual steam production and potential fuel saving.

Input location

Page 24 of 34
Input receiver data

Design a field

Page 25 of 34
Top view of field with each heliostat shown as a dot.

Page 26 of 34
Calculate clear day output

Performance hour by hour for Summer (22 December)

Page 27 of 34
Performance hour by hour for fall (21 March)

Page 28 of 34
Performance hour by hour for Winter (21 June)

Page 29 of 34
Annual Performance estimate

Summary of performance and explanation

For clear days the predicted peak output at noon time is


Thermal output at noon Steam flow at noon Steam flow per day
MW ton/h ton/day
Summer 36 55 570
Fall 36 56 495
Winter 31 47 334

Note that the peak output comes close to the desired output of 35 MW thermal.
For this plant location the peak output is close to 1.1 t/h of steam per 1000 m2 of
heliostats.

The annual performance output is approximate only. This type of plant can operate
only on days with few or no clouds. To account for the effect of cloudy days the
actual output for each month can be estimated as:

(Heat output actual) = (Heat output clear day) x CF

where CF = (DNI clear day) / (DNI average per day for month)

Actual average DNI data (W/m2/day) can be found for example on the link above.

Note that for this plant the estimated fuel cost saving is 6.9 mill USD per year, if oil
price was 1,000 USD/ton and the same steam was produced in an oil fired boiler.

Page 30 of 34
References

(1) The Book Power of the Sun


(2) Solar Basics Eugene University

Page 31 of 34
APPENDIX A

Day of Year calculation (including leap years)


Function DayOfYear (MM, DD, YYYY)
' Function return day of year starting from 1st Jan
' The function consider leap year if YYYY is the actual year at call
' If YYYY is input as 0 then leap year is not considered (28 days in Feb assumed)

Dim Day(12) As Integer


Day(1) = 31 ' January
Day(2) = 28 ' February
Day(3) = 31 ' March
Day(4) = 30 ' April
Day(5) = 31 ' May
Day(6) = 30 ' June
Day(7) = 31 ' July
Day(8) = 31 ' Aug
Day(9) = 30 ' Sep
Day(10) = 31 ' Oct
Day(11) = 30 ' Nov
Day(12) = 31 'Dec

If YYYY > 0 Then Day(2) = Day(2) + Leap(YYYY) 'Add 1 day if leap

SUMday = 0

For I = 1 To MM - 1
SUMday = SUMday + Day(I)
Next I

DayOfYear = SUMday + DD

End Function

Function Leap(YYYY) ' Return 0 if not leap and 1 if leap year

Leap = 0 ' Not leap year as default

Frac = YYYY - 4 * Int(YYYY / 4) ' Can divide with 4?


If Frac = 0 Then Leap = 1 ' If can divide 4 assume leap year

' However if century year (FracCent=0) it is leap year if can divide by 400 (Frac400=0)

FracCent = YYYY - 100 * Int(YYYY / 100)

If Frac = 0 And FracCent = 0 Then ' Year is century year

Frac400 = YYYY = 400 * Int(YYYY / 400)

If Frac400 = 0 Then
Leap = 0 ' it is leap year
Else
Leap = 1
End If

End If

End Function

Page 32 of 34
APPENDIX B

Accurate Sun Position calculation - Within 0.2 minutes of arc

' Calculate position of sun as Declination and GHA


'
' Input:
' =====
' YYYY Year
' MM Month
' DD Day
' TH Hour GMT
' TM Minute GMT
' TS Second GMT
'
' Output
' ======
' Dec Declination (latitude) in decimal degree (+N/-S)
' GHA Greenwich hour angle (longitude) in decimal degree

Sub SunPos(YYYY, MM, DD, TH, TM, TS, Dec, GHA)

Pi = WorksheetFunction.Pi()

' Julian day for date at GMT=UT=0

D = DD

Y = YYYY
M = MM

If M < 2 Then
Y=Y-1
M = M + 12
End If

A = Int(Y / 100)
B = 2 - A + Int(A / 4)

JO = Int(365.25 * Y) + Int(30.6001 * (M + 1)) + D + 1720994.5 + B

' GHA for Aries

T = (JO - 2415020) / 36525


GA = (0.000001075 * T + 100.0021359) * T + 0.276919398
GA = 360 * Frac(GA)
GA = GA + 1.002737908 * (TH + TM / 60 + TS / 3600) * 15
If GA > 360 Then GA = GA - 360

Page 33 of 34
' Calculate Julian time for actual time

D = DD + (TH + TM / 60 + TS / 3600) / 24

Y = YYYY
M = MM

If M < 2 Then
Y=Y-1
M = M + 12
End If

A = Int(Y / 100)
B = 2 - A + Int(A / 4)

JD = Int(365.25 * Y) + Int(30.6001 * (M + 1)) + D + 1720994.5 + B

' Declination and GHA calculation

T = (JD - 2415020) / 36525

L = (0.0003025 * T + 36000.76892) * T + 279.69668


L = L - 360 * Int(L / 360)

M = ((-0.0000033 * T - 0.00015) * T + 35999.04975) * T + 358.47583


M = M - 360 * Int(M / 360)

C1 = (-0.000014 * T - 0.004789) * T + 1.91946


C2 = 0.020094 - 0.0001 * T
C3 = 0.000293
C = C1 * Sin(M * Pi / 180) + C2 * Sin(2 * M * Pi / 180) + C3 * Sin(3 * M * Pi / 180)

OM = 259.18 - 1934.142 * T
L = L + C - 0.00569 - 0.00479 * Sin(OM * Pi / 180)
E = ((0.000000503 * T - 0.00000164) * T - 0.0130125) * T + 23.452294 + 0.00256 * Cos(OM * Pi /
180)

' Declination of sun in decimal degree

Dec = 180 / Pi * WorksheetFunction.Asin(Sin(E * Pi / 180) * Sin(L * Pi / 180))

Ra = 180 / Pi * WorksheetFunction.Atan2(1, Cos(E * Pi / 180) * Tan(L * Pi / 180))

If Cos(Pi / 180 * L) < 0 Then Ra = Ra + 180

GHA = GA - Ra

If GHA < 0 Then GHA = GHA + 360

End Sub

Function Frac(X)
Frac = X - Int(X)
End Function

Page 34 of 34

You might also like