From cfd6e78235e9eff55308f138d4dfe79317b72299 Mon Sep 17 00:00:00 2001 From: Cliff Hansen Date: Tue, 27 Jun 2023 09:52:30 -0600 Subject: [PATCH] Clarify PVWatts DC and inverter documentation (#1785) * some doc clarifications * formatting * edit inline comment --- pvlib/inverter.py | 7 ++++++- pvlib/pvsystem.py | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pvlib/inverter.py b/pvlib/inverter.py index cfac1682c7..0b57e14d2d 100644 --- a/pvlib/inverter.py +++ b/pvlib/inverter.py @@ -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:: @@ -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 @@ -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 diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 86aa415bda..4fb0dc5772 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -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. @@ -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 ----------