Skip to main content

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

NameSymbolUnitsDescription
Sun Position Vectors\vec{s}3D unit vector pointing from origin to sun
Solar Zenith Angleθz\theta_zdegreesAngle from vertical to sun position
Solar Azimuth Angleγs\gamma_sdegreesCompass direction of sun position
Reference Azimuthγref\gamma_{ref}degreesReference azimuth for scene rotation
Bay Verticesm3D coordinates of bay corner points (parallelograms, 4 vertices each)
Object Verticesm3D coordinates of obstruction objects (triangles or parallelograms)
Terrain ElevationzzmGround elevation at each bay location
Tracker Rotation Angleϕ\phidegreesRotation angle for tracking systems
Tracker Axis Tiltα\alphadegreesAxis tilt for sloped tracker installations

Outputs

NameSymbolUnitsDescription
Shaded Fraction per Bayfshadedf_{shaded}Fraction of bay area in shadow (0-1)
Average Shaded Fractionfˉshaded\bar{f}_{shaded}Site-wide average shading (area-weighted)

Detailed Description

Scene Preparation

Before collision detection, the scene is prepared through coordinate transformations:
  1. Bay Rotation: If tracking is enabled, rotate bay matrices around the tracker axis using rotation angle ϕ\phi and axis tilt α\alpha
  2. Scene Rotation: Rotate the entire scene (bays and objects) to align with the sun vector direction
The sun position vector is calculated as: s=(sin(θz)cos(γsγref),sin(θz)sin(γsγref),cos(θz))\vec{s} = (\sin(\theta_z) \cos(\gamma_s - \gamma_{ref}), -\sin(\theta_z) \sin(\gamma_s - \gamma_{ref}), \cos(\theta_z))

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: fshaded=AshadowAbayf_{shaded} = \frac{A_{shadow}}{A_{bay}} where AshadowA_{shadow} is the area of shadow polygon intersection and AbayA_{bay} is total bay area.

Sun Behind Modules

If the sun is behind all bays (sun vector dot product with bay normals < 0): fshaded=1.0f_{shaded} = 1.0 Optional correction for back-side illumination: fshaded,corrected=1(1fshaded)×1sun_in_frontf_{shaded,corrected} = 1 - (1 - f_{shaded}) \times \mathbb{1}_{sun\_in\_front} where 1sun_in_front\mathbb{1}_{sun\_in\_front} 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: Ibeam,shaded=Ibeam,POA×(1fshaded)I_{beam,shaded} = I_{beam,POA} \times (1 - f_{shaded}) 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.