Skip to main content

Module mass

Module mass 

Source
Expand description

Rigid-body mass properties: mass, center of mass and the full inertia tensor, and how bodies combine, move and turn.

Frame. Positions and tensors are in body axes (docs/physics/frames.md): z along the axis of symmetry, positive toward the nose; x the design’s zero radial direction; y = z × x. A component’s own frame has these axes with its origin on the axis at the component’s forward reference plane (its forward end, or a nose cone’s tip), so points of the component have z ≤ 0. The design places a component by translating and rolling it.

Inertia tensor about a point p (positive products-of-inertia convention):

I_p = ∫ (|r|² E − r rᵀ) dm,     r = position − p

so I_xx = ∫(y² + z²) dm and I_xy = −∫ x y dm. MassProperties stores it about the center of mass. The standard results used here (parallel-axis theorem, rotation of a tensor) are in any dynamics text, for example J. L. Meriam and L. G. Kraige, Engineering Mechanics: Dynamics, appendix B:

parallel axis:  I_p = I_cg + m (|d|² E − d dᵀ),   d = cg − p
rotation R:     cg' = R cg,  I' = R I Rᵀ
combination:    m = Σ m_k,  cg = Σ m_k cg_k / m,  I = Σ [I_k + m_k (|d_k|² E − d_k d_kᵀ)],  d_k = cg_k − cg

See docs/physics/mass.md.

Structs§

MassProperties
Mass, center of mass and inertia tensor about the center of mass, in body axes.
Placement
Where one copy of a repeated part sits: the part as it is written, turned by roll_rad about the body’s axis (from x_B toward y_B), then moved across the axis by offset_m, in body axes. A point p of the part goes to R(roll) p + offset.