cable
Cable
Cable(conductor: CableConductorProperties, layer_properties: dict[CableLayer, CableLayerProperties], layer_metrics: CableLayerMetrics, cable_type: CableType, grid_counts: dict[CableLayer, int])
Bases: AbstractCable
Finite difference cable model that discretizes cable layers into a radial grid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conductor
|
CableConductorProperties
|
Conductor properties of the cable. |
required |
layer_properties
|
dict[CableLayer, CableLayerProperties]
|
Mapping of cable layers to their properties. |
required |
layer_metrics
|
CableLayerMetrics
|
Geometric and calculated metrics for the cable layers. |
required |
cable_type
|
CableType
|
The type of the cable. |
required |
grid_counts
|
dict[CableLayer, int]
|
Number of grid points per cable layer. |
required |
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 | |
info
property
info: str
Return a compact string encoding the cable's physical properties.
grid_size
property
grid_size: int
Get the total number of grid points in the finite difference model.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The total number of grid points. |
update_pipe_fill_resistivity
update_pipe_fill_resistivity(temperature_grid: ndarray) -> None
This method updates the (temperature dependent) thermal resistivity of the medium in the pipe of the cable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
temperature_grid
|
ndarray
|
The temperature grid for the cable, as calculated for a given timestep. |
required |
Source code in cable_thermal_model/model/cables/cable.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
get_layer_indices_for_layer
get_layer_indices_for_layer(layer: CableLayer) -> tuple[int, int]
This method fetches the inclusive start and end indices of the grid points for a given layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer
|
CableLayer
|
A CableLayer object representing the layer for which the indices need to be fetched. |
required |
Returns:
| Type | Description |
|---|---|
tuple[int, int]
|
tuple[int, int]: A tuple of integers representing the inclusive start and end indices of the grid points for the given layer, in that order. |
Source code in cable_thermal_model/model/cables/cable.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
get_heating_contribution_at_radius
get_heating_contribution_at_radius(radius: float, self_heating_contribution: ndarray) -> float
Interpolate the self-heating contribution at a given radius.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius
|
float
|
Radial distance at which to evaluate the self-heating contribution. |
required |
self_heating_contribution
|
ndarray
|
Self-heating contribution state values for the cable. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Interpolated temperature-rise contribution due to cable self-heating at the requested radius. |
Source code in cable_thermal_model/model/cables/cable.py
505 506 507 508 509 510 511 512 513 514 515 516 | |
get_cable_copy_with_pipe
get_cable_copy_with_pipe(pipe: Pipe) -> Self
Get a new cable instance based on the current self, but with extra added layers that model a pipe.
This method adds two layers
- pipe_fill layer with an empiric resistance value
- PE layer for the pipe
The resistivity of the pipe filling material is updated depending on the temperature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipe
|
Pipe
|
A pipe instance |
required |
Returns:
| Type | Description |
|---|---|
Cable
|
A new Cable instance based on the Cable instance the method was called from, but with the added pipe layers, as if the cable had an outer pipe added. |
Source code in cable_thermal_model/model/cables/cable.py
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | |
add_dielectric_loss_to_heating_vector
add_dielectric_loss_to_heating_vector() -> None
This method calculates and updates the heating vector with dielectric loss.
Source code in cable_thermal_model/model/cables/cable.py
574 575 576 577 578 579 580 | |