Skip to content

Clarify PVWatts DC and inverter documentation #1785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

cwhanse
Copy link
Member

@cwhanse cwhanse commented Jun 26, 2023

  • [ ] Closes #xxxx
  • I am familiar with the contributing guidelines
  • [ ] Tests added
  • [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • [ ] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for 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`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Email exchange with a user pointed out a possible ambiguity with pvsystem.pvwatts_dc and inverter.pvwatts - neither function provides a unit for the output DC power, or for the input DC power for the inverter.

@cwhanse cwhanse added this to the 0.10.0 milestone Jun 26, 2023
@@ -393,6 +397,7 @@ def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
pdc_neq_0 = ~np.equal(pdc, 0)

# eta < 0 if zeta < 0.006. power_ac is forced to be >= 0 below. GH 541
# differs from Eq. 10 of [1], where parentheses were omitted by mistake
eta = eta_inv_nom / eta_inv_ref * (
-0.0162 * zeta - np.divide(0.0059, zeta, out=eta, where=pdc_neq_0)
+ 0.9858) # noQA: W503
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between this code and the equation in the reference? I can't see it:

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parentheses are missing in this copy: https://www.nrel.gov/docs/fy14osti/62641.pdf Which copy did you open?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting. I was looking at the PDF linked in the pvlib.inverter.pvwatts docstring: https://pvwatts.nrel.gov/downloads/pvwattsv5.pdf

Good to know there are multiple non-identical versions of that PDF. I wonder if there are any other differences...

@kandersolar kandersolar merged commit cfd6e78 into pvlib:main Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants