BondLib.Switches.Sw3

# .BondLib.Switches.Sw3

Switching between two branches if one is unconnected

## Information

This is a special switch used to check whether anything is connected from the outside to the connector n2. If this is the case, the switch should be in the p-n2 position. If this is not the case, the switch should be in the p-n1 position.

This commuting switch must be used instead of the corresponding Sw4 commuting switch, because Dymola sets by default the flow of an unconnected terminal to zero. Hence we must not set it to zero once more externally.

    Bond graph connectors:

     p:           Positive connector

     n1:          First negative connector

     n2:          Second negative connector

    Control variables:

     control:     Boolean variable denoting the switch position (modulation signal)

Logic:

contol = true: p-n2 is connected
contol = false: p-n1 is connected

Generated at 2026-05-12T20:19:03Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos