Metadata-Version: 2.3
Name: switchgear-thermal-model
Version: 0.0.1
Summary: Thermal model for switchgears.
Author: Contributors to the Switchgear Thermal Model project
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: numpy>=2.2.5,<3
Requires-Dist: pandas>=2.0.0,<4.0.0
Requires-Dist: pydantic>=2.12.1,<3
Requires-Python: >=3.12, <4
Description-Content-Type: text/markdown

<!--
SPDX-FileCopyrightText: Contributors to the Switchgear Thermal Model project

SPDX-License-Identifier: MPL-2.0
-->

# Switchgear thermal model

[![License: MPL2.0](https://img.shields.io/badge/License-MPL2.0-informational.svg)](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/LICENSE)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=alliander-opensource_switchgear-thermal-model&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=alliander-opensource_switchgear-thermal-model)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=alliander-opensource_switchgear-thermal-model&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=alliander-opensource_switchgear-thermal-model)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=alliander-opensource_switchgear-thermal-model&metric=coverage)](https://sonarcloud.io/summary/new_code?id=alliander-opensource_switchgear-thermal-model)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=alliander-opensource_switchgear-thermal-model&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=alliander-opensource_switchgear-thermal-model)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=alliander-opensource_switchgear-thermal-model&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=alliander-opensource_switchgear-thermal-model)

thermal model which can simulate the temperature of the switchgear, based on
the switchgear specifications, ambient temperature and load profiles.

## Quick start

One can install the switchgear thermal model from PyPI by running

```bash
pip install switchgear-thermal-model
```

### Simple Example

The model uses an `InputProfile`, which is a combination of a datetime index,
load profile, and ambient temperature profile as input for the model.
A quick start can be made using the following code snippet:

```python
import numpy as np

from switchgear_thermal_model.schemas.input_profile import InputProfile
from switchgear_thermal_model.switchgear import Switchgear
from switchgear_thermal_model.thermal_model import switchgear_temp

# Set up the InputProfile
start_time = np.datetime64("2024-01-01T00:00")
dt_minutes = 15
datetime_array = start_time + np.arange(96) * np.timedelta64(dt_minutes, "m")
load_array = np.full((1, 96), 2000)[0]
amb_temp_array = np.full((1, 96), 20)[0]

input_profile = InputProfile(
    datetime_index=datetime_array,
    ambient_temperature_profile=amb_temp_array,
    load_profile=load_array,
)

# Set up a switchgear with specifications
switchgear = Switchgear(
    rated_current=3150,
    measured_temperature_rise=75,
    temp_rise_exp=1.8,
    thermal_time_constant=90
)

# run the model
result = switchgear_temp(input_profile, switchgear)
```

## Features

- **Creating switchgear models**: Create a switchgear model based on specified thermal parameters.
- **Temperature modeling**: Calculate conductor temperature according to IEC 62271‑306.

## Documentation

- [Getting Started](https://alliander-opensource.github.io/switchgear-thermal-model/get_started/about/)
- [API Reference](https://alliander-opensource.github.io/switchgear-thermal-model/api_reference/switchgear_temp/)
- [Examples](https://alliander-opensource.github.io/switchgear-thermal-model/examples/quick_start/)
- [Technical Documentation](https://alliander-opensource.github.io/switchgear-thermal-model/theoretical_documentation/model_equations/)

## License

This project is licensed under the Mozilla Public License, version 2.0 - see
[LICENSE](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/LICENSE) for details.

## Licenses third-party libraries

This project includes third-party libraries,
which are licensed under their own respective Open-Source licenses.
SPDX-License-Identifier headers are used to show which license is applicable.

An overview of these third-party libraries and their licenses is outlined in [THIRD_PARTY_NOTICES](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/THIRD_PARTY_NOTICES.md)

## Contributing

Please read
[CODE_OF_CONDUCT](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/CODE_OF_CONDUCT.md),
[CONTRIBUTING](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/CONTRIBUTING.md)
and
[PROJECT GOVERNANCE](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/GOVERNANCE.md)
for details on the process
for submitting pull requests to us.

## Contact

Please read [SUPPORT](https://github.com/alliander-opensource/switchgear-thermal-model/blob/main/SUPPORT.md) for how to
get in touch with the Switchgear Thermal Model project.
