|
| 1 | +from __future__ import division |
| 2 | + |
1 | 3 | import logging
|
2 | 4 | pvl_logger = logging.getLogger('pvlib')
|
3 | 5 |
|
@@ -676,104 +678,93 @@ def sapm(Module,Eb,Ediff,Tcell,AM,AOI):
|
676 | 678 | return DFOut
|
677 | 679 |
|
678 | 680 |
|
679 |
| -def sapmcelltemp(E, Wspd, Tamb,modelt='Open_rack_cell_glassback',**kwargs): |
| 681 | +def sapm_celltemp(irrad, wind, temp, model='open_rack_cell_glassback'): |
680 | 682 | '''
|
681 |
| - Estimate cell temperature from irradiance, windspeed, ambient temperature, and module parameters (SAPM) |
682 |
| -
|
683 | 683 | Estimate cell and module temperatures per the Sandia PV Array
|
684 | 684 | Performance model (SAPM, SAND2004-3535), when given the incident
|
685 | 685 | irradiance, wind speed, ambient temperature, and SAPM module
|
686 | 686 | parameters.
|
687 | 687 |
|
688 | 688 | Parameters
|
689 | 689 | ----------
|
| 690 | + irrad : float or DataFrame |
| 691 | + Total incident irradiance in W/m^2. |
690 | 692 |
|
691 |
| - E : float or DataFrame |
692 |
| - Total incident irradiance in W/m^2. Must be >=0. |
693 |
| -
|
694 |
| -
|
695 |
| - windspeed : float or DataFrame |
696 |
| - Wind speed in m/s at a height of 10 meters. Must be >=0 |
697 |
| -
|
698 |
| - Tamb : float or DataFrame |
699 |
| - Ambient dry bulb temperature in degrees C. Must be >= -273.15. |
700 |
| -
|
701 |
| -
|
702 |
| - Other Parameters |
703 |
| - ---------------- |
| 693 | + wind : float or DataFrame |
| 694 | + Wind speed in m/s at a height of 10 meters. |
704 | 695 |
|
705 |
| - modelt : string |
| 696 | + temp : float or DataFrame |
| 697 | + Ambient dry bulb temperature in degrees C. |
706 | 698 |
|
707 |
| - Model to be used for parameters, can be: |
| 699 | + model : string or list |
| 700 | + Model to be used. |
| 701 | + |
| 702 | + If string, can be: |
708 | 703 |
|
709 | 704 | * 'Open_rack_cell_glassback' (DEFAULT)
|
710 | 705 | * 'Roof_mount_cell_glassback'
|
711 | 706 | * 'Open_rack_cell_polymerback'
|
712 | 707 | * 'Insulated_back_polumerback'
|
713 | 708 | * 'Open_rack_Polymer_thinfilm_steel'
|
714 | 709 | * '22X_Concentrator_tracker'
|
715 |
| -
|
716 |
| - a : float (optional) |
717 |
| - SAPM module parameter for establishing the upper limit for module |
718 |
| - temperature at low wind speeds and high solar irradiance (see SAPM |
719 |
| - eqn. 11). Must be a scalar.If not input, this value will be taken from the chosen |
720 |
| - model |
721 |
| - b : float (optional) |
722 |
| -
|
723 |
| - SAPM module parameter for establishing the rate at which the module |
724 |
| - temperature drops as wind speed increases (see SAPM eqn. 11). Must be |
725 |
| - a scalar.If not input, this value will be taken from the chosen |
726 |
| - model |
727 |
| -
|
728 |
| - deltaT : float (optional) |
729 |
| -
|
730 |
| - SAPM module parameter giving the temperature difference |
731 |
| - between the cell and module back surface at the reference irradiance, |
732 |
| - E0. Must be a numeric scalar >=0. If not input, this value will be taken from the chosen |
733 |
| - model |
| 710 | + |
| 711 | + If list, supply the following parameters in the following order: |
| 712 | + |
| 713 | + * a : float |
| 714 | + SAPM module parameter for establishing the upper limit for module |
| 715 | + temperature at low wind speeds and high solar irradiance (see SAPM |
| 716 | + eqn. 11). |
| 717 | + |
| 718 | + * b : float |
| 719 | + SAPM module parameter for establishing the rate at which the module |
| 720 | + temperature drops as wind speed increases (see SAPM eqn. 11). Must be |
| 721 | + a scalar. |
| 722 | +
|
| 723 | + * deltaT : float |
| 724 | + SAPM module parameter giving the temperature difference |
| 725 | + between the cell and module back surface at the reference irradiance, |
| 726 | + E0. |
734 | 727 |
|
735 | 728 | Returns
|
736 | 729 | --------
|
737 |
| - Tcell : float or DataFrame |
738 |
| - Cell temperatures in degrees C. |
739 |
| -
|
740 |
| - Tmodule : float or DataFrame |
741 |
| - Module back temperature in degrees C. |
| 730 | + dict with keys tcell and tmodule. Values in degrees C. |
742 | 731 |
|
743 | 732 | References
|
744 | 733 | ----------
|
745 |
| -
|
746 |
| - [1] King, D. et al, 2004, "Sandia Photovoltaic Array Performance Model", SAND Report |
747 |
| - 3535, Sandia National Laboratories, Albuquerque, NM |
| 734 | + [1] King, D. et al, 2004, "Sandia Photovoltaic Array Performance Model", |
| 735 | + SAND Report 3535, Sandia National Laboratories, Albuquerque, NM. |
748 | 736 |
|
749 | 737 | See Also
|
750 | 738 | --------
|
751 |
| -
|
752 |
| - pvl_sapm |
| 739 | + sapm |
753 | 740 | '''
|
754 | 741 |
|
755 |
| - TempModel={'Open_rack_cell_glassback':[-3.47, -.0594, 3], |
756 |
| - 'Roof_mount_cell_glassback':[-2.98, -.0471, 1], |
757 |
| - 'Open_rack_cell_polymerback': [-3.56, -.0750, 3], |
758 |
| - 'Insulated_back_polumerback': [-2.81, -.0455, 0 ], |
759 |
| - 'Open_rack_Polymer_thinfilm_steel':[-3.58, -.113, 3], |
760 |
| - '22X_Concentrator_tracker':[-3.23, -.130, 13] |
761 |
| - } |
762 |
| - try: |
763 |
| - a=a |
764 |
| - b=b |
765 |
| - deltaT=deltaT |
766 |
| - except: |
767 |
| - a=TempModel[modelt][0] |
768 |
| - b=TempModel[modelt][1] |
769 |
| - deltaT=TempModel[modelt][2] |
770 |
| - |
771 |
| - E0=1000 # Reference irradiance |
772 |
| - Tmodule=E*((np.exp(a + b*Wspd))) + Tamb |
773 |
| - |
774 |
| - Tcell=Tmodule + E / E0*(deltaT) |
775 |
| - |
776 |
| - return pd.DataFrame({'Tcell':Tcell,'Tmodule':Tmodule}) |
| 742 | + temp_models = {'open_rack_cell_glassback':[-3.47, -.0594, 3], |
| 743 | + 'roof_mount_cell_glassback':[-2.98, -.0471, 1], |
| 744 | + 'open_rack_cell_polymerback': [-3.56, -.0750, 3], |
| 745 | + 'insulated_back_polumerback': [-2.81, -.0455, 0 ], |
| 746 | + 'open_rack_polymer_thinfilm_steel':[-3.58, -.113, 3], |
| 747 | + '22x_concentrator_tracker':[-3.23, -.130, 13] |
| 748 | + } |
| 749 | + |
| 750 | + if isinstance(model, str): |
| 751 | + model = temp_models[model.lower()] |
| 752 | + elif isinstance(model, list): |
| 753 | + model = model |
| 754 | + |
| 755 | + a = model[0] |
| 756 | + b = model[1] |
| 757 | + deltaT = model[2] |
| 758 | + |
| 759 | + E0 = 1000. # Reference irradiance |
| 760 | + |
| 761 | + tmodule = irrad*np.exp(a + b*wind) + temp |
| 762 | + |
| 763 | + tcell = tmodule + (irrad / E0)*(deltaT) |
| 764 | + |
| 765 | + return {'tcell':tcell, 'tmodule':tmodule} |
| 766 | + |
| 767 | + |
777 | 768 |
|
778 | 769 | def singlediode(Module,IL,I0,Rs,Rsh,nNsVth,**kwargs):
|
779 | 770 | '''
|
|
0 commit comments