rigidBodyDynamics: Added rotating joint
This joint allows two bodies to rotate relative to each other at a
specified speed. The relative motion is completely specified, so this
joint has zero degrees of freedom.
It could be used, for example, to attach a rotating propeller to a
moving ship:
bodies
{
hull
{
...
}
propeller
{
type rigidBody;
// Dynamic properties
mass ...;
centreOfMass ...;
inertia ...;
// The propeller is connected to the hull
parent hull;
// The position relative to the hull
transform (1 0 0 0 1 0 0 0 1) (20 0 0);
// Rotation settings
joint
{
type rotating;
omega (6 0 0);
}
}
}
This commit is contained in:
59
applications/test/rigidBodyDynamics/doublePendulumAndRotor
Normal file
59
applications/test/rigidBodyDynamics/doublePendulumAndRotor
Normal file
@ -0,0 +1,59 @@
|
||||
solver
|
||||
{
|
||||
type symplectic;
|
||||
}
|
||||
|
||||
bodies
|
||||
{
|
||||
bar1
|
||||
{
|
||||
type rigidBody;
|
||||
mass 3;
|
||||
centreOfMass (0 -0.5 0);
|
||||
inertia (0.2575 0 0 0.015 0 0.2575);
|
||||
parent root;
|
||||
transform (1 0 0 0 1 0 0 0 1) (0 0 0);
|
||||
joint
|
||||
{
|
||||
type Rz;
|
||||
}
|
||||
outline ((0 0 0) (0 -1 0));
|
||||
}
|
||||
bar2
|
||||
{
|
||||
type rigidBody;
|
||||
mass 3;
|
||||
centreOfMass (0 -0.5 0);
|
||||
inertia (0.2575 0 0 0.015 0 0.2575);
|
||||
parent bar1;
|
||||
transform (1 0 0 0 1 0 0 0 1) (0 -1 0);
|
||||
joint
|
||||
{
|
||||
type Rz;
|
||||
}
|
||||
outline ((0 0 0) (0 -1 0));
|
||||
}
|
||||
rotor
|
||||
{
|
||||
type rigidBody;
|
||||
mass 3;
|
||||
centreOfMass (0 -0.5 0);
|
||||
inertia (0.2575 0 0 0.015 0 0.2575);
|
||||
parent bar2;
|
||||
transform (1 0 0 0 1 0 0 0 1) (0 -1 0);
|
||||
joint
|
||||
{
|
||||
type rotating;
|
||||
omega (0 0 1);
|
||||
}
|
||||
outline ((0 0 0) (0 -1 0));
|
||||
}
|
||||
}
|
||||
|
||||
g (0 -9.81 0);
|
||||
|
||||
q (1.5707963267948966 0 0);
|
||||
|
||||
deltaT 0.01;
|
||||
|
||||
endTime 20;
|
||||
Reference in New Issue
Block a user