NodePoint2D
A 2D point node for point masses or solid finite elements which has 2 displacement degrees of freedom for ODE2.
Interface
Python names:
NodePoint2DorPoint2D, andVPoint2Dfor its visualizationProvides:
Position2DNode markers that can be attached: MarkerNodePosition
Objects that take this node: ObjectMassPoint2D
Parameters
The parameters of the item; in a dictionary, its type is ‘Point2D’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
node’s unique name |
|
referenceCoordinates |
Vector2D |
2 |
[0.,0.] |
(symbol: \(\qv\cRef = [q_0,\,q_1]\tp\cRef = \pv\cRef = [r_0,\,r_1]\tp\)) reference coordinates of node ==> e.g. ref. coordinates for finite elements; global position of node without displacement |
initialCoordinates |
Vector2D |
2 |
[0.,0.] |
(symbol: \(\qv\cIni = [q_0,\,q_1]\cIni\tp = [u_0,\,u_1]\cIni\tp\)) initial displacement coordinate |
initialVelocities |
Vector2D |
2 |
[0.,0.] |
(symbol: \(\dot\qv\cIni = \vv\cIni = [\dot q_0,\,\dot q_1]\cIni\tp\)) initial velocity coordinate |
visualization |
VNodePoint2D |
parameters for visualization of item |
Visualization parameters
The parameters of VNodePoint2D, given as visualization:
name |
type |
size |
default |
description |
|---|---|---|---|---|
show |
Bool |
True |
set true, if item is shown in visualization and false if it is not shown |
|
drawSize |
float |
-1. |
drawing size (diameter, dimensions of underlying cube, etc.) for item; size == -1.f means that default size is used |
|
color |
Float4 |
4 |
[-1.,-1.,-1.,-1.] |
Default RGBA color for nodes; 4th value is alpha-transparency; R=-1.f means, that default color is used |
Drawing
Drawn as all nodes.
Output variables
Available as OutputVariableType in sensors, Get...Output() and other functions:
output variable |
symbol |
description |
|---|---|---|
Position |
\(\pv\cConfig = [p_0,\,p_1,\,0]\cConfig\tp= \uv\cConfig + \pv\cRef\) |
global 3D position vector of node; \(\uv\cRef=0\) |
Displacement |
\(\uv\cConfig = [q_0,\,q_1,\,0]\cConfig\tp\) |
global 3D displacement vector of node |
Velocity |
\(\vv\cConfig = [\dot q_0,\,\dot q_1,\,0]\cConfig\tp\) |
global 3D velocity vector of node |
Acceleration |
\(\av\cConfig = [\ddot q_0,\,\ddot q_1,\,0]\cConfig\tp\) |
global 3D acceleration vector of node |
CoordinatesTotal |
\(\cv\cConfig = \uv\cConfig + \pv\cRef\) |
displacement plus reference coordinates of node |
Coordinates |
\(\cv\cConfig = [q_0,\,q_1]\tp\cConfig\) |
coordinate vector of node |
Coordinates_t |
\(\dot\cv\cConfig = [\dot q_0,\,\dot q_1]\tp\cConfig\) |
velocity coordinates vector of node |
Coordinates_tt |
\(\ddot\cv\cConfig = \av\cConfig = [\ddot q_0,\,\ddot q_1]\tp\cConfig\) |
acceleration coordinates vector of node |
RotationMatrix |
identity matrix (only for completeness) |
|
Rotation |
\([0,0,0]\) |
(only for completeness) |
AngularVelocity |
\([0,0,0]\) |
(only for completeness) |
AngularVelocityLocal |
\([0,0,0]\) |
(only for completeness) |
Detailed description
Coordinates
index |
symbol |
kind |
meaning |
frame |
|---|---|---|---|---|
0, 1 |
\(q_0,\,q_1\) |
displacement of the node in \(x\) and \(y\) |
global |
Configuration
In any configuration, the position of the node is its reference position plus its displacement, with a third component that is always zero,
Frame and interpretation
The coordinates are displacements in the global \(x\)-\(y\) plane; ObjectMassPoint2D is the object
that uses them.
Action on the equations of motion
The two coordinates lead to two ODE2 equations, the residuals of the forces in \(x\) and \(y\); a force of a load or connector enters them with its first two components.
Example: see ObjectMassPoint2D
Mini example
#a planar point mass under gravity, thrown with an initial velocity
node = mbs.AddNode(NodePoint2D(referenceCoordinates=[0,0], initialVelocities=[1,2]))
oMass = mbs.AddObject(ObjectMassPoint2D(nodeNumber=node, mass=1))
mMass = mbs.AddMarker(MarkerNodePosition(nodeNumber=node))
mbs.AddLoad(LoadForceVector(markerNumber=mMass, loadVector=[0,-9.81,0]))
mbs.Assemble()
mbs.SolveDynamic()
#y = v0*t - g/2*t^2 at t=1
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Position)[1] #2-4.905=-2.905
Examples (Ex) and TestModels (TM) that show this item, with weblink to github: pendulum2Dconstraint.py (Ex), SliderCrank.py (Ex), SpringDamperMassUserFunction.py (Ex), slidercrankWithMassSpring.py (Ex)