NodeRigidBodyRotVecLG

A 3D rigid body node based on rotation vector and Lie group methods for rigid bodies. The node has 3 displacement coordinates and three rotation coordinates and can be used in combination with explicit Lie Group time integration methods.

Authors: Gerstmayr Johannes, Holzinger Stefan

Interface

Parameters

The parameters of the item; in a dictionary, its type is ‘RigidBodyRotVecLG’:

name

type

size

default

description

name

String

‘’

node’s unique name

referenceCoordinates

Vector6D

6

[0.,0.,0., 0.,0.,0.]

(symbol: \(\qv\cRef = [q_0,\,q_1,\,q_2,\,\nu_0,\,\nu_1,\,\nu_2]\tp\cRef = [\pv\tp\cRef,\,\tnu\tp\cRef]\tp\)) reference coordinates (position and rotation vector \(\tnu\)) of node ==> e.g. ref. coordinates for finite elements or reference position of rigid body (e.g. for definition of joints)

initialCoordinates

Vector6D

6

[0.,0.,0., 0.,0.,0.]

(symbol: \(\qv\cIni = [q_0,\,q_1,\,q_2,\,\nu_0,\,\nu_1,\,\nu_2]\tp\cIni = [\uv\tp\cIni,\,\tnu\tp\cIni]\tp\)) initial displacement coordinates \(\uv\) and rotation vector \(\tnu\) relative to reference coordinates

initialVelocities

Vector6D

6

[0.,0.,0., 0.,0.,0.]

(symbol: \(\dot \qv\cIni = [\dot q_0,\,\dot q_1,\,\dot q_2,\,\dot \nu_0,\,\dot \nu_1,\,\dot \nu_2]\tp\cIni = [\dot \uv\tp\cIni,\,\dot \tnu\tp\cIni]\tp\)) initial velocity coordinate: time derivatives of displacement and angular velocity vector

visualization

VNodeRigidBodyRotVecLG

parameters for visualization of item

Visualization parameters

The parameters of VNodeRigidBodyRotVecLG, given as visualization:

name

type

size

default

description

show

Bool

True

set true, if item is shown in visualization and false if it is not shown

drawSize

float

-1.

drawing size (diameter, dimensions of underlying cube, etc.) for item; size == -1.f means that default size is used

color

Float4

4

[-1.,-1.,-1.,-1.]

Default RGBA color for nodes; 4th value is alpha-transparency; R=-1.f means, that default color is used

Drawing

Drawn as all nodes; with nodes.showBasis, also its frame, of length nodes.basisSize.

Settings beyond those of all nodes: general.axesTiling, nodes.basisSize, nodes.showBasis.

Output variables

Available as OutputVariableType in sensors, Get...Output() and other functions:

output variable

symbol

description

Position

\(\LU{0}{\pv}\cConfig = \LU{0}{[p_0,\,p_1,\,p_2]}\cConfig\tp= \LU{0}{\uv}\cConfig + \LU{0}{\pv}\cRef\)

global 3D position vector of node; \(\uv\cRef=0\)

Displacement

\(\LU{0}{\uv}\cConfig = [q_0,\,q_1,\,q_2]\cConfig\tp\)

global 3D displacement vector of node

Velocity

\(\LU{0}{\vv}\cConfig = [\dot q_0,\,\dot q_1,\,\dot q_2]\cConfig\tp\)

global 3D velocity vector of node

Acceleration

\(\LU{0}{\av}\cConfig = [\ddot q_0,\,\ddot q_1,\,\ddot q_2]\cConfig\tp\)

global 3D acceleration vector of node

CoordinatesTotal

displacement/rotation coordinates of node including reference configuration

Coordinates

\(\cv\cConfig = [q_0,\,q_1,\,q_2, \,\nu_0,\,\nu_1,\,\nu_2]\tp\cConfig\)

coordinate vector of node, having 3 displacement coordinates and 3 Euler angles

Coordinates_t

\(\dot\cv\cConfig = [\dot q_0,\,\dot q_1,\,\dot q_2, \,\dot \nu_0,\,\dot \nu_1,\,\dot \nu_2]\tp\cConfig\)

velocity coordinates vector of node

RotationMatrix

