Implement iam.schlick, iam.schlick_diffuse - #1562
Conversation
|
I suppose we could move the diffuse calculations to a separate function like was done with martin_ruiz. It's a little strange to return scalar sky & ground IAM but time series direct IAM as the current code does for a fixed tilt simulation. |
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
|
Offline discussion with @cwhanse and the model's author determined that the parameter this PR calls I also added |
cwhanse
left a comment
There was a problem hiding this comment.
I think there are some minor efficiency improvements that could be done in iam.fedis at the cost of less transparency when comparing to the reference. E.g., the default case n_ref=n means that term1 is identically 1. On the whole I am preferring transparency.
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
|
Should/does fedis direct be equal to schlick? If not, why not? |
Close-ish but not identical. FEDIS is using the true Fresnel equations for the direct component so it cannot match exactly. The Schlick approximation only comes in for the diffuse components: in the absence of an analytical integration of the real Fresnel equations, FEDIS's diffuse components are instead an integration of the Shlick approximation. It's the alternative to Marion's integration method -- whereas Marion's is an approximate integration of an exact integrand, FEDIS is an exact integration of an approximate integrand. |
I see, but we already have that in iam.physical, right? |
Yes, with two minor differences: FEDIS does not consider extinction (i.e. it assumes For context, I have the sense that the FEDIS paper to some extent views its diffuse IAM equations as the primary scientific contribution with the direct component being included for completeness. |
Co-Authored-By: Anton Driesse <9001027+adriesse@users.noreply.github.com>
cwhanse
left a comment
There was a problem hiding this comment.
A little docstring tidying. OK with me to merge as is.
|
Perhaps we should invite a additional reviewer on this one? |
|
It turns out that For clarity, I would suggest using the long version because it shows what's actually going on, and putting the short version in a comment with reference to the paper. |
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
I have kept the equations as-is so they continue being directly tied to the reference, but the latest commit at least leaves a comment noting the equivalence for any interested readers. Hopefully that achieves the same goal?
I wouldn't mind input from additional reviewers here, but the three of us (@adriesse, @cwhanse, myself) reaching consensus would be good enough for me. |
Co-authored-by: Anton Driesse <anton.driesse@pvperformancelabs.com>
|
Following offline discussion, we have decided to move forward here with only the two schlick functions. I'll wait a few days to merge this to leave opportunity to review for anyone who wants to. |
|
No problem. I learned a few things in the process! |
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.Yu Xie from NREL presented a new IAM model at the recent PVPMC meeting (slides) and wanted to contribute it to pvlib. This one is a little unusual in that it calculates the IAM factor as a relative quantity, taking the indices of refraction of both the PV surface and the accompanying pyranometer into account.