solarenergy.solar_panels module¶
Functions for solar energy dealing with solar (PV) panels/modules.
-
class
solarenergy.solar_panels.
SolarPanels
(geo_lon: float = 0.0, geo_lat: float = 0.0, tz: str = None, az: float = 0.0, incl: float = 0.0, area: float = 0.0, p_max: float = 0.0, eff0: float = 0.0, deff_dt: float = 0.0, year: float = 2015, t_coef: float = -0.005, n_refr: float = 1.43, inv_model: str = None, inv_sn: str = None, name: str = None)[source]¶ Bases:
object
Dataclass containing solar-panel parameters.
-
area
= 0.0¶ Surface area of solar PV panels (m2; typically 1.6m2 per panel)
-
az
= 0.0¶ ‘Azimuth’ of the panel normal vector (rad; 0=S, π/2=W)
-
deff_dt
= 0.0¶ degrades to 90% after 20 years)
Type: Linear degradation of efficiency factor over time (yr^-1; -5e-3
-
eff0
= 0.0¶ Original efficiency of solar panels + inverter, at installation (0-1; e.g. 0.15 for 15%)
-
geo_lat
= 0.0¶ Geographic latitude of the panels (rad; >0 for east of Greenwich)
-
geo_lon
= 0.0¶ Geographic longitude of the panels (rad; >0 for northern hemisphere)
-
incl
= 0.0¶ ‘Zenith angle’ of the panel normal vector (rad; 0=horizontal, π/2=vertical)
-
inv_model
= None¶ Model or type of the inverter
-
inv_sn
= None¶ Serial number of the inverter
-
n_refr
= 1.43¶ 1.000293)
Type: Refractive index of PV cover (typically 1.43; air
-
name
= None¶ PV plant name
-
p_max
= 0.0¶ Maximum electrical power of solar PV panels or inverter (kW)
-
t_coef
= -0.005¶ PV temperature coefficient (/K; typically -0.005)
-
tz
= None¶ Time zone where the solar panels sit (e.g. Europe/Berlin)
-
year
= 2015¶ Installation year (e.g. 2015.25 for 2015-04-01)
-
-
solarenergy.solar_panels.
pv_cell_temperature
(temp_a, glob_insol, v_wind, temp_c_noct=45, eta_c_noct=0.15, t_coef=-0.0045, glob_insol_noct=800, temp_a_noct=20, v_wind_noct=1, tau_alp=0.9)[source]¶ Estimate the PV-cell temperature as a function of ambient temperature, insolation and wind velocity.
Parameters: - temp_a (float) – Ambient temperature (°C or K - ensure all temperatures use the same unit).
- glob_insol (float) – Global projected insolation on PV cell (W/m2).
- v_wind (float) – Wind velocity (m/s).
- temp_c_noct (float) – Cell temperature for nominal operating cell temperature (NOCT; °C or K).
- eta_c_noct (float) – Cell/module efficiency for NOCT (-).
- t_coef (float) – Temperature coefficient for Pmpp and η_cell (/K).
- glob_insol_noct (float) – Projected global insolation on the PV module for NOCT (W/m2).
- temp_a_noct (float) – Ambient temperature for NOCT (°C or K).
- v_wind_noct (float) – Wind velocity for NOCT (m/s).
- tau_alp (float) – Tau alpha (τα): the optical transmission-absorption coefficient for the PV module (0-1).
Returns: PV cell temperature (°C or K).
Return type: (float)
Note
- This follows Duffie & Beckman (2013).
- NOCT stands for normal-operation cell temperature and concerns the specifications of the PV module for realistic conditions. If not available, use STC specs everywhere instead.
- Note that all temperatures should be either in °C or K; they should not be mixed.
-
solarenergy.solar_panels.
pv_efficiency
(temp_c, eta_c_stc=0.15, t_coef=-0.0045, temp_c_stc=25)[source]¶ Compute the instantaneous PV effiency for a given cell temperature.
We assume that the efficiency varies linearly with temperature.
Parameters: - temp_c (float) – Temperature of the PV cell (°C or K).
- eta_c_stc (float) – Efficiency of PV (+inverter if desired) for standard test conditions (STC) (0-1).
- t_coef (float) – Temperature coefficient for P_mpp and η (/K; <0).
- temp_c_stc (float) – Temperature of the cells under Standard Test Conditions (°C or K, same as temp_c).
Returns: Efficiency of the solar cell.
Return type:
-
solarenergy.solar_panels.
read_solar_panel_specs
(cfg_file='.solar_panels.cfg', rel_to_home=True, to_rad=True)[source]¶ Read solar-panel specifications from a configuration file.
Parameters: - cfg_file (str) – Configuration file to read specs from (by default relative to home directory).
- rel_to_home (bool) – File path/name is relative to home directory.
- to_rad (bool) – Convert angles from degrees to radians (location, orientation).
Returns: Dataclass of type SolarPanels containing the specifications.
Return type: