Home > Resources > MBDyn Examples > 3. Double Rigid Pendulum (1)
MBDyn Examples

## 3. Double Rigid Pendulum (1)

### Input File

```# double_rigid_pendulum.mbd

begin: data;
problem: initial value;
end: data;

begin: initial value;
initial time:   0.;
final time:     5.;
time step:      1.e-3;
max iterations: 10;
tolerance:      1.e-6;
end: initial value;

begin: control data;
structural nodes: 2;
rigid bodies:     2;
joints:           2;
gravity;
end: control data;

# Design Variables

# Node Labels

# Body Labels

# Joint Labels

begin: nodes;
1./2.*L, 0., 0., # absolute position
eye,             # absolute orientation
null,            # absolute velocity
null;            # absolute angular velocity

L, 0., 1./2.*L,        # absolute position
euler, 0., -pi/2., 0., # absolute orientation
null,                  # absolute velocity
null;                  # absolute angular velocity

end: nodes;

begin: elements;
M,                                # mass
null,                             # relative center of mass
diag, 0., M*L^2./12., M*L^2./12.; # inertia matrix

M,                                # mass
null,                             # relative center of mass
diag, 0., M*L^2./12., M*L^2./12.; # inertia matrix

revolute pin,
-1./2.*L, 0., 0.,                    # relative offset
hinge, 1, 1., 0., 0., 3, 0., 1., 0., # relative axis orientation
null,                                # absolute pin position
hinge, 1, 1., 0., 0., 3, 0., 1., 0.; # absolute pin orientation