forked from boschresearch/fmi_adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDampedPendulum.mo
29 lines (29 loc) · 2.14 KB
/
DampedPendulum.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
model DampedPendulum
inner Modelica.Mechanics.MultiBody.World world(label2 = "z", n = {0, 0, -1}) annotation(
Placement(visible = true, transformation(origin = {-92, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Joints.Revolute revolute1i(n = {0, 1, 0},phi(start = 1.5708), useAxisFlange = true) annotation(
Placement(visible = true, transformation(origin = {-26, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Parts.Body body1(m = 1, r_CM = {0, 0, -1}) annotation(
Placement(visible = true, transformation(origin = {24, 4}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Mechanics.Rotational.Components.Damper damper1(d = 0.1) annotation(
Placement(visible = true, transformation(origin = {-30, 74}, extent = {{14, -14}, {-14, 14}}, rotation = 0)));
Modelica.Mechanics.MultiBody.Sensors.AbsoluteAngles absoluteAngles annotation(
Placement(visible = true, transformation(origin = {10, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Interfaces.RealOutput revolute1_angle annotation(
Placement(visible = true, transformation(origin = {48, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {48, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(revolute1i.support, damper1.flange_b) annotation(
Line(points = {{-32, 14}, {-32, 45}, {-44, 45}, {-44, 74}}));
connect(damper1.flange_a, revolute1i.axis) annotation(
Line(points = {{-16, 74}, {-16, 45}, {-26, 45}, {-26, 14}}));
connect(world.frame_b, revolute1i.frame_a) annotation(
Line(points = {{-82, 4}, {-36, 4}, {-36, 4}, {-36, 4}}, color = {95, 95, 95}));
connect(revolute1i.frame_b, body1.frame_a) annotation(
Line(points = {{-16, 4}, {14, 4}}, color = {95, 95, 95}));
connect(revolute1i.frame_b, absoluteAngles.frame_a) annotation(
Line(points = {{-16, 4}, {0, 4}, {0, -44}}, color = {95, 95, 95}));
connect(absoluteAngles.angles[2], revolute1_angle) annotation(
Line(points = {{21, -44}, {48, -44}}, color = {0, 0, 127}));
annotation(
uses(Modelica(version = "3.2.2")));
end DampedPendulum;