SunPosition

Description

sealed class Tinman.Engine.Components.SunPosition

Computes the sun position for a given location and time.

This class implements the 'Solar Position Algorithm for Solar Radiation Applications', by Ibrahim Reda and Afshin Andreas, published by the National Renewable Energy Laboratory (NREL/TP-560-34302):
https://www.nrel.gov/docs/fy08osti/34302.pdf

Public / Constructors

Sun​Position


public constructor SunPosition → ()

Creates a new instance of SunPosition.

Public / Methods

Compute


public method Compute → ()

Computes the sun position (and other values, see remarks).

The following properties are used as inputs for this method:

The following properties are output values:

Set​Atmosphere


public method SetAtmosphere → (3)

temperature opt : float64 = 15

Value for LocationLatitude.

pressure opt : float64 = 1000

Value for LocationLongitude.

refraction opt : float64 = 0.5667

Value for LocationElevation.

returns → SunPosition

this

Sets the properties that define the atmospheric conditions.

Set​Location


public method SetLocation → (5)

latitude in : float64

Value for LocationLatitude.

longitude in : float64

Value for LocationLongitude.

elevation opt : float64 = 0

Value for LocationElevation.

slope opt : float64 = 0

Value for LocationSlope.

rotation opt : float64 = 0

Value for LocationRotation.

returns → SunPosition

this

Sets the properties that define the location of the observation.

Set​Time


public method SetTime → (9)

year in : int32

Value for TimeYear.

month in : int32

Value for TimeMonth.

day in : int32

Value for TimeDay.

hour opt : int32 = 0

Value for TimeHour.

minute opt : int32 = 0

Value for TimeMinute.

second opt : float64 = 0

Value for TimeSecond.

timezone opt : float64 = 0

Value for TimeZone.

deltaT opt : float64 = 67

Value for TimeDeltaT.

deltaUT1 opt : float64 = 0

Value for TimeDeltaUT1.

returns → SunPosition

this

Sets the properties that define the point in time of the observation.

Public / Attributes

Atmosphere​Pressure


public attribute AtmospherePressure → (get,set)

value : float64

[0..5000]
The pressure, in millibars.

Annual average local pressure.

The default value is 1000.

Atmosphere​Refraction


public attribute AtmosphereRefraction → (get,set)

value : float64

[-5..5]
The refraction index.

Atmospheric refraction at sunrise and sunset.

The default value is 0.5667.

Atmosphere​Temperature


public attribute AtmosphereTemperature → (get,set)

value : float64

[-273..6000]
The temperature, in degrees Celsius.

Annual average local temperature.

The default value is 15.

Location​Elevation


public attribute LocationElevation → (get,set)

value : float64

The elevation, in metres.

Elevation of observer location.

The default value is 0.

Location​Latitude


public attribute LocationLatitude → (get,set)

value : float64

[-90..90]
The latitude, in degrees (negative south of equator).

Longitude of observer location.

The default value is 0.

Location​Longitude


public attribute LocationLongitude → (get,set)

value : float64

[-180..180]
The longitude, in degrees (negative west of Greenwich).

Longitude of observer location.

The default value is 0.

Location​Rotation


public attribute LocationRotation → (get,set)

value : float64

[-360..360]
The rotation angle, in degrees.

Surface azimuth rotation, measured from south to projection of surface normal on horizontal plane, negative east.

The default value is 0.

Location​Slope


public attribute LocationSlope → (get,set)

value : float64

[-360..360]
The slope angle, in degrees.

Surface slope, measured from the horizontal plane.

The default value is 0.

Sun​Azimuth


public attribute SunAzimuth → (get)

value : float64

[-180..180]
The azimuth angle, in degrees.

Topocentric astronomers azimuth angle, westwards from south.

Sun​Down


public attribute SunDown → (get)

value : float64

The time, in fractional hours.

Local sunset time (+/- 30 seconds).

Sun​Incidence


public attribute SunIncidence → (get)

value : float64

The angle, in degrees.

Surface incidence angle.

Sun​Rise


public attribute SunRise → (get)

value : float64

The time, in fractional hours.

Local sunrise time (+/- 30 seconds).

Sun​Transit


public attribute SunTransit → (get)

value : float64

The time, in fractional hours.

Local sun transit time (+/- 30 seconds).

Sun​Zenith


public attribute SunZenith → (get)

value : float64

The angle, in degrees.

Topocentric zenith angle.

Time​Day


public attribute TimeDay → (get,set)

value : int32

[1..31]
The day number.

The day.

The default value is 1.

Time​Delta​T


public attribute TimeDeltaT → (get,set)

value : float64

[-8000..8000]
The difference in seconds.

Difference between earth rotation time and terrestrial time.

It is derived from observation only.

The default value is 67.

Time​Delta​UT1


public attribute TimeDeltaUT1 → (get,set)

value : float64

[-1..1]
The difference, in seconds.

Fractional second difference between UTC and UT.

The difference is used to adjust UTC for earth’s irregular rotation rate and is derived from observation only.

The default value is 0.

Time​Hour


public attribute TimeHour → (get,set)

value : int32

[0..24]
The hour number.

The hour of the local time.

The default value is 0.

Time​Minute


public attribute TimeMinute → (get,set)

value : int32

[0..59]
The minute number.

The minute of the local time.

The default value is 0.

Time​Month


public attribute TimeMonth → (get,set)

value : int32

[1..12]
The month number.

The month.

The default value is 1.

Time​Second


public attribute TimeSecond → (get,set)

value : float64

[0..60]
The second number.

The second of the local time.

The default value is 0.

Time​Year


public attribute TimeYear → (get,set)

value : int32

[-2000..6000]
The year number.

The year.

The default value is 0.

Time​Zone


public attribute TimeZone → (get,set)

value : float64

[-18..18]
The timezone delta, in hours (negative west of Greenwich).

The timezone delta of the local time.

The default value is 0.