modelSw
Generic switch element of the Modelica bond graph library
Extends from Interfaces.PassiveOnePort (Partial model invoking one bondgraphic connector).
Information
The generic switch element is a passive OnePort element. It inherits the effort and flow variables from the passive OnePort. The switch has an additional modulating Boolean input signal modeling the switch position. If the modulating input signal has a value of true, the switch is considered open.The causality of the switch element must be free, i.e., the switch element must be placed inside an algebraic loop.
Potential variables: e: Bondgraphic effort variable f: Bondgraphic flow variable, normalized positive for flows into the model open: Boolean variable denoting the switch position (modulation input signal)
Equations:
0 = if open then f else e
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| BondLib.Interfaces.BondCon | BondCon1 (from PassiveOnePort) | Bond graph connector | |
| Modelica.Blocks.Interfaces.BooleanInput | BooleanInPort1 | Boolean input signal (true if switch is open) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | e (from PassiveOnePort) | Bondgraphic effort | |
| Real | f (from PassiveOnePort) | Bondgraphic flow | |
| Boolean | open | Switch position |