Node1D
A node with one 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:
GenericODE2Objects that take this node: ObjectMass1D, ObjectRotationalMass1D, 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:
output variable |
symbol |
description |
|---|---|---|
CoordinatesTotal |
displacement plus reference coordinates of node |
|
Coordinates |
\(\qv\cConfig = [q_0]\tp\cConfig\) |
ODE2 coordinate of node (in vector form) |
Coordinates_t |
\(\dot \qv\cConfig = [\dot q_0]\tp\cConfig\) |
ODE2 velocity coordinate of node (in vector form) |
Coordinates_tt |
\(\ddot \qv\cConfig = [\ddot q_0]\tp\cConfig\) |
ODE2 acceleration coordinate of node (in vector form) |
Detailed description
Coordinates
index |
symbol |
kind |
meaning |
frame |
|---|---|---|---|---|
0 |
\(q_0\) |
displacement or rotation, as the object reads it |
the frame of the object |
Configuration
The current position or rotation coordinate of the node is
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 ODE2 equation, the residual of the force or the torque the object assigns to it.
Mini example
#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 (Ex), mpi4pyExample.py (Ex), multiprocessingTest.py (Ex), nMassOscillator.py (Ex), nMassOscillatorEigenmodes.py (Ex), nMassOscillatorInteractive.py (Ex), accessFunctionsTest.py (TM), connectorOutputVariablesTest.py (TM), contactComparisonTest.py (TM), coordinateSpringDamperExt.py (TM), coordinateSpringDamperExtVelocityOffsetTest.py (TM), distanceSensor.py (TM), driveTrainTest.py (TM), explicitSolversPostNewtonTest.py (TM), genericODE2matrixFormatsTest.py (TM), …