models.pv module¶
PV system model using pvlib (POA irradiance, Sandia cell temperature, PVWatts DC).
- class models.pv.PV(name: str, capacity: float, tilt: float = 30.0, azimuth: float = 180.0, latitude: float = 0.0, longitude: float = 0.0, current_production: float = 0.0)[source]¶
Bases:
objectPV system with fixed tilt/azimuth; production from GHI/DNI/DHI and cell temperature.
- name¶
System name.
- Type:
str
- capacity¶
DC capacity at STC (kW).
- Type:
float
- tilt¶
Panel tilt (degrees); default 30.
- Type:
float
- azimuth¶
Panel azimuth (degrees); default 180.
- Type:
float
- latitude¶
Site latitude.
- Type:
float
- longitude¶
Site longitude.
- Type:
float
- current_production¶
Last computed production (kW).
- Type:
float
- azimuth: float = 180.0¶
- calculate_production(ghi: float, dni: float, dhi: float, temperature: float, timestamp, wind_speed: float = 1.0) float[source]¶
Compute DC power (kW) at timestamp using POA irradiance, Sandia cell temperature, PVWatts DC.
- Parameters:
ghi – Global horizontal irradiance (W/m²).
dni – Direct normal irradiance (W/m²).
dhi – Diffuse horizontal irradiance (W/m²).
temperature – Air temperature (°C).
timestamp – Time for solar position.
wind_speed – Wind speed (m/s) for cell temperature; default 1.0.
- Returns:
DC power in kW; 0 if sun below horizon. Also sets current_production.
- capacity: float¶
- current_production: float = 0.0¶
- latitude: float = 0.0¶
- longitude: float = 0.0¶
- name: str¶
- tilt: float = 30.0¶