MarkerSuperElementPosition
A position marker attached to a SuperElement, such as ObjectFFRF, ObjectGenericODE2 and ObjectFFRFreducedOrder (for which it is in its current implementation inefficient for large number of meshNodeNumbers). The marker acts on the mesh (interface) nodes, not on the underlying nodes of the object.
Interface
Provides:
PositionBodies it can be placed on: ObjectGenericODE2, ObjectFFRF, ObjectFFRFreducedOrder
Connectors, constraints and loads that can use it: ObjectConnectorSpringDamper, ObjectConnectorCartesianSpringDamper, ObjectConnectorGravity, ObjectConnectorHydraulicActuatorSimple, ObjectConnectorDistance, ObjectContactSphereSphere, ObjectContactSphereTriangle, ObjectJointSpherical, ObjectJointRevolute2D, LoadForceVector
Parameters
The parameters of the item; in a dictionary, its type is ‘SuperElementPosition’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
marker’s unique name |
|
bodyNumber |
ObjectIndex |
invalid (-1) |
(symbol: \(n_b\)) body number to which marker is attached to |
|
meshNodeNumbers |
ArrayIndex |
[] |
(symbol: \([k_0,\,\ldots,\,k_{n_m-1}]\tp\)) a list of \(n_m\) mesh node numbers of superelement (=interface nodes) which are used to compute the body-fixed marker position; the related nodes must provide 3D position information, such as NodePoint, NodePoint2D, NodeRigidBody[..]; in order to retrieve the global node number, the generic body needs to convert local into global node numbers |
|
weightingFactors |
Vector |
[] |
(symbol: \([w_{0},\,\ldots,\,w_{n_m-1}]\tp\)) a list of \(n_m\) weighting factors per node to compute the final local position; the sum of these weights shall be 1, such that a summation of all nodal positions times weights gives the average position of the marker |
|
visualization |
VMarkerSuperElementPosition |
parameters for visualization of item |
Visualization parameters
The parameters of VMarkerSuperElementPosition, 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 |
|
showMarkerNodes |
Bool |
True |
set true, if all nodes are shown (similar to marker, but with less intensity) |
Drawing
Drawn as all markers; at the weighted position of its mesh nodes, deformed with bodies.deformationScaleFactor.
Settings beyond those of all markers: bodies.deformationScaleFactor.
Detailed description
Definition of marker quantities:
intermediate variables |
symbol |
description |
|---|---|---|
number of mesh nodes |
\(n_m\) |
size of |
mesh node number |
\(i = k_i\) |
abbreviation |
mesh node points |
\(\LU{0}{\pv}_{i}\) |
position of mesh node \(k_i\) in object \(n_b\) |
mesh node velocities |
\(\LU{0}{\vv}_{i}\) |
velocity of mesh node \(i\) in object \(n_b\) |
marker position |
\(\LU{0}{\pv}_{m} = \sum_i w_i \cdot \LU{0}{\pv_i}\) |
current global position which is provided by marker |
marker velocity |
\(\LU{0}{\vv}_{m} = \sum_i w_i \cdot \LU{0}{\vv_i}\) |
current global velocity which is provided by marker |
Marker quantities
The marker provides a ‘position’ jacobian, which is the derivative of the marker velocity w.r.t. the object velocity coordinates \(\dot \qv_{n_b}\),
in which \(\Jm_{i,pos}\) denotes the position jacobian of mesh node \(i\),
The jacobian \(\Jm_{i,pos}\) usually contains mostly zeros for ObjectGenericODE2, because the jacobian only affects one single node.
In ObjectFFRFreducedOrder, the jacobian may affect all reduced coordinates.
Note that \(\Jm_{m,pos}\) is actually computed by the
ObjectSuperElement within the function GetAccessFunctionSuperElement.
Mini example
#set up a mechanical system with two nodes; it has the structure: |~~M0~~M1
#==>further examples see objectGenericODE2Test.py, objectFFRFTest2.py, etc.
nMass0 = mbs.AddNode(NodePoint(referenceCoordinates=[0,0,0]))
nMass1 = mbs.AddNode(NodePoint(referenceCoordinates=[1,0,0]))
mGround = mbs.AddMarker(MarkerBodyPosition(bodyNumber=oGround, localPosition = [1,0,0]))
mass = 0.5 * np.eye(3) #mass of nodes
stif = 5000 * np.eye(3) #stiffness of nodes
damp = 50 * np.eye(3) #damping of nodes
Z = 0. * np.eye(3) #matrix with zeros
#build mass, stiffness and damping matrices (:
M = np.block([[mass, 0.*np.eye(3)],
[0.*np.eye(3), mass ] ])
K = np.block([[2*stif, -stif],
[ -stif, stif] ])
D = np.block([[2*damp, -damp],
[ -damp, damp] ])
oGenericODE2 = mbs.AddObject(ObjectGenericODE2(nodeNumbers=[nMass0,nMass1],
massMatrix=M,
stiffnessMatrix=K,
dampingMatrix=D))
#EXAMPLE for single node marker on super element body, mesh node 1; compare results to ObjectGenericODE2 example!!!
mSuperElement = mbs.AddMarker(MarkerSuperElementPosition(bodyNumber=oGenericODE2, meshNodeNumbers=[1], weightingFactors=[1]))
mbs.AddLoad(Force(markerNumber = mSuperElement, loadVector = [10, 0, 0]))
#assemble and solve system for default parameters
mbs.Assemble()
mbs.SolveDynamic(solverType = exu.DynamicSolverType.TrapezoidalIndex2)
#check result at default integration time
exu.sys['testResult'] = mbs.GetNodeOutput(nMass1, exu.OutputVariableType.Position)[0]
Relevant Examples (Ex) and TestModels (TM) with weblink to github: NGsolvePistonEngine.py (Ex), NGsolvePostProcessingStresses.py (Ex), objectFFRFreducedOrderNetgen.py (Ex), objectFFRFreducedOrderAccelerations.py (TM), objectFFRFreducedOrderStressModesTest.py (TM), objectFFRFreducedOrderTest.py (TM), objectFFRFTest.py (TM), objectFFRFTest2.py (TM), objectGenericODE2Test.py (TM), superElementRigidJointTest.py (TM)