(field)
return divergence(field, frame).simplify() == S(0)
Checks if a field is solenoidal.

    Paramaters
    ==========

    field : Vector
        The field to check for solenoidal property

    Examples
    ========

    >>> from sympy.physics.vector import ReferenceFrame
    >>> from sympy.physics.vector import is_solenoidal
    >>> R = ReferenceFrame('R')
    >>> is_solenoidal(R[1]*R[2]*R.x + R[0]*R[2]*R.y + R[0]*R[1]*R.z)
    True
    >>> is_solenoidal(R[1] * R.y)
    False
Checks if a field is solenoidal.
Checks if a field is solenoidal .
def is_solenoidal(field):
    """
    Checks if a field is solenoidal.

    Paramaters
    ==========

    field : Vector
        The field to check for solenoidal property

    Examples
    ========

    >>> from sympy.physics.vector import ReferenceFrame
    >>> from sympy.physics.vector import is_solenoidal
    >>> R = ReferenceFrame('R')
    >>> is_solenoidal(R[1]*R[2]*R.x + R[0]*R[2]*R.y + R[0]*R[1]*R.z)
    True
    >>> is_solenoidal(R[1] * R.y)
    False

    """

    #Field is solenoidal irrespective of frame
    #Take the first frame in the result of the
    #separate method in Vector
    if field == Vector(0):
        return True
    frame = list(field.separate())[0]
    return divergence(field, frame).simplify() == S(0)
def is_solenoidal ( field ) : #Field is solenoidal irrespective of frame #Take the first frame in the result of the #separate method in Vector if field == Vector ( 0 ) : return True frame = list ( field . separate ( ) ) [ 0 ] return divergence ( field , frame ) . simplify ( ) == S ( 0 )