stranded-cable is a python package proposed to evaluate stranded cables' physical characteristics.
To install the package using pip, execute the following command:
python -m pip install https://github.com/rte-france/pallas-stranded-cable/archive/refs/heads/main.zip
This example defines a two-layer conductor cable directly from grades of steel and aluminium, speeding up the definition. When using grades of materials implemented in this package, only the diameter of wires, their number per layer, the grade of materials and the lay length for each layer need to be defined. Mechanical and thermal properties are already tabulated in the package.
import numpy as np
from strdcable.cable import Conductor
cable = Conductor(
dwires=np.array([3e-3, 2e-3]),
nbwires=np.array([1, 6]),
material=np.array(['ST6C', 'AL1']), # 'ST6C' is a grade of steel, 'AL1' is a grade of aluminium
laylengths=np.array([np.nan, 0.2])
)
The export method of the StrandedCable
class allows exporting all of the cable's properties in a dataframe:
df = cable.export(format='dataframe')
>>> df[['nb_wires', 'wire_diameter', 'young_modulus', 'ultimate_stress']]
nb_wires wire_diameter young_modulus ultimate_stress
0 1 0.003 207000000000 1650000000
1 6 0.002 68000000000 185000000
Homogenized cable properties can be accessed directly from the StrandedCable
object:
>>> cable.A
2.5918139392115792e-05
>>> cable.m
0.10604410834231327
>>> cable.EA
2733197.4739603605
>>> cable.c_dilat
1.6843561209162503e-05
First, make sure you have sphinx and the Readthedocs theme installed.
If you use pip, open a terminal and enter the following commands:
pip install sphinx sphinx_rtd_theme
If you use conda, open an Anaconda Powershell Prompt and enter the following commands:
conda install sphinx sphinx_rtd_theme
Then, in the same terminal or anaconda prompt, build the doc with:
cd doc
make html
The documentation can then be accessed from doc/_build/html/index.html
.
stranded-cable is developed by Eurobios Mews Labs and supported by Rte-R&D via the OLLA project (see ResearchGate).