symbrim.core.attachment.MasslessBody

class symbrim.core.attachment.MasslessBody(name: str, masscenter: Point, frame: ReferenceFrame)

Bases: RigidBody

Massless rigid body.

Explanation

The main purpose of this class is to allow the usage of just a frame and point when defining a joint. This class should only be used as long as sympy’s joints framework does not yet support passing only a frame and point to the joint constructor.

Attributes

central_inertia

The body's central inertia dyadic.

frame

The ReferenceFrame fixed to the body.

inertia

The body's inertia about a point; stored as (Dyadic, Point).

mass

The body's mass.

masscenter

The body's center of mass.

name

The name of the body.

potential_energy

The potential energy of the body.

x

The basis Vector for the body, in the x direction.

y

The basis Vector for the body, in the y direction.

z

The basis Vector for the body, in the z direction.

Methods

__init__

Initialize a massless body.

angular_momentum

Angular momentum of the body about a point in a frame.

kinetic_energy

Kinetic energy of the body.

linear_momentum

Linear momentum of the body.

parallel_axis

Returns the inertia dyadic of the body with respect to another point.

set_potential_energy

__init__(name: str, masscenter: Point, frame: ReferenceFrame) None

Initialize a massless body.

__repr__()

Return repr(self).

__str__()

Return str(self).

__weakref__

list of weak references to the object (if defined)

angular_momentum(point: Point, frame: ReferenceFrame) Vector

Angular momentum of the body about a point in a frame.

property central_inertia

The body’s central inertia dyadic.

property frame

The ReferenceFrame fixed to the body.

property inertia

The body’s inertia about a point; stored as (Dyadic, Point).

kinetic_energy(frame: ReferenceFrame) Expr

Kinetic energy of the body.

linear_momentum(frame: ReferenceFrame) Vector

Linear momentum of the body.

property mass

The body’s mass.

property masscenter

The body’s center of mass.

property name

The name of the body.

parallel_axis(point, frame=None)

Returns the inertia dyadic of the body with respect to another point.

Parameters:
  • point (sympy.physics.vector.Point) – The point to express the inertia dyadic about.

  • frame (sympy.physics.vector.ReferenceFrame) – The reference frame used to construct the dyadic.

Returns:

inertia – The inertia dyadic of the rigid body expressed about the provided point.

Return type:

sympy.physics.vector.Dyadic

property potential_energy

The potential energy of the body.

Examples

>>> from sympy.physics.mechanics import Particle, Point
>>> from sympy import symbols
>>> m, g, h = symbols('m g h')
>>> O = Point('O')
>>> P = Particle('P', O, m)
>>> P.potential_energy = m * g * h
>>> P.potential_energy
g*h*m
property x

The basis Vector for the body, in the x direction.

property y

The basis Vector for the body, in the y direction.

property z

The basis Vector for the body, in the z direction.