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.
The simples way to obtain the package is through NuGet, by searching for SolarAngles
and installing it that way.
There are two anticipated use cases for using this package.
SolarAngles
-wrapper class. This is the preferred method of usage, as you can define your input format (e.g. local time or UTC or solar time) and used models.SolarAngles
-wrapper classBrief 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));
There are multiple models and converters that you can choose from within the Configuration
-class.
Please feel free to contribute to the package by either