chrono::ChInertiaUtils Class Reference

Description

Class with some static functions that can be used to make computations with inertia tensors.

#include <ChInertiaUtils.h>

Static Public Member Functions

static void InertiaFromCluster (const std::vector< ChVector3d > &positions, const std::vector< ChMatrix33<> > &rotations, const std::vector< ChMatrix33<> > &Jlocal, const std::vector< double > &masses, ChMatrix33<> &totJ, double &totmass, ChVector3d &baricenter)
 Given a cluster of bodies, each with local inertia tensor, and position and rotation respect to absolute coordinates, compute the total mass, the barycenter and the inertia tensor of the cluster. More...
 
static void RotateInertia (const ChMatrix33<> inertiaIn, const ChMatrix33<> R, ChMatrix33<> &inertiaOut)
 Rotate an inertia tensor, given a rotation matrix R.
 
static void TranslateInertia (const ChMatrix33<> inertiaIn, const ChVector3d dist, const double mass, ChMatrix33<> &inertiaOut)
 Translate an inertia tensor to a non-barycentric reference, given a displacement 'dist', using the Huygens-Steiner parallel axis theorem.
 
static void PrincipalInertia (const ChMatrix33<> &inertia, ChVector3d &principal_inertia, ChMatrix33<> &principal_axes)
 Compute principal moments of inertia and the principal axes. More...
 

Member Function Documentation

◆ InertiaFromCluster()

static void chrono::ChInertiaUtils::InertiaFromCluster ( const std::vector< ChVector3d > &  positions,
const std::vector< ChMatrix33<> > &  rotations,
const std::vector< ChMatrix33<> > &  Jlocal,
const std::vector< double > &  masses,
ChMatrix33<> &  totJ,
double &  totmass,
ChVector3d baricenter 
)
inlinestatic

Given a cluster of bodies, each with local inertia tensor, and position and rotation respect to absolute coordinates, compute the total mass, the barycenter and the inertia tensor of the cluster.

Note: the resulting total inertia tensor is expressed in absolute coordinates Note: we assume that body masses are not overlapping Note: we assume that all local inertias are expressed in body local coords Note: we assume that all local inertias are expressed relative to body barycenter

◆ PrincipalInertia()

static void chrono::ChInertiaUtils::PrincipalInertia ( const ChMatrix33<> &  inertia,
ChVector3d principal_inertia,
ChMatrix33<> &  principal_axes 
)
inlinestatic

Compute principal moments of inertia and the principal axes.

The principal moments of inertia are sorted in ascending order. The principal axes are returned as the columns of a 3x3 rotation matrix.


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/physics/ChInertiaUtils.h