36 const scalar mBy12 =
m/12.0;
37 const scalar mSqrLx = mBy12*
sqr(
L.x());
38 const scalar mSqrLy = mBy12*
sqr(
L.y());
39 const scalar mSqrLz = mBy12*
sqr(
L.z());
43 mSqrLy + mSqrLz, 0, 0,
74 const scalar
m(
dict.get<scalar>(
"mass"));
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const vector L(dict.get< vector >("L"))
dimensionedSymmTensor sqr(const dimensionedVector &dv)
scalar m() const
Return the mass of the rigid-body.
rigidBodyInertia()
Null constructor, initializes to zero.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
static const Identity< scalar > I
const vector & c() const
Return the centre of mass of the rigid-body.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
A class for handling words, derived from Foam::string.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const vector & L() const
Return the lengths of the sides of the cuboid.
const dimensionedScalar c
Speed of light in a vacuum.
cuboid(const word &name, const scalar m, const vector &c, const vector &L)
Construct from name, mass, centre of mass and lengths of the sides.