```{raw} latex \clearpage ``` (sec-item-markernodeposition)= # MarkerNodePosition A node-Marker attached to a position-based node. It can be used for connectors, joints or loads where position is required. If connectors also require orientation information, use a MarkerNodeRigid. ## Interface - Provides: `Position` - Nodes it can be attached to: [](#sec-item-nodepoint), [](#sec-item-nodepoint2d), [](#sec-item-noderigidbodyep), [](#sec-item-noderigidbodyrxyz), [](#sec-item-noderigidbodyrotveclg), [](#sec-item-noderigidbody2d), [](#sec-item-nodepoint2dslope1), [](#sec-item-nodepointslope1), [](#sec-item-nodepointslope12), [](#sec-item-nodepointslope23), [](#sec-item-nodepointground) - Connectors, constraints and loads that can use it: [](#sec-item-objectconnectorspringdamper), [](#sec-item-objectconnectorcartesianspringdamper), [](#sec-item-objectconnectorgravity), [](#sec-item-objectconnectorhydraulicactuatorsimple), [](#sec-item-objectconnectordistance), [](#sec-item-objectcontactspheresphere), [](#sec-item-objectcontactspheretriangle), [](#sec-item-objectjointspherical), [](#sec-item-objectjointrevolute2d), [](#sec-item-loadforcevector) ## Parameters The parameters of the item; in a dictionary, its type is 'NodePosition': | name | type | size | default | description | |---|---|---|---|---| | **name** | String | | '' | marker's unique name | | **nodeNumber** | NodeIndex | | invalid (-1) | node number to which marker is attached to | | **visualization** | VMarkerNodePosition | | | parameters for visualization of item | ## Visualization parameters The parameters of `VMarkerNodePosition`, 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 | ## Drawing Drawn as [all markers](#sec-drawing-markers). (description-markernodeposition)= ## Detailed description ### Marker quantities | quantity | symbol | as computed | |---|---|---| | position | $\LU{0}{\pv}_m$ | the position of the node, as its output variable `Position` | | velocity | $\LU{0}{\vv}_m$ | the velocity of the node, as its output variable `Velocity` | Both are global, or in the frame the object reads the node in (see the page of the node). ### Jacobians The position Jacobian of the node, $\LU{0}{\Jm_{pos}} = \partial \LU{0}{\pv} / \partial \qv$ with respect to the node's coordinates: the unit matrix for `NodePoint`, the first three columns for a rigid body node, and for a 2D node the $x$ and $y$ rows. (miniexample-markernodeposition)= ## Mini example ```python #the position of a node: a mass hanging on a spring from a ground node, released at rest nMass = mbs.AddNode(NodePoint(referenceCoordinates=[0,0,-1])) mbs.AddObject(ObjectMassPoint(nodeNumber=nMass, mass=1)) mMass = mbs.AddMarker(MarkerNodePosition(nodeNumber=nMass)) mFixed = mbs.AddMarker(MarkerNodePosition(nodeNumber=nGround)) k = (2*np.pi)**2 #1 Hz mbs.AddObject(ObjectConnectorSpringDamper(markerNumbers=[mFixed, mMass], stiffness=k, referenceLength=1)) mbs.AddLoad(LoadForceVector(markerNumber=mMass, loadVector=[0,0,-9.81])) mbs.Assemble() simulationSettings = exu.SimulationSettings() simulationSettings.timeIntegration.endTime = 0.5 #half a period mbs.SolveDynamic(simulationSettings) #lowest point: twice the static deflection, -2*g/k exu.sys['testResult'] = mbs.GetNodeOutput(nMass, exu.OutputVariableType.Displacement)[2] #-0.497 ``` Examples (Ex) and TestModels (TM) that show this item, with weblink to github: [`doublePendulum2D.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/doublePendulum2D.py) (Ex), [`pendulum2Dconstraint.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/pendulum2Dconstraint.py) (Ex), [`interactiveTutorial.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/interactiveTutorial.py) (Ex), [`simple4linkPendulumBing.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/simple4linkPendulumBing.py) (Ex), [`connectorGravityTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/connectorGravityTest.py) (TM)