1 | model TranslationalTests "Tests Elastogap,Position,Move and RelativeStates"
|
---|
2 | annotation (uses(Modelica(version="2.2.1")), Diagram(Text(
|
---|
3 | extent=[-54,102; 90,62],
|
---|
4 | string="Test of Translational Components",
|
---|
5 | style(color=0, rgbcolor={0,0,0}))));
|
---|
6 | Modelica.Mechanics.Translational.ElastoGap elastoGap(s_rel0=0.1)
|
---|
7 | annotation (extent=[2,-38; 22,-18]);
|
---|
8 | Modelica.Mechanics.Translational.Rod rod(L=0.1)
|
---|
9 | annotation (extent=[-32,-38; -12,-18]);
|
---|
10 | Modelica.Mechanics.Translational.Move move
|
---|
11 | annotation (extent=[-58,-38; -38,-18]);
|
---|
12 | Modelica.Mechanics.Translational.Position position
|
---|
13 | annotation (extent=[46,-100; 66,-80], rotation=0);
|
---|
14 | Modelica.Blocks.Sources.SawTooth sawTooth(period=0.1)
|
---|
15 | annotation (extent=[10,-100; 30,-80]);
|
---|
16 | Modelica.Blocks.Continuous.Integrator integrator
|
---|
17 | annotation (extent=[-94,58; -74,78]);
|
---|
18 | Modelica.Blocks.Continuous.Derivative derivative
|
---|
19 | annotation (extent=[-92,-12; -72,8]);
|
---|
20 | Modelica.Blocks.Routing.Multiplex3 multiplex3_1
|
---|
21 | annotation (extent=[-54,18; -34,38]);
|
---|
22 | Modelica.Blocks.Sources.Sine sine(freqHz=15, amplitude=50)
|
---|
23 | annotation (extent=[-92,20; -72,40]);
|
---|
24 | Modelica.Mechanics.Translational.Spring spring(s_rel0=0.1)
|
---|
25 | annotation (extent=[-4,2; 16,22]);
|
---|
26 | Modelica.Mechanics.Translational.SlidingMass slidingMass(L=0.1, m=0.01)
|
---|
27 | annotation (extent=[24,2; 44,22]);
|
---|
28 | Modelica.Mechanics.Translational.Spring spring1(s_rel0=0.1)
|
---|
29 | annotation (extent=[50,2; 70,22]);
|
---|
30 | Modelica.Mechanics.Translational.Fixed fixed(s0=0.4)
|
---|
31 | annotation (extent=[76,2; 96,22]);
|
---|
32 | Modelica.Mechanics.Translational.RelativeStates relativeStates
|
---|
33 | annotation (extent=[24,42; 44,62]);
|
---|
34 | equation
|
---|
35 | connect(elastoGap.flange_a, rod.flange_b)
|
---|
36 | annotation (points=[2,-28; -12,-28], style(color=58, rgbcolor={0,127,0}));
|
---|
37 | connect(sawTooth.y, position.s_ref)
|
---|
38 | annotation (points=[31,-90; 44,-90], style(color=74, rgbcolor={0,0,127}));
|
---|
39 | connect(integrator.y, multiplex3_1.u1[1]) annotation (points=[-73,68; -66,68;
|
---|
40 | -66,35; -56,35], style(color=74, rgbcolor={0,0,127}));
|
---|
41 | connect(derivative.y, multiplex3_1.u3[1]) annotation (points=[-71,-2; -64,-2;
|
---|
42 | -64,21; -56,21], style(color=74, rgbcolor={0,0,127}));
|
---|
43 | connect(rod.flange_a, move.flange_b) annotation (points=[-32,-28; -38,-28],
|
---|
44 | style(color=58, rgbcolor={0,127,0}));
|
---|
45 | connect(move.u, multiplex3_1.y) annotation (points=[-60,-28; -64,-28; -64,-14;
|
---|
46 | -26,-14; -26,28; -33,28], style(color=74, rgbcolor={0,0,127}));
|
---|
47 | connect(sine.y, integrator.u) annotation (points=[-71,30; -68,30; -68,46;
|
---|
48 | -100,46; -100,68; -96,68], style(color=74, rgbcolor={0,0,127}));
|
---|
49 | connect(derivative.u, sine.y) annotation (points=[-94,-2; -98,-2; -98,12; -68,
|
---|
50 | 12; -68,30; -71,30], style(color=74, rgbcolor={0,0,127}));
|
---|
51 | connect(multiplex3_1.u2[1], sine.y) annotation (points=[-56,28; -62,28; -62,
|
---|
52 | 30; -71,30], style(color=74, rgbcolor={0,0,127}));
|
---|
53 | connect(position.flange_b, elastoGap.flange_b) annotation (points=[66,-90; 68,
|
---|
54 | -90; 68,-28; 22,-28], style(color=58, rgbcolor={0,127,0}));
|
---|
55 | connect(spring.flange_a, rod.flange_b) annotation (points=[-4,12; -12,12; -12,
|
---|
56 | -28], style(color=58, rgbcolor={0,127,0}));
|
---|
57 | connect(slidingMass.flange_a, spring.flange_b)
|
---|
58 | annotation (points=[24,12; 16,12], style(color=58, rgbcolor={0,127,0}));
|
---|
59 | connect(spring1.flange_a, slidingMass.flange_b)
|
---|
60 | annotation (points=[50,12; 44,12], style(color=58, rgbcolor={0,127,0}));
|
---|
61 | connect(fixed.flange_b, spring1.flange_b)
|
---|
62 | annotation (points=[86,12; 70,12], style(color=58, rgbcolor={0,127,0}));
|
---|
63 | connect(relativeStates.flange_a, slidingMass.flange_a)
|
---|
64 | annotation (points=[24,52; 24,12], style(color=58, rgbcolor={0,127,0}));
|
---|
65 | connect(relativeStates.flange_b, slidingMass.flange_b)
|
---|
66 | annotation (points=[44,52; 44,12], style(color=58, rgbcolor={0,127,0}));
|
---|
67 | end TranslationalTests;
|
---|