-
Notifications
You must be signed in to change notification settings - Fork 164
/
Damper.mo
63 lines (61 loc) · 2.92 KB
/
Damper.mo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
within Modelica.Mechanics.Translational.Examples;
model Damper "Use of damper models"
extends Modelica.Icons.Example;
Translational.Components.Mass mass1(
L=1,
s(start=3, fixed=true),
v(start=10, fixed=true),
m=1) annotation (Placement(transformation(extent={{-60,50},{-40,70}})));
Translational.Components.Damper damper1(d=25) annotation (Placement(
transformation(extent={{-10,50},{10,70}})));
Translational.Components.Fixed fixed1(s0=4.5) annotation (Placement(
transformation(extent={{30,50},{50,70}})));
Translational.Components.Mass mass2(
L=1,
s(start=3, fixed=true),
v(start=10, fixed=true),
m=1) annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
Translational.Components.Damper damper2(d=25) annotation (Placement(
transformation(extent={{-10,0},{10,20}})));
Translational.Components.Fixed fixed2(s0=4.5) annotation (Placement(
transformation(extent={{30,-10},{50,10}})));
Translational.Components.Mass mass3(
L=1,
s(start=3, fixed=true),
v(start=10, fixed=true),
m=1) annotation (Placement(transformation(extent={{-60,-70},{-40,-50}})));
Translational.Components.Fixed fixed3(s0=4.5) annotation (Placement(
transformation(extent={{30,-70},{50,-50}})));
Translational.Components.Spring spring2(s_rel0=1, c=1) annotation (
Placement(transformation(extent={{-10,-20},{10,0}})));
Translational.Components.SpringDamper springDamper3(
s_rel0=1,
d=25,
c=1) annotation (Placement(transformation(extent={{-10,-70},{10,-50}})));
equation
connect(mass1.flange_b, damper1.flange_a)
annotation (Line(points={{-40,60},{-10,60}}, color={0,127,0}));
connect(mass2.flange_b, damper2.flange_a)
annotation (Line(points={{-40,0},{-20,0},{-20,10},{-10,10}},
color={0,127,0}));
connect(damper2.flange_b, spring2.flange_b)
annotation (Line(points={{10,10},{20,10},{20,-10},{10,-10}},
color={0,127,0}));
connect(damper2.flange_a, spring2.flange_a)
annotation (Line(points={{-10,10},{-20,10},{-20,-10},{-10,-10}},
color={0,127,0}));
connect(mass3.flange_b, springDamper3.flange_a)
annotation (Line(points={{-40,-60},{-10,-60}}, color={0,127,0}));
connect(damper1.flange_b, fixed1.flange) annotation (Line(
points={{10,60},{40,60}},color={0,127,0}));
connect(damper2.flange_b, fixed2.flange) annotation (Line(points={{10,10},{20,10},{20,0},{40,0}},
color={0,127,0}));
connect(springDamper3.flange_b, fixed3.flange) annotation (Line(
points={{10,-60},{40,-60}},color={0,127,0}));
annotation (Documentation(info="<html>
<p>
Demonstrate usage of a translational damper component in various configurations.
</p>
</html>"),
experiment(StopTime=1.0, Interval=0.001));
end Damper;