Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# Variable Cylindrical Solid

Solid cylinder with variable mass and size

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

## Description

The Variable Cylindrical Solid block adds to the attached frame a solid cylinder with variable mass and side. The mass, radius, and length of the cylinder can each be constant or vary with time. A variable quantity can be specified directly as a physical signal or it can be calculated as a function of the remaining quantities. Either the mass or the cylinder dimensions can be calculated during simulation, but not both simultaneously.

A reference frame encodes the position and orientation of the solid in a model. The frame is defined relative to the solid geometry so that its origin is located at the intersection of the longitudinal axis of the cylinder (as observed with a ```Z up``` view convention). This relationship is preserved during simulation. Length increases asymmetrically relative to the bottom surface, along the positive direction of the z-axis.

Variable Cylinder with Length Calculated from Mass

Visualization is dynamic. Solid dimensions update continuously as they occur, in the visualization pane of Mechanics Explorer. The initial dimensions of the solid depend on the parameters and physical signals that you specify. It is possible for a variable dimension to begin with a zero value—for example, if it derives from a physical signal whose initial value is zero also.

Density can itself be constant or variable. This quantity is specified as a constant if at least one solid parameter is calculated during simulation. It is calculated as a variable if all solid parameters are explicitly specified, either as (constant) block parameters or as physical signals. As in the case of the Solid block, you can specify a negative density, for example, to model voids in compound bodies.

## Ports

### Frame

expand all

Local reference frame of the solid. This frame is fixed with respect to the solid geometry. Its origin is located at the center of geometry and its z-axis is aligned with the longitudinal axis of the cylinder. Connect this port to a frame entity—port, line, or junction—to resolve the frame placement in a model. For more information, see Working with Frames.

### Physical Signal Input

expand all

Input port for the length of the cylinder.

Input port for the radius of the cylinder.

Input port for the mass of the cylinder.

### Physical Signal Output

expand all

Output port for the length of the cylinder.

Output port for the width of the cylinder.

Output port for the mass of the cylinder.

Output port for the center of mass of the cylinder, reported as a three-element vector with Cartesian coordinates resolved in the reference frame of the solid.

Output port for the inertia matrix of the cylinder, reported as a nine-element matrix resolved in the inertia frame of resolution of the solid—a virtual copy of the reference frame whose origin has been shifted to the center of mass. The axes of the inertia frame of resolution are parallel to the axes of the reference frame. The diagonal elements of the matrix are the moments of inertia and the off-diagonal elements are the products of inertia.

## Parameters

expand all

#### Geometry and Inertia

Parameterization of the radius of the solid. Select `Constant` to specify a fixed value as a block parameter. Select `Provided by Input` to specify a variable value as a physical signal input. Use the default setting (`Calculated from Mass`) to obtain this parameter from the specified solid density and remaining dimensions. Selecting `Provided by Input` exposes a new physical signal input port, labeled r, through which to specify the variable value.

Radius of the solid. The longitudinal axis of the solid is aligned with the z-axis of the local reference frame. The z dimension is constant when this block parameter is active.

#### Parameter Dependencies

This parameter is active when the Radius parameter is set to `Constant`.

Parameterization of the length of the solid. Select `Constant` to specify a fixed value as a block parameter. Select `Provided by Input` to specify a variable value as a physical signal input. Use the default setting (`Calculated from Mass`) to obtain this parameter from the specified solid density and remaining dimensions. Selecting `Provided by Input` exposes a new physical signal input port, labeled len, through which to specify the variable value.

Length of the solid. The longitudinal axis of the cylinder is aligned with the z-axis of the local reference frame. The z dimension is constant when this block parameter is active.

#### Parameter Dependencies

This parameter is active when the Length parameter is set to `Constant`.

Parameterization of the mass of the solid. Select ```Calculate from Geometry``` to obtain this parameter from the specified solid density and dimensions. Use the default setting (```Provided by Input```) to specify this parameter directly as a time-variable physical signal. This option exposes a new physical signal input port, labeled M, through which to specify the time-variable solid mass.

Mass per unit volume of material. The mass density can take on a positive or negative value. Specify a negative mass density to model the effects of a void or cavity in a solid body. The default value, ```1000 kg/m^3```, is characteristic of polymers such as ABS plastic.

#### Parameter Dependencies

This parameter is active when the Mass parameter is set to `Calculate from Geometry`.

#### Sensing

Sensing selection for the radius of the solid. Check to expose a new physical signal output port, labeled r, through which to output the time-varying value of the radius.

Sensing selection for the z dimension of the solid. Check to expose a new physical signal output port, labeled len, through which to output the time-varying value of the length.

Sensing selection for the total mass of the solid. Check to expose a new physical signal output port, labeled m, through which to output the time-varying value of the solid mass.

Sensing selection for the coordinates of the center of mass of the solid. Check to expose a new physical signal output port, labeled com, through which to output the time-varying coordinates. The output is a three-element vector with Cartesian coordinates resolved in the reference frame of the solid.

Sensing selection for the inertia matrix of the solid. Check to expose a new physical signal output port, labeled I, through which to output the time-varying inertia matrix. The output is a nine-element matrix with the moments of inertia in the diagonal positions and the products of inertia in the off-diagonal positions. The moments and products of inertia are resolve in the inertia frame of resolution—a frame with axes parallel to those of the reference frame but origin at the center of mass.

#### Graphic

Visualization setting for this solid. Use the default setting, `From Geometry`, to show the solid geometry. Select `Marker` to show a graphic marker such as a sphere or frame. Select `None` to disable visualization for this solid.

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

Size of the marker in units of pixels. The size does not change with zoom level.

Parameterization for specifying visual properties. Select `Simple` to specify color and opacity. Select `Advanced` to add specular highlights, ambient shadows, and self-illumination effects.

RGB 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.

Graphic 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.

True 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`.

Color 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`.

Color 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`.

Surface 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`.

Sharpness 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.