```{raw} latex \clearpage ``` (sec-item-markerbodymass)= # MarkerBodyMass A marker attached to the body mass; use this marker to apply a body-load (e.g. gravitational force). ## Interface - Provides: `BodyMass` - Bodies it can be placed on: [](#sec-item-objectground), [](#sec-item-objectmasspoint), [](#sec-item-objectmasspoint2d), [](#sec-item-objectmass1d), [](#sec-item-objectrigidbody), [](#sec-item-objectrigidbody2d), [](#sec-item-objectffrf), [](#sec-item-objectffrfreducedorder), [](#sec-item-objectancfcable), [](#sec-item-objectancfcable2d), [](#sec-item-objectaleancfcable2d), [](#sec-item-objectancfbeam), [](#sec-item-objectbeamgeometricallyexact2d), [](#sec-item-objectbeamgeometricallyexact), [](#sec-item-objectancfthinplate) - Connectors, constraints and loads that can use it: [](#sec-item-loadmassproportional) ## Parameters The parameters of the item; in a dictionary, its type is 'BodyMass': | name | type | size | default | description | |---|---|---|---|---| | **name** | String | | '' | marker's unique name | | **bodyNumber** | ObjectIndex | | invalid (-1) | body number to which marker is attached to | | **visualization** | VMarkerBodyMass | | | parameters for visualization of item | ## Visualization parameters The parameters of `VMarkerBodyMass`, 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 | ## Drawing Drawn as [all markers](#sec-drawing-markers). (description-markerbodymass)= ## Detailed description ### Marker quantities None that a connector reads: the marker exists to take a load proportional to the mass of the body, `LoadMassProportional`, and provides only its Jacobian. ### Jacobians The mass-weighted integral of the position Jacobian over the body, $$ \Jm_{m} = \int_V \rho\, \frac{\partial \LU{0}{\pv}}{\partial \qv}\, dV , $$ which the body computes (its access function `DisplacementMassIntegral_q`); a load vector $\LU{0}{\bv}$ per unit mass gives $\Qm = \Jm_{m}\tp \LU{0}{\bv}$. For a rigid body it is the mass times the position Jacobian of the center of mass. (miniexample-markerbodymass)= ## Mini example ```python #gravity on a planar rigid body: the load acts on the mass of the whole body node = mbs.AddNode(NodeRigidBody2D(referenceCoordinates=[0.5,0.2,0])) body = mbs.AddObject(ObjectRigidBody2D(nodeNumber=node, mass=2, inertia=0.1)) mMass = mbs.AddMarker(MarkerBodyMass(bodyNumber=body)) mbs.AddLoad(LoadMassProportional(markerNumber=mMass, loadVector=[0,-9.81,0])) mbs.Assemble() mbs.SolveDynamic() #free fall: y = -g/2*t^2 at t=1, independent of the mass exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Displacement)[1] #-4.905 ``` Examples (Ex) and TestModels (TM) that show this item, with weblink to github: [`basicTutorial2024.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/basicTutorial2024.py) (Ex), [`tutorialSpringDamperCreate.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/notebooks/tutorialSpringDamperCreate.py) (Ex), [`tutorialRigidBody.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/notebooks/tutorialRigidBody.py) (Ex), [`tutorialRigidBodyCreate.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/notebooks/tutorialRigidBodyCreate.py) (Ex)