class_docstr: Force-producing actuator.
  
  Explanation
  ===========
  
  A ``ForceActuator`` is an actuator that produces a (expansile) force along
  its length.
  
  A force actuator uses a pathway instance to determine the direction and
  number of forces that it applies to a system. Consider the simplest case
  where a ``LinearPathway`` instance is used. This pathway is made up of two
  points that can move relative to each other, and results in a pair of equal
  and opposite forces acting on the endpoints. If the positive time-varying
  Euclidean distance between the two points is defined, then the "extension
  velocity" is the time derivative of this distance. The extension velocity
  is positive when the two points are moving away from each other and
  negative when moving closer to each other. The direction for the force
  acting on either point is determined by constructing a unit vector directed
  from the other point to this point. This establishes a sign convention such
  that a positive force magnitude tends to push the points apart, this is the
  meaning of "expansile" in this context. The following diagram shows the
  positive force sense and the distance between the points::
  
     P           Q
     o<--- F --->o
     |           |
     |<--l(t)--->|
  
  Examples
  ========
  
  To construct an actuator, an expression (or symbol) must be supplied to
  represent the force it can produce, alongside a pathway specifying its line
  of action. Let's also create a global reference frame and spatially fix one
  of the points in it while setting the other to be positioned such that it
  can freely move in the frame's x direction specified by the coordinate
  ``q``.
  
  >>> from sympy import symbols
  >>> from sympy.physics.mechanics import (ForceActuator, LinearPathway,
  ...     Point, ReferenceFrame)
  >>> from sympy.physics.vector import dynamicsymbols
  >>> N = ReferenceFrame('N')
  >>> q = dynamicsymbols('q')
  >>> force = symbols('F')
  >>> pA, pB = Point('pA'), Point('pB')
  >>> pA.set_vel(N, 0)
  >>> pB.set_pos(pA, q*N.x)
  >>> pB.pos_from(pA)
  q(t)*N.x
  >>> linear_pathway = LinearPathway(pA, pB)
  >>> actuator = ForceActuator(force, linear_pathway)
  >>> actuator
  ForceActuator(F, LinearPathway(pA, pB))
  
  Parameters
  ==========
  
  force : Expr
      The scalar expression defining the (expansile) force that the actuator
      produces.
  pathway : PathwayBase
      The pathway that the actuator follows. This must be an instance of a
      concrete subclass of ``PathwayBase``, e.g. ``LinearPathway``.
docstr: Loads required by the equations of motion method classes.
  
  Explanation
  ===========
  
  ``KanesMethod`` requires a list of ``Point``-``Vector`` tuples to be
  passed to the ``loads`` parameters of its ``kanes_equations`` method
  when constructing the equations of motion. This method acts as a
  utility to produce the correctly-structred pairs of points and vectors
  required so that these can be easily concatenated with other items in
  the list of loads and passed to ``KanesMethod.kanes_equations``. These
  loads are also in the correct form to also be passed to the other
  equations of motion method classes, e.g. ``LagrangesMethod``.
  
  Examples
  ========
  
  The below example shows how to generate the loads produced by a force
  actuator that follows a linear pathway. In this example we'll assume
  that the force actuator is being used to model a simple linear spring.
  First, create a linear pathway between two points separated by the
  coordinate ``q`` in the ``x`` direction of the global frame ``N``.
  
  >>> from sympy.physics.mechanics import (LinearPathway, Point,
  ...     ReferenceFrame)
  >>> from sympy.physics.vector import dynamicsymbols
  >>> q = dynamicsymbols('q')
  >>> N = ReferenceFrame('N')
  >>> pA, pB = Point('pA'), Point('pB')
  >>> pB.set_pos(pA, q*N.x)
  >>> pathway = LinearPathway(pA, pB)
  
  Now create a symbol ``k`` to describe the spring's stiffness and
  instantiate a force actuator that produces a (contractile) force
  proportional to both the spring's stiffness and the pathway's length.
  Note that actuator classes use the sign convention that expansile
  forces are positive, so for a spring to produce a contractile force the
  spring force needs to be calculated as the negative for the stiffness
  multiplied by the length.
  
  >>> from sympy import symbols
  >>> from sympy.physics.mechanics import ForceActuator
  >>> stiffness = symbols('k')
  >>> spring_force = -stiffness*pathway.length
  >>> spring = ForceActuator(spring_force, pathway)
  
  The forces produced by the spring can be generated in the list of loads
  form that ``KanesMethod`` (and other equations of motion methods)
  requires by calling the ``to_loads`` method.
  
  >>> spring.to_loads()
  [(pA, k*q(t)*N.x), (pB, - k*q(t)*N.x)]
  
  A simple linear damper can be modeled in a similar way. Create another
  symbol ``c`` to describe the dampers damping coefficient. This time
  instantiate a force actuator that produces a force proportional to both
  the damper's damping coefficient and the pathway's extension velocity.
  Note that the damping force is negative as it acts in the opposite
  direction to which the damper is changing in length.
  
  >>> damping_coefficient = symbols('c')
  >>> damping_force = -damping_coefficient*pathway.extension_velocity
  >>> damper = ForceActuator(damping_force, pathway)
  
  Again, the forces produces by the damper can be generated by calling
  the ``to_loads`` method.
  
  >>> damper.to_loads()
  [(pA, c*Derivative(q(t), t)*N.x), (pB, - c*Derivative(q(t), t)*N.x)]
