Solar angles#

linerate.equations.solar_angles.compute_hour_angle_relative_to_noon(when, longitude)[source]#

Compute the hour angle.

Described in the text on p. 18 of [2]. The hour angle is the number of hours from noon times 15^circ. This means that the hour angle for 11:00 is -15^circ, and the hour angle for 14:00 is 30^circ.

This function converts the hour angle to radians by multiplying it by frac{pi}{12}, which is the same as 15^circ.

The hour angle is used when calculating the solar altitude. This function does not take into account the difference between apparent/actual and mean solar time, which means that the result may be up to 15 minutes from the correct hour angle.

Parameters:

when (datetime64 | ndarray[Any, dtype[datetime64]]) – The time and date.

Returns:

:math:’omega~left[text{radian}right]`. The hour angle relative to noon.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]

linerate.equations.solar_angles.compute_solar_declination(when)[source]#

Compute the solar declination

Equation (16b) on page 18 of [2].

The function takes in a numpy.datetime64 object, and uses the _get_day_of_year function to find the day number of the year to be used to compute the solar declination.

Parameters:

when (datetime64 | ndarray[Any, dtype[datetime64]]) – The time and date.

Returns:

\(\delta~\left[\text{radian}\right]\). The declination of the earth.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]

linerate.equations.solar_angles.compute_solar_azimuth_variable(latitude, solar_declination, hour_angle_relative_to_noon)[source]#

Compute the solar azimuth variable.

Equation (17b) on page 18 of [2].

Parameters:
  • latitude (Annotated[float | float64 | ndarray[Any, dtype[float64]], '°']) – \(Lat~\left[\text{degrees}\right]\). The latitude of the span (center).

  • solar_declination (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(\delta~\left[\text{radian}\right]\). Solar declination (-23.45 to +23.45).

  • hour_angle_relative_to_noon (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – :math:’omega~left[text{radian}right]`. The hour angle relative to noon.

Returns:

\(\chi~\left[\text{radian}\right]\). The solar azimuth variable.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]

linerate.equations.solar_angles.compute_solar_azimuth_constant(solar_azimuth_variable, hour_angle_relative_to_noon)[source]#

Compute the solar azimuth constant.

Table 2 on page 18 of:cite:p:ieee738.

Parameters:
  • solar_azimuth_variable (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(\chi~\left[\text{radian}\right]\). The solar azimuth variable.

  • hour_angle_relative_to_noon (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – :math:’omega~left[text{radian}right]`. The hour angle relative to noon.

Returns:

\(C~\left[\text{radian}\right]\). The solar azimuth constant.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]

linerate.equations.solar_angles.compute_solar_azimuth(solar_azimuth_constant, solar_azimuth_variable)[source]#

Compute the solar azimuth.

Equation (17a) on page 18 of [2].

Parameters:
  • solar_azimuth_constant (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(C~\left[\text{radian}\right]\). The solar azimuth constant.

  • solar_azimuth_variable (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(\chi~\left[\text{radian}\right]\). The solar azimuth variable.

Returns:

\(Z_c~\left[\text{radian}\right]\). The solar azimuth.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]

linerate.equations.solar_angles.compute_sin_solar_altitude(latitude, solar_declination, hour_angle_relative_to_noon)[source]#

Compute the sine of the solar altitude

This is an alteration of equation (16a) on page 18 of [2]. \(sin(H_c)\) is calculated instead of \(H_c\).

Parameters:
  • latitude (Annotated[float | float64 | ndarray[Any, dtype[float64]], '°']) – \(Lat~\left[^\circ\right]\). The latitude of the span (center).

  • ssolar_declination\(\delta~\left[\text{radian}\right]\). Solar declination (-23.45 to +23.45).

  • hour_angle_relative_to_noon (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – :math:’omega~left[text{radian}right]`. The hour angle relative to noon.

Returns:

\(\sin\left(H_c\right)\). The sine of the solar altitude.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]

linerate.equations.solar_angles.compute_cos_solar_effective_incidence_angle(sin_solar_altitude, solar_azimuth, conductor_azimuth)[source]#

Compute the cosine of the effective angle of incidence of the sun rays.

This is an alteration of equation (9) on page 13 of [2]. \(cos(\theta)\) is calculated instead of \(\theta\).

Parameters:
  • sin_solar_altitude (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(sin(H_c)~\left[\text{radian}~\right]\). The sin of the solar altitude.

  • solar_azimuth (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(Z_c~\left[\text{radian}~\right]\). The azimuth of the sun.

  • conductor_azimuth (Annotated[float | float64 | ndarray[Any, dtype[float64]], 'rad']) – \(Z_l~\left[\text{radian}~\right]\). The azimuth of the conductor/line.

Returns:

\(cos(\theta)\). The cosine of the effective angle of incidence of the sun rays.

Return type:

Union[float, float64, ndarray[Any, dtype[float64]]]