state_schemas
State
Bases: BaseModel
Stores information about temperatures within cables at the final state.
The final state is reached at the end of the simulation. In addition, the relevant cable representations and their properties are stored.
Attributes:
| Name | Type | Description |
|---|---|---|
cable_representations |
list[PosCable]
|
list[PosCable]: List of cable representations with their properties and positions in the environment. |
full_solution |
dict[CableKey, ndarray]
|
dict[CableKey, np.ndarray]: Combines the internal heating solution with the ambient temperature profile and, for a StateSoil object, the mutual heating solution. |
internal_heating_solution |
dict[CableKey, ndarray]
|
dict[CableKey, np.ndarray]: The temperature delta profile as a result of internal heating due to the load. |
check_solution_consistency
check_solution_consistency()
Validate that full_solution and internal_heating_solution share the same cable keys.
Source code in cable_thermal_model/model/schemas/state_schemas.py
40 41 42 43 44 45 46 47 48 49 50 | |
check_cable_representations_consistency
check_cable_representations_consistency()
Validate that cable_representations and internal_heating_solution share the same cable keys.
Source code in cable_thermal_model/model/schemas/state_schemas.py
52 53 54 55 56 57 58 59 60 61 62 63 | |
StateSoil
Bases: State
Extends upon the base State class. Includes additional attribute mutual_heating_solutions and validation thereof.
Attributes:
| Name | Type | Description |
|---|---|---|
mutual_heating_solutions |
dict[CableKey, ndarray]
|
dict[CableKey, np.ndarray] A dictionary containing the temperature increase inside a cable due to mutual heating from other cables in the environment. This is stored as a dict with CableKey as key and an array of temperature increases per grid point as value. |
validate_mutual_heating_solutions
validate_mutual_heating_solutions()
Validate that mutual_heating_solutions keys match the cable representation keys.
Source code in cable_thermal_model/model/schemas/state_schemas.py
80 81 82 83 84 85 86 87 88 89 90 91 | |
StateAir
Bases: State
StateAir has no added attributes on top of State.
However, we want to make sure there is only one circuit (check for a unique circuit_name).
validate_single_circuit
validate_single_circuit()
Ensure that all cable representations in StateAir belong to the same circuit.
Source code in cable_thermal_model/model/schemas/state_schemas.py
100 101 102 103 104 105 106 | |