Skip to content

Commit 7b310b6

Browse files
author
Kempe
committed
Update temperature.py
I fixed the cell temperature calculation to default to a wind speed factor of 1.7 instead of 1 and to allow that to be passed in. My guess is that this change will cause problems elsewhere.
1 parent 0b9d138 commit 7b310b6

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

pvdeg/temperature.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def module(
1212
poa=None,
1313
temp_model="sapm",
1414
conf="open_rack_glass_polymer",
15-
wind_speed_factor=1,
15+
wind_speed_factor=1.7,
1616
):
1717
"""
1818
Calculate module surface temperature using pvlib.
@@ -53,7 +53,14 @@ def module(
5353
return module_temperature
5454

5555

56-
def cell(weather_df, meta, poa=None, temp_model="sapm", conf="open_rack_glass_polymer"):
56+
def cell(
57+
weather_df,
58+
meta,
59+
poa=None,
60+
temp_model="sapm",
61+
conf="open_rack_glass_polymer",
62+
wind_speed_factor=1.7,
63+
):
5764
"""
5865
Calculate the PV cell temperature using PVLIB
5966
Currently this only supports the SAPM temperature model.
@@ -72,6 +79,11 @@ def cell(weather_df, meta, poa=None, temp_model="sapm", conf="open_rack_glass_po
7279
The configuration of the PV module architecture and mounting configuration.
7380
Options: 'open_rack_glass_polymer' (default), 'open_rack_glass_glass',
7481
'close_mount_glass_glass', 'insulated_back_glass_polymer'
82+
83+
Return:
84+
-------
85+
temp_cell : pandas.DataFrame
86+
This is the temperature of the cell in a module at every time step. [°C]
7587
"""
7688

7789
parameters = pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS[temp_model][conf]
@@ -82,7 +94,7 @@ def cell(weather_df, meta, poa=None, temp_model="sapm", conf="open_rack_glass_po
8294
temp_cell = pvlib.temperature.sapm_cell(
8395
poa_global=poa["poa_global"],
8496
temp_air=weather_df["temp_air"],
85-
wind_speed=weather_df["wind_speed"],
97+
wind_speed=weather_df["wind_speed"]* wind_speed_factor,
8698
**parameters
8799
)
88100
return temp_cell

0 commit comments

Comments
 (0)