WOLFRAM SYSTEMMODELER

World

World coordinate system + gravity field + default animation definition

Wolfram Language

In[1]:=
Click for copyable input
SystemModel["Modelica.Mechanics.MultiBody.World"]
Out[1]:=

Information

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

Model World represents a global coordinate system fixed in ground. This model serves several purposes:

  • It is used as inertial system in which the equations of all elements of the MultiBody library are defined.
  • It is the world frame of an animation window in which all elements of the MultiBody library are visualized.
  • It is used to define the gravity field in which a multi-body model is present. Default is a uniform gravity field where the gravity acceleration vector g is the same at every position. Additionally, a point gravity field or no gravity can be selected. Also, function gravityAcceleration can be redeclared to a user-defined function that computes the gravity acceleration, see example Examples.Elementary.UserDefinedGravityField.
  • It is used to define default settings of animation properties (e.g., the diameter of a sphere representing by default the center of mass of a body, or the diameters of the cylinders representing a revolute joint).
  • It is used to define a visual representation of the world model (= 3 coordinate axes with labels) and of the defined gravity field.
    MultiBody.World

Since the gravity field function is required from all bodies with mass and the default settings of animation properties are required from nearly every component, exactly one instance of model World needs to be present in every model on the top level. The basic declaration needs to be:

    inner Modelica.Mechanics.MultiBody.World world

Note, it must be an inner declaration with instance name world in order that this world object can be accessed from all objects in the model. When dragging the "World" object from the package browser into the diagram layer, this declaration is automatically generated (this is defined via annotations in model World).

All vectors and tensors of a mechanical system are resolved in a frame that is local to the corresponding component. Usually, if all relative joint coordinates vanish, the local frames of all components are parallel to each other, as well as to the world frame (this holds as long as a Parts.FixedRotation, component is not used). In this "reference configuration" it is therefore alternatively possible to resolve all vectors in the world frame, since all frames are parallel to each other. This is often very convenient. In order to give some visual support in such a situation, in the icon of a World instance two axes of the world frame are shown and the labels of these axes can be set via parameters.

Connectors (1)

frame_b

Type: Frame_b

Description: Coordinate system fixed in the origin of the world frame

Parameters (42)

enableAnimation

Value: true

Type: Boolean

Description: = true, if animation of all components is enabled

animateWorld

Value: true

Type: Boolean

Description: = true, if world coordinate system shall be visualized

animateGravity

Value: true

Type: Boolean

Description: = true, if gravity field shall be visualized (acceleration vector or field center)

label1

Value: "x"

Type: AxisLabel

Description: Label of horizontal axis in icon

label2

Value: "y"

Type: AxisLabel

Description: Label of vertical axis in icon

gravityType

Value: GravityTypes.UniformGravity

Type: GravityTypes

Description: Type of gravity field

g

Value: 9.81

Type: Acceleration (m/s²)

Description: Constant gravity acceleration

n

Value: {0, -1, 0}

Type: Axis ()

Description: Direction of gravity resolved in world frame (gravity = g*n/length(n))

mue

Value: 3.986e14

Type: Real (m³/s²)

Description: Gravity field constant (default = field constant of earth)

driveTrainMechanics3D

Value: true

Type: Boolean

Description: = true, if 3-dim. mechanical effects of Parts.Mounting1D/Rotor1D/BevelGear1D shall be taken into account

axisLength

Value: nominalLength / 2

Type: Distance (m)

Description: Length of world axes arrows

axisDiameter

Value: axisLength / defaultFrameDiameterFraction

Type: Distance (m)

Description: Diameter of world axes arrows

axisShowLabels

Value: true

Type: Boolean

Description: = true, if labels shall be shown

gravityArrowTail

Value: {0, 0, 0}

Type: Position[3] (m)

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

gravityArrowLength

Value: axisLength / 2

Type: Length (m)

Description: Length of gravity arrow

gravityArrowDiameter

Value: gravityArrowLength / defaultWidthFraction

Type: Diameter (m)

Description: Diameter of gravity arrow

gravitySphereDiameter

Value: 12742000

Type: Diameter (m)

Description: Diameter of sphere representing gravity center (default = mean diameter of earth)

nominalLength

Value: 1

Type: Length (m)

Description: "Nominal" length of multi-body system

defaultAxisLength

Value: nominalLength / 5

Type: Length (m)

Description: Default for length of a frame axis (but not world frame)

defaultJointLength

Value: nominalLength / 10

Type: Length (m)

Description: Default for the fixed length of a shape representing a joint

defaultJointWidth

Value: nominalLength / 20

Type: Length (m)

