cable_spec_parsers
CableSpecParser
CableSpecParser(cable_specs: Series)
Bases: ABC
Abstract base class for parsing cable specification rows into structured input schemas.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cable_specs
|
Series
|
Cable specification row from the source cable table. |
required |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
45 46 47 48 49 50 51 52 | |
get_internal_oil_duct_input
abstractmethod
get_internal_oil_duct_input() -> (
InternalOilDuctInputSchema | None
)
Build internal oil duct schema.
Returns:
| Type | Description |
|---|---|
InternalOilDuctInputSchema | None
|
InternalOilDuctInputSchema | None: Oil duct schema when applicable,
otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
54 55 56 57 58 59 60 61 62 63 | |
get_conductor_input
abstractmethod
get_conductor_input() -> ConductorInputSchema
Build conductor schema for the current cable specs.
Returns:
| Name | Type | Description |
|---|---|---|
ConductorInputSchema |
ConductorInputSchema
|
Conductor layer schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
65 66 67 68 69 70 71 72 73 | |
get_conductor_screen_input
abstractmethod
get_conductor_screen_input() -> (
ConductorScreenInputSchema | None
)
Build optional conductor screen schema.
Returns:
| Type | Description |
|---|---|
ConductorScreenInputSchema | None
|
ConductorScreenInputSchema | None: Conductor screen schema when
applicable, otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
75 76 77 78 79 80 81 82 83 84 | |
get_insulation_input
abstractmethod
get_insulation_input() -> InsulationInputSchema
Build insulation schema for the current cable specs.
Returns:
| Name | Type | Description |
|---|---|---|
InsulationInputSchema |
InsulationInputSchema
|
Insulation layer schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
86 87 88 89 90 91 92 93 94 | |
get_insulation_screen_input
abstractmethod
get_insulation_screen_input() -> (
InsulationScreenInputSchema | None
)
Build optional insulation screen schema.
Returns:
| Type | Description |
|---|---|
InsulationScreenInputSchema | None
|
InsulationScreenInputSchema | None: Insulation screen schema when
applicable, otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
96 97 98 99 100 101 102 103 104 105 | |
get_screen_input
get_screen_input() -> ScreenInputSchema | None
Build optional metallic screen input schema.
Returns:
| Type | Description |
|---|---|
ScreenInputSchema | None
|
ScreenInputSchema | None: Screen layer schema when present,
otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
get_bedding_input
get_bedding_input() -> BeddingInputSchema | None
Build optional bedding layer input schema.
Returns:
| Type | Description |
|---|---|
BeddingInputSchema | None
|
BeddingInputSchema | None: Bedding layer schema when present,
otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
get_armour_input
get_armour_input() -> ArmourInputSchema | None
Build optional armour layer input schema.
Returns:
| Type | Description |
|---|---|
ArmourInputSchema | None
|
ArmourInputSchema | None: Armour layer schema when present,
otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |
get_sheath_input
get_sheath_input() -> SheathInputSchema
Build outer sheath layer input schema.
Returns:
| Name | Type | Description |
|---|---|---|
SheathInputSchema |
SheathInputSchema
|
Sheath layer schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
get_cable_constructional_input
get_cable_constructional_input() -> (
CableConstructionalInputSchema
)
Compose full cable constructional schema from parsed fields.
Returns:
| Name | Type | Description |
|---|---|---|
CableConstructionalInputSchema |
CableConstructionalInputSchema
|
Fully assembled constructional input schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
SingleCoreSpecParser
SingleCoreSpecParser(cable_specs: Series)
Bases: CableSpecParser
Parser for single-core cable specifications.
Source code in cable_thermal_model/cable/cable_spec_parsers.py
45 46 47 48 49 50 51 52 | |
get_internal_oil_duct_input
get_internal_oil_duct_input() -> (
InternalOilDuctInputSchema | None
)
Build optional internal oil duct schema for single-core cables.
Returns:
| Type | Description |
|---|---|
InternalOilDuctInputSchema | None
|
InternalOilDuctInputSchema | None: Oil duct schema when a duct is
defined, otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
get_conductor_input
get_conductor_input() -> ConductorInputSchema
Build conductor input schema for a single-core cable.
Returns:
| Name | Type | Description |
|---|---|---|
ConductorInputSchema |
ConductorInputSchema
|
Conductor layer schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
get_conductor_screen_input
get_conductor_screen_input() -> (
ConductorScreenInputSchema | None
)
Build optional conductor screen schema for single-core cables.
Returns:
| Type | Description |
|---|---|
ConductorScreenInputSchema | None
|
ConductorScreenInputSchema | None: Screen schema when thickness is
positive, otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
get_insulation_input
get_insulation_input() -> InsulationInputSchema
Build insulation input schema for a single-core cable.
Returns:
| Name | Type | Description |
|---|---|---|
InsulationInputSchema |
InsulationInputSchema
|
Insulation layer schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
get_insulation_screen_input
get_insulation_screen_input() -> (
InsulationScreenInputSchema | None
)
Build optional insulation screen schema for single-core cables.
Returns:
| Type | Description |
|---|---|
InsulationScreenInputSchema | None
|
InsulationScreenInputSchema | None: Screen schema when thickness is
positive, otherwise |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
ThreeCoreSpecParser
ThreeCoreSpecParser(cable_specs: Series)
Bases: CableSpecParser
Parser for three-core cable specifications.
Source code in cable_thermal_model/cable/cable_spec_parsers.py
45 46 47 48 49 50 51 52 | |
get_internal_oil_duct_input
get_internal_oil_duct_input() -> (
InternalOilDuctInputSchema | None
)
Return oil duct schema for three-core cables.
Returns:
| Type | Description |
|---|---|
InternalOilDuctInputSchema | None
|
InternalOilDuctInputSchema | None: Always |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
332 333 334 335 336 337 338 339 340 | |
get_conductor_input
get_conductor_input() -> ConductorInputSchema
Build conductor input schema for a three-core cable.
Returns:
| Name | Type | Description |
|---|---|---|
ConductorInputSchema |
ConductorInputSchema
|
Conductor layer schema. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
get_conductor_screen_input
get_conductor_screen_input() -> (
ConductorScreenInputSchema | None
)
Return conductor screen schema for three-core cables.
Returns:
| Type | Description |
|---|---|
ConductorScreenInputSchema | None
|
ConductorScreenInputSchema | None: Always |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
364 365 366 367 368 369 370 371 372 | |
get_insulation_input
get_insulation_input() -> (
ThreeCoreCableInsulationInputSchema
)
Build three-core specific insulation input schema.
Returns:
| Name | Type | Description |
|---|---|---|
ThreeCoreCableInsulationInputSchema |
ThreeCoreCableInsulationInputSchema
|
Insulation layer schema with three-core specific fields. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
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 | |
get_insulation_screen_input
get_insulation_screen_input() -> (
InsulationScreenInputSchema | None
)
Return insulation screen schema for three-core cables.
Returns:
| Type | Description |
|---|---|
InsulationScreenInputSchema | None
|
InsulationScreenInputSchema | None: Always |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
405 406 407 408 409 410 411 412 413 | |
SpecParserFactory
Factory that returns the appropriate CableSpecParser for cable specification.
get_spec_parser
staticmethod
get_spec_parser(cable_specs: Series) -> CableSpecParser
Create the parser matching conductor count in cable specs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cable_specs
|
Series
|
Cable specification row from source table. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CableSpecParser |
CableSpecParser
|
Single-core or three-core parser instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If number of conductors is unsupported. |
Source code in cable_thermal_model/cable/cable_spec_parsers.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |