ThomasSchuetz / SolarAnglesNet

C# implementation of common solar radiation models
MIT License
0 stars 0 forks source link
hacktoberfest

SolarAngleNet

NuGet downloads SolarAnglesNet Quality Gate Status

C# (.NET standard) implementation of common solar radiation models.

This package can help you determining solar angles, sunrise and sunset times as well as effective radiation on tilted surfaces.

Plans for future developments

Installation

The simples way to obtain the package is through NuGet, by searching for SolarAngles and installing it that way.

Usage

There are two anticipated use cases for using this package.

Using the SolarAngles-wrapper class

Brief example of calculating the incidence angle on solar noon on Christmas Day onto a roof with 30° slope angle and west orientation in Nuremberg (Germany), while also defining the declination angle model:

var tiltedSurface = new SolarAngles.TiltedSurface(beta: 30, gamma: 90);
var nuremberg = new SolarAngles.Location(49.27, 11.05);
var solarAngles = new SolarAngles.SolarAngles(nuremberg, tiltedSurface);

var config = SolarAngles.Configuration.Config;
config.SetDeclinationAngleModel(SolarAngles.DeclinationAngle.DeclinationAngleModels.Spencer1971);

var result = solarAngles.GetIncidenceAngle(new DateTime(2020, 12, 25, 12, 0, 0));

Implemented models

There are multiple models and converters that you can choose from within the Configuration-class.

Air Mass models:

Declination Angle models:

Sunset Hour Angle models:

Definition of input and output time formats:

Contributing

Please feel free to contribute to the package by either

Used other open-source projects