You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is nothing stopping a user from specifying an array much wider than it is tall and proceeding to model it at steep tilts that cause the lower module edge to go to negative heights. When that happens, negative irradiance values are returned. For example, for static solar position and irradiance, here's how the returned rearside irradiance varies with surface tilt for an array with pvrow_width/pvrow_height=3 showing how irradiance goes negative when pvrow_width/2 * sin(surface_tilt) > pvrow_height:
I think it would be good to raise an error, or at least emit a warning, in this situation. Perhaps a check like this in OrderedPVArray.fit?
# Check whether the lower module edge ever goes undergroundlower_edge_height=self.height-0.5*self.width*np.sin(np.radians(surface_tilt))
ifnp.any(lower_edge_height<0):
msg= ("Input pvrow_height is not large enough to prevent modules ""from colliding with ground. Check pvrow_width, ""pvrow_height, and surface_tilt.")
raiseValueError(msg)
The text was updated successfully, but these errors were encountered:
😔 yeah I tripped on this a few times also... the fit() function does sound like a good place to add a validation layer, not only on the geometry side but also on the irradiance too (maybe looking for negative values, ...)
Currently there is nothing stopping a user from specifying an array much wider than it is tall and proceeding to model it at steep tilts that cause the lower module edge to go to negative heights. When that happens, negative irradiance values are returned. For example, for static solar position and irradiance, here's how the returned rearside irradiance varies with surface tilt for an array with
pvrow_width/pvrow_height=3
showing how irradiance goes negative whenpvrow_width/2 * sin(surface_tilt) > pvrow_height
:Code to reproduce above plot (v1.5.2):
Click to expand!
This behavior has tripped people up at least twice:
I think it would be good to raise an error, or at least emit a warning, in this situation. Perhaps a check like this in
OrderedPVArray.fit
?The text was updated successfully, but these errors were encountered: