Skip to main content

calc_connection_channels

Function calc_connection_channels 

Source
pub fn calc_connection_channels(
    configuration: Configuration,
    terminal_count: usize,
    channel_count: usize,
    neutral: Option<usize>,
) -> Result<Vec<ConnectionChannel>, String>
Expand description

The channels of a connection of terminal_count terminals carrying channel_count stated powers, one channel per power in power order:

  • single phase or delta, two terminals and one power: the first terminal to the second;
  • wye or single phase, one terminal per power: each terminal to ground;
  • wye with one terminal more than its powers: each phase terminal to the neutral, the terminal at neutral or else the last;
  • delta with two terminals per power: each consecutive pair, the first of the pair to the second;
  • delta with one terminal per power: a ring, terminal k to terminal k + 1, the last back to the first.

neutral is read only for a wye with an explicit neutral. The one connection rule: the LinDist3Flow incidence, the GridLAB-D writer, calc_element_connection (every load, capacitor, inverter, source and transformer winding the multiconductor calculations connect) read it.

ยงErrors

A configuration and arity that describe none of these connections, or a neutral position outside the terminal map.