Skip to content

cable_trefoil_circuit_single_pipe

CableTrefoilCircuitSinglePipe

CableTrefoilCircuitSinglePipe(conductor: CableConductorProperties, layer_properties: dict[CableLayer, CableLayerProperties], layer_metrics: CableLayerMetrics, cable_type: CableType, grid_counts: dict[CableLayer, int])

Bases: Cable

Finite difference cable model for a trefoil circuit with a single pipe base class.

Attributes:

Name Type Description
_bottomright_index tuple[int, int]

Index tuple (row, col) for accessing the bottom-right element of the sparse matrix used in convection boundary condition updates.

Source code in cable_thermal_model/model/cables/cable.py
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
def __init__(
    self,
    conductor: CableConductorProperties,
    layer_properties: dict[CableLayer, CableLayerProperties],
    layer_metrics: CableLayerMetrics,
    cable_type: CableType,
    grid_counts: dict[CableLayer, int],
) -> None:
    """Initialize the Cable with conductor properties, layer data, and grid resolution.

    Args:
        conductor (CableConductorProperties): Conductor properties of the cable.
        layer_properties (dict[CableLayer, CableLayerProperties]): Mapping of cable layers to their properties.
        layer_metrics (CableLayerMetrics): Geometric and calculated metrics for the cable layers.
        cable_type (CableType): The type of the cable.
        grid_counts (dict[CableLayer, int]): Number of grid points per cable layer.

    """
    super().__init__(conductor, layer_properties, layer_metrics, cable_type)

    self._validate_grid_counts(grid_counts)

    self._grid_counts = grid_counts
    self._radii_grid = np.array([], dtype=float)
    self._inter_radii_grid = np.array([], dtype=float)
    self._surface_area_grid = np.array([], dtype=float)
    self._capacity_grid = np.array([], dtype=float)
    self._rho_grid = np.array([], dtype=float)

    self._upper_diagonal = np.array([], dtype=float)
    self._base_diagonal = np.array([], dtype=float)
    self._lower_diagonal = np.array([], dtype=float)
    self._finite_difference_matrix_diagonals_outdated = True

    self._heating_vector = np.array([], dtype=float)

    self._set_calculated_fields()

CableTrefoilCircuitSinglePipeInSoil

CableTrefoilCircuitSinglePipeInSoil(conductor: CableConductorProperties, layer_properties: dict[CableLayer, CableLayerProperties], layer_metrics: CableLayerMetrics, cable_type: CableType, grid_counts: dict[CableLayer, int])

Bases: CableTrefoilCircuitSinglePipe, CableSoil

Finite difference cable model for a trefoil circuit with a single pipe in soil.

Source code in cable_thermal_model/model/cables/cable.py
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
def __init__(
    self,
    conductor: CableConductorProperties,
    layer_properties: dict[CableLayer, CableLayerProperties],
    layer_metrics: CableLayerMetrics,
    cable_type: CableType,
    grid_counts: dict[CableLayer, int],
) -> None:
    """Initialize the Cable with conductor properties, layer data, and grid resolution.

    Args:
        conductor (CableConductorProperties): Conductor properties of the cable.
        layer_properties (dict[CableLayer, CableLayerProperties]): Mapping of cable layers to their properties.
        layer_metrics (CableLayerMetrics): Geometric and calculated metrics for the cable layers.
        cable_type (CableType): The type of the cable.
        grid_counts (dict[CableLayer, int]): Number of grid points per cable layer.

    """
    super().__init__(conductor, layer_properties, layer_metrics, cable_type)

    self._validate_grid_counts(grid_counts)

    self._grid_counts = grid_counts
    self._radii_grid = np.array([], dtype=float)
    self._inter_radii_grid = np.array([], dtype=float)
    self._surface_area_grid = np.array([], dtype=float)
    self._capacity_grid = np.array([], dtype=float)
    self._rho_grid = np.array([], dtype=float)

    self._upper_diagonal = np.array([], dtype=float)
    self._base_diagonal = np.array([], dtype=float)
    self._lower_diagonal = np.array([], dtype=float)
    self._finite_difference_matrix_diagonals_outdated = True

    self._heating_vector = np.array([], dtype=float)

    self._set_calculated_fields()

CableTrefoilCircuitSinglePipeInAir

CableTrefoilCircuitSinglePipeInAir(conductor: CableConductorProperties, layer_properties: dict[CableLayer, CableLayerProperties], layer_metrics: CableLayerMetrics, cable_type: CableType, grid_counts: dict[CableLayer, int])

Bases: CableTrefoilCircuitSinglePipe, CableAir

Finite difference cable model for a trefoil circuit with a single pipe in air.

Source code in cable_thermal_model/model/cables/cable_air.py
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
def __init__(
    self,
    conductor: CableConductorProperties,
    layer_properties: dict[CableLayer, CableLayerProperties],
    layer_metrics: CableLayerMetrics,
    cable_type: CableType,
    grid_counts: dict[CableLayer, int],
):
    """Initialize CableAir with convection parameters set to None until explicitly configured.

    Args:
        conductor (CableConductorProperties): Conductor properties of the cable.
        layer_properties (dict[CableLayer, CableLayerProperties]): Mapping of cable layers to their properties.
        layer_metrics (CableLayerMetrics): Geometric and calculated metrics for the cable layers.
        cable_type (CableType): The type of the cable.
        grid_counts (dict[CableLayer, int]): Number of grid points per cable layer.

    """
    self.convection_params: CableConvectionParams | None = None
    self.convection_coefficient: float | None = None
    super().__init__(conductor, layer_properties, layer_metrics, cable_type, grid_counts)