WOLFRAM SYSTEM MODELER

Vector

Visualizing a vector quantity (force, torque, etc.)

Wolfram Language

In[1]:=
SystemModel["Modelica.Mechanics.MultiBody.Visualizers.Advanced.Vector"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Model Vector defines an arrow that dynamically visualizes a physical vector of selected quantity at the defined location (see variables below). Thus, the arrow length does not represent a physical length (except, of course, for quantity = RelativePosition), but a different 3-dimensional quantity (such as force, torque, speed, …), defined by MultiBody.Types.VectorQuantity. That allows the vectors of similar quantities to be scaled appropriately during post-processing. This is useful even for RelativePosition, and in that case to disable or exaggerate the relative positions.

The dialog variables R, r, coordinates, color, specularCoefficient, quantity, headAtOrigin, and twoHeadedArrow are declared as (time varying) input variables. If the default equation is not appropriate, a corresponding modifier equation has to be provided in the model where a Vector instance is used, e.g., in the form

Visualizers.Advanced.Vector vectorForce(coordinates = {sin(time),cos(time),0});

Variable color is an Integer vector with 3 elements, {r, g, b}, and specifies the color of the shape. {r, g, b} are the "red", "green" and "blue" color parts. Note, r, g and b are given in the range 0 … 255. The predefined type MultiBody.Types.Color contains a menu definition of the colors used in the MultiBody library together with a color editor.

Parameters (1)

quantity

Value: Types.VectorQuantity.Force

Type: VectorQuantity

Description: Quantity of the coordinates

Inputs (7)

R

Default Value: Frames.nullRotation()

Type: Orientation

Description: Orientation object to rotate the world frame into the vector frame

r

Default Value: {0, 0, 0}

Type: Position[3] (m)

Description: Position vector from origin of world frame to origin of vector frame, resolved in world frame

coordinates

Default Value: {0, 0, 0}

Type: Real[3]

Description: Coordinates of the vector resolved in vector frame

color

Default Value: Types.Defaults.ArrowColor

Type: Color

Description: Color of vector

specularCoefficient

Default Value: 0.7

Type: SpecularCoefficient

Description: Material property describing the reflecting of ambient light (= 0 means, that light is completely absorbed)

headAtOrigin

Default Value: false

Type: Boolean

Description: = true, if the vector is pointing towards the origin of vector frame

twoHeadedArrow

Default Value: false

Type: Boolean

Description: = true, if the arrow has two heads after each other (pointing in the same direction)

Outputs (10)

Form

Type: Real

rxvisobj

Type: Real[3]

Description: x-axis unit vector of shape, resolved in world frame

ryvisobj

Type: Real[3]

Description: y-axis unit vector of shape, resolved in world frame

rvisobj

Type: Position[3] (m)

Description: position vector from world frame to shape frame, resolved in world frame

vectorCoordinates

Type: Real[3]

vectorColor

Type: Color

Description: RGB representation of color

vectorSpecularCoefficient

Type: SpecularCoefficient

Description: Reflection of ambient light (= 0: light is completely absorbed)

vectorQuantity

Type: VectorQuantity

Description: Enumeration defining the kind of physical quantity represented by the vector

vectorTwoHeadedArrow

Type: Boolean

vectorHeadAtOrigin

Type: Boolean

Components (1)

R

Type: Orientation

Description: Orientation object to rotate the world frame into the vector frame

Used in Components (17)

WorldForce

Modelica.Mechanics.MultiBody.Forces

External force acting at frame_b, defined by 3 input signals and resolved in frame world, frame_b or frame_resolve

WorldTorque

Modelica.Mechanics.MultiBody.Forces

External torque acting at frame_b, defined by 3 input signals and resolved in frame world, frame_b or frame_resolve

WorldForceAndTorque

Modelica.Mechanics.MultiBody.Forces

External force and torque acting at frame_b, defined by 3+3 input signals and resolved in frame world, frame_b or in frame_resolve

Force

Modelica.Mechanics.MultiBody.Forces

Force acting between two frames, defined by 3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve

Torque

Modelica.Mechanics.MultiBody.Forces

Torque acting between two frames, defined by 3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve

ForceAndTorque

Modelica.Mechanics.MultiBody.Forces

Force and torque acting between two frames, defined by 3+3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve

FreeMotion

Modelica.Mechanics.MultiBody.Joints

Free motion joint (6 degrees-of-freedom, 12 potential states)

AbsoluteSensor

Modelica.Mechanics.MultiBody.Sensors

Measure absolute kinematic quantities of frame connector

RelativeSensor

Modelica.Mechanics.MultiBody.Sensors

Measure relative kinematic quantities between two frame connectors

Distance

Modelica.Mechanics.MultiBody.Sensors

Measure the distance between the origins of two frame connectors

CutForce

Modelica.Mechanics.MultiBody.Sensors

Measure cut force vector

CutTorque

Modelica.Mechanics.MultiBody.Sensors

Measure cut torque vector

CutForceAndTorque

Modelica.Mechanics.MultiBody.Sensors

Measure cut force and cut torque vector

FixedArrow

Modelica.Mechanics.MultiBody.Visualizers

Visualizing an arrow with dynamically varying size in frame_a

SignalArrow

Modelica.Mechanics.MultiBody.Visualizers

Visualizing an arrow with dynamically varying size in frame_a based on input signal

Arrow

Modelica.Mechanics.MultiBody.Visualizers.Advanced

Visualizing an arrow with variable size

DoubleArrow

Modelica.Mechanics.MultiBody.Visualizers.Advanced

Visualizing a double arrow with variable size