Skip to content

Commit 45912cc

Browse files
committed
Add tests for effective irradiance behavior in noct_sam
1 parent b7c1264 commit 45912cc

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed
Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +0,0 @@
1-
import numpy as np
2-
from pvlib.temperature import noct_sam
3-
def test_noct_sam_effective_irr_reduces_temp():
4-
# Test that effective irradiance lowers predicted cell temperature
5-
t_full = noct_sam(poa_global=800, temp_air=20, wind_speed=2,
6-
noct=45, module_efficiency=0.20)
7-
# Lower effective irradiance should reduce modeled temperature
8-
t_eff_600 = noct_sam(poa_global=800, temp_air=20, wind_speed=2,
9-
noct=45, module_efficiency=0.20,
10-
effective_irradiance=600)
11-
t_eff_200 = noct_sam(poa_global=800, temp_air=20, wind_speed=2,
12-
noct=45, module_efficiency=0.20,
13-
effective_irradiance=200)
14-
assert t_eff_600 < t_full
15-
assert t_eff_200 < t_eff_600
16-
def test_noct_sam_oc_case_reduces_temp():
17-
# Test that open-circuit modules (efficiency=0) still respond to effective irradiance
18-
t_oc_full = noct_sam(poa_global=800, temp_air=20, wind_speed=2,
19-
noct=45, module_efficiency=0.0)
20-
# Reducing effective irradiance should still lower modeled temperature
21-
t_oc_eff = noct_sam(poa_global=800, temp_air=20, wind_speed=2,
22-
noct=45, module_efficiency=0.0,
23-
effective_irradiance=300)
24-
assert t_oc_eff < t_oc_full
25-
26-
def test_noct_sam_not_below_ambient_for_small_eff():
27-
# Test that extremely small effective irradiance never predicts temperature below ambient
28-
t_small = noct_sam(poa_global=800, temp_air=20, wind_speed=2,
29-
noct=45, module_efficiency=0.20,
30-
effective_irradiance=1.0)
31-
# Allow tiny numerical tolerance
32-
assert t_small >= 20.0 - 1e-6

0 commit comments

Comments
 (0)