Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pvlib/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
NREL's PVWatts inverter model.

The PVWatts inverter model [1]_ calculates inverter efficiency :math:`\eta`
as a function of input DC power
as a function of input DC power :math:`P_{dc}`

.. math::

Expand Down Expand Up @@ -369,6 +369,10 @@ def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):

Notes
-----
When sourcing ``pdc`` from pvlib functions
(e.g. :py:func:`pvlib.pvsystem.pvwatts_dc`) their DC power output is in W,
and ``pdc0`` should have the same unit (W).

Note that ``pdc0`` is also used as a symbol in
:py:func:`pvlib.pvsystem.pvwatts_dc`. ``pdc0`` in this function refers to
the DC power input limit of the inverter. ``pdc0`` in
Expand All @@ -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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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...

Expand Down
8 changes: 4 additions & 4 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2809,9 +2809,9 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):

P_{dc} = \frac{G_{poa eff}}{1000} P_{dc0} ( 1 + \gamma_{pdc} (T_{cell} - T_{ref}))

Note that the pdc0 is also used as a symbol in
:py:func:`pvlib.inverter.pvwatts`. pdc0 in this function refers to the DC
power of the modules at reference conditions. pdc0 in
Note that ``pdc0`` is also used as a symbol in
:py:func:`pvlib.inverter.pvwatts`. ``pdc0`` in this function refers to the DC
power of the modules at reference conditions. ``pdc0`` in
:py:func:`pvlib.inverter.pvwatts` refers to the DC power input limit of
the inverter.

Expand All @@ -2836,7 +2836,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
Returns
-------
pdc: numeric
DC power.
DC power. [W]

References
----------
Expand Down