Skip to content

SolarHeating

SolarHeating

SolarHeating(
    latitude: floatArrayLike,
    cable_azimuth: floatArrayLike,
    albedo: floatArrayLike,
    datetime_utc: datetimeArrayLike,
    outer_diameter: floatArrayLike,
    solar_absorptivity: floatArrayLike,
    solar_irradiance: floatArrayLike,
    **kwargs: Any,
)

Bases: PowerTerm

Solar heating term.

:param latitude: Latitude in degrees. :param cable_azimuth: Azimuth of the conductor in degrees. :param albedo: Albedo. :param datetime_utc: Datetime in UTC. :param outer_diameter: external diameter of the conductor. :param solar_absorptivity: Solar absorption coefficient of the conductor. :param solar_irradiance: Optional precomputed solar radiation term.

Source code in src/thermohl/power/cigre/solar_heating.py
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
def __init__(
    self,
    latitude: floatArrayLike,
    cable_azimuth: floatArrayLike,
    albedo: floatArrayLike,
    datetime_utc: datetimeArrayLike,
    outer_diameter: floatArrayLike,
    solar_absorptivity: floatArrayLike,
    solar_irradiance: floatArrayLike,
    **kwargs: Any,
):
    """Init with args.
    If more than one input are numpy arrays, they should have the same size.

    :param latitude: Latitude in degrees.
    :param cable_azimuth: Azimuth of the conductor in degrees.
    :param albedo: Albedo.
    :param datetime_utc: Datetime in UTC.
    :param outer_diameter: external diameter of the conductor.
    :param solar_absorptivity: Solar absorption coefficient of the conductor.
    :param solar_irradiance: Optional precomputed solar radiation term.
    """
    self.solar_absorptivity = solar_absorptivity

    mask = np.isnan(solar_irradiance)
    self.solar_irradiance = np.empty_like(solar_irradiance)
    if np.any(~mask):
        self.solar_irradiance[~mask] = np.maximum(solar_irradiance, 0.0)
    if np.any(mask):
        self.solar_irradiance[mask] = SolarHeating._solar_radiation(
            np.deg2rad(latitude),
            np.deg2rad(cable_azimuth),
            albedo,
            datetime_utc,
        )

    self.outer_diameter = outer_diameter

derivative

derivative(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute solar heating derivative.

Source code in src/thermohl/power/cigre/solar_heating.py
124
125
126
def derivative(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    """Compute solar heating derivative."""
    return np.zeros_like(conductor_temperature)

value

value(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute solar heating. If more than one input are numpy arrays, they should have the same size.

:param conductor_temperature: Conductor temperature (°C). :return: Power term value (W·m⁻¹).

Source code in src/thermohl/power/cigre/solar_heating.py
110
111
112
113
114
115
116
117
118
119
120
121
122
def value(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    """Compute solar heating.
    If more than one input are numpy arrays, they should have the same size.

    :param conductor_temperature: Conductor temperature (°C).
    :return: Power term value (W·m⁻¹).
    """
    return (
        self.solar_absorptivity
        * self.solar_irradiance
        * self.outer_diameter
        * np.ones_like(conductor_temperature)
    )