```{raw} latex \clearpage ``` (sec-item-nodegenericode2)= # NodeGenericODE2 A node containing a number of {ref}`ODE2 ` variables. Use this node e.g. for scalar dynamic equations (Mass1D), for ObjectGenericODE2 or for the Eulerian coordinate in the ALECable element. NOTE: referenceCoordinates and all initialCoordinates(_t) must be initialized, because no default values exist. ## 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 'GenericODE2': | name | type | size | default | description | |---|---|---|---|---| | **name** | String | | '' | node's unique name | | **referenceCoordinates** | Vector | | [] | (symbol: $\qv\cRef = [q_0,\,\ldots,\,q_{nc}]\tp\cRef$) generic reference coordinates of node; must be consistent with numberOfODE2Coordinates | | **initialCoordinates** | Vector | | [] | (symbol: $\qv\cIni = [q_0,\,\ldots,\,q_{nc}]\tp\cIni$) initial displacement coordinates; must be consistent with numberOfODE2Coordinates | | **initialCoordinates_t** | Vector | | [] | (symbol: $\dot \qv\cIni = [\dot q_0,\,\ldots,\,\dot q_{n_c}]\tp\cIni$) initial velocity coordinates; must be consistent with numberOfODE2Coordinates | | **numberOfODE2Coordinates** | PInt | | 0 | (symbol: $n_c$) number of generic {ref}`ODE2 ` coordinates; **must be given**: the default is only a placeholder | | **visualization** | VNodeGenericODE2 | | | parameters for visualization of item | ## Visualization parameters `VNodeGenericODE2` 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,\,\ldots,\,q_{nc}]\tp\cConfig$ | coordinates vector of node | | Coordinates_t | $\dot \qv\cConfig = [\dot q_0,\,\ldots,\,\dot q_{nc}]\tp\cConfig$ | velocity coordinates vector of node | | Coordinates_tt | $\ddot \qv\cConfig = [\ddot q_0,\,\ldots,\,\ddot q_{nc}]\tp\cConfig$ | acceleration coordinates vector of node | (description-nodegenericode2)= ## Detailed description ### Coordinates A number of {ref}`ODE2 ` coordinates, `numberOfODE2Coordinates`, whose meaning is **defined by the object that uses the node**: the modal coordinates of `ObjectFFRFreducedOrder`, the joint coordinates of `ObjectKinematicTree`, the coordinates of `ObjectGenericODE2`, or the axial motion of `ObjectALEANCFCable2D`. The current value of a coordinate is its reference value plus its current coordinate, $c_i = q_{i,\mathrm{ref}} + q_i$. ### Action on the equations of motion Each coordinate leads to one {ref}`ODE2 ` equation, which the object provides; the node itself adds nothing. (miniexample-nodegenericode2)= ## Mini example ```python #two coordinates of a user-defined second-order system: a mass on a spring and a free mass node = mbs.AddNode(NodeGenericODE2(numberOfODE2Coordinates=2, referenceCoordinates=[0,0], initialCoordinates=[0.1,0], initialCoordinates_t=[0,1])) M = np.diag([1,1]) K = np.diag([(2*np.pi)**2, 0]) #eigenfrequency 1 Hz for the first coordinate mbs.AddObject(ObjectGenericODE2(nodeNumbers=[node], massMatrix=M, stiffnessMatrix=K)) mbs.Assemble() mbs.SolveDynamic() #after one period, q0 = 0.1 again; q1 = 1*t exu.sys['testResult'] = sum(mbs.GetNodeOutput(node, exu.OutputVariableType.Coordinates)) #1.1 ``` Relevant Examples (Ex) and TestModels (TM) with weblink to github: [`ALEANCFpipe.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ALEANCFpipe.py) (Ex), [`ANCFALEtest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ANCFALEtest.py) (Ex), [`ANCFmovingRigidbody.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ANCFmovingRigidbody.py) (Ex), [`beltDriveALE.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/beltDriveALE.py) (Ex), [`craneReevingSystem.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/craneReevingSystem.py) (Ex), [`kinematicTreeAndMBS.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/kinematicTreeAndMBS.py) (Ex), [`nMassOscillator.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/nMassOscillator.py) (Ex), [`nMassOscillatorInteractive.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/nMassOscillatorInteractive.py) (Ex), [`reinforcementLearningRobot.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/reinforcementLearningRobot.py) (Ex), [`simulateInteractively.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/simulateInteractively.py) (Ex), [`stiffFlyballGovernorKT.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/stiffFlyballGovernorKT.py) (Ex), [`ANCFmovingRigidBodyTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFmovingRigidBodyTest.py) (TM), [`ANCFslidingAndALEjointTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFslidingAndALEjointTest.py) (TM), [`energiesFlexibleBodiesTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/energiesFlexibleBodiesTest.py) (TM), [`energiesTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/energiesTest.py) (TM), ...