ObjectJointRevolute2D
A revolute joint in 2D; constrains the absolute 2D position of two points given by PointMarkers or RigidMarkers
Interface
Python names:
ObjectJointRevolute2DorRevoluteJoint2D, andVRevoluteJoint2Dfor its visualizationMarkers it acts on: those providing
Position: MarkerBodyPosition, MarkerBodyRigid, MarkerNodePosition, MarkerNodeRigid, MarkerSuperElementPosition, MarkerSuperElementRigid, MarkerKinematicTreeRigid
Parameters
The parameters of the item; in a dictionary, its type is ‘JointRevolute2D’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
constraints’s unique name |
|
markerNumbers |
ArrayMarkerIndex |
[ invalid (-1), invalid (-1) ] |
list of markers used in connector |
|
activeConnector |
Bool |
True |
flag, which determines, if the connector is active; used to deactivate (temporarily) a connector or constraint |
|
visualization |
VObjectJointRevolute2D |
parameters for visualization of item |
Visualization parameters
The parameters of VObjectJointRevolute2D, 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 |
|
drawSize |
float |
-1. |
drawing size = radius of revolute joint; size == -1.f means that default connector size is used |
|
color |
Float4 |
4 |
[-1.,-1.,-1.,-1.] |
RGBA connector color; if R==-1, use default color |
Drawing
Drawn as all joints; a circle of diameter drawSize at each marker, the one of marker 0 red.
Output variables
Available as OutputVariableType in sensors, Get...Output() and other functions:
output variable |
symbol |
description |
|---|---|---|
Displacement |
\(\LU{0}{\pv}_{m1} - \LU{0}{\pv}_{m0}\) |
global vector from marker m0 to marker m1, zero up to the drift of the position on the velocity level |
Position |
\(\LU{0}{\pv}_{m0}\) |
current global position of position marker \(m0\) |
Velocity |
\(\LU{0}{\vv}_{m0}\) |
current global velocity of position marker \(m0\) |
Force |
\(\LU{0}{\fv} = [\lambda_0,\,\lambda_1,\,0]\tp\) |
global joint force; as for the other joints the force on marker m0 |
Detailed description
Definition of quantities
intermediate variables |
symbol |
description |
|---|---|---|
marker m0 position |
\(\LU{0}{\pv}_{m0}\) |
global position provided by marker m0 |
marker m1 position |
\(\LU{0}{\pv}_{m1}\) |
global position provided by marker m1 |
marker velocities |
\(\LU{0}{\vv}_{m0}\), \(\LU{0}{\vv}_{m1}\) |
global velocities of the two markers |
Lagrange multipliers |
\(\tlambda = [\lambda_0,\,\lambda_1]\tp\) |
the joint force in \(x\) and \(y\) |
Connector constraint equations
The two points coincide in the \(x\)-\(y\) plane; the rotation about \(z\) is free. On the position level (index 3)
and on the velocity level (index 2) the same with the velocities. The multipliers act on the markers
with the \(x\) and \(y\) rows of the position Jacobians, \(\pm\LU{0}{\Jm_{pos}}\tp\tlambda\). With
activeConnector = False the equations become \(\tlambda = \Null\).
Mini example
#a planar rigid body pendulum held at its end by a planar revolute joint
node = mbs.AddNode(NodeRigidBody2D(referenceCoordinates=[0.5,0,0]))
body = mbs.AddObject(ObjectRigidBody2D(nodeNumber=node, mass=1, inertia=1/12))
mbs.AddLoad(LoadForceVector(markerNumber=mbs.AddMarker(MarkerBodyPosition(bodyNumber=body)), loadVector=[0,-9.81,0]))
mGround = mbs.AddMarker(MarkerBodyPosition(bodyNumber=oGround, localPosition=[0,0,0]))
mBody = mbs.AddMarker(MarkerBodyPosition(bodyNumber=body, localPosition=[-0.5,0,0]))
mbs.AddObject(ObjectJointRevolute2D(markerNumbers=[mGround, mBody]))
mbs.Assemble()
simulationSettings = exu.SimulationSettings()
simulationSettings.timeIntegration.numberOfSteps = 1000
mbs.SolveDynamic(simulationSettings)
#the pendulum falls from horizontal; the angle after 1 second (numerical)
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Coordinates)[2]
Examples (Ex) and TestModels (TM) that show this item, with weblink to github: rigidPendulum.py (Ex), doublePendulum2D.py (Ex), SliderCrank.py (Ex), simple4linkPendulumBing.py (Ex), slidercrankWithMassSpring.py (Ex)