cable_layer_input_schemas
AbstractLayerInputSchema
Bases: BaseModel
Base input schema for a generic cable layer.
The schema stores geometric properties for a single radial cable layer and derives missing values when enough dimensional information is available.
calculate_surface_area
calculate_surface_area() -> float
Calculate the annular surface area of the layer.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Layer annular area computed as pi * (r_o^2 - r_i^2). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inner or outer radius is not defined. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
43 44 45 46 47 48 49 50 51 52 53 54 55 | |
validate_thickness
classmethod
validate_thickness(
thickness: float | None = None,
) -> float | None
Validate that thickness is strictly positive when provided.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
thickness
|
float | None
|
Optional thickness value to validate. |
None
|
Returns:
| Type | Description |
|---|---|
float | None
|
float | None: The validated thickness. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If thickness is zero or negative. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
validate_inner_radius
validate_inner_radius() -> Self
Validate that the inner radius is non-negative.
Returns:
| Name | Type | Description |
|---|---|---|
_AbstractLayerInputSchema |
Self
|
The validated model instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inner_radius is negative. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
validate_dimension_consistency
validate_dimension_consistency() -> Self
Validate and derive consistent radial dimensions.
Returns:
| Name | Type | Description |
|---|---|---|
_AbstractLayerInputSchema |
Self
|
The validated model instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If provided dimensions are physically inconsistent. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
validate_layer_material
classmethod
Validate that a layer material is not explicitly set to NONE.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material
|
Material
|
Layer material enum value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Material |
Material
|
The validated material. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the material enum exposes a |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
ConductingLayerInputSchema
Bases: AbstractLayerInputSchema
Input schema for conducting layers with optional conducting area.
validate_conducting_surface_area
validate_conducting_surface_area() -> Self
Validate that conducting surface area does not exceed layer area.
Returns:
| Name | Type | Description |
|---|---|---|
_ConductingLayerInputSchema |
Self
|
The validated model instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If conducting_surface_area exceeds calculated area. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
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 | |
InternalOilDuctInputSchema
ConductorInputSchema
Bases: ConductingLayerInputSchema
Input schema for conductor layer properties.
validate_single_conductor_radius
validate_single_conductor_radius() -> Self
Validate that conducting surface area does not exceed area calculated from single conductor radius.
Returns:
| Name | Type | Description |
|---|---|---|
ConductorInputSchema |
Self
|
The validated model instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If single_conductor_radius is provided and conducting_surface_area exceeds the area calculated from it. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
validate_conductor_shape_and_radius
validate_conductor_shape_and_radius() -> Self
Validate that if inner_radius is not zero, the conductor shape is hollow.
Returns:
| Name | Type | Description |
|---|---|---|
ConductorInputSchema |
Self
|
The validated model instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If inner_radius is greater than zero and shape is not hollow. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |
ConductorScreenInputSchema
InsulationInputSchema
ThreeCoreCableInsulationInputSchema
Bases: InsulationInputSchema
Input schema for insulation layer properties specific to three core cables.
compute_inner_radius
compute_inner_radius() -> Self
Compute or validate the equivalent inner insulation radius.
When both outer_radius and insulation_equivalent_radius_ratio are
available, this method derives inner_radius and validates consistency
with a user-provided value.
Returns:
| Name | Type | Description |
|---|---|---|
ThreeCoreCableInsulationInputSchema |
Self
|
The validated model instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the derived inner radius conflicts with an already provided inner radius. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
validate_diameter_over_stranded_conductors
classmethod
validate_diameter_over_stranded_conductors(
diameter_over_stranded_conductors: float,
) -> float
Validate the stranded-conductor diameter value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
diameter_over_stranded_conductors
|
float
|
Diameter over stranded conductors in meters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The validated diameter. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the diameter is not strictly positive. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | |
validate_single_conductor_insulation_thickness
classmethod
validate_single_conductor_insulation_thickness(
single_conductor_insulation_thickness: float,
) -> float
Validate the single-conductor insulation thickness.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
single_conductor_insulation_thickness
|
float
|
Insulation thickness from conductor to screen in meters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The validated insulation thickness. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If thickness is not strictly positive. |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
InsulationScreenInputSchema
ScreenInputSchema
Bases: ConductingLayerInputSchema
Input schema for metallic screen layer properties.
validate_screen_type
classmethod
validate_screen_type(
screen_type: CableScreenType,
) -> CableScreenType
Validate supported screen types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
screen_type
|
CableScreenType
|
Screen type enum value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CableScreenType |
CableScreenType
|
The validated screen type. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If |
Source code in cable_thermal_model/cable/schemas/cable_layer_input_schemas.py
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |