Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion docs/sphinx/source/whatsnew/v0.15.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Bug fixes

Enhancements
~~~~~~~~~~~~

* Use ``k`` and ``cap_adjustment`` from :py:func:`pvlib.pvsystem.Array.module_parameters` in :py:func:`pvlib.pvsystem.PVSystem.pvwatts_dc`
(:issue:`2714`, :pull:`2715`)


Documentation
~~~~~~~~~~~~~
Expand Down Expand Up @@ -70,4 +72,5 @@ Contributors
* Anton Driesse (:ghuser:`adriesse`)
* Kevin Anderson (:ghuser:`kandersolar`)
* Rohan Saxena (:ghuser:`r0hansaxena`)
* Marco Fumagalli (:ghuser:`fuma900`)

8 changes: 6 additions & 2 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,10 @@ def pvwatts_dc(self, effective_irradiance, temp_cell):
"""
Calculates DC power according to the PVWatts model using
:py:func:`pvlib.pvsystem.pvwatts_dc`, `self.module_parameters['pdc0']`,
and `self.module_parameters['gamma_pdc']`.
`self.module_parameters['gamma_pdc']`,
`self.module_parameters['temp_ref']`, and optionally,
`self.module_parameters['k']` and
`self.module_parameters['cap_adjustment']`.

See :py:func:`pvlib.pvsystem.pvwatts_dc` for details.
"""
Expand All @@ -860,7 +863,8 @@ def pvwatts_dc(self, effective_irradiance, temp_cell):
pvwatts_dc(effective_irradiance, temp_cell,
array.module_parameters['pdc0'],
array.module_parameters['gamma_pdc'],
**_build_kwargs(['temp_ref'], array.module_parameters))
**_build_kwargs(['temp_ref', 'k', 'cap_adjustment'],
array.module_parameters))
for array, effective_irradiance, temp_cell
in zip(self.arrays, effective_irradiance, temp_cell)
)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,8 @@ def pvwatts_system_defaults():

@pytest.fixture
def pvwatts_system_kwargs():
module_parameters = {'pdc0': 100, 'gamma_pdc': -0.003, 'temp_ref': 20}
module_parameters = {'pdc0': 100, 'gamma_pdc': -0.003, 'temp_ref': 20,
'k': 0.01, 'cap_adjustment': True}
inverter_parameters = {'pdc0': 90, 'eta_inv_nom': 0.95, 'eta_inv_ref': 1.0}
system = pvsystem.PVSystem(module_parameters=module_parameters,
inverter_parameters=inverter_parameters)
Expand Down