Balance Engine
The BalanceEngine is the central API for computing insulator chain positions and cable tensions along a power line section. It handles two main scenarios:
- Adjustment: computing the reference cable length \(L_0\) at sagging conditions (no weather, sagging temperature).
- Change of state: computing chain displacements and cable parameters under new weather conditions and/or temperature.
It also supports optional features such as adding point loads on spans and simulating cable shifting or shortening operations.
Instantiation
A BalanceEngine requires a CableArray and a SectionArray as inputs. Both must be fully configured before the engine is created.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
Key attributes after construction:
| Attribute | Description |
|---|---|
engine.support_number |
Number of supports (= len(engine)) |
engine.span_model |
The catenary span model |
engine.balance_model |
The balance model (insulator chains) |
engine.cable_loads |
Wind and ice load container |
solve_adjustment()
Solves the insulator chain positions at sagging conditions. This establishes \(L_0\) (the unstressed cable reference length) that is used as the reference for all subsequent change-of-state computations.
Must be called before solve_change_state() (or it will be triggered automatically with a warning).
1 2 3 4 5 | |
After this call, engine.L_ref and engine.initial_L_ref are set. The sagging parameter and chain displacements are also updated inside the balance model.
solve_change_state()
Solves the insulator chain positions under new weather conditions and/or a new temperature. All parameters are optional; omitting one uses its default value (see table below).
| Parameter | Default | Unit |
|---|---|---|
wind_pressure |
0.0 |
Pa |
ice_thickness |
0.0 |
m |
new_temperature |
15.0 |
°C |
wind_direction |
"anticlockwise" |
— |
1 2 3 4 5 6 7 8 9 10 11 12 | |
Wind sense convention:
"anticlockwise"(default): wind blows away from the viewer (left in the span plane)."clockwise": wind blows towards the viewer (right in the span plane).
Passing a scalar broadcasts to all spans; passing an array gives per-span control:
1 | |
Warning
If solve_adjustment() has not been called first, it is triggered automatically and a BalanceEngineWarning is emitted.
add_loads()
Adds a point load (e.g. a maintenance device) on a span. Inputs are per-support arrays; the last support value must be nan (span-based convention).
1 2 3 4 5 6 7 | |
load_position_distancemust be in[0, span_length]for each span; aValueErroris raised otherwise.- After the call,
engine.reset(full=False)is triggered automatically to keep the engine consistent.
get_data_spans()
Returns a dictionary summarising the key span-level results after a solve. All values are lists of length equal to the number of spans.
1 2 3 4 | |
| Key | Description | Unit |
|---|---|---|
span_length |
Horizontal span length | m |
elevation |
Elevation difference between supports | m |
parameter |
Sagging parameter | m |
tension_sup |
Tension at upper attachment | (configured output unit) |
tension_inf |
Tension at lower attachment | (configured output unit) |
L0 |
Reference cable length | m |
horizontal_distance |
Projected horizontal distance | m |
arc_length |
Cable arc length | m |
T_h |
Horizontal component of tension | (configured output unit) |
reset()
Re-initialises the engine. Use full=True to completely rebuild all internal models (span model, deformation model, balance model, solvers). Use full=False (default) for a lighter reset that keeps the span and deformation models but reloads loads and cable data.
1 2 | |
Warning
reset(full=True) rebuilds the internal models but does not clear engine.L_ref or engine.initial_L_ref. If you need a fresh adjustment (for example after changing geometry, loads, or cable data), you must call solve_adjustment() again before solve_change_state().
Typical workflows
Basic sag-tension
1 2 3 4 5 6 | |
Point load on a span
1 2 3 4 5 6 7 | |