Solid sphere with variable mass and size
Simscape / Multibody / Body Elements / Variable Mass
The Variable Spherical Solid block adds to the attached frame a solid sphere with variable mass and size. The mass and radius of the sphere 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 quantity. Only one quantity, mass or radius, can be calculated during simulation.
A reference frame encodes the position and orientation of the solid relative to other components in a model. The frame is defined relative to the solid geometry so that its origin is located at the center of the sphere. This relationship is preserved during simulation. The radius increases symmetrically in all directions with respect to the frame origin.
Variable Sphere with Radius 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 either mass or radius is calculated during simulation. It is calculated as a variable if both mass and radius 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 frame
Local reference frame of the solid. This frame is fixed with respect to the solid geometry. The frame origin is located at the center of geometry. 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.
r— Radius of the sphere
Input port for the radius of the sphere.
m— Mass of the sphere
Input port for the mass of the sphere.
r— Radius of the sphere
Output port for the radius of the sphere.
m— Mass of the sphere
Output port for the mass of the sphere.
com— Center-of-mass coordinates of the sphere
Output port for the center of mass of the sphere, reported as a three-element vector with Cartesian coordinates resolved in the reference frame of the solid.
I— Inertia matrix of the sphere
Output port for the inertia matrix of the sphere, 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.
Radius— Radius parameterization
Calculate from Mass(default) |
Provided by Input
Parameterization of the radius of the solid. Select
Constant to specify a fixed value as a block
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.
Provided by Input exposes a new
physical signal input port, labeled r, through which to
specify the variable value.
Radius: Value— Value of the radius
1 m(default) | scalar with units of length
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.
This parameter is active when the Radius
parameter is set to
Mass— Mass parameterization
Provided by Input(default) |
Calculate from Geometry
Parameterization of the mass of the solid. Select
from Geometry to obtain this parameter from the specified
solid density and dimensions. Use the default setting (
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 material
1000 kg/m^3(default) | scalar in units of mass per unit volume
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,
kg/m^3, is characteristic of polymers such as ABS
This parameter is active when the Mass parameter
is set to
Calculate from Geometry.
Radius— Sensing selection for the radius
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.
Mass— Sensing selection for the total mass
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.
Center of Mass— Sensing selection for the center-of-mass coordinates
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.
Inertia Matrix— Sensing option for the inertia matrix
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.
Type— Solid visualization setting
From Geometry(default) |
Visualization setting for this solid. Use the default setting,
From Geometry, to show the solid geometry.
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 marker
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 pixels
Size of the marker in units of pixels. The size does not change with zoom level.