```{raw} latex \clearpage ``` (sec-item-node1d)= # Node1D A node with one {ref}`ODE2 ` coordinate for one dimensional (1D) problems. Use e.g. for scalar dynamic equations (Mass1D) and mass-spring-damper mechanisms, representing either translational or rotational degrees of freedom: in most cases, Node1D is equivalent to NodeGenericODE2 using one coordinate, however, it offers a transformation to 3D translational or rotational motion and allows to couple this node to 2D or 3D bodies. ## Interface - Provides: `GenericODE2` - Objects that take this node: [](#sec-item-objectmass1d), [](#sec-item-objectrotationalmass1d), [](#sec-item-objectkinematictree) ## Parameters The parameters of the item; in a dictionary, its type is '1D': | name | type | size | default | description | |---|---|---|---|---| | **name** | String | | '' | node's unique name | | **referenceCoordinates** | Vector | | [0.] | (symbol: $[q_0]\tp\cRef$) reference coordinate of node (in vector form) | | **initialCoordinates** | Vector | | [0.] | (symbol: $[q_0]\tp\cIni$) initial displacement coordinate (in vector form) | | **initialVelocities** | Vector | | [0.] | (symbol: $[\dot q_0]\tp\cIni$) initial velocity coordinate (in vector form) | | **visualization** | VNode1D | | | parameters for visualization of item | ## Visualization parameters `VNode1D` has no parameters. ## Drawing The item draws nothing. ## Output variables Available as `OutputVariableType` in sensors, `Get...Output()` and other functions: ```{tabularcolumns} \Y{0.25}\Y{0.25}\Y{0.5} ``` | output variable | symbol | description | |---|---|---| | CoordinatesTotal | | displacement plus reference coordinates of node | | Coordinates | $\qv\cConfig = [q_0]\tp\cConfig$ | {ref}`ODE2 ` coordinate of node (in vector form) | | Coordinates_t | $\dot \qv\cConfig = [\dot q_0]\tp\cConfig$ | {ref}`ODE2 ` velocity coordinate of node (in vector form) | | Coordinates_tt | $\ddot \qv\cConfig = [\ddot q_0]\tp\cConfig$ | {ref}`ODE2 ` acceleration coordinate of node (in vector form) | (description-node1d)= ## Detailed description ### Coordinates | index | symbol | kind | meaning | frame | |---|---|---|---|---| | 0 | $q_0$ | {ref}`ODE2 ` | displacement or rotation, as the object reads it | the frame of the object | ### Configuration The current position or rotation coordinate of the node is $$ p_0 = {q_0}\cRef + {q_0}\cCur . $$ For drawing and for markers, the node has a position and a velocity in 3D, $\pv\cConfig = [{p_0}\cConfig,\,0,\,0]\tp$ and $[{\dot p_0}\cConfig,\,0,\,0]\tp$. ### Frame and interpretation What the coordinate means is the object's: `ObjectMass1D` reads it as a translation along the local $x$-axis of the frame of its `referencePosition` and `referenceRotation`, `ObjectRotationalMass1D` as a rotation about its local axis. That is what couples a 1D node to 2D or 3D bodies, and what distinguishes it from a `NodeGenericODE2` with one coordinate. ### Action on the equations of motion The coordinate leads to one {ref}`ODE2 ` equation, the residual of the force or the torque the object assigns to it. (miniexample-node1d)= ## Mini example ```python #one coordinate, here the displacement of a 1D mass, pulled by a constant force node = mbs.AddNode(Node1D(referenceCoordinates=[0], initialVelocities=[1])) mbs.AddObject(ObjectMass1D(nodeNumber=node, mass=2)) mCoord = mbs.AddMarker(MarkerNodeCoordinate(nodeNumber=node, coordinate=0)) mbs.AddLoad(LoadCoordinate(markerNumber=mCoord, load=4)) mbs.Assemble() mbs.SolveDynamic() #q = v0*t + F/(2m)*t^2 at t=1 exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Coordinates) #2 (a scalar for one coordinate) ``` Relevant Examples (Ex) and TestModels (TM) with weblink to github: [`lugreFrictionTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/lugreFrictionTest.py) (Ex), [`mpi4pyExample.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/mpi4pyExample.py) (Ex), [`multiprocessingTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/multiprocessingTest.py) (Ex), [`nMassOscillator.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/nMassOscillator.py) (Ex), [`nMassOscillatorEigenmodes.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/nMassOscillatorEigenmodes.py) (Ex), [`nMassOscillatorInteractive.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/nMassOscillatorInteractive.py) (Ex), [`accessFunctionsTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/accessFunctionsTest.py) (TM), [`connectorOutputVariablesTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/connectorOutputVariablesTest.py) (TM), [`contactComparisonTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/contactComparisonTest.py) (TM), [`coordinateSpringDamperExt.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/coordinateSpringDamperExt.py) (TM), [`coordinateSpringDamperExtVelocityOffsetTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/coordinateSpringDamperExtVelocityOffsetTest.py) (TM), [`distanceSensor.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/distanceSensor.py) (TM), [`driveTrainTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/driveTrainTest.py) (TM), [`explicitSolversPostNewtonTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/explicitSolversPostNewtonTest.py) (TM), [`genericODE2matrixFormatsTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/genericODE2matrixFormatsTest.py) (TM), ...