Skip to content

JouleHeating

JouleHeating

JouleHeating(
    transit: floatArrayLike,
    outer_diameter: floatArrayLike,
    core_diameter: floatArrayLike,
    outer_area: floatArrayLike,
    core_area: floatArrayLike,
    magnetic_coeff: floatArrayLike,
    magnetic_coeff_per_a: floatArrayLike,
    temperature_coeff_linear: floatArrayLike,
    temperature_coeff_quadratic: floatArrayLike,
    linear_resistance_dc_20c: floatArrayLike,
    reference_temperature: floatArrayLike = 20.0,
    frequency: floatArrayLike = 50.0,
    **kwargs: Any,
)

Bases: JouleHeating

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

outer_diameter

float | ndarray

External diameter (m).

required

core_diameter

float | ndarray

Core diameter (m).

required

outer_area

float | ndarray

External (total) cross-sectional area (m²).

required

core_area

float | ndarray

Core cross-sectional area (m²).

required

magnetic_coeff

float | ndarray

Coefficient for magnetic effects (—).

required

magnetic_coeff_per_a

float | ndarray

Coefficient for magnetic effects (A⁻¹).

required

temperature_coeff_linear

float | ndarray

Linear resistance augmentation with temperature (K⁻¹).

required

temperature_coeff_quadratic

float | ndarray

Quadratic resistance augmentation with temperature (K⁻²).

required

linear_resistance_dc_20c

float | ndarray

Electric resistance per unit length (DC) at 20°C (Ω·m⁻¹).

required

reference_temperature

float | ndarray

Reference temperature (°C). The default is 20.

20.0

frequency

float | ndarray

Current frequency (Hz). The default is 50.

50.0
Source code in src/thermohl/power/rte/joule_heating.py
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
53
54
55
56
57
58
59
60
61
62
63
64
def __init__(
    self,
    transit: floatArrayLike,
    outer_diameter: floatArrayLike,
    core_diameter: floatArrayLike,
    outer_area: floatArrayLike,
    core_area: floatArrayLike,
    magnetic_coeff: floatArrayLike,
    magnetic_coeff_per_a: floatArrayLike,
    temperature_coeff_linear: floatArrayLike,
    temperature_coeff_quadratic: floatArrayLike,
    linear_resistance_dc_20c: floatArrayLike,
    reference_temperature: floatArrayLike = 20.0,
    frequency: floatArrayLike = 50.0,
    **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).
        outer_diameter (float | numpy.ndarray): External diameter (m).
        core_diameter (float | numpy.ndarray): Core diameter (m).
        outer_area (float | numpy.ndarray): External (total) cross-sectional area (m²).
        core_area (float | numpy.ndarray): Core cross-sectional area (m²).
        magnetic_coeff (float | numpy.ndarray): Coefficient for magnetic effects (—).
        magnetic_coeff_per_a (float | numpy.ndarray): Coefficient for magnetic effects (A⁻¹).
        temperature_coeff_linear (float | numpy.ndarray): Linear resistance augmentation with temperature (K⁻¹).
        temperature_coeff_quadratic (float | numpy.ndarray): Quadratic resistance augmentation with temperature (K⁻²).
        linear_resistance_dc_20c (float | numpy.ndarray): Electric resistance per unit length (DC) at 20°C (Ω·m⁻¹).
        reference_temperature (float | numpy.ndarray, optional): Reference temperature (°C). The default is 20.
        frequency (float | numpy.ndarray, optional): Current frequency (Hz). The default is 50.

    """
    self.transit = transit
    self.outer_diameter = outer_diameter
    self.core_diameter = core_diameter
    self.magnetic_coeff = self._kem(
        outer_area, core_area, magnetic_coeff, magnetic_coeff_per_a
    )
    self.temp_coeff_linear = temperature_coeff_linear
    self.temp_coeff_quadratic = temperature_coeff_quadratic
    self.linear_resistance_dc_20c = linear_resistance_dc_20c
    self.reference_temperature = reference_temperature
    self.frequency = frequency

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 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/rte/joule_heating.py
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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⁻¹).

    """
    dc_resistance = self._rdc(conductor_temperature)
    skin_effect_coeff = self._ks(dc_resistance)
    ac_resistance = self.magnetic_coeff * skin_effect_coeff * dc_resistance
    return ac_resistance * self.transit**2