Summary
The Site-Level 3D Scene algorithm is a polygon clipping approach introduced in Version 12 for fast, site-wide shading calculations. This method uses broad-phase and narrow-phase collision detection with Shapely geometric operations for robust polygon intersection. The algorithm is automatically enabled when a user loads a 3D scene and supports complex terrain, non-uniform row spacing, arbitrary array geometries, and external obstructions with significantly improved computational performance compared to the legacy ray-tracing approach.Inputs
| Name | Symbol | Units | Description |
|---|---|---|---|
| Sun Position Vector | — | 3D unit vector pointing from origin to sun | |
| Solar Zenith Angle | degrees | Angle from vertical to sun position | |
| Solar Azimuth Angle | degrees | Compass direction of sun position | |
| Reference Azimuth | degrees | Reference azimuth for scene rotation | |
| Bay Vertices | — | m | 3D coordinates of bay corner points (parallelograms, 4 vertices each) |
| Object Vertices | — | m | 3D coordinates of obstruction objects (triangles or parallelograms) |
| Terrain Elevation | m | Ground elevation at each bay location | |
| Tracker Rotation Angle | degrees | Rotation angle for tracking systems | |
| Tracker Axis Tilt | degrees | Axis tilt for sloped tracker installations |
Outputs
| Name | Symbol | Units | Description |
|---|---|---|---|
| Shaded Fraction per Bay | — | Fraction of bay area in shadow (0-1) | |
| Average Shaded Fraction | — | Site-wide average shading (area-weighted) |
Detailed Description
Scene Preparation
Before collision detection, the scene is prepared through coordinate transformations:- Bay Rotation: If tracking is enabled, rotate bay matrices around the tracker axis using rotation angle and axis tilt
- Scene Rotation: Rotate the entire scene (bays and objects) to align with the sun vector direction
Broad-Phase Collision Detection
The broad-phase uses spatial indexing to quickly eliminate bay pairs that cannot possibly cast shadows on each other, reducing computational complexity from all-pairs comparisons to local neighborhood searches.Narrow-Phase Collision Detection
For candidate pairs identified in the broad-phase, the narrow-phase computes precise shadow polygon intersections using the Shapely geometric library. The shaded fraction for each bay is: where is the area of shadow polygon intersection and is total bay area.Sun Behind Modules
If the sun is behind all bays (sun vector dot product with bay normals < 0): Optional correction for back-side illumination: where is 1 if sun is in front of bay, 0 otherwise.Complex Geometry Handling
The algorithm handles:- Terrain Effects: Bays at different elevations with terrain slope variations
- Non-Uniform Spacing: Irregular row spacing, curved rows, non-rectangular layouts
- Arbitrary Orientations: Modules with different tilt and azimuth angles, tilted tracker axes
- External Obstructions: Bay-to-bay shading and external objects (buildings, trees, terrain features)
Application to Irradiance
The shaded fraction is applied to beam irradiance: Diffuse shading is handled separately using view-factor methods (Schaar-Panchula model).References
- Peláez, S. Á., Deline, C., Greenberg, P., Stein, J. S., & Kostuk, R. K. (2019). Model and validation of single-axis tracking with bifacial PV. IEEE Journal of Photovoltaics, 9(3), 715–721.
- Marion, B. (2021). Numerical verification of pvlib single-axis tracking shading algorithms. IEEE Journal of Photovoltaics, 11(1), 184–190.