The code currently executes relatively slow, hence it is of great interest to find methods to speed up the calculations.
One reviewer has proposed to:
... to calculate a maximum solar elevation beyond which any self-shading is impossible for a given array geometry. That would allow shading calculations to be skipped for a large portion of daylight hours.
An initial bootstrap implementation of this showed a 23 % decrease in computational time for the investigated field layout and aperture geometry. Hence, some improvements is certainly achievable, though it varies significantly with the specific field layout and aperture shape.
In order to implement this concept, an analytical method for determining the maximum shading elevation should be developed. The allowable inputs to the method are the field layout and the aperture geometry. Potentially the maximum shading elevation can be calculated in the generate_field_layout function and be passed to the two_axis_shading_fraction function.
The implementation of this concept in the two_axis_shading_fraction function would simply involve adding an extra optional input argument (max_elevation) and adding the following code to the start of the function:
The code currently executes relatively slow, hence it is of great interest to find methods to speed up the calculations.
One reviewer has proposed to:
An initial bootstrap implementation of this showed a 23 % decrease in computational time for the investigated field layout and aperture geometry. Hence, some improvements is certainly achievable, though it varies significantly with the specific field layout and aperture shape.
In order to implement this concept, an analytical method for determining the maximum shading elevation should be developed. The allowable inputs to the method are the field layout and the aperture geometry. Potentially the maximum shading elevation can be calculated in the
generate_field_layout
function and be passed to thetwo_axis_shading_fraction
function.The implementation of this concept in the
two_axis_shading_fraction
function would simply involve adding an extra optional input argument (max_elevation
) and adding the following code to the start of the function: