modelSw3

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

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanInputcontroltrue => p--n2 connected, false => p--n1 connected
Interfaces.BondConpPositive bond graph connector
Interfaces.BondConn2Second negative bond graph connector
Interfaces.BondConn1First negative bond graph connector