NodeGenericODE1

A node containing a number of ODE1 variables. Use this node e.g. for linear state space systems. NOTE: referenceCoordinates and initialCoordinates must be initialized, because no default values exist.

Interface

  • Provides: GenericODE1

Parameters

The parameters of the item; in a dictionary, its type is ‘GenericODE1’:

name

type

size

default

description

name

String

‘’

node’s unique name

referenceCoordinates

Vector

[]

(symbol: \(\yv\cRef = [y_0,\,\ldots,\,y_{nc}]\tp\cRef\)) generic reference coordinates of node; must be consistent with numberOfODE1Coordinates

initialCoordinates

Vector

[]

(symbol: \(\yv\cIni = [y_0,\,\ldots,\,y_{nc}]\tp\cIni\)) initial displacement coordinates; must be consistent with numberOfODE1Coordinates

numberOfODE1Coordinates

PInt

0

(symbol: \(n_c\)) number of generic ODE1 coordinates; must be given: the default is only a placeholder

visualization

VNodeGenericODE1

parameters for visualization of item

Visualization parameters

VNodeGenericODE1 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

\(\yv\cConfig = [y_0,\,\ldots,\,y_{nc}]\tp\cConfig\)

ODE1 coordinates vector of node

Coordinates_t

\(\dot \yv\cConfig = [\dot y_0,\,\ldots,\,\dot y_{nc}]\tp\cConfig\)

ODE1 velocity coordinates vector of node

Detailed description

Coordinates

A number of ODE1 coordinates, numberOfODE1Coordinates, whose meaning is defined by the object that uses the node, such as the states of ObjectGenericODE1. The current value of a coordinate is its reference value plus its current coordinate.

Action on the equations of motion

Each coordinate leads to one first order equation, which the object provides; a load acts on a coordinate through MarkerNodeODE1Coordinate.

Mini example

#a first-order system q_t = A q, here an exponential decay
node = mbs.AddNode(NodeGenericODE1(numberOfODE1Coordinates=1, referenceCoordinates=[0],
                                   initialCoordinates=[1]))
mbs.AddObject(ObjectGenericODE1(nodeNumbers=[node], systemMatrix=[[-1]]))

mbs.Assemble()
simulationSettings = exu.SimulationSettings()
mbs.SolveDynamic(simulationSettings, solverType=exu.DynamicSolverType.RK44)

#q(1) = exp(-1)
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Coordinates) #0.3679

Relevant Examples (Ex) and TestModels (TM) with weblink to github: HydraulicActuator2Arms.py (Ex), HydraulicActuatorStaticInitialization.py (Ex), HydraulicsUserFunction.py (Ex), lugreFrictionODE1.py (Ex), lugreFrictionTest.py (Ex), genericODE1duplicateNodeTest.py (TM), hydraulicActuatorSimpleTest.py (TM), solverExplicitODE1ODE2test.py (TM), taskmanagerTest.py (TM)