@@ -2195,8 +2195,8 @@ def _parse_raw_sam_df(csvdata):
2195
2195
return df
2196
2196
2197
2197
2198
- def sapm (effective_irradiance , temp_cell , module , reference_temperature = 25 ,
2199
- reference_irradiance = 1000 ):
2198
+ def sapm (effective_irradiance , temp_cell , module , temperature_ref = 25 ,
2199
+ irradiance_ref = 1000 ):
2200
2200
'''
2201
2201
The Sandia PV Array Performance Model (SAPM) generates 5 points on a
2202
2202
PV module's I-V curve (Voc, Isc, Ix, Ixx, Vmp/Imp) according to
@@ -2215,10 +2215,10 @@ def sapm(effective_irradiance, temp_cell, module, reference_temperature=25,
2215
2215
A dict or Series defining the SAPM parameters. See the notes section
2216
2216
for more details.
2217
2217
2218
- reference_temperature : numeric, optional
2218
+ temperature_ref : numeric, optional
2219
2219
Reference temperature [°C]
2220
2220
2221
- reference_irradiance : numeric, optional
2221
+ irradiance_ref : numeric, optional
2222
2222
Reference irradiance [Wm⁻²]
2223
2223
2224
2224
Returns
@@ -2295,7 +2295,7 @@ def sapm(effective_irradiance, temp_cell, module, reference_temperature=25,
2295
2295
kb = constants .k # Boltzmann's constant in units of J/K
2296
2296
2297
2297
# avoid problem with integer input
2298
- Ee = np .array (effective_irradiance , dtype = 'float64' ) / reference_irradiance
2298
+ Ee = np .array (effective_irradiance , dtype = 'float64' ) / irradiance_ref
2299
2299
2300
2300
# set up masking for 0, positive, and nan inputs
2301
2301
Ee_gt_0 = np .full_like (Ee , False , dtype = 'bool' )
@@ -2319,31 +2319,31 @@ def sapm(effective_irradiance, temp_cell, module, reference_temperature=25,
2319
2319
2320
2320
out ['i_sc' ] = (
2321
2321
module ['Isco' ] * Ee * (1 + module ['Aisc' ]* (temp_cell -
2322
- reference_temperature )))
2322
+ temperature_ref )))
2323
2323
2324
2324
out ['i_mp' ] = (
2325
2325
module ['Impo' ] * (module ['C0' ]* Ee + module ['C1' ]* (Ee ** 2 )) *
2326
- (1 + module ['Aimp' ]* (temp_cell - reference_temperature )))
2326
+ (1 + module ['Aimp' ]* (temp_cell - temperature_ref )))
2327
2327
2328
2328
out ['v_oc' ] = np .maximum (0 , (
2329
2329
module ['Voco' ] + cells_in_series * delta * logEe +
2330
- Bvoco * (temp_cell - reference_temperature )))
2330
+ Bvoco * (temp_cell - temperature_ref )))
2331
2331
2332
2332
out ['v_mp' ] = np .maximum (0 , (
2333
2333
module ['Vmpo' ] +
2334
2334
module ['C2' ] * cells_in_series * delta * logEe +
2335
2335
module ['C3' ] * cells_in_series * ((delta * logEe ) ** 2 ) +
2336
- Bvmpo * (temp_cell - reference_temperature )))
2336
+ Bvmpo * (temp_cell - temperature_ref )))
2337
2337
2338
2338
out ['p_mp' ] = out ['i_mp' ] * out ['v_mp' ]
2339
2339
2340
2340
out ['i_x' ] = (
2341
2341
module ['IXO' ] * (module ['C4' ]* Ee + module ['C5' ]* (Ee ** 2 )) *
2342
- (1 + module ['Aisc' ]* (temp_cell - reference_temperature )))
2342
+ (1 + module ['Aisc' ]* (temp_cell - temperature_ref )))
2343
2343
2344
2344
out ['i_xx' ] = (
2345
2345
module ['IXXO' ] * (module ['C6' ]* Ee + module ['C7' ]* (Ee ** 2 )) *
2346
- (1 + module ['Aimp' ]* (temp_cell - reference_temperature )))
2346
+ (1 + module ['Aimp' ]* (temp_cell - temperature_ref )))
2347
2347
2348
2348
if isinstance (out ['i_sc' ], pd .Series ):
2349
2349
out = pd .DataFrame (out )
0 commit comments