Skip to content

JouleHeating

JouleHeating

JouleHeating(
    transit: floatArrayLike,
    temp_low: floatArrayLike,
    temp_high: floatArrayLike,
    linear_resistance_temp_low: floatArrayLike,
    linear_resistance_temp_high: floatArrayLike,
    **kwargs: Any,
)

Bases: PowerTerm

Joule heating term.

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

Parameters:

Name Type Description Default

transit

float | ndarray

Transit intensity (A).

required

temp_low

float | ndarray

Temperature for linear_resistance_temp_low measurement (°C).

required

temp_high

float | ndarray

Temperature for linear_resistance_temp_high measurement (°C).

required

linear_resistance_temp_low

float | ndarray

Electric resistance per unit length at temp_low (Ω·m⁻¹).

required

linear_resistance_temp_high

float | ndarray

Electric resistance per unit length at temp_high (Ω·m⁻¹).

required
Source code in src/thermohl/power/ieee/joule_heating.py
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
60
61
def __init__(
    self,
    transit: floatArrayLike,
    temp_low: floatArrayLike,
    temp_high: floatArrayLike,
    linear_resistance_temp_low: floatArrayLike,
    linear_resistance_temp_high: floatArrayLike,
    **kwargs: Any,
):
    r"""Init with args.

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

    Args:
        transit (float | numpy.ndarray): Transit intensity (A).
        temp_low (float | numpy.ndarray): Temperature for linear_resistance_temp_low measurement (°C).
        temp_high (float | numpy.ndarray): Temperature for linear_resistance_temp_high measurement (°C).
        linear_resistance_temp_low (float | numpy.ndarray): Electric resistance per unit length at temp_low (Ω·m⁻¹).
        linear_resistance_temp_high (float | numpy.ndarray): Electric resistance per unit length at temp_high (Ω·m⁻¹).

    """
    self.temp_low = temp_low
    self.temp_high = temp_high
    self.linear_resistance_temp_low = linear_resistance_temp_low
    self.linear_resistance_temp_high = linear_resistance_temp_high
    self.transit = transit
    self.temp_coeff_linear = JouleHeating._c(
        temp_low,
        temp_high,
        linear_resistance_temp_low,
        linear_resistance_temp_high,
    )

derivative

derivative(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute joule heating derivative.

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

Parameters:

Name Type Description Default

conductor_temperature

float | ndarray

Conductor temperature (°C).

required

Returns:

Type Description
floatArrayLike

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

Source code in src/thermohl/power/ieee/joule_heating.py
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
def derivative(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    r"""Compute joule heating derivative.

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

    Args:
        conductor_temperature (float | numpy.ndarray): Conductor temperature (°C).

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

    """
    return (
        self.temp_coeff_linear
        * self.transit**2
        * np.ones_like(conductor_temperature)
    )

value

value(
    conductor_temperature: floatArrayLike,
) -> floatArrayLike

Compute joule heating.

Parameters:

Name Type Description Default

conductor_temperature

float | ndarray

Conductor temperature (°C).

required

Returns:

Type Description
floatArrayLike

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

Source code in src/thermohl/power/ieee/joule_heating.py
68
69
70
71
72
73
74
75
76
77
78
def value(self, conductor_temperature: floatArrayLike) -> floatArrayLike:
    r"""Compute joule heating.

    Args:
        conductor_temperature (float | numpy.ndarray): Conductor temperature (°C).

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

    """
    return self._rdc(conductor_temperature) * self.transit**2