I am looking to create an object which will then be handled by project chrono. In order to maintain stability in a certain orientation, I would like the center the center of mass below the center of buoyancy. Is it possible to gain manual control over the center of mass and moment of inertia quantities for a created GeometryID?
Appreciate any help!
Hello @Ethan_Evans, welcome to GPUSPH!
the methods you’re looking for are setCenterOfGravity()
and setInertia()
.
setCenterOfGravity
takes as parameters the GeometryID
returned by add
Whatever, and the coordinates of the center of gravity in the global reference system, either as 3 floating-point values or as a Point
object.
setInteria
takes as parameters the GeometryID
and three floating-point values for the inertia components along the principal axes of inertia.
The orientation of the principal axes of inertia usually follows the object rotation, but can be overridden using setOrientation
, that takes as parameters the GeometryID
and an EulerParameter
object describing the orientation.