# simscape.multibody.MassDistribution class

Package: simscape.multibody
Superclasses: `simscape.multibody.Inertia`

Construct custom mass distribution

## Description

Use an object of the `simscape.multibody.MassDistribution` class to construct a custom mass distribution that explicitly specifies the mass, center of mass, moments of inertia, and products of inertia. The mass distribution has an implicit reference frame. If you use a `simscape.multibody.MassDistribution` object to specify the mass distribution of a solid, the implicit reference frame is coincident with the reference frame of the solid.

### Class Attributes

 `Sealed` `true` `ConstructOnLoad` `true` `RestrictsSubclassing` `true`

For information on class attributes, see Class Attributes.

## Creation

### Description

````mdmass = simscape.multibody.Massdistribution` constructs a custom mass distribution using default values.```
````mdmass = simscape.multibody.Massdistribution(mass)` constructs a custom mass distribution and sets the total mass to `mass`.```
````mdmass = simscape.multibody.Massdistribution(mass,com)` constructs a custom mass distribution and also sets the specified center of mass to `com`.```
````mdmass = simscape.multibody.Massdistribution(mass,com,moi)` constructs a custom mass distribution and also sets the moments of inertia to `moi`.```
````mdmass = simscape.multibody.Massdistribution(mass,com,moi,poi)` constructs a custom mass distribution and also sets the products of inertia to `poi`.```

## Properties

expand all

Total mass, specified as a `simscape.Value` object that represents a scalar with a unit of mass. The scalar can be positive or negative. Use a negative value to capture the effect of a void or cavity in a compound body that comprises multiple solids. The total mass of the compound body must be positive.

Example: `simscape.Value(16,"lbm")`

#### Attributes:

 `GetAccess` `public` `SetAccess` `public` `NonCopyable` `true`

Center-of-mass coordinates, specified as a `simscape.Value` object that represents a 3-by-1 or 1-by-3 array with a unit of length. The coordinates are resolved in the implicit reference frame of the mass distribution.

Example: `simscape.Value([0 0 5],"mm")`

#### Attributes:

 `GetAccess` `public` `SetAccess` `public` `NonCopyable` `true`

Ixx, Iyy, and Izz elements of the inertia matrix, specified as a `simscape.Value` object that represents a 3-by-1 or 1-by-3 array with a unit of mass*length^2.

The quantities, Ixx, Iyy, and Izz, are the moments of inertia with respect to the axes of a frame whose origin is coincident with the center of mass and whose axes are parallel to the implicit reference frame. The moments of inertia are the diagonal elements of the inertia matrix

`$\left(\begin{array}{ccc}{I}_{xx}& & \\ & {I}_{yy}& \\ & & {I}_{zz}\end{array}\right),$`

where:

• ${I}_{xx}=\underset{m}{\int }\left({y}^{2}+{z}^{2}\right)\text{\hspace{0.17em}}dm$

• ${I}_{yy}=\underset{m}{\int }\left({x}^{2}+{z}^{2}\right)\text{\hspace{0.17em}}dm$

• ${I}_{zz}=\underset{m}{\int }\left({x}^{2}+{y}^{2}\right)\text{\hspace{0.17em}}dm$

Example: `simscape.Value([12 15 10],"kg*cm^2")`

#### Attributes:

 `GetAccess` `public` `SetAccess` `public` `NonCopyable` `true`

Iyz, Izx, and Ixy elements of the inertia matrix, specified as a `simscape.Value` object that represents a 3-by-1 or 1-by-3 array with a unit of mass*length^2.

The quantities, Ixy, Iyz, and Izx are the products of inertia with respect to the axes of a frame whose origin is coincident with the center of mass and whose axes are parallel to the implicit reference frame. The products of inertia are the off-diagonal elements of the inertia matrix

`$\left(\begin{array}{ccc}& {I}_{xy}& {I}_{zx}\\ {I}_{xy}& & {I}_{yz}\\ {I}_{zx}& {I}_{yz}& \end{array}\right),$`

where:

• ${I}_{yz}=-\underset{m}{\int }yz\text{\hspace{0.17em}}dm$

• ${I}_{zx}=-\underset{m}{\int }zx\text{\hspace{0.17em}}dm$

• ${I}_{xy}=-\underset{m}{\int }xy\text{\hspace{0.17em}}dm$

Example: `simscape.Value([-2 3 1],"kg*cm^2")`

#### Attributes:

 `GetAccess` `public` `SetAccess` `public` `NonCopyable` `true`

expand all

## Version History

Introduced in R2022a