Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

**MathWorks Machine Translation**

The automated translation of this page is provided by a general purpose third party translator tool.

MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.

Mass element with variable inertial properties

**Library:**Simscape / Multibody / Body Elements / Variable Mass

The General Variable Mass block adds to the attached frame a mass element with constant or time-varying inertial properties. The mass element can be a point mass without rotational inertia or a custom mass with rotational inertia. The inertial properties include mass, center of mass, moments of inertia, and products of inertia. Each inertial property can be independently configured as constant or time-varying.

The geometry of the mass element is unspecified. A marker or equivalent inertia ellipsoid identifies the mass element in the visualization pane of Mechanics Explorer. An inertia ellipsoid provides a graphical representation of the principal moments of inertia of the mass element. The block includes an option to hide the variable mass element in the Mechanics Explorer visualization window.

`m`

— Massphysical signal specified as a scalar with units of mass

Input port for the time-varying mass.

This port is enabled when the **Inertia** > **Mass** parameter is set to
`Time-Varying`

.

`com`

— Center of massphysical signal specified as a 3-by-1 or 1-by-3 vector with units of length

Input port for the time-varying center-of-mass coordinates. Specify
the coordinates in the order `[x y z]`

relative to the
block reference frame.

This port is enabled when the **Inertia** > **Center of Mass** parameter is set to
`Time-Varying`

.

`I`

— Inertiaphysical signal specified as a 3-by-3 matrix with units of mass × length^2

Input port for the time-varying inertia tensor. Specify the tensor
elements in the order ```
[Ixx Ixy I xz; Iyx Iyy Iyz; Izx Izy
Izz]
```

. The elements are defined relative to a frame with
origin at the center of mass and axes aligned with the reference frame.
See the **Inertia tensor** parameter description for
the definitions of the moments and products of inertia.

This port is enabled when the **Inertia** > **Type** parameter is set to
`Custom`

.

`R`

— Reference frameframe

Local reference frame of the variable mass element. Connect the port to a frame line or another frame port to define the relative position and orientation of the variable mass.

`Type`

— Choice of point or distributed mass`Custom`

(default) | `Point Mass`

Choice of point or distributed mass. Select ```
Point
Mass
```

to model a concentrated mass with no rotational
inertia. Select `Custom`

to model a distributed
mass with the specified inertia tensor and center of mass.

`Mass`

— Mass parameterization`Time-Varying`

(default) | `Constant`

Choice of fixed or variable mass. Select
`Time-Varying`

to specify the mass as a
variable using physical signal input port **m**. Select
`Constant`

to specify the mass as a constant
parameter.

`Mass: Value`

— Aggregate mass of the mass element`1 kg`

(default) | scalar with units of massAggregate mass of the mass element. The mass can be a positive or negative value. Specify a negative mass to model the aggregate effect of voids and cavities in a compound body. The mass is constant when this parameter is active.

This parameter is enabled when the **Mass** parameter
is set to `Constant`

.

`Center of Mass`

— Center-of-mass parameterization`Time-Varying`

(default) | `Constant`

Choice of fixed or variable center of mass. Select
`Time-Varying`

to specify the center of mass as
a variable using physical signal input port **com**. Select
`Constant`

to specify the center of mass as a
constant parameter.

`Center of Mass: Value`

— Center-of-mass coordinates`[0 0 0] m`

(default) | three-element vector with units of length[*x*
*y*
*z*] coordinates of the center of mass relative to the
origin of the reference frame. The center of mass coincides with the center
of gravity in uniform gravitational fields only. The center of mass is
constant when this parameter is active.

This parameter is enabled when the **Center of Mass**
parameter is set to `Constant`

.

`Inertia Matrix`

— Inertia-matrix parameterization`Time-Varying`

(default) | `Constant`

Choice of a variable or fixed inertia matrix. Select
`Time-Varying`

to specify the inertia matrix as
a variable using physical signal input port **I**. Select
`Constant`

to specify the moments and products
of inertia separately as constant block parameters.

`Inertia Matrix: Moments of Inertia`

— Diagonal elements of the inertia matrix`[1 1 1] kg * m^2`

(default) | three-element vector with units of mass*length^2Moments of inertia of the variable mass element specified in the order
[*I*_{xx}
*I*_{yy}
*I*_{zz}]. The moments of inertia are
defined relative to a frame with origin at the center of mass and with axes
parallel to the reference frame axes. The moments of inertia are the
diagonal elements of the inertia tensor,

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

where:

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

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

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

This parameter is enabled when the **Inertia Matrix**
parameter is set to `Constant`

.

`Inertia Matrix: Products of Inertia`

— Off-diagonal elements of the inertia matrix`[0 0 0] kg * m^2`

(default) | 3-element array with units of mass * length^2Products of inertia of the variable mass element specified in the order
[*I*_{yz}
*I*_{zx}
*I*_{xy}]. The products of inertia are
defined relative to a frame with origin at the center of mass and with axes
parallel to the reference frame axes. 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}=-{\displaystyle \underset{V}{\int}yz\text{\hspace{0.17em}}dm}$$

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

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

This parameter is enabled when the **Inertia Matrix**
parameter is set to `Constant`

.

`Type`

— Geometry type to use in model visualizations```
Equivalent Inertia
Ellipsoid
```

(default) | `Marker`

| `None`

Visualization setting for this solid. Marker dimensions are fixed and specified in pixel units. Ellipsoid dimensions are variable and depend on the specified mass and inertia tensor. The center of the ellipsoid coincides with the specified center of mass. Marker visualization is active on model update and during simulation. Ellipsoid visualization is active during simulation only.

`Marker: Shape`

— Shape of the graphic marker`Sphere`

(default) | `Cube`

| `Frame`

Geometrical shape of the graphic marker. Mechanics Explorer shows the marker using the selected shape.

`Marker: Size`

— Pixel size of the graphic marker`10`

(default) | scalar with units of pixelsSize of the marker in units of pixels. The size does not change with zoom level.

`Visual Properties`

— Parameterizations for color and opacity`Simple`

(default) | `Advanced`

Parameterization for specifying visual properties. Select `Simple`

to
specify color and opacity. Select `Advanced`

to
add specular highlights, ambient shadows, and self-illumination effects.

`Simple: Color`

— True color as [R,G,B] vector on 0–1 scale`[0.5 0.5 0.5]`

(default) | three-element vector with values constrained to 0–1RGB color vector with red (R), green (G), and blue (B) color
amounts specified on a 0–1 scale. A color picker provides an
alternative interactive means of specifying a color. If you change
the **Visual Properties** setting to `Advanced`

,
the color specified in this parameter becomes the **Diffuse
Color** vector.

`Simple: Opacity`

— Surface opacity as scalar number on 0–1 scale`1.0`

(default) | scalar with value constrained to 0–1Graphic opacity specified on a scale of 0–1. An opacity
of `0`

corresponds to a completely transparent graphic
and an opacity of `1`

to a completely opaque graphic.

`Advanced: Diffuse Color`

— True color as [R,G,B,A] vector on 0–1 scale`[0.5 0.5 0.5]`

(default) | three-element vector with values constrained to 0–1True color under direct white light specified as an [R,G,B]
or [R,G,B,A] vector on a 0–1 scale. An optional fourth element
specifies the color opacity also on a scale of 0–1. Omitting
the opacity element is equivalent to specifying a value of `1`

.

`Advanced: Specular Color`

— Highlight color as [R,G,B,A] vector on 0–1 scale`[0.5 0.5 0.5 1.0]`

(default) | three- or four-element vector with values constrained to 0–1Color of specular highlights specified as an [R,G,B] or [R,G,B,A]
vector on a 0–1 scale. The optional fourth element specifies
the color opacity. Omitting the opacity element is equivalent to specifying
a value of `1`

.

`Advanced: Ambient Color`

— Shadow color as [R,G,B,A] vector on 0–1 scale`[0.5 0.5 0.5 1.0]`

(default) | three- or four-element vector with values constrained to 0–1Color of shadow areas in diffuse ambient light, specified as
an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional
fourth element specifies the color opacity. Omitting the opacity element
is equivalent to specifying a value of `1`

.

`Advanced: Emissive Color`

— Self-illumination color as [R,G,B] vector on 0–1 scale`[0.5 0.5 0.5 1.0]`

(default) | three- or four-element vector with values constrained to 0–1Surface color due to self illumination, specified as an [R,G,B]
or [R,G,B,A] vector on a 0–1 scale. The optional fourth element
specifies the color opacity. Omitting the opacity element is equivalent
to specifying a value of `1`

.

`Advanced: Shininess`

— Highlight sharpness as scalar number on 0–128 scale`75`

(default) | scalar with value constrained to 0–128Sharpness of specular light reflections, specified as a scalar number on a 0–128 scale. Increase the shininess value for smaller but sharper highlights. Decrease the value for larger but smoother highlights.

You clicked a link that corresponds to this MATLAB command:

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)