1 | within ;
|
---|
2 | model Pendulum_2_MultiBody
|
---|
3 | constant Integer N = 2 "Number of individual elements";
|
---|
4 | inner Modelica.Mechanics.MultiBody.World world(enableAnimation=false);
|
---|
5 | Modelica.Mechanics.MultiBody.Joints.Revolute revolute[N];
|
---|
6 | Modelica.Mechanics.MultiBody.Parts.BodyCylinder bodyCylinder[N](each r={1,0,0});
|
---|
7 | equation
|
---|
8 | connect(world.frame_b, revolute[1].frame_a);
|
---|
9 | connect(revolute[1].frame_b, bodyCylinder[1].frame_a);
|
---|
10 | connect(revolute[2].frame_b, bodyCylinder[2].frame_a);
|
---|
11 | connect(bodyCylinder[1].frame_b, revolute[2].frame_a);
|
---|
12 | annotation (uses(Modelica(version="3.2")));
|
---|
13 | end Pendulum_2_MultiBody;
|
---|