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, Generic[CableT]
A positioned cable within a circuit, combining cable data with spatial coordinates.
cable_representation
property
cable_representation: str
Return a string representation of this positioned cable for serialization.
distance_to_point
distance_to_point(x: float, y: float) -> float
Return the distance from this cable center to a point in meters.
Source code in cable_thermal_model/cable/cable_circuit.py
81 82 83 | |
distance_to
distance_to(other_cable: PosCable) -> float
Return the heart-to-heart distance to another positioned cable in meters.
Source code in cable_thermal_model/cable/cable_circuit.py
85 86 87 | |
CircuitInitData
Bases: BaseModel
Data class for initializing a cable circuit, encapsulating position, type, and bonding information.
from_schema
classmethod
from_schema(schema: CircuitFromCableInputSchema[Cable]) -> CircuitInitData
Create CircuitInitData from CircuitFromCableInputSchema.
Source code in cable_thermal_model/cable/cable_circuit.py
104 105 106 107 108 109 110 111 112 113 114 115 116 | |
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
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
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 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
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
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
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |
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
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
initialize_pos_cables
initialize_pos_cables(cable: Cable, cable_centers: dict[CablePosition, tuple[float, float]]) -> list[PosCable[Cable]]
Initialize the PosCable instances for the circuit based on the given cable and cable centers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cable
|
Cable
|
Cable 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[Cable]]
|
List of PosCable instances representing the cables in the circuit. |
Source code in cable_thermal_model/cable/cable_circuit.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | |
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
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
validate_no_screen_no_bonding
validate_no_screen_no_bonding(bonding_type: BondingType, cable: Cable)
Validate that if no screen is present, no bonding is applied.
Source code in cable_thermal_model/cable/cable_circuit.py
279 280 281 282 283 284 285 286 287 288 289 290 | |
SingleCable
SingleCable(circuit_init_data: CircuitInitData)
Bases: CableCircuit
A single cable circuit.
Source code in cable_thermal_model/cable/cable_circuit.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |
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
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
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
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 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 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | |
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
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | |
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
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 485 486 487 488 489 490 491 492 493 494 495 496 497 | |
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
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | |
TrefoilCircuitInSinglePipe
TrefoilCircuitInSinglePipe(circuit_init_data: CircuitInitData)
Bases: SingleCable
Trefoil circuit with three cables in one pipe.
This is modeled 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
542 543 544 545 546 547 548 549 550 551 | |
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
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | |
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
583 584 585 586 587 588 589 590 591 592 593 | |
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
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | |
CircuitBuilder
Factory for constructing CableCircuit instances from various input sources.
from_cable
staticmethod
from_cable(circuit_input: CircuitFromCableInputSchema[Cable]) -> 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[Cable]
|
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
625 626 627 628 629 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 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | |
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[CableT]
|
Cable positioned in the static environment |
required |
Returns:
| Type | Description |
|---|---|
PosCable[CableT]
|
'mirrored' positioned cable |
Source code in cable_thermal_model/cable/cable_circuit.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |