Model
A thermal model to calculate transformer temperatures under specified load and ambient temperature profiles.
Initialising a transformer model with a temperature simulation profile
>>> from datetime import datetime
>>> from transformer_thermal_model.cooler import CoolerType
>>> from transformer_thermal_model.schemas import InputProfile, UserTransformerSpecifications
>>> from transformer_thermal_model.transformer import PowerTransformer
>>> from transformer_thermal_model.model import Model
>>> # First, we necreate the input profile
>>> datetime_index = [
... datetime(2023, 1, 1, 0, 0),
... datetime(2023, 1, 1, 1, 0),
... datetime(2023, 1, 1, 2, 0),
... ]
>>> load_profile = [0.8, 0.9, 1.0]
>>> ambient_temperature_profile = [25.0, 24.5, 24.0]
>>> input_profile = InputProfile.create(
... datetime_index=datetime_index,
... load_profile=load_profile,
... ambient_temperature_profile=ambient_temperature_profile,
... )
>>> # Then, we create the transformer with some basic specifications
>>> tr_specs = UserTransformerSpecifications(
... load_loss=1000, # Transformer load loss [W]
... nom_load_sec_side=1500, # Transformer nominal current secondary side [A]
... no_load_loss=200, # Transformer no-load loss [W]
... amb_temp_surcharge=20, # Ambient temperature surcharge [K]
... )
>>> tr = PowerTransformer(
... user_specs=tr_specs,
... cooling_type=CoolerType.ONAN
... )
>>> # Finally, we can use the input profile in the transformer model
>>> model = Model(temperature_profile=input_profile, transformer=tr)
Attributes:
Name | Type | Description |
---|---|---|
transformer |
Transformer
|
The transformer that the model will use to calculate the temperatures. |
data |
DataFrame
|
The data that the model will use to calculate the top-oil and hot-spottemperatures. |
init_top_oil_temp |
float | None
|
The initial top-oil temperature. Defaults to None. If this is provided, will start the calculation with this temperature. If not provided, will start the calculation with the first value of the ambient temperature profile. |
init_hot_spot_temp |
float | None
|
The initial hot-spot temperature. Defaults to None. If this is provided, will start the calculation with this temperature. If not provided, will start the calculation with the first value of the ambient temperature profile. |
hot_spot_temp_profile |
Series
|
The modeled hot-spot temperature profile. |
top_oil_temp_profile |
Series
|
The modeled top-oil temperature profile. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
temperature_profile
|
InputProfile
|
The temperature profile for the model. |
required |
transformer
|
Transformer
|
The transformer object. |
required |
init_top_oil_temp
|
float | None
|
The initial top-oil temperature. Defaults to None. If this is provided, will start the calculation with this temperature. If not provided, will start the calculation with the first value of the ambient temperature profile. |
None
|
init_hot_spot_temp
|
float | None
|
The initial hot-spot temperature. Defaults to None. If this is provided, will start the calculation with this temperature. If not provided, will start the calculation with the first value of the ambient temperature profile. |
None
|
Source code in transformer_thermal_model/model/thermal_model.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
run
run() -> OutputProfile
Calculate the top-oil and hot-spot temperatures for the provided Transformer object.
This method prepares the calculation inputs, calculates intermediate factors, and computes the top-oil and hot-spot temperature profiles for the transformer based on the provided load and internal parameters.
Returns:
Name | Type | Description |
---|---|---|
OutputProfile |
OutputProfile
|
Object containing the top-oil and hot-spot temperature profiles. |
Source code in transformer_thermal_model/model/thermal_model.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|