Skip to content

Commit

Permalink
Clarify PVWatts DC and inverter documentation (#1785)
Browse files Browse the repository at this point in the history
* some doc clarifications

* formatting

* edit inline comment
  • Loading branch information
cwhanse authored Jun 27, 2023
1 parent cfd9fcc commit cfd6e78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
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
# In some published versions of [1] the parentheses are missing
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
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

0 comments on commit cfd6e78

Please sign in to comment.