Incident Radiation From Weather and Shading¶
This guide explains how the current implementation combines weather-file radiation, solar geometry, surface orientation, sunlit fraction, and diffuse view factors to compute incident solar radiation.
Related API References¶
- Python reference:
voxel_shading - Web reference: VoxelShading endpoints
- Shading API output:
GET /api/voxelShading/result/{jobId} - Weather-to-radiation implementation:
Weather.ComputeAnnualIncidentRadiationFromShadingResult
Source Implementation¶
EnergyAtlasCore/Weather.csEnergyAtlasCore/Model/PerezSky.csEnergyAtlasCore/VoxelShading/ShadingResult.cs
Inputs¶
| Input | Source |
|---|---|
DirectNormalRadiation (DNI) |
EPW column parsed in Weather.cs from index 14. |
DiffuseHorizontalRadiation (DHI) |
EPW column parsed in Weather.cs from index 15. |
| Solar elevation and azimuth | SolarGeometry.solarelevation and SolarGeometry.solarazimuth. |
| Surface normal | ShadingGroupResult.Normal. |
| Sunlit fraction | ShadingGroupResult.SunlitFraction. |
| Sky visibility | ShadingGroupResult.SkyViewFactor. |
| Horizon visibility | ShadingGroupResult.HorizonViewFactor. |
Hourly Expansion¶
ComputeAnnualIncidentRadiationFromShadingResult expands a representative-day shading result into all 365 * 24 hours.
repDayCount = ceil(365 / CalcUpdateFreq).stepsPerRepDay = SunlitFraction.Length / repDayCount.subStepsPerHour = stepsPerRepDay / 24.- For each annual hour:
dayOfYear = hourIndex / 24repDayIndex = dayOfYear / CalcUpdateFreq- if already hourly, read one sunlit value
- otherwise average sub-hour values inside the hour
Surface Orientation¶
The incident radiation calculation converts group normal to the angles expected by PerezSky:
AltitudeAngleDegrees(normal)returns tilt from vertical+Z.AzimuthAngleDegrees(normal)projects the normal into XY and returns a rounded azimuth.- Solar zenith is
90 - SolarElevation[hour].
Radiation Components¶
Direct beam¶
PerezSky.Direct computes beam radiation on the tilted surface:
1 2 3 4 5 | |
Diffuse sky¶
PerezSky.Diffuse decomposes DHI into three Perez components:
1 2 3 4 5 | |
In the annual incident-radiation path:
horizonVisibility = ShadingGroupResult.HorizonViewFactordomeVisibility = ShadingGroupResult.SkyViewFactorcircumsolarVisibility = sunlitFractiona = max(0, cos(AOI))b = max(cos(85 degrees), cos(solarZenith))
Ground reflected¶
PerezSky.GroundRefelectedSolar uses a default ground reflectance of 0.2:
1 2 3 | |
Final hourly value¶
1 | |
The division by 1000 converts W/m2 to kWh/m2 for the one-hour record. Summing all 8760 values gives annual kWh/m2.
Relationship to the API Workflow¶
The web/Python voxel-shading API calculates sunlit fraction, SVF, and HVF. The weather-file incident-radiation conversion is currently a core-library step that consumes a ShadingResult plus a Weather object. The API result is therefore the shading input to incident radiation, not the weather-combined annual radiation by itself.