test.mo 2.3 KB

12345678910111213141516171819202122232425262728
  1. model test
  2. Modelica.Mechanics.Translational.Components.SpringDamper springDamper1(c = 1, d = 1) annotation(
  3. Placement(visible = true, transformation(origin = {-42, 32}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  4. Modelica.Mechanics.Translational.Components.Mass mass1(m = 1) annotation(
  5. Placement(visible = true, transformation(origin = {-42, 6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  6. Modelica.Mechanics.Translational.Components.Spring spring1(c = 1) annotation(
  7. Placement(visible = true, transformation(origin = {-42, -22}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  8. Modelica.Mechanics.Translational.Components.Mass mass2(m = 1) annotation(
  9. Placement(visible = true, transformation(origin = {-42, 58}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  10. Modelica.Mechanics.Translational.Sources.ConstantForce constantForce1(f_constant = 1) annotation(
  11. Placement(visible = true, transformation(origin = {-42, 86}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  12. Modelica.Mechanics.Translational.Components.Fixed fixed1 annotation(
  13. Placement(visible = true, transformation(origin = {-42, -46}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  14. equation
  15. connect(fixed1.flange, spring1.flange_b) annotation(
  16. Line(points = {{-42, -46}, {-42, -46}, {-42, -32}, {-42, -32}}, color = {0, 127, 0}));
  17. connect(constantForce1.flange, mass2.flange_a) annotation(
  18. Line(points = {{-42, 76}, {-42, 76}, {-42, 68}, {-42, 68}}, color = {0, 127, 0}));
  19. connect(springDamper1.flange_a, mass2.flange_b) annotation(
  20. Line(points = {{-42, 42}, {-42, 42}, {-42, 42}, {-42, 42}, {-42, 42}, {-42, 42}, {-42, 42}, {-42, 42}, {-42, 42}, {-40, 42}, {-40, 48}, {-42, 48}, {-42, 48}, {-42, 48}, {-42, 48}, {-42, 48}, {-42, 48}, {-42, 48}, {-42, 48}, {-42, 48}}, color = {0, 127, 0}));
  21. connect(mass1.flange_b, spring1.flange_a) annotation(
  22. Line(points = {{-42, -4}, {-42, -12}}, color = {0, 127, 0}));
  23. connect(mass1.flange_a, springDamper1.flange_b) annotation(
  24. Line(points = {{-42, 16}, {-42, 16}, {-42, 16}, {-42, 16}, {-42, 16}, {-42, 16}, {-42, 16}, {-40, 16}, {-40, 22}, {-42, 22}, {-42, 22}, {-42, 22}, {-42, 22}, {-42, 22}, {-42, 22}, {-42, 22}, {-42, 22}, {-42, 22}}, color = {0, 127, 0}));
  25. annotation(
  26. uses(Modelica(version = "3.2.2")));
  27. end test;