Tags and keywords
SysPhS-1.1: 'The following Modelica code corresponds to Figure 23. It has a model Spring, with two components p1 and p2 of type Flange. Flange is a connector that has one flow component f, and one regular component lV.'
model Spring Flange p1; Flange p2; end Spring; connector Flange flow Real f; Real lV; end Flange;
Realused directly for both 'f' and 'lV' are wrong (or at least not fully consistent):
SysPhS-1.1: p.32: 10.7.8 Modelica modeling, physical interaction: Type Real for 'f' and 'lV' in example Modelica code for Spring do not correspond to 'Figure 23: Ports for physical interaction in SysML', should be Force and Velocity.Export of block
Springto Modelica from the MagicDraw SysML Plugin or Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) gives:
model Spring Spring _Spring; model Spring Flange p1; Flange p2; end Spring; connector Flange flow Force f; Velocity lV; end Flange; type Force=Real(unit="N"); type Velocity=Real(unit="m/s"); end Spring;