forked from pvlib/pvlib-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemperature.py
More file actions
1604 lines (1285 loc) · 59.3 KB
/
temperature.py
File metadata and controls
1604 lines (1285 loc) · 59.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
The ``temperature`` module contains functions for modeling temperature of
PV modules and cells.
"""
import numpy as np
import pandas as pd
from pvlib.tools import sind
from pvlib._deprecation import warn_deprecated
from pvlib.tools import _get_sample_intervals
import scipy
import scipy.constants
import warnings
TEMPERATURE_MODEL_PARAMETERS = {
'sapm': {
'open_rack_glass_glass': {'a': -3.47, 'b': -.0594, 'deltaT': 3},
'close_mount_glass_glass': {'a': -2.98, 'b': -.0471, 'deltaT': 1},
'open_rack_glass_polymer': {'a': -3.56, 'b': -.0750, 'deltaT': 3},
'insulated_back_glass_polymer': {'a': -2.81, 'b': -.0455, 'deltaT': 0},
},
'pvsyst': {'freestanding': {'u_c': 29.0, 'u_v': 0},
'insulated': {'u_c': 15.0, 'u_v': 0},
'semi_integrated': {'u_c': 20.0, 'u_v': 0}}
}
"""Dictionary of temperature parameters organized by model.
There are keys for each model at the top level. Currently there are two models,
``'sapm'`` for the Sandia Array Performance Model, and ``'pvsyst'``. Each model
has a dictionary of configurations; a value is itself a dictionary containing
model parameters. Retrieve parameters by indexing the model and configuration
by name. Note: the keys are lower-cased and case sensitive.
Example
-------
Retrieve the open rack glass-polymer configuration for SAPM::
from pvlib.temperature import TEMPERATURE_MODEL_PARAMETERS
temperature_model_parameters = (
TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_polymer'])
# {'a': -3.56, 'b': -0.075, 'deltaT': 3}
"""
def _temperature_model_params(model, parameter_set):
try:
params = TEMPERATURE_MODEL_PARAMETERS[model]
return params[parameter_set]
except KeyError:
msg = ('{} is not a named set of parameters for the {} cell'
' temperature model.'
' See pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS'
' for names'.format(parameter_set, model))
raise KeyError(msg)
def sapm_cell(poa_global, temp_air, wind_speed, a, b, deltaT,
irrad_ref=1000.):
r'''
Calculate cell temperature per the Sandia Array Performance Model.
See [1]_ for details on the Sandia Array Performance Model.
Parameters
----------
poa_global : numeric
Total incident irradiance [W/m^2].
temp_air : numeric
Ambient dry bulb temperature [C].
wind_speed : numeric
Wind speed at a height of 10 meters [m/s].
a : float
Parameter :math:`a` in :eq:`sapm1`.
b : float
Parameter :math:`b` in :eq:`sapm1`.
deltaT : float
Parameter :math:`\Delta T` in :eq:`sapm2` [C].
irrad_ref : float, default 1000
Reference irradiance, parameter :math:`E_{0}` in
:eq:`sapm2` [W/m^2].
Returns
-------
numeric, values in degrees C.
Notes
-----
The model for cell temperature :math:`T_{C}` is given by a pair of
equations (Eq. 11 and 12 in [1]_).
.. math::
:label: sapm1
T_{m} = E \times \exp (a + b \times WS) + T_{a}
.. math::
:label: sapm2
T_{C} = T_{m} + \frac{E}{E_{0}} \Delta T
The module back surface temperature :math:`T_{m}` is implemented in
:py:func:`~pvlib.temperature.sapm_module`.
Inputs to the model are plane-of-array irradiance :math:`E` (W/m2) and
ambient air temperature :math:`T_{a}` (C). Model parameters depend both on
the module construction and its mounting. Parameter sets are provided in
[1]_ for representative modules and mounting, and are coded for convenience
in :data:`~pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS`.
+---------------+----------------+-------+---------+---------------------+
| Module | Mounting | a | b | :math:`\Delta T [C]`|
+===============+================+=======+=========+=====================+
| glass/glass | open rack | -3.47 | -0.0594 | 3 |
+---------------+----------------+-------+---------+---------------------+
| glass/glass | close mount | -2.98 | -0.0471 | 1 |
+---------------+----------------+-------+---------+---------------------+
| glass/polymer | open rack | -3.56 | -0.075 | 3 |
+---------------+----------------+-------+---------+---------------------+
| glass/polymer | insulated back | -2.81 | -0.0455 | 0 |
+---------------+----------------+-------+---------+---------------------+
Mounting cases can be described in terms of air flow across and around the
rear-facing surface of the module:
* "open rack" refers to mounting that allows relatively free air flow.
This case is typical of ground-mounted systems on fixed racking or
single axis trackers.
* "close mount" refers to limited or restricted air flow. This case is
typical of roof-mounted systems with some gap behind the module.
* "insulated back" refers to systems with no air flow contacting the rear
surface of the module. This case is typical of building-integrated PV
systems, or systems laid flat on a ground surface.
References
----------
.. [1] King, D. et al, 2004, "Sandia Photovoltaic Array Performance
Model", SAND Report 3535, Sandia National Laboratories, Albuquerque,
NM.
See also
--------
sapm_cell_from_module
sapm_module
Examples
--------
>>> from pvlib.temperature import sapm_cell, TEMPERATURE_MODEL_PARAMETERS
>>> params = TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_glass']
>>> sapm_cell(1000, 10, 0, **params)
44.11703066106086
'''
module_temperature = sapm_module(poa_global, temp_air, wind_speed,
a, b)
return sapm_cell_from_module(module_temperature, poa_global, deltaT,
irrad_ref)
def sapm_module(poa_global, temp_air, wind_speed, a, b):
r'''
Calculate module back surface temperature per the Sandia Array
Performance Model.
See [1]_ for details on the Sandia Array Performance Model.
Parameters
----------
poa_global : numeric
Total incident irradiance [W/m^2].
temp_air : numeric
Ambient dry bulb temperature [C].
wind_speed : numeric
Wind speed at a height of 10 meters [m/s].
a : float
Parameter :math:`a` in :eq:`sapm1mod`.
b : float
Parameter :math:`b` in :eq:`sapm1mod`.
Returns
-------
numeric, values in degrees C.
Notes
-----
The model for module temperature :math:`T_{m}` is given by Eq. 11 in [1]_.
.. math::
:label: sapm1mod
T_{m} = E \times \exp (a + b \times WS) + T_{a}
Inputs to the model are plane-of-array irradiance :math:`E` (W/m2) and
ambient air temperature :math:`T_{a}` (C). Model outputs are surface
temperature at the back of the module :math:`T_{m}` and cell temperature
:math:`T_{C}`. Model parameters depend both on the module construction and
its mounting. Parameter sets are provided in [1]_ for representative
modules and mounting, and are coded for convenience in
:data:`~pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS`.
+---------------+----------------+-------+---------+---------------------+
| Module | Mounting | a | b | :math:`\Delta T [C]`|
+===============+================+=======+=========+=====================+
| glass/glass | open rack | -3.47 | -0.0594 | 3 |
+---------------+----------------+-------+---------+---------------------+
| glass/glass | close mount | -2.98 | -0.0471 | 1 |
+---------------+----------------+-------+---------+---------------------+
| glass/polymer | open rack | -3.56 | -0.075 | 3 |
+---------------+----------------+-------+---------+---------------------+
| glass/polymer | insulated back | -2.81 | -0.0455 | 0 |
+---------------+----------------+-------+---------+---------------------+
Mounting cases can be described in terms of air flow across and around the
rear-facing surface of the module:
* "open rack" refers to mounting that allows relatively free air flow.
This case is typical of ground-mounted systems on fixed racking or
single axis trackers.
* "close mount" refers to limited or restricted air flow. This case is
typical of roof-mounted systems with some gap behind the module.
* "insulated back" refers to systems with no air flow contacting the rear
surface of the module. This case is typical of building-integrated PV
systems, or systems laid flat on a ground surface.
References
----------
.. [1] King, D. et al, 2004, "Sandia Photovoltaic Array Performance
Model", SAND Report 3535, Sandia National Laboratories, Albuquerque,
NM.
See also
--------
sapm_cell
sapm_cell_from_module
'''
return poa_global * np.exp(a + b * wind_speed) + temp_air
def sapm_cell_from_module(module_temperature, poa_global, deltaT,
irrad_ref=1000.):
r'''
Calculate cell temperature from module temperature using the Sandia Array
Performance Model.
See [1]_ for details on the Sandia Array Performance Model.
Parameters
----------
module_temperature : numeric
Temperature of back of module surface [C].
poa_global : numeric
Total incident irradiance [W/m^2].
deltaT : float
Parameter :math:`\Delta T` in :eq:`sapm2_cell_from_mod` [C].
irrad_ref : float, default 1000
Reference irradiance, parameter :math:`E_{0}` in
:eq:`sapm2` [W/m^2].
Returns
-------
numeric, values in degrees C.
Notes
-----
The model for cell temperature :math:`T_{C}` is given by Eq. 12 in [1]_.
.. math::
:label: sapm2_cell_from_mod
T_{C} = T_{m} + \frac{E}{E_{0}} \Delta T
The module back surface temperature :math:`T_{m}` is implemented in
:py:func:`~pvlib.temperature.sapm_module`.
Model parameters depend both on the module construction and its mounting.
Parameter sets are provided in [1]_ for representative modules and
mounting, and are coded for convenience in
:data:`~pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS`.
+---------------+----------------+-------+---------+---------------------+
| Module | Mounting | a | b | :math:`\Delta T [C]`|
+===============+================+=======+=========+=====================+
| glass/glass | open rack | -3.47 | -0.0594 | 3 |
+---------------+----------------+-------+---------+---------------------+
| glass/glass | close mount | -2.98 | -0.0471 | 1 |
+---------------+----------------+-------+---------+---------------------+
| glass/polymer | open rack | -3.56 | -0.075 | 3 |
+---------------+----------------+-------+---------+---------------------+
| glass/polymer | insulated back | -2.81 | -0.0455 | 0 |
+---------------+----------------+-------+---------+---------------------+
Mounting cases can be described in terms of air flow across and around the
rear-facing surface of the module:
* "open rack" refers to mounting that allows relatively free air flow.
This case is typical of ground-mounted systems on fixed racking or
single axis trackers.
* "close mount" refers to limited or restricted air flow. This case is
typical of roof-mounted systems with some gap behind the module.
* "insulated back" refers to systems with no air flow contacting the rear
surface of the module. This case is typical of building-integrated PV
systems, or systems laid flat on a ground surface.
References
----------
.. [1] King, D. et al, 2004, "Sandia Photovoltaic Array Performance
Model", SAND Report 3535, Sandia National Laboratories, Albuquerque,
NM.
See also
--------
sapm_cell
sapm_module
'''
return module_temperature + (poa_global / irrad_ref) * deltaT
def pvsyst_cell(poa_global, temp_air, wind_speed=1.0, u_c=29.0, u_v=0.0,
module_efficiency=0.1, alpha_absorption=0.9):
r"""
Calculate cell temperature using an empirical heat loss factor model
as implemented in PVsyst.
Parameters
----------
poa_global : numeric
Total incident irradiance [W/m^2].
temp_air : numeric
Ambient dry bulb temperature [C].
wind_speed : numeric, default 1.0
Wind speed in m/s measured at the same height for which the wind loss
factor was determined. The default value 1.0 m/s is the wind
speed at module height used to determine NOCT. [m/s]
u_c : float, default 29.0
Combined heat loss factor coefficient. The default value is
representative of freestanding modules with the rear surfaces exposed
to open air (e.g., rack mounted). Parameter :math:`U_{c}` in
:eq:`pvsyst`.
:math:`\left[\frac{\text{W}/{\text{m}^2}}{\text{C}}\right]`
u_v : float, default 0.0
Combined heat loss factor influenced by wind. Parameter :math:`U_{v}`
in :eq:`pvsyst`.
:math:`\left[ \frac{\text{W}/\text{m}^2}{\text{C}\ \left( \text{m/s} \right)} \right]`
module_efficiency : numeric, default 0.1
Module external efficiency as a fraction. Parameter :math:`\eta_{m}`
in :eq:`pvsyst`. Calculate as
:math:`\eta_{m} = DC\ power / (POA\ irradiance \times module\ area)`.
alpha_absorption : numeric, default 0.9
Absorption coefficient. Parameter :math:`\alpha` in :eq:`pvsyst`.
Returns
-------
numeric, values in degrees Celsius
Notes
-----
The Pvsyst model for cell temperature :math:`T_{C}` is given by
.. math::
:label: pvsyst
T_{C} = T_{a} + \frac{\alpha E (1 - \eta_{m})}{U_{c} + U_{v} \times WS}
Inputs to the model are plane-of-array irradiance :math:`E` (W/m2), ambient
air temperature :math:`T_{a}` (C) and wind speed :math:`WS` (m/s). Model
output is cell temperature :math:`T_{C}`. Model parameters depend both on
the module construction and its mounting. Parameters are provided in
[1]_ for open (freestanding), close (insulated), and intermediate
(semi_integrated) mounting configurations, and are coded for convenience in
:data:`~pvlib.temperature.TEMPERATURE_MODEL_PARAMETERS`. The heat loss
factors provided represent the combined effect of convection, radiation and
conduction, and their values are experimentally determined.
+-----------------+---------------+---------------+
| Mounting | :math:`U_{c}` | :math:`U_{v}` |
+=================+===============+===============+
| freestanding | 29.0 | 0.0 |
+-----------------+---------------+---------------+
| insulated | 15.0 | 0.0 |
+-----------------+---------------+---------------+
| semi_integrated | 20.0 | 0.0 |
+-----------------+---------------+---------------+
Mounting cases can be described in terms of air flow across and around the
rear-facing surface of the module:
* "freestanding" refers to mounting that allows relatively free air
circulation around the modules. This case is typical of ground-mounted
systems on tilted, fixed racking or single axis trackers.
* "insulated" refers to mounting with air flow across only the front
surface. This case is typical of roof-mounted systems with no gap
behind the module.
References
----------
.. [1] "PVsyst 7 Help", [Online]. Available:
https://www.pvsyst.com/help/index.html?thermal_loss.htm.
[Accessed: 30-Jan-2024].
.. [2] Faiman, D. (2008). "Assessing the outdoor operating temperature of
photovoltaic modules." Progress in Photovoltaics 16(4): 307-315.
Examples
--------
>>> from pvlib.temperature import pvsyst_cell, TEMPERATURE_MODEL_PARAMETERS
>>> params = TEMPERATURE_MODEL_PARAMETERS['pvsyst']['freestanding']
>>> pvsyst_cell(1000, 10, **params)
37.93103448275862
""" # noQA: E501
total_loss_factor = u_c + u_v * wind_speed
heat_input = poa_global * alpha_absorption * (1 - module_efficiency)
temp_difference = heat_input / total_loss_factor
return temp_air + temp_difference
def faiman(poa_global, temp_air, wind_speed=1.0, u0=25.0, u1=6.84):
r'''
Calculate cell or module temperature using the Faiman model.
The Faiman model uses an empirical heat loss factor model [1]_ and is
adopted in the IEC 61853 standards [2]_ and [3]_.
Usage of this model in the IEC 61853 standard does not distinguish
between cell and module temperature.
Parameters
----------
poa_global : numeric
Total incident irradiance [W/m^2].
temp_air : numeric
Ambient dry bulb temperature [C].
wind_speed : numeric, default 1.0
Wind speed in m/s measured at the same height for which the wind loss
factor was determined. The default value 1.0 m/s is the wind
speed at module height used to determine NOCT. [m/s]
u0 : numeric, default 25.0
Combined heat loss factor coefficient. The default value is one
determined by Faiman for 7 silicon modules
in the Negev desert on an open rack at 30.9° tilt.
:math:`\left[\frac{\text{W}/{\text{m}^2}}{\text{C}}\right]`
u1 : numeric, default 6.84
Combined heat loss factor influenced by wind. The default value is one
determined by Faiman for 7 silicon modules
in the Negev desert on an open rack at 30.9° tilt.
:math:`\left[ \frac{\text{W}/\text{m}^2}{\text{C}\ \left( \text{m/s} \right)} \right]`
Returns
-------
numeric, values in degrees Celsius
Notes
-----
All arguments may be scalars or vectors. If multiple arguments
are vectors they must be the same length.
References
----------
.. [1] Faiman, D. (2008). "Assessing the outdoor operating temperature of
photovoltaic modules." Progress in Photovoltaics 16(4): 307-315.
:doi:`10.1002/pip.813`
.. [2] "IEC 61853-2 Photovoltaic (PV) module performance testing and energy
rating - Part 2: Spectral responsivity, incidence angle and module
operating temperature measurements". IEC, Geneva, 2018.
.. [3] "IEC 61853-3 Photovoltaic (PV) module performance testing and energy
rating - Part 3: Energy rating of PV modules". IEC, Geneva, 2018.
See also
--------
pvlib.temperature.faiman_rad
''' # noQA: E501
# Contributed by Anton Driesse (@adriesse), PV Performance Labs. Dec., 2019
# The following lines may seem odd since u0 & u1 are probably scalar,
# but it serves an indirect and easy way of allowing lists and
# tuples for the other function arguments.
u0 = np.asanyarray(u0)
u1 = np.asanyarray(u1)
total_loss_factor = u0 + u1 * wind_speed
heat_input = poa_global
temp_difference = heat_input / total_loss_factor
return temp_air + temp_difference
def faiman_rad(poa_global, temp_air, wind_speed=1.0, ir_down=None,
u0=25.0, u1=6.84, sky_view=1.0, emissivity=0.88):
r'''
Calculate cell or module temperature using the Faiman model augmented
with a radiative loss term.
The Faiman model uses an empirical heat loss factor model [1]_ and is
adopted in the IEC 61853 standards [2]_ and [3]_. The radiative loss
term was proposed and developed by Driesse [4]_.
The model can be used to represent cell or module temperature.
Parameters
----------
poa_global : numeric
Total incident irradiance [W/m^2].
temp_air : numeric
Ambient dry bulb temperature [C].
wind_speed : numeric, default 1.0
Wind speed measured at the same height for which the wind loss
factor was determined. The default value 1.0 m/s is the wind
speed at module height used to determine NOCT. [m/s]
ir_down : numeric, default 0.0
Downwelling infrared radiation from the sky, measured on a horizontal
surface. [W/m^2]
u0 : numeric, default 25.0
Combined heat loss factor coefficient. The default value is one
determined by Faiman for 7 silicon modules
in the Negev desert on an open rack at 30.9° tilt.
:math:`\left[\frac{\text{W}/{\text{m}^2}}{\text{C}}\right]`
u1 : numeric, default 6.84
Combined heat loss factor influenced by wind. The default value is one
determined by Faiman for 7 silicon modules
in the Negev desert on an open rack at 30.9° tilt.
:math:`\left[ \frac{\text{W}/\text{m}^2}{\text{C}\ \left( \text{m/s} \right)} \right]`
sky_view : numeric, default 1.0
Effective view factor limiting the radiative exchange between the
module and the sky. For a tilted array the expressions
(1 + 3*cos(tilt)) / 4 can be used as a first estimate for sky_view
as discussed in [4]_. The default value is for a horizontal module.
[unitless]
emissivity : numeric, default 0.88
Infrared emissivity of the module surface facing the sky. The default
value represents the middle of a range of values found in the
literature. [unitless]
Returns
-------
numeric, values in degrees Celsius
Notes
-----
All arguments may be scalars or vectors. If multiple arguments
are vectors they must be the same length.
When only irradiance, air temperature and wind speed inputs are provided
(`ir_down` is `None`) this function calculates the same device temperature
as the original faiman model. When down-welling long-wave radiation data
are provided as well (`ir_down` is not None) the default u0 and u1 values
from the original model should not be used because a portion of the
radiative losses would be double-counted.
References
----------
.. [1] Faiman, D. (2008). "Assessing the outdoor operating temperature of
photovoltaic modules." Progress in Photovoltaics 16(4): 307-315.
:doi:`10.1002/pip.813`
.. [2] "IEC 61853-2 Photovoltaic (PV) module performance testing and energy
rating - Part 2: Spectral responsivity, incidence angle and module
operating temperature measurements". IEC, Geneva, 2018.
.. [3] "IEC 61853-3 Photovoltaic (PV) module performance testing and energy
rating - Part 3: Energy rating of PV modules". IEC, Geneva, 2018.
.. [4] Driesse, A. et al (2022) "Improving Common PV Module Temperature
Models by Incorporating Radiative Losses to the Sky". SAND2022-11604.
:doi:`10.2172/1884890`
See also
--------
pvlib.temperature.faiman
''' # noQA: E501
# Contributed by Anton Driesse (@adriesse), PV Performance Labs. Nov., 2022
abs_zero = -273.15
sigma = scipy.constants.Stefan_Boltzmann
if ir_down is None:
qrad_sky = 0.0
else:
ir_up = sigma * ((temp_air - abs_zero)**4)
qrad_sky = emissivity * sky_view * (ir_up - ir_down)
heat_input = poa_global - qrad_sky
total_loss_factor = u0 + u1 * wind_speed
temp_difference = heat_input / total_loss_factor
return temp_air + temp_difference
def ross(poa_global, temp_air, noct=None, k=None):
r'''
Calculate cell temperature using the Ross model.
The Ross model [1]_ assumes the difference between cell temperature
and ambient temperature is proportional to the plane of array irradiance,
and assumes wind speed of 1 m/s. The model implicitly assumes steady or
slowly changing irradiance conditions.
Parameters
----------
poa_global : numeric
Total incident irradiance. [W/m⁻²]
temp_air : numeric
Ambient dry bulb temperature. [C]
noct : numeric, optional
Nominal operating cell temperature [C], determined at conditions of
800 W/m⁻² irradiance, 20 C ambient air temperature and 1 m/s wind.
If ``noct`` is not provided, ``k`` is required.
k: numeric, optional
Ross coefficient [Km²W⁻¹], which is an alternative to employing
NOCT in Ross's equation. If ``k`` is not provided, ``noct`` is
required.
Returns
-------
cell_temperature : numeric
Cell temperature. [C]
Notes
-----
The Ross model for cell temperature :math:`T_{C}` is given in [1]_ as
.. math::
T_{C} = T_{a} + \frac{NOCT - 20}{80} S = T_{a} + k × S
where :math:`S` is the plane of array irradiance in mWcm⁻².
This function expects irradiance in Wm⁻².
Representative values for k are provided in [2]_, covering different types
of mounting and degrees of back ventialtion. The naming designations,
however, are adapted from [3]_ to enhance clarity and usability.
+--------------------------------------+-----------+
| Mounting | :math:`k` |
+======================================+===========+
| Sloped roof, well ventilated | 0.02 |
+--------------------------------------+-----------+
| Free-standing system | 0.0208 |
+--------------------------------------+-----------+
| Flat roof, well ventilated | 0.026 |
+--------------------------------------+-----------+
| Sloped roof, poorly ventilated | 0.0342 |
+--------------------------------------+-----------+
| Facade integrated, semi-ventilated | 0.0455 |
+--------------------------------------+-----------+
| Facade integrated, poorly ventilated | 0.0538 |
+--------------------------------------+-----------+
| Sloped roof, non-ventilated | 0.0563 |
+--------------------------------------+-----------+
It is also worth noting that the semi-ventilated facade case refers to
partly transparent compound glass insulation modules, while the non-
ventilated case corresponds to opaque, insulated PV-cladding elements.
However, the emphasis in [3]_ appears to be on ventilation conditions
rather than module construction.
References
----------
.. [1] Ross, R. G. Jr., (1981). "Design Techniques for Flat-Plate
Photovoltaic Arrays". 15th IEEE Photovoltaic Specialist Conference,
Orlando, FL.
.. [2] E. Skoplaki and J. A. Palyvos, "Operating temperature of
photovoltaic modules: A survey of pertinent correlations," Renewable
Energy, vol. 34, no. 1, pp. 23–29, Jan. 2009,
:doi:`10.1016/j.renene.2008.04.009`
.. [3] T. Nordmann and L. Clavadetscher, "Understanding temperature
effects on PV system performance," Proceedings of 3rd World Conference
on Photovoltaic Energy Conversion, May 2003.
'''
if (noct is None) & (k is None):
raise ValueError("Either noct or k is required.")
elif (noct is not None) & (k is not None):
raise ValueError("Provide only one of noct or k, not both.")
elif k is None:
# factor of 0.1 converts irradiance from W/m2 to mW/cm2
return temp_air + (noct - 20.) / 80. * poa_global * 0.1
elif noct is None:
# k assumes irradiance in W.m-2, dismissing 0.1 factor
return temp_air + k * poa_global
def _fuentes_hconv(tave, windmod, temp_delta, xlen, tilt, check_reynold):
# Calculate the convective coefficient as in Fuentes 1987 -- a mixture of
# free, laminar, and turbulent convection.
densair = 0.003484 * 101325.0 / tave # density
visair = 0.24237e-6 * tave**0.76 / densair # kinematic viscosity
condair = 2.1695e-4 * tave**0.84 # thermal conductivity
reynold = windmod * xlen / visair
# the boundary between laminar and turbulent is modeled as an abrupt
# change at Re = 1.2e5:
if check_reynold and reynold > 1.2e5:
# turbulent convection
hforce = 0.0282 / reynold**0.2 * densair * windmod * 1007 / 0.71**0.4
else:
# laminar convection
hforce = 0.8600 / reynold**0.5 * densair * windmod * 1007 / 0.71**0.67
# free convection via Grashof number
# NB: Fuentes hardwires sind(tilt) as 0.5 for tilt=30
grashof = 9.8 / tave * temp_delta * xlen**3 / visair**2 * sind(tilt)
# product of Nusselt number and (k/l)
hfree = 0.21 * (grashof * 0.71)**0.32 * condair / xlen
# combine free and forced components
hconv = (hfree**3 + hforce**3)**(1/3)
return hconv
def _hydraulic_diameter(width, height):
# calculate the hydraulic diameter of a rectangle
return 2 * (width * height) / (width + height)
def fuentes(poa_global, temp_air, wind_speed, noct_installed, module_height=5,
wind_height=9.144, emissivity=0.84, absorption=0.83,
surface_tilt=30, module_width=0.31579, module_length=1.2):
"""
Calculate cell or module temperature using the Fuentes model.
The Fuentes model is a first-principles heat transfer energy balance
model [1]_ that is used in PVWatts for cell temperature modeling [2]_.
Parameters
----------
poa_global : pandas Series
Total incident irradiance [W/m^2]
temp_air : pandas Series
Ambient dry bulb temperature [C]
wind_speed : pandas Series
Wind speed [m/s]
noct_installed : float
The "installed" nominal operating cell temperature as defined in [1]_.
PVWatts assumes this value to be 45 C for rack-mounted arrays and
49 C for roof mount systems with restricted air flow around the
module. [C]
module_height : float, default 5.0
The height above ground of the center of the module. The PVWatts
default is 5.0 [m]
wind_height : float, default 9.144
The height above ground at which ``wind_speed`` is measured. The
PVWatts default is 9.144 [m]
emissivity : float, default 0.84
The effectiveness of the module at radiating thermal energy. [unitless]
absorption : float, default 0.83
The fraction of incident irradiance that is converted to thermal
energy in the module. [unitless]
surface_tilt : float, default 30
Module tilt from horizontal. If not provided, the default value
of 30 degrees from [1]_ and [2]_ is used. [degrees]
module_width : float, default 0.31579
Module width. The default value of 0.31579 meters in combination with
the default `module_length` gives a hydraulic diameter of 0.5 as
assumed in [1]_ and [2]_. [m]
module_length : float, default 1.2
Module length. The default value of 1.2 meters in combination with
the default `module_width` gives a hydraulic diameter of 0.5 as
assumed in [1]_ and [2]_. [m]
Returns
-------
temperature_cell : pandas Series
The modeled cell temperature [C]
Notes
-----
This function returns slightly different values from PVWatts at night
and just after dawn. This is because the SAM SSC assumes that module
temperature equals ambient temperature when irradiance is zero so it can
skip the heat balance calculation at night.
References
----------
.. [1] Fuentes, M. K., 1987, "A Simplifed Thermal Model for Flat-Plate
Photovoltaic Arrays", SAND85-0330, Sandia National Laboratories,
Albuquerque NM.
http://prod.sandia.gov/techlib/access-control.cgi/1985/850330.pdf
.. [2] Dobos, A. P., 2014, "PVWatts Version 5 Manual", NREL/TP-6A20-62641,
National Renewable Energy Laboratory, Golden CO.
:doi:`10.2172/1158421`.
"""
# ported from the FORTRAN77 code provided in Appendix A of Fuentes 1987;
# nearly all variable names are kept the same for ease of comparison.
boltz = 5.669e-8
emiss = emissivity
absorp = absorption
xlen = _hydraulic_diameter(module_width, module_length)
# cap0 has units of [J / (m^2 K)], equal to mass per unit area times
# specific heat of the module.
cap0 = 11000
tinoct = noct_installed + 273.15
# convective coefficient of top surface of module at NOCT
windmod = 1.0
tave = (tinoct + 293.15) / 2
hconv = _fuentes_hconv(tave, windmod, tinoct - 293.15, xlen,
surface_tilt, False)
# determine the ground temperature ratio and the ratio of the total
# convection to the top side convection
hground = emiss * boltz * (tinoct**2 + 293.15**2) * (tinoct + 293.15)
backrat = (
absorp * 800.0
- emiss * boltz * (tinoct**4 - 282.21**4)
- hconv * (tinoct - 293.15)
) / ((hground + hconv) * (tinoct - 293.15))
tground = (tinoct**4 - backrat * (tinoct**4 - 293.15**4))**0.25
tground = np.clip(tground, 293.15, tinoct)
tgrat = (tground - 293.15) / (tinoct - 293.15)
convrat = (absorp * 800 - emiss * boltz * (
2 * tinoct**4 - 282.21**4 - tground**4)) / (hconv * (tinoct - 293.15))
# adjust the capacitance (thermal mass) of the module based on the INOCT.
# It is a function of INOCT because high INOCT implies thermal coupling
# with the racking (e.g. roofmount), so the thermal mass is increased.
# `cap` has units J/(m^2 C) -- see Table 3, Equations 26 & 27
cap = cap0
if tinoct > 321.15:
cap = cap * (1 + (tinoct - 321.15) / 12)
# iterate through timeseries inputs
sun0 = 0
# n.b. the way Fuentes calculates the first timedelta makes it seem like
# the value doesn't matter -- rather than recreate it here, just assume
# it's the same as the second timedelta:
timedelta_seconds = poa_global.index.to_series().diff().dt.total_seconds()
timedelta_hours = timedelta_seconds / 3600
timedelta_hours.iloc[0] = timedelta_hours.iloc[1]
tamb_array = temp_air + 273.15
sun_array = poa_global * absorp
# Two of the calculations are easily vectorized, so precalculate them:
# sky temperature -- Equation 24
tsky_array = 0.68 * (0.0552 * tamb_array**1.5) + 0.32 * tamb_array
# wind speed at module height -- Equation 22
# not sure why the 1e-4 factor is included -- maybe the equations don't
# behave well if wind == 0?
windmod_array = wind_speed * (module_height/wind_height)**0.2 + 1e-4
tmod0 = 293.15
tmod_array = np.zeros_like(poa_global)
iterator = zip(tamb_array, sun_array, windmod_array, tsky_array,
timedelta_hours)
for i, (tamb, sun, windmod, tsky, dtime) in enumerate(iterator):
# solve the heat transfer equation, iterating because the heat loss
# terms depend on tmod. NB Fuentes doesn't show that 10 iterations is
# sufficient for convergence.
tmod = tmod0
for j in range(10):
# overall convective coefficient
tave = (tmod + tamb) / 2
hconv = convrat * _fuentes_hconv(tave, windmod,
abs(tmod-tamb), xlen,
surface_tilt, True)
# sky radiation coefficient (Equation 3)
hsky = emiss * boltz * (tmod**2 + tsky**2) * (tmod + tsky)
# ground radiation coeffieicient (Equation 4)
tground = tamb + tgrat * (tmod - tamb)
hground = emiss * boltz * (tmod**2 + tground**2) * (tmod + tground)
# thermal lag -- Equation 8
eigen = - (hconv + hsky + hground) / cap * dtime * 3600
# not sure why this check is done, maybe as a speed optimization?
if eigen > -10:
ex = np.exp(eigen)
else:
ex = 0
# Equation 7 -- note that `sun` and `sun0` already account for
# absorption (alpha)
tmod = tmod0 * ex + (
(1 - ex) * (
hconv * tamb
+ hsky * tsky
+ hground * tground
+ sun0
+ (sun - sun0) / eigen
) + sun - sun0
) / (hconv + hsky + hground)
tmod_array[i] = tmod
tmod0 = tmod
sun0 = sun
return pd.Series(tmod_array - 273.15, index=poa_global.index, name='tmod')
def _adj_for_mounting_standoff(x):
# supports noct cell temperature function. Except for x > 3.5, the SAM code
# and documentation aren't clear on the precise intervals. The choice of
# < or <= here is pvlib's.
return np.piecewise(x, [x <= 0, (x > 0) & (x < 0.5),
(x >= 0.5) & (x < 1.5), (x >= 1.5) & (x < 2.5),
(x >= 2.5) & (x <= 3.5), x > 3.5],
[0., 18., 11., 6., 2., 0.])
def noct_sam(poa_global, temp_air, wind_speed, noct, module_efficiency,
effective_irradiance=None, transmittance_absorptance=0.9,
array_height=1, mount_standoff=4):
r'''
Cell temperature model from the System Advisor Model (SAM).
The model is described in [1]_, Section 10.6.
Parameters
----------
poa_global : numeric
Total incident irradiance. [W/m^2]
temp_air : numeric
Ambient dry bulb temperature. [C]
wind_speed : numeric
Wind speed in m/s measured at the same height for which the wind loss
factor was determined. The default value 1.0 m/s is the wind
speed at module height used to determine NOCT. [m/s]
noct : float
Nominal operating cell temperature [C], determined at conditions of
800 W/m^2 irradiance, 20 C ambient air temperature and 1 m/s wind.
module_efficiency : float
Module external efficiency [unitless] at reference conditions of
1000 W/m^2 and 20C. Denoted as :math:`eta_{m}` in [1]_. Calculate as
:math:`\eta_{m} = \frac{V_{mp} I_{mp}}{A \times 1000 W/m^2}`
where A is module area [m^2].
effective_irradiance : numeric, optional
The irradiance that is converted to photocurrent. If not specified,
assumed equal to poa_global. [W/m^2]
transmittance_absorptance : numeric, default 0.9
Coefficient for combined transmittance and absorptance effects.
[unitless]
array_height : int, default 1
Height of array above ground in stories (one story is about 3m). Must
be either 1 or 2. For systems elevated less than one story, use 1.
If system is elevated more than two stories, use 2.
mount_standoff : numeric, default 4
Distance between array mounting and mounting surface. Use default
if system is ground-mounted. [inches]
Returns
-------
cell_temperature : numeric
Cell temperature. [C]
Raises
------
ValueError
If array_height is an invalid value (must be 1 or 2).
References
----------