abstract_model
AbstractModel
AbstractModel(
static_env: StaticEnv,
scenario: DataFrame[ScenarioSchemaT],
)
Bases: ABC, Generic[ModelRunOptionsT, StateT, ScenarioSchemaT]
Abstract base class for thermal cable models.
Source code in cable_thermal_model/model/abstract_model.py
48 49 50 51 52 53 | |
run
run(
initial_state: StateT | None = None,
run_options: ModelRunOptionsT | dict | None = None,
) -> ModelOutputSchema[StateT]
Computes the temperature solutions for all cable objects.
Notes
Be careful about changing default run option values. The following settings affect the temperature outcome and should only be changed if you understand the implications:
- temperature_dependent_electric_resistance
- ac_current
- soil_drying
- initial_state
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_state
|
StateT | None
|
Heating information from a previous computation. |
None
|
run_options
|
ModelRunOptionsT | dict | None
|
Run options for the model. If |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ModelOutputSchema |
ModelOutputSchema[StateT]
|
Temperature solutions for all cables. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the provided initial state does not match the model environment. |
Source code in cable_thermal_model/model/abstract_model.py
89 90 91 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 | |