Tags and keywords
SysPhS-1.1: 'In this example, a constraint block BinaryElectricalComponentConstraint defines parameters and constraints common to resistors, inductors, capacitors, and sources, as shown in Figure 40. These specify that the voltage v across the component is equal to the difference between the voltage at the positive and negative pins. The current i through the component is equal to the current going through the positive pin. The current i through the component is equal to the current going through the positive pin. The sum of the current going through the two pins adds up to zero (one is the negative of the other), because the components do not create, destroy, or store charge. The constraints for the resistor, capacitor, and inductor specify the voltage/current relationship with resistance, capacitance, and inductance, respectively. The source constraint defines the circuit’s electrical source. The ground constraint specifies that the voltage at the ground pin is zero.'
The trail version of the diagram is much like the spec version except:
- The block BinaryElectricalComponentConstraint
is set abstract.
- The correct ValueTypes for Current
, Voltage
, Resistance
, Capacitance
, and Inductance
are used throughout instead of just Real
.
- Each ConstraintBlock definition has been set as owned by the Block that has a usage of it (just as a modelling choice).
Note that the time
variable is known to Modelica, and need not be specified as an additional constraint parameter on SourceConstraint
.