NodeGenericODE2

A node containing a number of 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

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 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:

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

Detailed description

Coordinates

A number of 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 ODE2 equation, which the object provides; the node itself adds nothing.

Mini example

#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 (Ex), ANCFALEtest.py (Ex), ANCFmovingRigidbody.py (Ex), beltDriveALE.py (Ex), craneReevingSystem.py (Ex), kinematicTreeAndMBS.py (Ex), nMassOscillator.py (Ex), nMassOscillatorInteractive.py (Ex), reinforcementLearningRobot.py (Ex), simulateInteractively.py (Ex), stiffFlyballGovernorKT.py (Ex), ANCFmovingRigidBodyTest.py (TM), ANCFslidingAndALEjointTest.py (TM), energiesFlexibleBodiesTest.py (TM), energiesTest.py (TM), …