67 m_(dict.
lookup<scalar>(
"mass")),
68 c_(dict.
lookup(
"centreOfMass")),
69 Ic_(dict.
lookup(
"inertia"))
76 c_(
vector(-st(1, 5), st(0, 5), -st(0, 4))/m_),
113 return Ioc(m_, c - c_);
144 is >> rbi.m_ >> rbi.c_ >> rbi.Ic_;
155 os << rbi.m_ <<
nl << rbi.c_ <<
nl << rbi.Ic_ <<
endl;
176 const scalar m12 = rbi1.
m() + rbi2.m();
177 const vector c12 = (rbi1.
m()*rbi1.
c() + rbi2.m()*rbi2.c())/m12;
183 rbi1.
Ic() + rbi1.
Icc(c12) + rbi2.Ic() + rbi2.Icc(c12)
200 (rbi.
Io() & av) + rbi.
m()*(rbi.
c() ^ lv),
201 rbi.
m()*lv - rbi.
m()*(rbi.
c() ^ av)
237 return 0.5*(v && (*
this & v));
243 inline void Foam::RBD::rigidBodyInertia::operator+=
Templated 3D spatial tensor derived from MatrixSpace used to represent transformations of spatial vec...
A list of keyword definitions, which are a keyword followed by any number of values (e...
symmTensor Io() const
Return the inertia tensor of the rigid-body about the origin.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Tensor< Cmpt > T() const
Return transpose.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const symmTensor & Ic() const
Return the inertia tensor of the rigid-body about the centre of mass.
scalar m() const
Return the mass of the rigid-body.
SpatialTensor< scalar > spatialTensor
SpatialTensor of scalars.
rigidBodyInertia()
Null constructor, initialises to zero.
stressControl lookup("compactNormalStress") >> compactNormalStress
symmTensor Icc(const vector &c) const
Return the difference between the inertia tensor of the rigid-body.
static const Identity< scalar > I
const vector & c() const
Return the centre of mass of the rigid-body.
SpatialVector< scalar > spatialVector
SpatialVector of scalars.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
dimensioned< scalar > magSqr(const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Templated 3D spatial vector derived from VectorSpace used to represent the anglular and linear compon...
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
rigidBodyInertia transform(const spatialTransform &X, const rigidBodyInertia &I)
Return (^BX_A)^* I ^AX_B.
symmTensor Ioc() const
Return the difference between the inertia tensor of the rigid-body.
scalar kineticEnergy(const spatialVector &v)
Return the kinetic energy of the body with the given velocity.
This class represents the linear and angular inertia of a rigid body by the mass, centre of mass and ...