Sky models
Index
SkyDomes.CIE
SkyDomes.StandardSky
SkyDomes.UniformSky
SkyDomes.clear_sky
SkyDomes.equal_angle_intervals
SkyDomes.equal_solid_angles
SkyDomes.radiosity
SkyDomes.radiosity
SkyDomes.sky
SkyDomes.waveband_conversion
Public API
SkyDomes.CIE
— MethodCIE(;type = 1, θₛ = 0.0, Φₛ = 0.0, rtol = sqrt(eps(Float64)), atol = 0.0,
maxevals = typemax(Int))
Create a standard CIE model of sky diffuse radiance on the horizontal plane as described by Darula and Kittler (2002). The argument type
can have values from 1 to 15 representing the 15 standard CIE models. θₛ and Φₛ are the zenith and azimuth angles of the solar disc. rtol
and atol
and maxevals
are the relative tolerance, absolute tolerance and maximum number of function evaluation of the numerical integration algorithm. See package documentation for details.
SkyDomes.StandardSky
— TypeStandardSky()
Standard model of overcast sky diffuse radiation Moon & Spencer (1942). See package documentation for details.
SkyDomes.UniformSky
— TypeUniformSky()
Model of uniform sky diffuse radiation. See package documentation for details.
SkyDomes.clear_sky
— Methodclear_sky(;lat, DOY, t, altitude = 0.0, TL = 4.0)
Calculate global, direct and diffuse solar radiation on the horizontal plane using the clear sky model by Ineichen and Perez (2002).
Arguments
lat
: latitude in radiansDOY
: day of yearf
: fraction of the day (0 = sunrise, 1 = sunset)altitude
: altitude above sea level in meters (default 0.0)TL
: Linke turbidity coefficient (default 4.0)
Returns
A named tuple with fields:
Ig
: global solar radiation on the horizontal plane in W/m^2Idir
: direct solar radiation on the horizontal plane in W/m^2Idif
: diffuse solar radiation on the horizontal plane in W/m^2theta
: solar zenith angle in radiansphi
: solar azimuth angle in radians
References
Ineichen P., Perez R., A new airmass independent formulation for the Linke turbidity coefficient, Solar Energy, Vol 73(3), pp.151–157, 2002.
SkyDomes.equal_angle_intervals
— Methodequal_angle_intervals(ntheta, nphi)
Discretize the sky into ntheta
zenith rings of nphi
sectors each assuming the same angle intervals for each sector (Δθ = π/2/ntheta and ΔΦ = 2π/nphi). Returns an object of type SkySectors
. See package documentation for details.
SkyDomes.equal_solid_angles
— Methodequal_solid_angles (ntheta, nphi)
Discretize the sky into ntheta
zenith rings and a number of sectors per ring that is proportional to sin(θ)
. The total number of sectors will be ntheta*nphi
. Returns an object of type SkySectors
. See package documentation for details.
SkyDomes.radiosity
— Methodradiosity(m::StandardSky, sky::SkySectors, Idif::SVector{nw, Float64})
Calculate the radiosity of each section of sky
on the horizontal plane given diffuse irradiance on the horizontal plane (Idif
with nw
wavebands) assuming a Standard Sky model and for nw
wavebands. See package documentation for details.
SkyDomes.radiosity
— Methodradiosity(m::UniformSky, sky::SkySectors, Idif::SVector{nw, Float64}) where nw
Calculate the radiosity of each section of sky
on the horizontal plane given diffuse irradiance on the horizontal plane (Idif
with nw
wavebands) assuming a Uniform Sky model. See package documentation for details.
SkyDomes.sky
— Methodsky(mesh; Idir = 0.77, nrays_dir = 100_000, theta_dir = 0.0, phi_dir = 0.0,
Idif = 0.23, nrays_dif = 1_000_000, sky_model = StandardSky,
dome_method = equal_solid_angles, ntheta = 9, nphi = 12,
kwargs...)
Create a vector of directional radiation sources representing diffuse and direct solar radiation for a given mesh.
Arguments
mesh
: A Mesh object generated by VPL.Idir
: The direct solar radiation measured on the horizontal plane (a single value or tuple).nrays_dir
: The number of rays to be generated for direct solar radiation.theta_dir
: The zenith angle of the sun position (radians).phi_dir
: The azimuthal angle of the sun position (radians).Idif
: The diffuse solar radiation measured on the horizontal plane (a single value or tuple).nrays_dif
: The total number of rays to be generated diffuse solar radiation.sky_model
: The angular distribution of diffuse irradiance (StandardSky
,UniformSky
orCIE
).dome_method
: The method to discretize hemisphere into patches for diffuse solar radiation (equal_solid_angles
orequal_angle_intervals
).ntheta
: The number of divisions along the zenith angle fordome_method
.nphi
: The number of divisions along the azimuthal angle fordome_method
.kwargs...
: Additional arguments to be used whendome_method = CIE
Returns
A vector of directional sources that can be used for ray tracing calculations in VPL. ```
SkyDomes.waveband_conversion
— Methodwaveband_conversion(;Itype = :direct, waveband = :PAR, mode = :power)
Returns the conversion coefficient from solar radiation (W/m2) to a give waveband in either power (W/m2) or photon flux (umol/m2/s). The coefficients are based on the Bird spectral model for a clear sky using June 21th in The Netherlands (latitude 52° N).
Arguments
Itype
: The type of solar radiation, either:direct
or:diffuse
.waveband
: The waveband of interest, one of:PAR
,:UV
,:blue
,:red
,:green
, or:NIR
.mode
: The physical units of the target, either:power
(W/m^2) or:flux
(umol/m^2/s).
Examples
waveband_conversion(Itype = :diffuse, waveband = :UV, mode = :flux)
waveband_conversion(waveband = :NIR)
Private
Private functions, types or constants from SkyDomes
. These are not exported, so you need to prefix the function name with SkyDomes.
to access them. Also bear in mind that these are not part of the public API, so they may change without notice.