Ticket #2024: Pendulum_2_MultiBody.mo

File Pendulum_2_MultiBody.mo, 624 bytes (added by Christian Schubert, 12 years ago)
Line 
1within ;
2model 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});
7equation
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")));
13end Pendulum_2_MultiBody;