cable_circuit
CablePosition
Bases: StrEnum
Enumeration of cable positions within a circuit.
CableKey
Bases: BaseModel
Immutable identifier for a cable within a named circuit.
PosCable
Bases: BaseModel
A positioned cable within a circuit, combining cable data with spatial coordinates.
cable_info
property
cable_info: str
Return a compact string encoding the cable's physical properties.
cable_representation
property
cable_representation: str
Return a string representation of this positioned cable for serialisation.
CircuitInitData
Bases: BaseModel
A data class containing the necessary information to initialize ...
from_schema
classmethod
from_schema(
schema: CircuitFromCableInputSchema[FDCable],
) -> CircuitInitData
Create CircuitInitData from CircuitFromCableInputSchema.
Source code in cable_thermal_model/cable/cable_circuit.py
114 115 116 117 118 119 120 121 122 123 124 125 126 | |
CableCircuit
CableCircuit(
x: float,
y: float,
bonding: BondingType,
circuit_name: str,
dist: float | None = None,
)
Bases: ABC
Abstract base class for cable config.
Source code in cable_thermal_model/cable/cable_circuit.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
initialize_screen_loss_functions
abstractmethod
initialize_screen_loss_functions() -> None
Determines the screen loss functions for the cables in a configuration.
The screen loss functions for the cables in a configuration are then added as attributes of the cable instances in the configuration. These functions depend on the temperature T and compute the factor that described the proportion of the heat generation (loss) in the screen relative to the heat generation in the conductor. For example, if the this factor is 0, no heat is generated in the screen. If the factor is 0.5 and 400W/m is generated in the conductor, then 200W/m is generated in the screen.
Source code in cable_thermal_model/cable/cable_circuit.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | |
get_relative_screen_distances
get_relative_screen_distances() -> ndarray
Function to put relative screen distances in a matrix.
If the conductor is inside the screen, the screen radius is relevant. Otherwise, one should use the distances between the cable axes. Based on IEC 60287-1-3.
Source code in cable_thermal_model/cable/cable_circuit.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
get_relative_screen_reactances
get_relative_screen_reactances() -> ndarray
Function to put relative screen reactances in a matrix.
Based on IEC 60287-1-3.
Source code in cable_thermal_model/cable/cable_circuit.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
initialize_pos_cables
initialize_pos_cables(
cable: FDCable,
cable_centers: dict[CablePosition, tuple[float, float]],
) -> list[PosCable]
Initialize the PosCable instances for the circuit based on the given cable and cable centers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cable
|
FDCable
|
FDCable instance to use in the circuit |
required |
cable_centers
|
dict[CablePosition, tuple[float, float]]
|
Dictionary mapping CablePosition to (x, y) coordinates for each cable in the circuit |
required |
Returns:
| Type | Description |
|---|---|
list[PosCable]
|
List of PosCable instances representing the cables in the circuit. |
Source code in cable_thermal_model/cable/cable_circuit.py
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
set_weighted_screen_impedance
set_weighted_screen_impedance(
weighted_screen_impedance: WeightedScreenImpedance
| None,
)
Set the weighted screen impedance for the circuit.
This is used in the calculation of the screen losses for two-sided bonding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
weighted_screen_impedance
|
WeightedScreenImpedance | None
|
WeightedScreenImpedance instance containing the weighted screen impedance values to use for the circuit. |
required |
Source code in cable_thermal_model/cable/cable_circuit.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
validate_no_screen_no_bonding
validate_no_screen_no_bonding(
bonding_type: BondingType, cable: FDCable
)
Validate that if no screen is present, no bonding is applied.
Source code in cable_thermal_model/cable/cable_circuit.py
353 354 355 356 357 358 359 360 361 362 363 364 | |
SingleCable
SingleCable(circuit_init_data: CircuitInitData)
Bases: CableCircuit
A single cable circuit.
Source code in cable_thermal_model/cable/cable_circuit.py
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | |
initialize_screen_loss_functions
initialize_screen_loss_functions()
Determines the screen loss functions for single cable configurations.
Source code in cable_thermal_model/cable/cable_circuit.py
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | |
LinearCircuit
LinearCircuit(circuit_init_data: CircuitInitData)
Bases: CableCircuit
A circuit of cables arranged in a linear (flat) formation.
Source code in cable_thermal_model/cable/cable_circuit.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | |
initialize_screen_loss_functions
initialize_screen_loss_functions()
Determines the screen loss functions for the cables in a linear configuration.
Source code in cable_thermal_model/cable/cable_circuit.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | |
TrefoilCircuit
TrefoilCircuit(circuit_init_data: CircuitInitData)
Bases: CableCircuit
A circuit of three cables arranged in a trefoil formation.
Source code in cable_thermal_model/cable/cable_circuit.py
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 | |
initialize_screen_loss_functions
initialize_screen_loss_functions()
Determines the screen loss functions for the cables in a trefoil configuration.
Source code in cable_thermal_model/cable/cable_circuit.py
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | |
TrefoilCircuitInSinglePipe
TrefoilCircuitInSinglePipe(
circuit_init_data: CircuitInitData,
)
Bases: SingleCable
Trefoil circuit with three cables in one pipe.
This is modelled as a single equivalent cable with an extra heat source between the equivalent cable and the pipe.
Source code in cable_thermal_model/cable/cable_circuit.py
616 617 618 619 620 621 622 623 624 625 | |
initialize_screen_loss_functions
initialize_screen_loss_functions()
Determines the screen loss functions for the equivalent cable in a trefoil circuit in a single pipe.
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the sheath currents are not symmetric. |
Source code in cable_thermal_model/cable/cable_circuit.py
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |
get_relative_screen_distances
get_relative_screen_distances() -> ndarray
Returns the relative screen distances for a trefoil circuit with touching cables.
Source code in cable_thermal_model/cable/cable_circuit.py
657 658 659 660 661 662 663 664 665 666 667 | |
symmetric_sheath_currents
staticmethod
symmetric_sheath_currents(
weighted_reactance_matrix: ndarray,
) -> bool
Check if the sheath currents for three phases are symmetric.
This is the case when the weighted reactance matrix has the following form:
[ x, -x, 0 ]
[ 0, x, -x ],
for some real number x.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
weighted_reactance_matrix
|
ndarray
|
2x3 weighted relative reactance matrix |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the sheath currents are symmetric, False otherwise. |
Source code in cable_thermal_model/cable/cable_circuit.py
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | |
CircuitBuilder
Factory for constructing CableCircuit instances from various input sources.
from_cable_id
classmethod
from_cable_id(
x: float,
y: float,
circuit_type: CircuitType,
cable_id: str,
circuit_name: str,
dist: float | None = None,
pipe: PipeInputSchema | None = None,
bonding_type: BondingType | None = None,
y_ref: CircuitYReference = Center,
) -> CableCircuit
Build circuit from cable id.
First builds the cable instance using the CableBuilder and then builds the circuit using that cable instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
Horizontal position of circuit in environment in meters |
required |
y
|
float
|
Vertical position (depth) of circuit in environment in meters |
required |
circuit_type
|
CircuitType
|
Type of circuit |
required |
cable_id
|
str
|
Identifier of cable type |
required |
circuit_name
|
str
|
Name of the circuit |
required |
dist
|
float | None
|
Distance between cables, relevant for CircuitType.Linear |
None
|
pipe
|
PipeInputSchema | None
|
Pipe object with pipe parameters, if None, no pipe is added to the cables |
None
|
bonding_type
|
BondingType | None
|
Type of bonding used in the cable circuit |
None
|
y_ref
|
CircuitYReference
|
Reference of the circuit y position, either CircuitYReference.Center, CircuitYReference.Top or CircuitYReference.Bottom y_ref defines y: y is the distance from the ground surface level to y_ref |
Center
|
Returns:
| Type | Description |
|---|---|
CableCircuit
|
A CableCircuit instance that can be added to the static environment. |
Source code in cable_thermal_model/cable/cable_circuit.py
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | |
from_cable
staticmethod
from_cable(
circuit_input: CircuitFromCableInputSchema[FDCable],
) -> CableCircuit
Build circuit from cable.
Useful to create circuits from cables that are not (yet) present in the cable database example_cables.csv.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuit_input
|
CircuitFromCableInputSchema[FDCable]
|
CircuitFromCableInputSchema instance containing the necessary information to build the circuit, including the cable instance. |
required |
Returns:
| Type | Description |
|---|---|
CableCircuit
|
A CableCircuit instance that can be added to the static environment. |
Source code in cable_thermal_model/cable/cable_circuit.py
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | |
return_mirror_cable
Return mirror cable based on given cable.
A mirror cable is an exact copy of a given cable with the only difference being that the sign of the y-coordinate is switched. Mirror cables are essential in guaranteeing that the boundary conditions are satisfied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pos_cable
|
PosCable
|
Cable positioned in the static environment |
required |
Returns:
| Type | Description |
|---|---|
PosCable
|
'mirrored' positioned cable |
Source code in cable_thermal_model/cable/cable_circuit.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
add_soil_layer
add_soil_layer(
pos_cable: PosCable,
soil_rho: float,
soil_capacity: float,
logarithmic_soil_gridpoint_density: float,
soil_radius: float,
) -> PosCable
Add soil layers to cable attribute of the given PosCable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pos_cable
|
PosCable
|
Positioned cable instance without any soil layers |
required |
soil_rho
|
float
|
Thermal resistivity of the soil layer to add in Km/W |
required |
soil_capacity
|
float
|
Thermal capacity of the soil layer to add in J/(m³K) |
required |
logarithmic_soil_gridpoint_density
|
float
|
The density of grid points in the soil layer, this is used to compute the number of grid points in the soil layer based on its thickness. The density represents the number of grid points per factor 2 increase in soil layer thickness. |
required |
soil_radius
|
float
|
The outer radius of the soil layer to add. |
required |
Returns:
| Type | Description |
|---|---|
PosCable
|
New PosCable instance where the only difference is that the cable now has soil layers. |
Source code in cable_thermal_model/cable/cable_circuit.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
remove_soil
Remove soil layers from cable attribute of the given PosCable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pos_cable
|
PosCable
|
Positioned cable instance with soil layers |
required |
Returns:
| Type | Description |
|---|---|
PosCable
|
New PosCable instance where the only difference is that the cable now has no soil layers. |
Source code in cable_thermal_model/cable/cable_circuit.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |