ObjectMassPoint2D
A 2D mass point which is attached to a position-based 2D node.
Simpler: mbs.CreateMassPoint adds this item, with what it needs, in one call.
Interface
Python names:
ObjectMassPoint2DorMassPoint2D, andVMassPoint2Dfor its visualizationNodes it takes: NodePoint2D, NodeRigidBody2D, NodePoint2DSlope1, NodePointGround
Body markers that can be placed on it: MarkerBodyMass, MarkerBodyPosition
Parameters
The parameters of the item; in a dictionary, its type is ‘MassPoint2D’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
objects’s unique name |
|
mass |
UReal |
0. |
(symbol: \(m\)) mass [SI:kg] of mass point |
|
nodeNumber |
NodeIndex |
invalid (-1) |
(symbol: \(n0\)) node number (type NodeIndex) for mass point |
|
visualization |
VObjectMassPoint2D |
parameters for visualization of item |
Renamed parameters, still taken with a DeprecationWarning: physicsMass (deprecated since 1.12.258, removed in 2031): use mass.
Visualization parameters
The parameters of VObjectMassPoint2D, given as visualization:
name |
type |
size |
default |
description |
|---|---|---|---|---|
show |
Bool |
True |
set true, if item is shown in visualization and false if it is not shown |
|
graphicsData |
BodyGraphicsData |
Structure contains data for body visualization; data is defined in special list / dictionary structure |
Drawing
Drawn as all bodies; its graphicsData, moved with the node; without graphicsData only the node is seen.
Output variables
Available as OutputVariableType in sensors, Get...Output() and other functions:
output variable |
symbol |
description |
|---|---|---|
Position |
\(\LU{0}{\pv}\cConfig(\pLocB) = \LU{0}{\pRef}\cConfig + \LU{0}{\pRef}\cRef + \LU{0b}{\ImTwo}\pLocB\) |
global position vector of translated local position; local (body) coordinate system = global coordinate system |
Displacement |
\(\LU{0}{\uv}\cConfig = [q_0,\;q_1,\;0]\cConfig\tp\) |
global displacement vector of mass point |
Velocity |
\(\LU{0}{\vv}\cConfig = \LU{0}{\dot\uv}\cConfig = [\dot q_0,\;\dot q_1,\;0]\cConfig\tp\) |
global velocity vector of mass point |
Acceleration |
\(\LU{0}{\av}\cConfig = \LU{0}{\ddot\uv}\cConfig = [\ddot q_0,\;\ddot q_1,\;0]\cConfig\tp\) |
global acceleration vector of mass point |
RotationMatrix |
identity matrix (only for completeness) |
|
Rotation |
\([0,0,0]\) |
(only for completeness) |
AngularVelocity |
\([0,0,0]\) |
(only for completeness) |
AngularVelocityLocal |
\([0,0,0]\) |
(only for completeness) |
KineticEnergy |
\(T = \frac{1}{2} m\, \LU{0}{\vv}\tp \LU{0}{\vv}\) |
kinetic energy of the mass point; localPosition must be \([0,0,0]\) |
PotentialEnergy |
\(V = 0\) |
the body has no elastic energy; gravity and other loads are not part of it (see exudyn.advancedUtilities.LoadPotentialEnergy) - the value stays the same when a body gets a built-in gravity; localPosition must be \([0,0,0]\) |
Detailed description
Definition of quantities
intermediate variables |
symbol |
description |
|---|---|---|
node position |
\(\LU{0}{\pv}\cConfig = \LU{0}{\pRef}\cRef + \LU{0}{\uv}\cConfig = \LU{0}{\pv}(n_0)\cConfig\) |
position of the mass point, provided by node \(n_0\), in any configuration |
node displacement |
\(\LU{0}{\uv}\cConfig = [q_0,\;q_1,\;0]\cConfig\tp\) |
displacement of the mass point in the \(x\)-\(y\) plane |
node velocity |
\(\LU{0}{\vv}\cConfig = [\dot q_0,\;\dot q_1,\;0]\cConfig\tp\) |
velocity of the mass point |
rotation matrix |
\(\LU{0b}{\Rot} = \ImThree\) |
the body frame is the global frame |
applied forces |
\(\LU{0}{\fv}_a = [f_0,\;f_1,\;f_2]\tp\) |
from loads, connectors and joint reaction forces; \(f_2\) has no effect |
Equations of motion
Marker interfaces
The position Jacobian takes the \(x\) and \(y\) components of a global force,
so \(\Qm = \LU{0}{\Jm_{pos}}\tp \LU{0}{\fv}_a = [f_0,\;f_1]\tp\). There is no rotation Jacobian.
Mini example
node = mbs.AddNode(NodePoint2D(referenceCoordinates = [1,1],
initialCoordinates=[0.5,0],
initialVelocities=[0.5,0]))
mbs.AddObject(MassPoint2D(nodeNumber = node, mass=1))
#assemble and solve system for default parameters
mbs.Assemble()
mbs.SolveDynamic()
#check result
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Position)[0]
#final x-coordinate of position shall be 2
Examples (Ex) and TestModels (TM) that show this item, with weblink to github: basicTutorial2024.py (Ex), tutorialSpringDamperCreate.py (Ex), pendulum2Dconstraint.py (Ex), cartesianSpringDamper.py (Ex), SliderCrank.py (Ex)