SysML parameter names are replaced in the Modelica equations according to the bindings in Figure 13 [ERROR]: f is replaced by u, pos is replaced by y, x is replaced by position, k is replaced by springcst, v is replaced by velocity, m is replaced by mass.

Icon class
icon_class
fas fa-quote-left
icon_class_computed
fas fa-quote-left
Related content
Source
Snippet kind
UML keywords
SysML keywords
Modelica keywords
Keywords
Full quote
SysML parameter names are replaced in the Modelica equations according to the bindings in Figure 13: f is replaced by u, pos is replaced by y, x is replaced by position, k is replaced by springcst, v is replaced by velocity, m is replaced by mass.

model Spring
  input Real u;
  output Real y;
  Real position;
  parameter Real springcst = 1;
  Real velocity;
  parameter Real mass = 10;
equations
  der(velocity)=(u-springcst*position)/m;
  der(position)=velocity;
  y=position;
end Spring;
Next snippet
There is an error in the Figure reference:
The reference to 'Figure 13' is wrong
There are two errors in the Modelica code:
The keyword equation not equations should be used
It should probably say SpringMassSys not Spring
Related snippets
Related snippets (backlinks)
Visit also
Visit also (backlinks)