LoadCoordinate
Load with scalar value, which is attached to a coordinate-based marker; the load can be used e.g. to apply a force to a single axis of a body, a nodal coordinate of a finite element or a torque to the rotatory DOF of a rigid body.
Interface
Markers it acts on: those providing
Coordinate: MarkerNodeCoordinate, MarkerNodeODE1Coordinate, MarkerNodeRotationCoordinate, MarkerBodiesRelativeTranslationCoordinate, MarkerBodiesRelativeRotationCoordinate, MarkerBodyCable2DShape, MarkerBodyCable2DCoordinates
Parameters
The parameters of the item; in a dictionary, its type is ‘Coordinate’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
load’s unique name |
|
markerNumber |
MarkerIndex |
invalid (-1) |
marker’s number to which load is applied |
|
load |
Real |
0. |
(symbol: \(f\)) scalar load [SI:N]; in case of a user function, this value is ignored |
|
loadUserFunction |
LoadCoordinateLoadUserFunction |
0 |
(symbol: \(\mathrm{UF} \in \Rcal\)) A Python function which defines the time-dependent load and replaces the load; see description below; see also notes on loadFactor and drawing in LoadForceVector! |
|
visualization |
VLoadCoordinate |
parameters for visualization of item |
Visualization parameters
VLoadCoordinate has no parameters.
Drawing
The item draws nothing.
Detailed description
Load and its frame
The scalar \(f\) = load, or the return value of loadUserFunction, acts on one coordinate: the one
the coordinate marker selects, e.g. MarkerNodeCoordinate. It has no frame of its own: it is a
generalized force in the direction of the coordinate, which is a force for a displacement coordinate
and a torque-like quantity for a rotation parameter - for Euler parameters or a slope, not a torque
in the physical sense, so take care what the coordinate means.
Generalized forces
for the marked coordinate \(i\), and zero for all others. The load factor applies as for a force.
Userfunction: loadUserFunction(mbs, t, load)
A user function, which computes the scalar load depending on time and the object’s load parameter.
arguments / return |
type or size |
description |
|---|---|---|
|
MainSystem |
provides MainSystem mbs to which load belongs |
|
Real |
current time in mbs |
|
Real |
\(\bv\) copied from object; WARNING: this parameter does not work in combination with static computation, as it is changed by the solver over step time |
return value |
Real |
computed load |
Example:
from math import sin, cos, pi
#this example uses the object's stored parameter load to compute a time-dependent load
def UFload(mbs, t, load):
return load*sin(10*(2*pi)*t)
n0=mbs.AddNode(Point())
nodeMarker = mbs.AddMarker(MarkerNodeCoordinate(nodeNumber=n0,coordinate=0))
mbs.AddLoad(LoadCoordinate(markerNumber = markerCoordinate,
load = 10,
loadUserFunction = UFload))
Mini example
#a load on one coordinate, growing in time through its user function
node = mbs.AddNode(Node1D(referenceCoordinates=[0]))
mbs.AddObject(ObjectMass1D(nodeNumber=node, mass=1))
mCoord = mbs.AddMarker(MarkerNodeCoordinate(nodeNumber=node, coordinate=0))
def UFload(mbs, t, load):
return load*t
mbs.AddLoad(LoadCoordinate(markerNumber=mCoord, load=1, loadUserFunction=UFload))
mbs.Assemble()
mbs.SolveDynamic()
#q = t^3/6 at t=1
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Coordinates) #0.1667
Examples (Ex) and TestModels (TM) that show this item, with weblink to github: tutorialSpringDamper.py (Ex), coordinateSpringDamper.py (Ex), plotSensorExamples.py (Ex), slidercrankWithMassSpring.py (Ex), CoordinateSpringDamperTest.py (TM)