Direct Irradiation

class pysolorie.numerical_integration.IrradiationCalculator(climate_type: str, observer_altitude: int, observer_latitude: float)[source]

A class to find the optimal orientation and calculate the direct irradiation for a solar panel [1].

References

To instantiate the IrradiationCalculator class, provide the following three parameters.

param climate_type:

The type of climate.

type climate_type:

str

param observer_altitude:

The altitude of the observer in meters.

type observer_altitude:

int

param observer_latitude:

The latitude of the observer in degrees.

type observer_latitude:

float

calculate_direct_irradiation(panel_orientation: float, day_of_year: int) float[source]

Calculate the direct irradiation for a given solar panel orientation (i.e., \(\beta\)).

The direct irradiation is calculated using the formula:
\[E(n,\phi) = \frac{I(n)}{\Omega} \int_{\omega_s}^{\omega_t} \cos(\theta) \times H(\cos(\theta)) \times \tau_b~d\omega\]
- \(n\) is the day of year (i.e., day_of_year)
- \(\phi\) is the latitude of the observer
- \(I(n)\) is the amount of solar energy received per unit area per second on day number \(n\) of the year
- \(\Omega\) = 7.2722 * 1e-5
- \(\theta\) is incidence angle, the angle between the position vector of the sun and the normal vector to the solar panel.
- \(\omega_s\) is the sunrise hour angle
- \(\omega_t\) is the sunset hour angle
- \(H\) is the Heaviside step function
Parameters:
  • panel_orientation (float) – The orientation of the solar panel in degrees.

  • day_of_year (int) – The day of the year.

Returns:

The direct irradiation in Megajoules per square meter.

Return type:

float

find_optimal_orientation(day_of_year: int) float[source]

Find the optimal orientation \(beta\) that maximizes the direct irradiation.

Parameters:

day_of_year (int) – The day of the year.

Returns:

The optimal orientation (i.e., \(beta\)) in degrees.

Return type:

float