Hello
I work for a solar company in California that uses PVsyst heavily. We have created an inhouse solar production model and are working on implementing a horizons shading calculation into that model. To calculate the diffuse component of horizon shading, we implemented some code that takes in a horizon profile, calculates the area under the profile using an integration, and subtracts that from the visible sky dome.
We've been trying to use PvSyst to validate our approach, but consistently get disagreement, sometimes as large as an order of magnitude. In the case where we run the same horizon through a fixed tilt system with an azimuth of 0 and a tilt of 0 in PVsyst and our model, we get errors of ~.5% and ~5%, respectively. Our python code, in a simplified form, appears below:
(scipy.integrate.quad(np.sin(theta), hrz['azimuth'].iloc[0], hrz['azimuth'].iloc[1])[0])/(2*math.pi)
Essentially, we've generated a set of azimuths (phi) and altitudes (theta), expressed in radians, that describe our horizon profile. To get the area under the profile, we simply integrate the function sin(theta) between our first horizon azimuth (hrz['azimuth'].iloc[0]) and last (hrz['azimuth'].iloc[1]). We then divide this area by 2 pi, half the surface area of a sphere, assuming the radii cancel each other out in this situation.
We intentionally chose a large profile. This one corresponds to a site in Colorado with a mountain to its southwest. The mountains are 11 degrees (.2 radians) in height, and so we expected to see a substantial loss.
We are worried that either our formula is off and that we are not fully understanding how PVsyst calculates far shadings. Any insight would be a great help. Thank you!
Cheers,
Joe Hack
Cypress Creek Renewables