Description: Default for the fixed width of a shape representing a joint

defaultForceLength

Value: nominalLength / 10

Type: Length (m)

Description: Default for the fixed length of a shape representing a force (e.g., damper)

defaultForceWidth

Value: nominalLength / 20

Type: Length (m)

Description: Default for the fixed width of a shape representing a force (e.g., spring, bushing)

defaultBodyDiameter

Value: nominalLength / 9

Type: Length (m)

Description: Default for diameter of sphere representing the center of mass of a body

defaultWidthFraction

Value: 20

Type: Real

Description: Default for shape width as a fraction of shape length (e.g., for Parts.FixedTranslation)

defaultArrowDiameter

Value: nominalLength / 40

Type: Length (m)

Description: Default for arrow diameter (e.g., of forces, torques, sensors)

defaultFrameDiameterFraction

Value: 40

Type: Real

Description: Default for arrow diameter of a coordinate system as a fraction of axis length

defaultSpecularCoefficient

Value: 0.7

Type: Real

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

defaultN_to_m

Value: 1000

Type: Real (N/m)

Description: Default scaling of force arrows (length = force/defaultN_to_m)

defaultNm_to_m

Value: 1000

Type: Real (N·m/m)

Description: Default scaling of torque arrows (length = torque/defaultNm_to_m)

ndim

Value: if enableAnimation and animateWorld then 1 else 0

Type: Integer

Description:

ndim2

Value: if enableAnimation and animateWorld and axisShowLabels then 1 else 0

Type: Integer

Description:

headLength

Value: min(axisLength, axisDiameter * Types.Defaults.FrameHeadLengthFraction)

Type: Length (m)

Description:

headWidth

Value: axisDiameter * Types.Defaults.FrameHeadWidthFraction

Type: Length (m)

Description:

lineLength

Value: max(0, axisLength - headLength)

Type: Length (m)

Description:

lineWidth

Value: axisDiameter

Type: Length (m)

Description:

scaledLabel

Value: Modelica.Mechanics.MultiBody.Types.Defaults.FrameLabelHeightFraction * axisDiameter

Type: Length (m)

Description:

labelStart

Value: 1.05 * axisLength

Type: Length (m)

Description:

gravityHeadLength

Value: min(gravityArrowLength, gravityArrowDiameter * Types.Defaults.ArrowHeadLengthFraction)

Type: Length (m)

Description:

gravityHeadWidth

Value: gravityArrowDiameter * Types.Defaults.ArrowHeadWidthFraction

Type: Length (m)

Description:

gravityLineLength

Value: max(0, gravityArrowLength - gravityHeadLength)

Type: Length (m)

Description:

ndim_pointGravity

Value: if enableAnimation and animateGravity and gravityType == GravityTypes.UniformGravity then 1 else 0

Type: Integer

Description:

Components (12)

x_arrowLine

Type: Shape

Description:

x_arrowHead

Type: Shape

Description:

x_label

Type: Lines

Description:

y_arrowLine

Type: Shape

Description:

y_arrowHead

Type: Shape

Description:

y_label

Type: Lines

Description:

z_arrowLine

Type: Shape

Description:

z_arrowHead

Type: Shape

Description:

z_label

Type: Lines

Description:

gravityArrowLine

Type: Shape

Description:

gravityArrowHead

Type: Shape

Description:

gravitySphere

Type: Shape

Description:

Used in Examples (42)

DoublePendulum

Simple double pendulum with two revolute joints and two bodies

DoublePendulumInitTip

Demonstrate how to initialize a double pendulum so that its tip starts at a predefined position

ForceAndTorque

Demonstrate usage of ForceAndTorque element

FreeBody

Free flying body attached by two springs to environment

InitSpringConstant

Determine spring constant such that system is in steady state at given position

LineForceWithTwoMasses

Demonstrate line force with two point masses using a JointUPS and alternatively a LineForceWithTwoMasses component

Pendulum

Simple pendulum with one revolute joint and one body

PendulumWithSpringDamper

Simple spring/damper/mass system

PointGravity

Two point masses in a point gravity field

PointGravityWithPointMasses

Two point masses in a point gravity field (rotation of bodies is neglected)

PointGravityWithPointMasses2

Rigidly connected point masses in a point gravity field

SpringDamperSystem

Simple spring/damper/mass system

SpringMassSystem

Mass attached with a spring to the world frame

SpringWithMass

Point mass hanging on a spring

ThreeSprings

3-dim. springs in series and parallel connection

RollingWheel

Single wheel rolling on ground starting from an initial speed

RollingWheelSetDriving

Rolling wheel set that is driven by torques driving the wheels

RollingWheelSetPulling

Rolling wheel set that is pulled by a force

HeatLosses

Demonstrate the modeling of heat losses

UserDefinedGravityField

Demonstrate the modeling of a user-defined gravity field

Surfaces

Demonstrate the visualization of a sine surface, as well as a torus and a wheel constructed from a surface

Engine1a

Model of one cylinder engine

Engine1b

Model of one cylinder engine with gas force and preparation for assembly joint JointRRP

Engine1b_analytic

Model of one cylinder engine with gas force and analytic loop handling

EngineV6

V6 engine with 6 cylinders, 6 planar loops and 1 degree-of-freedom

EngineV6_analytic

V6 engine with 6 cylinders, 6 planar loops, 1 degree-of-freedom and analytic handling of kinematic loops

Fourbar1

One kinematic loop with four bars (with only revolute joints; 5 non-linear equations)

Fourbar2

One kinematic loop with four bars (with UniversalSpherical joint; 1 non-linear equation)

Fourbar_analytic

One kinematic loop with four bars (with JointSSP joint; analytic solution of non-linear algebraic loop)

PlanarLoops_analytic

Mechanism with three planar kinematic loops and one degree-of-freedom with analytic loop handling (with JointRRR joints)

Engine1bBase

Model of one cylinder engine with gas force

GyroscopicEffects

Demonstrates that a cylindrical body can be replaced by Rotor1D model

ActuatedDrive

Demonstrates usage of models Rotor1D and Mounting1D

MovingActuatedDrive

Demonstrates usage of model Rotor1D mounted on a moving body

GearConstraint

Demonstrate usage of GearConstraint model

BevelGear1D

Demonstrates the usage of a BevelGear1D model and how to calculate the power of such an element

PrismaticConstraint

Body attached by one spring and two prismatic joints or constrained to environment

RevoluteConstraint

Body attached by one spring and revolute joint or constrained to environment

SphericalConstraint

Body attached by one spring and spherical joint or constrained to environment

UniversalConstraint

Body attached by one spring and universal joint or constrained to environment

Arrow

Visualizing an arrow with variable size; all data have to be set as modifiers (see info layer)

DoubleArrow

Visualizing a double arrow with variable size; all data have to be set as modifiers (see info layer)

Used in Components (86)

PointMass

Point mass used at all places of this example

PointMass

Body used at all places of the comparison model with zero inertia tensor

MechanicalStructure

Model of the mechanical part of the r3 robot (without animation)

WorldForce

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

WorldTorque

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

WorldForceAndTorque

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

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

Torque

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

ForceAndTorque

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

LineForceWithMass

General line force component with an optional point mass on the connection line

LineForceWithTwoMasses

General line force component with two optional point masses on the connection line

Spring

Linear translational spring with optional mass

Damper

Linear (velocity dependent) damper

SpringDamperParallel

Linear spring and linear damper in parallel

SpringDamperSeries

Linear spring and linear damper in series connection

BasicForce

Force acting between two frames, defined by 3 input signals

BasicTorque

Torque acting between two frames, defined by 3 input signals

BasicWorldForce

External force acting at frame_b, defined by 3 input signals

BasicWorldTorque

External torque acting at frame_b, defined by 3 input signals

PartialTwoFrames

Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected

PartialTwoFramesDoubleSize

Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected (default icon size is factor 2 larger as usual)

PartialOneFrame_a

Base model for components providing one frame_a connector + outer world + assert to guarantee that the component is connected

PartialOneFrame_b

Base model for components providing one frame_b connector + outer world + assert to guarantee that the component is connected

PartialElementaryJoint

Base model for elementary joints (has two frames + outer world + assert to guarantee that the joint is connected)

PartialForce

Base model for force elements (provide frame_b.f and frame_b.t in subclasses)

PartialLineForce

Base model for line force elements

PartialAbsoluteSensor

Base model to measure an absolute frame variable

PartialRelativeSensor

Base model to measure a relative variable between two frames

PartialVisualizer

Base model for visualizers (has a frame_a on the left side + outer world + assert to guarantee that the component is connected)

Prismatic

Prismatic joint (1 translational degree-of-freedom, 2 potential states, optional axis flange)

Revolute

Revolute joint (1 rotational degree-of-freedom, 2 potential states, optional axis flange)

RevolutePlanarLoopConstraint

Revolute joint that is described by 2 positional constraints for usage in a planar loop (the ambiguous cut-force perpendicular to the loop and the ambiguous cut-torques are set arbitrarily to zero)

Cylindrical

Cylindrical joint (2 degrees-of-freedom, 4 potential states)

Universal

Universal joint (2 degrees-of-freedom, 4 potential states)

Planar

Planar joint (3 degrees-of-freedom, 6 potential states)

Spherical

Spherical joint (3 constraints and no potential states, or 3 degrees-of-freedom and 3 states)

FreeMotion

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

FreeMotionScalarInit

Free motion joint with scalar initialization and state selection (6 degrees-of-freedom, 12 potential states)

SphericalSpherical

Spherical - spherical joint aggregation (1 constraint, no potential states) with an optional point mass in the middle

UniversalSpherical

Universal - spherical joint aggregation (1 constraint, no potential states)

GearConstraint

Ideal 3-dim. gearbox (arbitrary shaft directions)

JointUPS

Universal - prismatic - spherical joint aggregation (no constraints, no potential states)

JointUSR

Universal - spherical - revolute joint aggregation (no constraints, no potential states)

JointUSP

Universal - spherical - prismatic joint aggregation (no constraints, no potential states)

JointSSR

Spherical - spherical - revolute joint aggregation with mass (no constraints, no potential states)

JointSSP

Spherical - spherical - prismatic joint aggregation with mass (no constraints, no potential states)

JointRRR

Planar revolute - revolute - revolute joint aggregation (no constraints, no potential states)

JointRRP

Planar revolute - revolute - prismatic joint aggregation (no constraints, no potential states)

Prismatic

Prismatic cut-joint and translational directions may be constrained or released

Revolute

Revolute cut-joint and translational directions may be constrained or released

Spherical

Spherical cut joint and translational directions may be constrained or released

Universal

Universal cut-joint and translational directions may be constrained or released

RevoluteWithLengthConstraint

Revolute joint where the rotation angle is computed from a length constraint (1 degree-of-freedom, no potential state)

PrismaticWithLengthConstraint

Prismatic joint where the translational distance is computed from a length constraint (1 degree-of-freedom, no potential state)

Fixed

Frame fixed in the world frame at a given position

FixedTranslation

Fixed translation of frame_b with respect to frame_a

FixedRotation

Fixed translation followed by a fixed rotation of frame_b with respect to frame_a

Body

Rigid body with mass, inertia tensor and one frame connector (12 potential states)

BodyShape

Rigid body with mass, inertia tensor, different shapes for animation, and two frame connectors (12 potential states)

BodyBox

Rigid body with box shape. Mass and animation properties are computed from box data and density (12 potential states)

BodyCylinder

Rigid body with cylinder shape. Mass and animation properties are computed from cylinder data and density (12 potential states)

PointMass

Rigid body where body rotation and inertia tensor is neglected (6 potential states)

Mounting1D

Propagate 1-dim. support torque to 3-dim. system (provided world.driveTrainMechanics3D=true)

Rotor1D

1D inertia attachable on 3-dim. bodies (3D dynamic effects are taken into account if world.driveTrainMechanics3D=true)

RotorWith3DEffects

1D inertia attachable on 3-dim. bodies (3D dynamic effects are taken into account)

BevelGear1D

1D gearbox with arbitrary shaft directions and 3-dim. bearing frame (3D dynamic effects are taken into account provided world.driveTrainMechanics3D=true)

AbsoluteSensor

Measure absolute kinematic quantities of frame connector

RelativeSensor

Measure relative kinematic quantities between two frame connectors

Distance

Measure the distance between the origins of two frame connectors

CutForce

Measure cut force vector

CutTorque

Measure cut torque vector

CutForceAndTorque

Measure cut force and cut torque vector

Power

Measure power flowing from frame_a to frame_b

PartialCutForceSensor

Base model to measure the cut force and/or torque between two frames, defined by components

PartialCutForceBaseSensor

Base model to measure the cut force and/or torque between two frames, defined by equations (frame_resolve must be connected exactly once)

BasicCutForce

Measure cut force vector (frame_resolve must be connected)

BasicCutTorque

Measure cut torque vector (frame_resolve must be connected)

FixedShape

Visualizing an elementary shape with dynamically varying shape attributes (has one frame connector)

FixedShape2

Visualizing an elementary shape with dynamically varying shape attributes (has two frame connectors)

FixedFrame

Visualizing a coordinate system including axes labels (visualization data may vary dynamically)

FixedArrow

Visualizing an arrow with dynamically varying size in frame_a

SignalArrow

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

Torus

Visualizing a torus

VoluminousWheel

Visualizing a voluminous wheel

PipeWithScalarField

Visualizing a pipe with scalar field quantities along the pipe axis

FixedLines

Visualizing a set of lines as cylinders (e.g., used to display characters)