Skip to content

Commit bfdcf0e

Browse files
placeholder unit tests, some documentation fixes.
1 parent f39c338 commit bfdcf0e

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

pvlib/temperature.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,14 @@ def _calculate_radiative_heat(module_area, view_factor, emissivity,
676676
677677
emissivity : float
678678
# TODO there are probably 2 of these values
679-
Thermal emissivity [unitless]
679+
Thermal emissivity [unitless]. Must be between 0 and 1.
680680
681681
temperature1 : float
682-
Temperature of object 1 [C]
682+
Temperature of object 1 [K]
683683
684684
temperature2 : float
685685
686-
Temperature of object 2 [C]
686+
Temperature of object 2 [K]
687687
Returns
688688
-------
689689
q : float
@@ -745,11 +745,12 @@ def hayes(poa_effective, temp_air, wind_speed, module_efficiency, module_area,
745745
module would be in steady-state equilibrium with the environment
746746
747747
emissivity_sky : float, default 0.95
748-
Thermal emissivity of sky [unitless].
748+
Thermal emissivity of sky [unitless]. Must be between 0 and 1.
749749
750750
emissivity_ground : float, default 0.85
751751
Thermal emissivity of ground [unitless]. Default value is suggested
752-
value for sand. Suggested value for grass is 0.9.
752+
value for sand. Suggested value for grass is 0.9. Must be between
753+
0 and 1.
753754
754755
k_c : float, default 12.7
755756
Free convective heat coefficient. Defaults to value for "hot"
@@ -823,6 +824,7 @@ def hayes(poa_effective, temp_air, wind_speed, module_efficiency, module_area,
823824
temperature1=t_mod_i,
824825
temperature2=t_sky
825826
)
827+
# TODO paper indicates temps equal, but that yields zero q
826828
q_mod_ground = _calculate_radiative_heat(
827829
module_area=module_area,
828830
view_factor=view_factor_mod_ground,

pvlib/tests/test_temperature.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,21 @@ def test_fuentes(filename, inoct):
190190
night_difference = expected_tcell[is_night] - actual_tcell[is_night]
191191
assert night_difference.max() < 6
192192
assert night_difference.min() > 0
193+
194+
195+
def test__calculate_radiative_heat():
196+
# TODO placeholder until final model is validated
197+
q = temperature._calculate_radiative_heat(
198+
module_area=2.47,
199+
view_factor=0.5,
200+
emissivity=0.5,
201+
temperature1=30 + 273.15,
202+
temperature2=10 + 273.15
203+
)
204+
assert round(q, 5) == 70.65021
205+
206+
207+
def test_hayes():
208+
# TODO placeholder until final model is validated
209+
pass
210+

0 commit comments

Comments
 (0)