Add marion_diffuse_tracking, to be used instead of marion_diffuse for vector surface_tilt inputs - #2824
Add marion_diffuse_tracking, to be used instead of marion_diffuse for vector surface_tilt inputs#2824cbcrespo wants to merge 2 commits into
marion_diffuse_tracking, to be used instead of marion_diffuse for vector surface_tilt inputs#2824Conversation
|
kudos to @kandersolar for raising the issue and everyone else who contributed to the conceptualization of this. was now thinking that neither me and @cbcrespo have never modelled bifacial, and we have no idea how IAM is calculated for that (not even sure if
likely it's not as simple as this.... |
I wonder if @shirubana is available to comment on this as bifacial PV is one of her many areas of expertise |
|
In the style of Marion's method, bifacial IAM can be pretty straightforward (assuming you already have the front-side IAMs in hand). By symmetry:
Flaws of this approach include: slight inconsistency in the horizon IAM, as the horizon band is placed slightly above the horizon (If it was centered on the horizon, it would be perfect, alas), the assumption of no neighboring rows or other objects blocking the view (of course this is also true for the front side in Marion's method, so not an "additional" deficiency here), and the assumption of isotropic ground-reflected irradiance (ignoring the row's own shadow). However I'm not sure we need to be thinking about bifacial modeling here. This is just a way to compute many Marion IAMs quickly. How best to model bifacial IAM is a separate problem which doesn't need to be addressed here IMHO. |
|
Thanks for the input @kandersolar. I think Carolina was worried how this would behave if a user sets up a bifacial system using ModelChain or simply wants to use this function directly as an efficient interpolation gimmick for bifacial. To be honest, I'm not even aware how bifacial is treated within pvlib, and I should check it as it makes it more difficult to imagine/reflect on the matter (from your feedback, it seems each side of the module is handled separately). Besides this bifaciality, anything else to add? Do you see any issue with interpolating the IAM curve with 0.5 degree resolution (as an arbitrary, high-resolution/theoretically safe delta)? |
cwhanse
left a comment
There was a problem hiding this comment.
Editorial suggestions for the docstring.
| Determine diffuse irradiance incidence angle modifiers using Marion's | ||
| method of integrating over solid angle. This function is designed for | ||
| trackers, where ``surface_tilt`` is a vector, to avoid the computational | ||
| burden of calling ``marion_integrate`` for each tilt angle. |
There was a problem hiding this comment.
| Determine diffuse irradiance incidence angle modifiers using Marion's | |
| method of integrating over solid angle. This function is designed for | |
| trackers, where ``surface_tilt`` is a vector, to avoid the computational | |
| burden of calling ``marion_integrate`` for each tilt angle. | |
| Determine incidence angle modifiers (IAMs) for diffuse irradiance | |
| using Marion's method of integrating over solid angles. | |
| This function supports trackers for which ``surface_tilt`` is a vector. |
| Instead, the IAM function is integrated once for a range of tilt angles, | ||
| and then interpolated to the requested tilt angles. For fixed-tilt systems, |
There was a problem hiding this comment.
| Instead, the IAM function is integrated once for a range of tilt angles, | |
| and then interpolated to the requested tilt angles. For fixed-tilt systems, | |
| The IAM function is integrated once for tilt angles specified by | |
| ``resolution``. IAM at other angles are determined by interpolation. | |
| For fixed-tilt systems, |
| (89.5 <= zenith <= 90) | ||
| * 'ground': radiation reflected from the ground (zenith >= 90) | ||
|
|
||
| See [1]_ for a detailed description of each class. |
There was a problem hiding this comment.
| See [1]_ for a detailed description of each class. | |
| See [1]_ for a detailed description of each type. |
docs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.As noted in #1402,
marion_diffuseuses too much memory (and takes a long time) when thesurface_tiltinput is a vector, which occurs for trackers.marion_diffusecallsmarion_integratefor eachsurface_tiltand each region (sky, horizon or ground).marion_integrateintegrates over a solid angle for each of those. @cwhanse, @markcampanelli, @adriesse, @kdebrab and others discussed how this issue could be circumvented via interpolation.This PR proposes a solution via a new function called
marion_diffuse_tracking, to be used instead ofmarion_diffusefor trackers.marion_diffuse_trackingcreates vectors of 0-90 or 0-180º (for bifacial arrays) with a 0.5º step,marion_integrateis called for each angle in that vector and each region only once, and the results are used to create an interpolator function (usingscipy.interpolate.PchipInterpolator). This interpolator is then used to obtain an IAM value for each value insurface_tilt.Regardless of the length of
surface_tilt,marion_integrateis called a fixed number of times, helping to contain the computational burden.In addition, the interpolation is cached, meaning that e.g. for a
PVSystemobject with multiple trackerArrays which have identical tilt vectors, the interpolator will only have to be created once for each region.More details on time and memory savings, as well as deviation, here. For one example for a 8760-length vector,
marion_diffuse_trackinguses 4% of the max memory and 2% of the time ofmarion_diffuse.