Skip to content

ConvectiveCooling

ConvectiveCooling

ConvectiveCooling(
    altitude: floatArrayLike,
    cable_azimuth: floatArrayLike,
    ambient_temperature: floatArrayLike,
    wind_speed: floatArrayLike,
    outer_diameter: floatArrayLike,
    wind_azimuth: floatArrayLike = None,
    wind_attack_angle: floatArrayLike = None,
    **kwargs: Any,
)

Bases: ConvectiveCoolingBase

Convective cooling term.

Very similar to IEEE. The differences are in some coefficient values for air constants.

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

Parameters:

Name Type Description Default

altitude

float | ndarray

Altitude (m).

required

cable_azimuth

float | ndarray

Azimuth (deg).

required

ambient_temperature

float | ndarray

Ambient temperature (°C).

required

wind_speed

float | ndarray

Wind speed (m·s⁻¹).

required

wind_azimuth

float | ndarray

wind_azimuth regarding north (deg).

None

outer_diameter

float | ndarray

External diameter (m).

required
Source code in src/thermohl/power/rte/convective_cooling.py
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
53
54
55
56
57
58
59
def __init__(
    self,
    altitude: floatArrayLike,
    cable_azimuth: floatArrayLike,
    ambient_temperature: floatArrayLike,
    wind_speed: floatArrayLike,
    outer_diameter: floatArrayLike,
    wind_azimuth: floatArrayLike = None,
    wind_attack_angle: floatArrayLike = None,
    **kwargs: Any,
):
    r"""Init with args.

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

    Args:
        altitude (float | numpy.ndarray): Altitude (m).
        cable_azimuth (float | numpy.ndarray): Azimuth (deg).
        ambient_temperature (float | numpy.ndarray): Ambient temperature (°C).
        wind_speed (float | numpy.ndarray): Wind speed (m·s⁻¹).
        wind_azimuth (float | numpy.ndarray): wind_azimuth regarding north (deg).
        outer_diameter (float | numpy.ndarray): External diameter (m).

    """
    super().__init__(
        altitude,
        cable_azimuth,
        ambient_temperature,
        wind_speed,
        outer_diameter,
        Air.volumic_mass,
        Air.dynamic_viscosity,
        Air.thermal_conductivity,
        wind_azimuth,
        wind_attack_angle,
    )

derivative

derivative(
    conductor_temperature: floatArrayLike,
    temperature_increment: float = _TEMP_INCREMENT,
) -> floatArrayLike

Compute power term derivative regarding temperature in function of temperature.

Usually this function should be overriden in children classes; if it is not the case it will evaluate the derivative from the value method with a second-order approximation.

Parameters:

Name Type Description Default

conductor_temperature

float | ndarray

Conductor temperature (°C).

required

temperature_increment

float

Temperature increment. The default is 1.0E-03.

_TEMP_INCREMENT

Returns:

Type Description
floatArrayLike

float | numpy.ndarray: Power term derivative (W·m⁻¹·K⁻¹).

Source code in src/thermohl/power/power_term.py
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
def derivative(
    self,
    conductor_temperature: floatArrayLike,
    temperature_increment: float = _TEMP_INCREMENT,
) -> floatArrayLike:
    r"""Compute power term derivative regarding temperature in function of temperature.

    Usually this function should be overriden in children classes; if it is
    not the case it will evaluate the derivative from the value method with
    a second-order approximation.

    Args:
        conductor_temperature (float | numpy.ndarray): Conductor temperature (°C).
        temperature_increment (float, optional): Temperature increment. The default is 1.0E-03.

    Returns:
        float | numpy.ndarray: Power term derivative (W·m⁻¹·K⁻¹).

    """
    return (
        self.value(conductor_temperature + temperature_increment)
        - self.value(conductor_temperature - temperature_increment)
    ) / (2.0 * temperature_increment)

value

value(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute convective cooling.

Parameters

conductor_temperature : float or np.ndarray Conductor temperature.

Returns

float or np.ndarray Power term value (W.m\ :sup:-1\ ).

Source code in src/thermohl/power/rte/convective_cooling.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
def value(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    r"""Compute convective cooling.

    Parameters
    ----------
    conductor_temperature : float or np.ndarray
        Conductor temperature.

    Returns
    -------
    float or np.ndarray
        Power term value (W.m\ :sup:`-1`\ ).

    """
    film_temperature = 0.5 * (conductor_temperature + self.ambient_temp)
    temperature_delta = conductor_temperature - self.ambient_temp
    # very slight difference with air.IEEE.volumic_mass() in coefficient before altitude**2
    air_density = (
        1.293 - 1.525e-04 * self.altitude + 6.38e-09 * self.altitude**2
    ) / (1 + 0.00367 * film_temperature)
    return np.maximum(
        self._value_forced(film_temperature, temperature_delta, air_density),
        self._value_natural(temperature_delta, air_density),
    )