Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cable thermal model

Quality Gate Status Code Smells Coverage Duplicated Lines (%) Maintainability Rating

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.

Getting started

System Requirements

  • Python Version: Python 3.11 or higher
  • Operating System: Windows, Linux, or macOS
  • Package Manager: uv

Installation

For Users

Installation via pip

Install the package from PyPI:

pip install cable-thermal-model

Installation via uv (Recommended)

For better dependency management, use uv:

Adding to an Existing uv Project:

uv add cable-thermal-model

Creating 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 sync

For Developers

If you plan to contribute to the Cable Thermal Model, follow these steps to set up your development environment:

1. Clone the Repository

git clone https://github.com/alliander-opensource/cable-thermal-model
cd cable-thermal-model

2. Install Dependencies with uv

We recommend using uv for development:

# Install all dependencies including development tools
uv sync --group dev

3. Enable Pre-commit Hooks

Pre-commit hooks ensure code quality and proper licensing headers:

# Install pre-commit hooks
pre-commit install --install-hooks

The reuse pre-commit hook ensures that all files have proper copyright headers (MPL-2.0 license).

Verifying Your Installation

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!

Documentation

For more information regarding the model, technical documentation and working examples, please visit the documentation:

https://alliander-opensource.github.io/cable-thermal-model/

About

The CTM (Cable Thermal Model) is a physical model used for computing dynamic temperatures of electrical power grid cables. The model computes cable temperatures by approximating the heat equation using a finite difference method.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages