GunnsElectSelector - nasa/gunns GitHub Wiki

GunnsElectSelector

default_img

Background

This link creates a conductance from the input port 0 to the output port selected by the user. The user can change the output port selection in runtime. The link is dynamically configured with one or more output ports in the drawing. The output port numbers range from 1 to the total number of ports - 1. In runtime, a port selection <= 0 or >= the number of ports turns off the connection, isolating all ports. The connection is similar in function to the GunnsBasicConductor link. Current can flow in either direction.

How To Use in GunnsDraw

This is a variable-port link, and can have any number 2 or more ports.

The picture below shows a typical setup. The 'input' node is on Port 0, and 1 or more 'output' nodes are on Ports 1 and up. Note the GunnsDraw shape doesn't care where you connect ports, so flip or rotate the shape as needed for clarity in your drawing.

default_img

Port Connection Rules (These are limitations on the port connection to nodes that the link enforces in run-time):

  • This link must connect to at least 2 nodes. Port 0 is always the input port, and port 1 is always the first output port.

Other Rules (These are extra rules you should always try to follow):

  • N/A

Configuration Data Parameters:

  • defaultConductance (defaults to 0.0): Same as defaultConductivity in GunnsBasicConductor.
  • mPortLabels (defaults to 0, must be a curly-braced set of comma-separated strings, i.e. {"Input", "Output1", "Output2"}: This defines a label for each port for reference on user displays. GunnsDraw uses your entry as the right-hand side of a C++ array initializer, i.e. std::string array[] = {"Input", "Output1", "Output2"} so your entry must be syntactically correct. The number of values in the set must match the number of ports you have defined by connected ports. If labels are not desired, then enter "" for each port, i.e. {"", "", ""}

Input Data Parameters:

  • malfBlockageFlag (defaults to false): This blocks the effective conductance of the connection, just like the blockage malfunction in a GunnsBasicConductor.
  • malfBlockageValue Same as GunnsBasicConductor.
  • selector (defaults to 0): This is the initial selected port number of the connection. Selecting between 1 and the number of ports minus 1 will initially connect that output port to the input port 0. Any other value will disconnect the input port 0 from any of the outputs.

Common Problems

  • N/A

References

  • N/A
⚠️ **GitHub.com Fallback** ⚠️