Skip to content

Commit fe57151

Browse files
committed
name change (#825)
1 parent 2360f16 commit fe57151

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pvlib/pvsystem.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,8 +2195,8 @@ def _parse_raw_sam_df(csvdata):
21952195
return df
21962196

21972197

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):
22002200
'''
22012201
The Sandia PV Array Performance Model (SAPM) generates 5 points on a
22022202
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,
22152215
A dict or Series defining the SAPM parameters. See the notes section
22162216
for more details.
22172217
2218-
reference_temperature : numeric, optional
2218+
temperature_ref : numeric, optional
22192219
Reference temperature [°C]
22202220
2221-
reference_irradiance : numeric, optional
2221+
irradiance_ref : numeric, optional
22222222
Reference irradiance [Wm⁻²]
22232223
22242224
Returns
@@ -2295,7 +2295,7 @@ def sapm(effective_irradiance, temp_cell, module, reference_temperature=25,
22952295
kb = constants.k # Boltzmann's constant in units of J/K
22962296

22972297
# 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
22992299

23002300
# set up masking for 0, positive, and nan inputs
23012301
Ee_gt_0 = np.full_like(Ee, False, dtype='bool')
@@ -2319,31 +2319,31 @@ def sapm(effective_irradiance, temp_cell, module, reference_temperature=25,
23192319

23202320
out['i_sc'] = (
23212321
module['Isco'] * Ee * (1 + module['Aisc']*(temp_cell -
2322-
reference_temperature)))
2322+
temperature_ref)))
23232323

23242324
out['i_mp'] = (
23252325
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)))
23272327

23282328
out['v_oc'] = np.maximum(0, (
23292329
module['Voco'] + cells_in_series * delta * logEe +
2330-
Bvoco*(temp_cell - reference_temperature)))
2330+
Bvoco*(temp_cell - temperature_ref)))
23312331

23322332
out['v_mp'] = np.maximum(0, (
23332333
module['Vmpo'] +
23342334
module['C2'] * cells_in_series * delta * logEe +
23352335
module['C3'] * cells_in_series * ((delta * logEe) ** 2) +
2336-
Bvmpo*(temp_cell - reference_temperature)))
2336+
Bvmpo*(temp_cell - temperature_ref)))
23372337

23382338
out['p_mp'] = out['i_mp'] * out['v_mp']
23392339

23402340
out['i_x'] = (
23412341
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)))
23432343

23442344
out['i_xx'] = (
23452345
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)))
23472347

23482348
if isinstance(out['i_sc'], pd.Series):
23492349
out = pd.DataFrame(out)

0 commit comments

Comments
 (0)