f1 is replaced by p1.f, v1 is replaced by p1.lV, x is replaced by lengthchg, k is replaced by springcst, v is replaced by velocitydiff, f is replaced by forcethru, v2 is replaced by p2.v, and f2 is replaced by p2.f.

Icon class
icon_class
fas fa-quote-left
icon_class_computed
fas fa-quote-left
Related content
Source
Snippet kind
UML keywords
SysML keywords
SysPhS Keywords
Modelica keywords
Keywords
Full quote
f1 is replaced by p1.f, v1 is replaced by p1.lV, x is replaced by lengthchg, k is replaced by springcst, v is replaced by velocitydiff, f is replaced by forcethru, v2 is replaced by p2.v, and f2 is replaced by p2.f.

model Spring
  Flange p1;
  Flange p2;
  parameter Real springcst = “10”;
  Real velocitydiff
  Real forcethru
equation
  p1.f+p2.f=0
  forcethru=p1.f;
  velocitydiff=p1.lV-p2.lV;
  velocitydiff=der(lengthchg);
  forcediff=springcst*lengthchg;
end Spring;
Next snippet
Related snippets
Related snippets (backlinks)
Visit also
Visit also (backlinks)