Skip to content

Commit f79d3fe

Browse files
committed
Fix NOCT SAM effective irradiance behavior and add tests
1 parent c960191 commit f79d3fe

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

pvlib/temperature.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,9 @@ def noct_sam(poa_global, temp_air, wind_speed, noct, module_efficiency,
10121012
# - Geff_total (SAM) is POA irradiance after reflections and
10131013
# adjustment for spectrum. Equivalent to effective_irradiance
10141014
if effective_irradiance is None:
1015-
irr = poa_global
1015+
Geff = poa_global
10161016
else:
1017-
irr = np.maximum(effective_irradiance, 0)
1017+
Geff= np.maximum(effective_irradiance, 0)
10181018
if array_height == 1:
10191019
wind_adj = 0.51 * wind_speed
10201020
elif array_height == 2:
@@ -1025,7 +1025,8 @@ def noct_sam(poa_global, temp_air, wind_speed, noct, module_efficiency,
10251025
noct_adj = noct + _adj_for_mounting_standoff(mount_standoff)
10261026
# [1] Eq. 10.37 isn't clear on exactly what "G" is. SAM SSC code uses
10271027
# poa_global where G appears
1028-
cell_temp_init = irr / 800. * (noct_adj - 20.)
1028+
irr_ratio = Geff / poa_global
1029+
cell_temp_init = (poa_global / 800.0) * (noct_adj - 20.0) * irr_ratio
10291030
tau_alpha = transmittance_absorptance
10301031
heat_loss = 1 - module_efficiency / tau_alpha
10311032
wind_loss = 9.5 / (5.7 + 3.8 * wind_adj)

tests/test_noct_sam_effective_irradiance.py

Whitespace-only changes.

tests/test_pvsystem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ def test_PVSystem_noct_celltemp(mocker):
522522
temp_model_params.update({'transmittance_absorptance': 0.8,
523523
'array_height': 2,
524524
'mount_standoff': 2.0})
525-
expected = 60.477703576
525+
expected =62.877666
526+
526527
system = pvsystem.PVSystem(temperature_model_parameters=temp_model_params)
527528
out = system.get_cell_temperature(poa_global, temp_air, wind_speed,
528529
effective_irradiance=1100.,

tests/test_temperature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def test_noct_sam_against_sam():
323323
module_efficiency, effective_irradiance,
324324
transmittance_absorptance, array_height,
325325
mount_standoff)
326-
expected = 43.0655
326+
expected = 43.024616
327327
# rtol from limited SAM output precision
328328
assert_allclose(result, expected, rtol=1e-5)
329329

@@ -339,7 +339,7 @@ def test_noct_sam_options():
339339
module_efficiency, effective_irradiance,
340340
transmittance_absorptance, array_height,
341341
mount_standoff)
342-
expected = 60.477703576
342+
expected = 62.877666
343343
assert_allclose(result, expected)
344344

345345

0 commit comments

Comments
 (0)