Solid brick with variable mass and size
Simscape / Multibody / Body Elements / Variable Mass
The Variable Brick Solid block adds to the attached frame a solid brick with variable mass and size. The mass and side lengths (x, y, and z) of the brick can each be a 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. Only one quantity, either mass or one side length, can be calculated during simulation.
A reference frame encodes the position and orientation of the solid in a model. The frame origin is located at the midpoint of the x- and y-dimensions and at the lower end of the z-dimension. These relationships are preserved during simulation. The z-dimension increases asymmetrically relative to the lower z-plane, along the positive direction of the z-axis.
Variable Brick with z-Dimension 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 blocks, you can specify a negative density, for example, to model voids in compound bodies.
R
— Reference frameLocal reference frame of the solid. This frame is fixed with respect to the solid geometry. Its origin is on the xy plane, in the geometrical center of the xy cross section. 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.
lx
— x-dimension of the brickInput port for the x-dimension of the brick.
ly
— y-dimension of the brickInput port for the y-dimension of the brick.
lz
— z-dimension of the brickInput port for the z-dimension of the brick.
m
— Brick massInput port for the mass of the brick.
lx
— x-dimension of the brickOutput port for the x-dimension of the brick.
ly
— y-dimension of the brickOutput port for the y-dimension of the brick.
lz
— z-dimension of the brickOutput port for the z-dimension of the brick.
m
— Brick massOutput port for the mass of the brick.
com
— Center-of-mass coordinates of the brickOutput port for the center of mass of the brick, reported as a three-element vector with Cartesian coordinates resolved in the reference frame of the solid.
I
— Inertia matrix of the brickOutput port for the inertia matrix of the brick, reported as a nine-element matrix and resolved in the reference frame of the block. The diagonal matrix elements are the moments of inertia. The off-diagonal elements are the products of inertia.
X Length
— Parameterization of the x dimensionConstant
(default) | Calculate from Mass
| Provided by Input
Parameterization of the x dimension of the solid—the
length along the x-axis of the local reference frame.
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 lx, through which
to specify the variable value.
X Length: Value
— Value of the x dimension1 m
(default) | scalar with units of lengthLength of the solid along the x-axis of the local reference frame. The x dimension is constant when this block parameter is active.
This parameter is active when the X Length
parameter is set to Constant
.
Y Length
— Parameterization of the y dimensionConstant
(default) | Calculate from Mass
| Provided by Input
Parameterization of the y dimension of the solid—the
length along the y-axis of the local reference frame.
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 ly, through which
to specify the variable value.
Y Length: Value
— Value of the y dimension1 m
(default) | scalar with units of lengthLength of the solid along the y-axis of the local reference frame. The y dimension is constant when this block parameter is active.
This parameter is active when the Y Length
parameter is set to Constant
.
Z Length
— Parameterization of the z dimensionCalculate from Mass
(default) | Constant
| Provided by Input
Parameterization of the z dimension of the solid—the
length along the z-axis of the local reference frame.
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 lz, through which
to specify the variable value.
Z Length: Value
— Value of the z dimension1 m
(default) | scalar with units of lengthLength of the solid along the z-axis of the local reference frame. The z dimension is constant when this block parameter is active.
This parameter is active when the Z Length
parameter is set to Constant
.
Mass
— Mass parameterizationProvided by Input
(default) | Calculate from Geometry
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: Density
— Mass per unit volume of material1000 kg/m^3
(default) | scalar in units of mass per unit volumeMass 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.
This parameter is active when the Mass parameter
is set to Calculate from Geometry
.
X Length
— Sensing selection for the x dimensionSensing selection for the x dimension of the solid. Check to expose a new physical signal output port, labeled lx, through which to output the time-varying value of the x dimension.
Y Length
— Sensing selection for the y dimensionSensing selection for the y dimension of the solid. Check to expose a new physical signal output port, labeled ly, through which to output the time-varying value of the y dimension.
Z Length
— Sensing selection for the z dimensionSensing selection for the z dimension of the solid. Check to expose a new physical signal output port, labeled lz, through which to output the time-varying value of the z dimension.
Mass
— Sensing selection for the total massSensing 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.
Center of Mass
— Sensing selection for the center-of-mass coordinatesSensing 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.
Inertia Matrix
— Sensing option for the inertia matrixSensing 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.
Type
— Solid visualization settingFrom Geometry
(default) | Marker
| None
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.
Marker: Shape
— Shape of the graphic markerSphere
(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 marker10
(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 opacitySimple
(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.
To enable this parameter, set Type to From
Geometry
or Marker
.
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.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
Simple
.
Opacity
— Surface opacity as scalar number on 0–1 scale1.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.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
Simple
.
Diffuse Color
— True color as [R,G,B,A] vector on 0–1 scale[0.5 0.5 0.5]
(default) | three- or four-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
.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
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
.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
Advanced
.
Ambient Color
— Shadow color as [R,G,B,A] vector on 0–1 scale[0.15 0.15 0.15 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
.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
Advanced
.
Emissive Color
— Self-illumination color as [R,G,B,A] vector on 0–1 scale[0.0 0.0 0.0 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
.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
Advanced
.
Shininess
— Highlight sharpness as scalar number on 0–128 scale75
(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.
To enable this parameter, set :
Type to Marker
.
Visual Properties to
Advanced
.
Brick Solid | Cylindrical Solid | Ellipsoidal Solid | Extruded Solid | Revolved Solid | Rigid Transform | Spherical Solid | Variable Cylindrical Solid | Variable Spherical Solid