Skip to content

SolarHeating

SolarHeating

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

Bases: SolarHeating

Solar heating term.

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

:param latitude: Latitude in degrees. :param altitude: Altitude. :param cable_azimuth: Azimuth of the conductor in degrees. :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 irradiance term.

Source code in src/thermohl/power/olla/solar_heating.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
def __init__(
    self,
    latitude: floatArrayLike,
    altitude: floatArrayLike,
    cable_azimuth: floatArrayLike,
    datetime_utc: datetimeArrayLike,
    outer_diameter: floatArrayLike,
    solar_absorptivity: floatArrayLike,
    solar_irradiance: floatArrayLike,
    **kwargs: Any,
):
    """Init with args.
    See ieee.SolarHeating, it is exactly the same with altitude and turbidity set to zero.
    If more than one input are numpy arrays, they should have the same size.

    :param latitude: Latitude in degrees.
    :param altitude: Altitude.
    :param cable_azimuth: Azimuth of the conductor in degrees.
    :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 irradiance term.
    """
    if "turbidity" in kwargs.keys():
        kwargs.pop("turbidity")
    super().__init__(
        latitude=latitude,
        altitude=altitude,
        cable_azimuth=cable_azimuth,
        turbidity=0.0,
        datetime_utc=datetime_utc,
        outer_diameter=outer_diameter,
        solar_absorptivity=solar_absorptivity,
        solar_irradiance=solar_irradiance,
        **kwargs,
    )

derivative

derivative(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute solar heating derivative.

:param conductor_temperature: Conductor temperature. :return: Derivative of solar heating.

Source code in src/thermohl/power/solar_heating.py
134
135
136
137
138
139
140
def derivative(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    """Compute solar heating derivative.

    :param conductor_temperature: Conductor temperature.
    :return: Derivative of solar heating.
    """
    return np.zeros_like(conductor_temperature)

value

value(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute solar heating.

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

Source code in src/thermohl/power/solar_heating.py
121
122
123
124
125
126
127
128
129
130
131
132
def value(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    """Compute solar heating.

    :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)
    )