```{raw} latex \clearpage ``` # General info for all loads ## How a load acts A load acts through a marker: the marker locates it - a point of a body, a node, a coordinate - and provides the Jacobian that takes the load to the coordinates of the body or node. For a force $\LU{0}{\fv}$ at a position marker this is the virtual work $\delta W = \delta \LU{0}{\pv}\tp \LU{0}{\fv}$, which gives the generalized forces $$ \Qm = \LU{0}{\Jm_{pos}}\tp\, \LU{0}{\fv}, \quad \LU{0}{\Jm_{pos}} = \frac{\partial \LU{0}{\pv}}{\partial \qv} ; $$ a torque uses the rotation Jacobian $\LU{0}{\Jm_{rot}} = \partial \LU{0}{\tomega} / \partial \dot\qv$ the same way. The Jacobians are global, so a load given in a local frame is transformed into the global frame first. Each load page gives its formula. ## Global and body-fixed loads A force or a torque is given in the global frame, or with `bodyFixed = True` in the frame of its marker, where it turns with the body or node - a follower load. A body-fixed load needs a marker with an orientation: `MarkerBodyRigid` on a body, `MarkerNodeRigid` on a node; a point node has no orientation and takes only global loads. ## Loads that change in time A load is constant, unless - a user function gives it: `loadVectorUserFunction(mbs, t, loadVector)` or `loadUserFunction(mbs, t, load)`, called at every evaluation with the current time, replaces the value of the load; - a `preStepUserFunction` of `mbs` changes it before every step, with `mbs.SetLoadParameter`. ## Loads in static computations The static solver increases the loads over its load steps (`staticSolver.numberOfLoadSteps`): every load is multiplied by the **load factor** of the current step, which reaches one in the last step. A load with a user function is **not** multiplied: its value is used as the function returns it, and the function gets the quasi-time of the load step (`staticSolver.loadStepDuration`), which it has to use itself to increase the load. ## Creating loads `mbs.CreateForce` and `mbs.CreateTorque` add the marker and the load in one call - for a force a `MarkerBodyPosition`, or a `MarkerBodyRigid` if it is body-fixed; for a torque a `MarkerBodyRigid` - unless a marker is given instead of a body; and the `gravity` argument of `CreateMassPoint` and `CreateRigidBody` adds a `MarkerBodyMass` with a `LoadMassProportional`. (sec-drawing-loads)= ## Drawing A load on a marker with a position is drawn if `loads.show` and its own `show` are True: an arrow at the marker, of length `loads.defaultSize` - a fraction of `openGL.advanced.initialMaxSceneSize` if -1 -, or, with `loads.fixedLoadSize` False, of the length of the load times `loads.loadSizeFactor`; lines with `loads.drawSimplified`, otherwise a 3D arrow of radius `loads.defaultRadius` (`general.axesTiling`), in `loads.defaultColor`. With `loads.drawWithUserFunction`, the value of the user function is drawn - of a symbolic one always, of a Python one only with `general.useMultiThreadedRendering` False, as the render thread cannot call Python. `loads.showNumbers` writes its number. A load on a coordinate draws nothing. The settings: [`loads.show`](#sec-vsettingsloads), [`loads.defaultSize`](#sec-vsettingsloads), [`loads.defaultRadius`](#sec-vsettingsloads), [`loads.defaultColor`](#sec-vsettingsloads), [`loads.drawSimplified`](#sec-vsettingsloads), [`loads.fixedLoadSize`](#sec-vsettingsloads), [`loads.loadSizeFactor`](#sec-vsettingsloads), [`loads.drawWithUserFunction`](#sec-vsettingsloads), [`loads.showNumbers`](#sec-vsettingsloads), [`general.axesTiling`](#sec-vsettingsgeneral), [`general.useMultiThreadedRendering`](#sec-vsettingsgeneral), [`openGL.advanced.initialMaxSceneSize`](#sec-vsettingsopengladvanced).