@@ -1067,7 +1067,8 @@ def sapm(module, poa_direct, poa_diffuse, temp_cell, airmass_absolute, aoi):
1067
1067
return dfout
1068
1068
1069
1069
1070
- def sapm_celltemp (irrad , wind , temp , model = 'open_rack_cell_glassback' ):
1070
+ def sapm_celltemp (poa_global , wind_speed , temp_air ,
1071
+ model = 'open_rack_cell_glassback' ):
1071
1072
'''
1072
1073
Estimate cell and module temperatures per the Sandia PV Array
1073
1074
Performance Model (SAPM, SAND2004-3535), from the incident
@@ -1076,16 +1077,16 @@ def sapm_celltemp(irrad, wind, temp, model='open_rack_cell_glassback'):
1076
1077
1077
1078
Parameters
1078
1079
----------
1079
- irrad : float or Series
1080
+ poa_global : float or Series
1080
1081
Total incident irradiance in W/m^2.
1081
1082
1082
- wind : float or Series
1083
+ wind_speed : float or Series
1083
1084
Wind speed in m/s at a height of 10 meters.
1084
1085
1085
- temp : float or Series
1086
+ temp_air : float or Series
1086
1087
Ambient dry bulb temperature in degrees C.
1087
1088
1088
- model : string or list
1089
+ model : string, list, or dict
1089
1090
Model to be used.
1090
1091
1091
1092
If string, can be:
@@ -1097,7 +1098,8 @@ def sapm_celltemp(irrad, wind, temp, model='open_rack_cell_glassback'):
1097
1098
* 'open_rack_polymer_thinfilm_steel'
1098
1099
* '22x_concentrator_tracker'
1099
1100
1100
- If list, supply the following parameters in the following order:
1101
+ If dict, supply the following parameters
1102
+ (if list, in the following order):
1101
1103
1102
1104
* a : float
1103
1105
SAPM module parameter for establishing the upper
@@ -1136,25 +1138,27 @@ def sapm_celltemp(irrad, wind, temp, model='open_rack_cell_glassback'):
1136
1138
'open_rack_polymer_thinfilm_steel' : [- 3.58 , - .113 , 3 ],
1137
1139
'22x_concentrator_tracker' : [- 3.23 , - .130 , 13 ]
1138
1140
}
1139
-
1141
+
1140
1142
if isinstance (model , str ):
1141
1143
model = temp_models [model .lower ()]
1142
1144
elif isinstance (model , list ):
1143
1145
model = model
1144
-
1146
+ elif isinstance (model , (dict , pd .Series )):
1147
+ model = [model ['a' ], model ['b' ], model ['deltaT' ]]
1148
+
1145
1149
a = model [0 ]
1146
1150
b = model [1 ]
1147
1151
deltaT = model [2 ]
1148
1152
1149
1153
E0 = 1000. # Reference irradiance
1150
-
1151
- temp_module = pd .Series (irrad * np .exp (a + b * wind ) + temp )
1152
1154
1153
- temp_cell = temp_module + (irrad / E0 )* (deltaT )
1155
+ temp_module = pd .Series (poa_global * np .exp (a + b * wind_speed ) + temp_air )
1156
+
1157
+ temp_cell = temp_module + (poa_global / E0 )* (deltaT )
1154
1158
1155
1159
return pd .DataFrame ({'temp_cell' : temp_cell , 'temp_module' : temp_module })
1156
-
1157
-
1160
+
1161
+
1158
1162
def singlediode (module , photocurrent , saturation_current ,
1159
1163
resistance_series , resistance_shunt , nNsVth ):
1160
1164
'''
0 commit comments