\([A_{00},\,A_{01},\,A_{02},\,A_{10},\,\ldots,\,A_{21},\,A_{22}]\cConfig\tp\)

vector with 9 components of the rotation matrix \(\LU{0b}{\Rot}\cConfig\) in row-major format, in any configuration; the rotation matrix transforms local (\(b\)) to global (0) coordinates

Rotation

\([\varphi_0,\,\varphi_1,\,\varphi_2]\tp\cConfig\)

vector with 3 components of the Euler/Tait-Bryan angles in xyz-sequence (\(\LU{0b}{\Rot}\cConfig=:\Rot_0(\varphi_0) \cdot \Rot_1(\varphi_1) \cdot \Rot_2(\varphi_2)\)), recomputed from rotation matrix

AngularVelocity

\(\LU{0}{\tomega}\cConfig = \LU{0}{[\omega_0,\,\omega_1,\,\omega_2]}\cConfig\tp\)

global 3D angular velocity vector of node

AngularVelocityLocal

\(\LU{b}{\tomega}\cConfig = \LU{b}{[\omega_0,\,\omega_1,\,\omega_2]}\cConfig\tp\)

local (body-fixed) 3D angular velocity vector of node

Detailed description

Coordinates

index

symbol

kind

meaning

frame

0, 1, 2

\(q_0,\,q_1,\,q_2\)

ODE2

displacement of the reference point of the body

global

3, 4, 5

\(\nu_0,\,\nu_1,\,\nu_2\)

ODE2

change of the rotation vector against its reference value

-

Configuration

The rotation vector combines the rotation angle \(\varphi\) and the axis \(\nv\),

\[ \tnu = \varphi \nv = \tnu\cConfig + \tnu\cRef , \]

and the rotation matrix \(\LU{0b}{\Rot(\tnu)}\) transforms a local position into the global frame, \(\LU{0}{\pLoc}\cConfig = \LU{0b}{\Rot(\tnu)}\cConfig \LU{b}{\pLoc}\); \(\Rot(\tnu)\) is the function RotationVector2RotationMatrix, see Function: RotationVector2RotationMatrix.

Frame and interpretation

The displacement is given in the global frame. The rotation coordinates are not a conventional parametrization: the node is meant for Lie group time integration, and it switches its rotation coordinates to it by itself, in explicit and in implicit integrators. For the formulation see Holzinger and Gerstmayr HolzingerGerstmayr2020.

Action on the equations of motion

All six coordinates lead to ODE2 equations: the first three are the residuals of the forces in the global frame, the last three the residuals of the torques in the body frame. In the Lie group update the rotation velocity coordinates are the local angular velocity \(\LU{b}{\tomega}\), so that \(\LU{b}{\Gm}\) is the identity matrix. There is no constraint.

Singularity

None in the Lie group update, which is why the node suits arbitrary rotations; it also reduces the nonlinearity of the equations, which can help implicit integration.

For creating a NodeRigidBodyRotVecLG together with a rigid body, use CreateRigidBody, see Function: CreateRigidBody.

Mini example

#a rigid body spinning about its z-axis, integrated with the Lie group integrator of the explicit solver
node = mbs.AddNode(NodeRigidBodyRotVecLG(referenceCoordinates=[0.5,0.2,0.1, 0,0,0],
                                         initialVelocities=[0,0,0, 0,0,0.5*np.pi])) #angular velocity
inertia = InertiaCuboid(density=1000, sideLengths=[0.4,0.2,0.1])
mbs.AddObject(ObjectRigidBody(nodeNumber=node, mass=inertia.Mass(),
                              inertia=inertia.GetInertia6D()))

mbs.Assemble()
simulationSettings = exu.SimulationSettings()
simulationSettings.timeIntegration.numberOfSteps = 100
mbs.SolveDynamic(simulationSettings, solverType=exu.DynamicSolverType.RK44)

#the rotation vector after 1 second:
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Rotation)[2] #pi/2

Relevant Examples (Ex) and TestModels (TM) with weblink to github: explicitLieGroupIntegratorPythonTest.py (TM), explicitLieGroupIntegratorTest.py (TM), explicitLieGroupMBSTest.py (TM), explicitSolversPostNewtonTest.py (TM)