Domain dedicated functions
Solar functions
solar-azimuth
Compute sun azimuth position in degrees.
(solar-azimuth t latitude longitude {temperature {pressure {deltaT}}})
parameters
- t: input time
- latitude: latitude in degrees ( >0 North South)
- longitude: longitude in degrees ( >0 East West)
- temperature: (optional default is 15°C), temperature in Celsius
- pressure: (optional default is 1013.25 HPa), pressure in HPa
- deltaT: (optional default is computed from t), delta time between clock and sun time is second (can be a duration)
example
Azimuth on 2024
Shows sun azimuth at 12h00 UTC for Paris for every day of 2024
(timeserie (range 2024-01-01T12:00 2025-01-01 1D) (fn[t](solar-azimuth t 48.858 2.294)))
solar-altitude
Compute sun altitude position in degrees.
(solar-altitude t latitude longitude {temperature {pressure {deltaT}}})
parameters
- t: input time
- latitude: latitude in degrees ( >0 North South)
- longitude: longitude in degrees ( >0 East West)
- temperature: (optional default is 15°C), temperature in Celsius
- pressure: (optional default is 1013.25 HPa), pressure in HPa
- deltaT: (optional default is computed from t), delta time between clock and sun time is second (can be a duration)
example
Altitude 20th june 2024
Shows sun altitude for Paris every minute for 20th june 2024.
(timeserie (range 2024-06-20 2024-06-21 1m) (fn[t](solar-altitude t 48.858 2.294)))
solar-deltat
Return an inter- or extrapolated estimate of Delta T for the given time. This is based on Espenak and Meeus, “Five Millennium Canon of Solar Eclipses: -1999 to +3000” (NASA/TP-2006-214141).
(solar-deltat t)
parameter
- t: input time
solar-radiation
Compute sun radiation in Watt per m². A Model for Estimating the Solar Insolation Under Real Weather Conditions from Mikulovic, Durisic, Zeid 2015
(solar-radiation t latitude longitude azimuth tilt {albedo {temperature {pressure {deltaT}}}})
(solar-radiation t sun_altitude)
parameters
- t: input time
- latitude: latitude in degrees ( >0 North South)
- longitude: longitude in degrees ( >0 East West)
- azimuth: angle to south orientation in degrees
- tilt: angle to horizontal plane in degrees
- albedo: (optional default is 0.2), albedo in [0 1]
- temperature: (optional default is 15°C), temperature in Celsius
- pressure: (optional default is 1013.25 HPa), pressure in HPa
- deltaT: (optional default is computed from t), delta time between clock and sun time is second (can be a duration)
- sun_altitude: sun altitude in degrees
example
Real vs Theoretical
Comparaison between real solar pannel production and theoretical radiation at the same time.
(def ts (timeserie @"power" "apsystems" "216000026113" 2020-01-19 2020-01-22))
[
(label "real" ts)
(label "theoretical"
(map(fn[t](solar-radiation t 46.561 0.291 90 3))(time-as-value ts)))
]