'Adds a force to a point (center of mass by default) on the body.
Parameters
vec: Vector
Defines the force vector. Can be any vector w.r.t any frame or
combinations of frames.
point: Point, optional
Defines the point on which the force is applied. Default is the
Body\'s center of mass.
Example
The first example applies a gravitational force in the x direction of
Body\'s frame to the body\'s center of mass. ::
>>> from sympy import Symbol
>>> from sympy.physics.mechanics import Body
>>> body = Body(\'body\')
>>> g = Symbol(\'g\')
>>> body.apply_force(body.mass * g * body.frame.x)
To apply force to any other point than center of mass, pass that point
as well. This example applies a gravitational force to a point a distance
l from the body\'s center of mass in the y direction. The force is again
applied in the x direction. ::
>>> from sympy import Symbol
>>> from sympy.physics.mechanics import Body
>>> body = Body(\'body\')
>>> g = Symbol(\'g\')
>>> l = Symbol(\'l\')
>>> point = body.masscenter.locatenew(\'force_point\', l *
...                                   body.frame.y)
>>> body.apply_force(body.mass * g * body.frame.x, point)'

def apply_force(self, vec, point=None):

    if (not isinstance(point, Point)):
        if (point is None):
            point = self.masscenter
        else:
            raise TypeError('A    Point    must    be    supplied    to    apply    force    to.')
    if (not isinstance(vec, Vector)):
        raise TypeError('A    Vector    must    be    supplied    to    apply    force.')
    self.loads.append((point, vec))
