Cable Thermal Model is a physical model which can be used to calculate cable temperature profiles in situations with dynamic profiles for loads, ambient temperature, soil properties. The model uses an implicit Euler finite difference approach to discretize the heat equation. Moreover, it relies on the NEN-IEC norms for cable ratings. Cable Thermal Model supports different bonding types, circuit types and environments in soil as well as in air.
- Python Version: Python 3.11 or higher
- Operating System: Windows, Linux, or macOS
- Package Manager: uv
Install the package from PyPI:
pip install cable-thermal-modelFor better dependency management, use uv:
Adding to an Existing uv Project:
uv add cable-thermal-modelCreating a New uv Project:
If you're starting from scratch, first create a new uv project:
# Create a new uv project
uv init my-cable-thermal-model
cd my-cable-thermal-model
# Add cable-thermal-model
uv add cable-thermal-model
# Install the project dependencies
uv syncIf you plan to contribute to the Cable Thermal Model, follow these steps to set up your development environment:
git clone https://github.com/alliander-opensource/cable-thermal-model
cd cable-thermal-modelWe recommend using uv for development:
# Install all dependencies including development tools
uv sync --group dev
Pre-commit hooks ensure code quality and proper licensing headers:
# Install pre-commit hooks
pre-commit install --install-hooksThe reuse pre-commit hook ensures that all files have proper copyright headers (MPL-2.0 license).
After installation, verify that the package is correctly installed by importing some of the main classes:
from cable_thermal_model import (
CircuitType,
BondingType,
StaticEnvSoil,
StaticEnvAir,
ModelFactory,
CableKey
)
# Check the installed version
from cable_thermal_model import __version__
print(f"Cable Thermal Model version: {__version__}")If the import succeeds without errors, your installation is complete!
For more information regarding the model, technical documentation and working examples, please visit the documentation: