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 = 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 = None, inv_sn: str | None = None, name: str | None = None)[source]
Bases:
object
Dataclass containing solar-panel parameters.
- deff_dt: float = 0.0
degrades to 90% after 20 years)
- Type:
Linear degradation of efficiency factor over time (yr^-1; -5e-3
- 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: