MarkerObjectODE2Coordinates
A Marker attached to all coordinates of an object (currently only body is possible), e.g. to apply special constraints or loads on all coordinates. The measured coordinates INCLUDE reference + current coordinates.
Interface
Provides:
CoordinatesConnectors, constraints and loads that can use it: ObjectConnectorCoordinateVector
Parameters
The parameters of the item; in a dictionary, its type is ‘ObjectODE2Coordinates’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
marker’s unique name |
|
objectNumber |
ObjectIndex |
invalid (-1) |
body number to which marker is attached to |
|
visualization |
VMarkerObjectODE2Coordinates |
parameters for visualization of item |
Visualization parameters
VMarkerObjectODE2Coordinates has no parameters.
Drawing
The item draws nothing.
Detailed description
Marker quantities
quantity |
symbol |
as computed |
|---|---|---|
coordinates |
\(\cv = \qv\cRef + \qv\) |
all ODE2 coordinates of the body, node after node in the order of its nodes, including their reference values |
their velocities |
\(\dot\cv\) |
the time derivatives |
Jacobians
The unit matrix of the size of the body’s coordinates. On a body without coordinates (ground) the values and the Jacobian are empty.
Mini example
#all coordinates of an object, here of a ObjectGenericODE2 with two free coordinates, tied by a
#coordinate vector constraint X1 q - X0 q_ground = offset, which is q0 - q1 = 0
node = mbs.AddNode(NodeGenericODE2(numberOfODE2Coordinates=2, referenceCoordinates=[0,0],
initialCoordinates=[0,0], initialCoordinates_t=[0,0]))
oGeneric = mbs.AddObject(ObjectGenericODE2(nodeNumbers=[node], massMatrix=np.eye(2)))
mAll = mbs.AddMarker(MarkerObjectODE2Coordinates(objectNumber=oGeneric))
mNone = mbs.AddMarker(MarkerNodeCoordinates(nodeNumber=nGround)) #the ground node has no coordinates
mbs.AddObject(ObjectConnectorCoordinateVector(markerNumbers=[mNone, mAll], scalingMarker0=np.zeros((1,0)),
scalingMarker1=[[1,-1]], offset=[0]))
mbs.AddLoad(LoadCoordinate(markerNumber=mbs.AddMarker(MarkerNodeCoordinate(nodeNumber=node, coordinate=0)), load=2))
mbs.Assemble()
mbs.SolveDynamic()
#both coordinates move together: a = F/2 = 1, q1 = a/2*t^2 at t=1
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Coordinates)[1] #0.5
Relevant Examples (Ex) and TestModels (TM) with weblink to github: coordinateVectorConstraintGenericODE2.py (TM)