Skip to content

Commit 17195ae

Browse files
committed
add optional surface_tilt parameter to PVSystem.fuentes_celltemp
1 parent a874b11 commit 17195ae

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

pvlib/pvsystem.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ def faiman_celltemp(self, poa_global, temp_air, wind_speed=1.0):
729729
)
730730

731731
@_unwrap_single_value
732-
def fuentes_celltemp(self, poa_global, temp_air, wind_speed):
732+
def fuentes_celltemp(self, poa_global, temp_air, wind_speed,
733+
surface_tilt=None):
733734
"""
734735
Use :py:func:`temperature.fuentes` to calculate cell temperature.
735736
@@ -744,6 +745,11 @@ def fuentes_celltemp(self, poa_global, temp_air, wind_speed):
744745
wind_speed : pandas Series or tuple of Series
745746
Wind speed [m/s]
746747
748+
surface_tilt : pandas Series or tuple of Series, optional
749+
Panel tilt from horizontal. Superseded by ``surface_tilt``
750+
values in ``self.arrays[i].temperature_model_parameters``
751+
(see Notes). [degrees]
752+
747753
Returns
748754
-------
749755
temperature_cell : Series or tuple of Series
@@ -754,11 +760,11 @@ def fuentes_celltemp(self, poa_global, temp_air, wind_speed):
754760
The Fuentes thermal model uses the module surface tilt for convection
755761
modeling. The SAM implementation of PVWatts hardcodes the surface tilt
756762
value at 30 degrees, ignoring whatever value is used for irradiance
757-
transposition. This method defaults to using ``self.surface_tilt``, but
758-
if you want to match the PVWatts behavior, you can override it by
759-
including a ``surface_tilt`` value in ``temperature_model_parameters``.
763+
transposition. If you want to match the PVWatts behavior, specify a
764+
``surface_tilt`` value in the Array's ``temperature_model_parameters``.
760765
761-
The `temp_air` and `wind_speed` parameters may be passed as tuples
766+
The `temp_air`, `wind_speed`, and `surface_tilt` parameters may be
767+
passed as tuples
762768
to provide different values for each Array in the system. If not
763769
passed as a tuple then the same value is used for input to each Array.
764770
If passed as a tuple the length must be the same as the number of
@@ -769,12 +775,10 @@ def fuentes_celltemp(self, poa_global, temp_air, wind_speed):
769775
poa_global = self._validate_per_array(poa_global)
770776
temp_air = self._validate_per_array(temp_air, system_wide=True)
771777
wind_speed = self._validate_per_array(wind_speed, system_wide=True)
778+
surface_tilt = self._validate_per_array(wind_speed, system_wide=True)
772779

773-
def _build_kwargs_fuentes(array):
774-
# TODO: I think there should be an interface function so that
775-
# directly accessing surface_tilt isn't necessary. Doesn't this
776-
# break for SAT?
777-
kwargs = {'surface_tilt': array.mount.surface_tilt}
780+
def _build_kwargs_fuentes(array, user_tilt):
781+
kwargs = {'surface_tilt': user_tilt}
778782
temp_model_kwargs = _build_kwargs([
779783
'noct_installed', 'module_height', 'wind_height', 'emissivity',
780784
'absorption', 'surface_tilt', 'module_width', 'module_length'],
@@ -784,9 +788,9 @@ def _build_kwargs_fuentes(array):
784788
return tuple(
785789
temperature.fuentes(
786790
poa_global, temp_air, wind_speed,
787-
**_build_kwargs_fuentes(array))
788-
for array, poa_global, temp_air, wind_speed in zip(
789-
self.arrays, poa_global, temp_air, wind_speed
791+
**_build_kwargs_fuentes(array, user_tilt))
792+
for array, poa_global, temp_air, wind_speed, user_tilt in zip(
793+
self.arrays, poa_global, temp_air, wind_speed, surface_tilt
790794
)
791795
)
792796

0 commit comments

Comments
 (0)