docstr_tok: ["Loads","required","by","the","equations","of","motion","method","classes",".","Explanation","===========","``","KanesMethod","``","requires","a","list","of","``","Point","``","-","``","Vector","``","tuples","to","be","passed","to","the","``","loads","``","parameters","of","its","``","kanes_equations","``","method","when","constructing","the","equations","of","motion",".","This","method","acts","as","a","utility","to","produce","the","correctly-structred","pairs","of","points","and","vectors","required","so","that","these","can","be","easily","concatenated","with","other","items","in","the","list","of","loads","and","passed","to","``","KanesMethod.kanes_equations","``",".","These","loads","are","also","in","the","correct","form","to","also","be","passed","to","the","other","equations","of","motion","method","classes",",","e.g",".","``","LagrangesMethod","``",".","Examples","========","The","below","example","shows","how","to","generate","the","loads","produced","by","a","force","actuator","that","follows","a","linear","pathway",".","In","this","example","we","'ll","assume","that","the","force","actuator","is","being","used","to","model","a","simple","linear","spring",".","First",",","create","a","linear","pathway","between","two","points","separated","by","the","coordinate","``","q","``","in","the","``","x","``","direction","of","the","global","frame","``","N","``",".",">",">",">","from","sympy.physics.mechanics","import","(","LinearPathway",",","Point",",","...","ReferenceFrame",")",">",">",">","from","sympy.physics.vector","import","dynamicsymbols",">",">",">","q","=","dynamicsymbols","(","'","q","'",")",">",">",">","N","=","ReferenceFrame","(","'N","'",")",">",">",">","pA",",","pB","=","Point","(","'pA","'",")",",","Point","(","'pB","'",")",">",">",">","pB.set_pos","(","pA",",","q","*","N.x",")",">",">",">","pathway","=","LinearPathway","(","pA",",","pB",")","Now","create","a","symbol","``","k","``","to","describe","the","spring","'s","stiffness","and","instantiate","a","force","actuator","that","produces","a","(","contractile",")","force","proportional","to","both","the","spring","'s","stiffness","and","the","pathway","'s","length",".","Note","that","actuator","classes","use","the","sign","convention","that","expansile","forces","are","positive",",","so","for","a","spring","to","produce","a","contractile","force","the","spring","force","needs","to","be","calculated","as","the","negative","for","the","stiffness","multiplied","by","the","length",".",">",">",">","from","sympy","import","symbols",">",">",">","from","sympy.physics.mechanics","import","ForceActuator",">",">",">","stiffness","=","symbols","(","'","k","'",")",">",">",">","spring_force","=","-stiffness","*","pathway.length",">",">",">","spring","=","ForceActuator","(","spring_force",",","pathway",")","The","forces","produced","by","the","spring","can","be","generated","in","the","list","of","loads","form","that","``","KanesMethod","``","(","and","other","equations","of","motion","methods",")","requires","by","calling","the","``","to_loads","``","method",".",">",">",">","spring.to_loads","(",")","[","(","pA",",","k","*","q","(","t",")","*","N.x",")",",","(","pB",",","-","k","*","q","(","t",")","*","N.x",")","]","A","simple","linear","damper","can","be","modeled","in","a","similar","way",".","Create","another","symbol","``","c","``","to","describe","the","dampers","damping","coefficient",".","This","time","instantiate","a","force","actuator","that","produces","a","force","proportional","to","both","the","damper","'s","damping","coefficient","and","the","pathway","'s","extension","velocity",".","Note","that","the","damping","force","is","negative","as","it","acts","in","the","opposite","direction","to","which","the","damper","is","changing","in","length",".",">",">",">","damping_coefficient","=","symbols","(","'","c","'",")",">",">",">","damping_force","=","-damping_coefficient","*","pathway.extension_velocity",">",">",">","damper","=","ForceActuator","(","damping_force",",","pathway",")","Again",",","the","forces","produces","by","the","damper","can","be","generated","by","calling","the","``","to_loads","``","method",".",">",">",">","damper.to_loads","(",")","[","(","pA",",","c","*","Derivative","(","q","(","t",")",",","t",")","*","N.x",")",",","(","pB",",","-","c","*","Derivative","(","q","(","t",")",",","t",")","*","N.x",")","]"]
code: def to_loads(self):
      """Loads required by the equations of motion method classes.
  
      Explanation
      ===========
  
      ``KanesMethod`` requires a list of ``Point``-``Vector`` tuples to be
      passed to the ``loads`` parameters of its ``kanes_equations`` method
      when constructing the equations of motion. This method acts as a
      utility to produce the correctly-structred pairs of points and vectors
      required so that these can be easily concatenated with other items in
      the list of loads and passed to ``KanesMethod.kanes_equations``. These
      loads are also in the correct form to also be passed to the other
      equations of motion method classes, e.g. ``LagrangesMethod``.
  
      Examples
      ========
  
      The below example shows how to generate the loads produced by a force
      actuator that follows a linear pathway. In this example we'll assume
      that the force actuator is being used to model a simple linear spring.
      First, create a linear pathway between two points separated by the
      coordinate ``q`` in the ``x`` direction of the global frame ``N``.
  
      >>> from sympy.physics.mechanics import (LinearPathway, Point,
      ...     ReferenceFrame)
      >>> from sympy.physics.vector import dynamicsymbols
      >>> q = dynamicsymbols('q')
      >>> N = ReferenceFrame('N')
      >>> pA, pB = Point('pA'), Point('pB')
      >>> pB.set_pos(pA, q*N.x)
      >>> pathway = LinearPathway(pA, pB)
  
      Now create a symbol ``k`` to describe the spring's stiffness and
      instantiate a force actuator that produces a (contractile) force
      proportional to both the spring's stiffness and the pathway's length.
      Note that actuator classes use the sign convention that expansile
      forces are positive, so for a spring to produce a contractile force the
      spring force needs to be calculated as the negative for the stiffness
      multiplied by the length.
  
      >>> from sympy import symbols
      >>> from sympy.physics.mechanics import ForceActuator
      >>> stiffness = symbols('k')
      >>> spring_force = -stiffness*pathway.length
      >>> spring = ForceActuator(spring_force, pathway)
  
      The forces produced by the spring can be generated in the list of loads
      form that ``KanesMethod`` (and other equations of motion methods)
      requires by calling the ``to_loads`` method.
  
      >>> spring.to_loads()
      [(pA, k*q(t)*N.x), (pB, - k*q(t)*N.x)]
  
      A simple linear damper can be modeled in a similar way. Create another
      symbol ``c`` to describe the dampers damping coefficient. This time
      instantiate a force actuator that produces a force proportional to both
      the damper's damping coefficient and the pathway's extension velocity.
      Note that the damping force is negative as it acts in the opposite
      direction to which the damper is changing in length.
  
      >>> damping_coefficient = symbols('c')
      >>> damping_force = -damping_coefficient*pathway.extension_velocity
      >>> damper = ForceActuator(damping_force, pathway)
  
      Again, the forces produces by the damper can be generated by calling
      the ``to_loads`` method.
  
      >>> damper.to_loads()
      [(pA, c*Derivative(q(t), t)*N.x), (pB, - c*Derivative(q(t), t)*N.x)]
  
      """
      return self.pathway.to_loads(self.force)
  
imports: from abc import ABC, abstractmethod
  from sympy import S, sympify
  from sympy.physics.mechanics.joint import PinJoint
  from sympy.physics.mechanics.loads import Torque
  from sympy.physics.mechanics.pathway import PathwayBase
  from sympy.physics.mechanics.rigidbody import RigidBody
  from sympy.physics.vector import ReferenceFrame, Vector
label_desc: Use image node_id 6 for calling the ForceActuator obj's underlying member method code with example usage: obj.to_loads() and returns: self