79 c_(
vector(-st(1, 5), st(0, 5), -st(0, 4))/m_),
116 return Ioc(m_,
c - c_);
127 inline Foam::RBD::rigidBodyInertia::operator
spatialTensor()
const 147 is >> rbi.m_ >> rbi.c_ >> rbi.Ic_;
158 os << rbi.m_ <<
nl << rbi.c_ <<
nl << rbi.Ic_ <<
endl;
179 const scalar m12 = rbi1.
m() + rbi2.m();
180 const vector c12 = (rbi1.m()*rbi1.c() + rbi2.m()*rbi2.c())/m12;
186 rbi1.Ic() + rbi1.Icc(c12) + rbi2.Ic() + rbi2.Icc(c12)
203 (rbi.Io() & av) + rbi.m()*(rbi.c() ^ lv),
204 rbi.m()*lv - rbi.m()*(rbi.c() ^ av)
216 const vector Xc((X.
E().T() &
I.c()) + X.
r());
240 return 0.5*(v && (*
this & v));
246 inline void Foam::RBD::rigidBodyInertia::operator+=
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
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 a number of values (eg...
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)...
constexpr char nl
The newline '\n' character (0x0a)
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, initializes to zero.
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.
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
This class represents the linear and angular inertia of a rigid body by the mass, centre of mass and ...
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
rigidBodyInertia transform(const spatialTransform &X, const rigidBodyInertia &I)
Return (^BX_A)^* I ^AX_B.
const dimensionedScalar c
Speed of light in a vacuum.
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.
Tensor of scalars, i.e. Tensor<scalar>.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)