Body

Module for handling a spherical moving body.

module:

body

author:

Le Bars, Yoann

This file is part of the pure Python benchmark.

This Python benchmark is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This Python benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The file LICENSE is a copy of the GNU General Public License. You can also see it on https://www.gnu.org/licenses/.

class body.Body(m: float, r: float, x0: array, v0: array, a0: array, theta0: array, omega0: array, alpha0: array)

Class for handling moving bodies.

Parameters:
  • m (float) – Body mass (in kg).

  • r (float) – Body radius (in m).

  • I (float) – Inverse of body inertia momentum (in kg m²)

  • x (array) – Body position vector (in m).

  • v (array) – Body velocity vector (in km / s).

  • a (array) – Body acceleration vector (in m / s²).

  • pre_a (array) – Body previous acceleration vector (in m / s²).

  • theta (array) – Body rotation vector (in rad).

  • omega (array) – Body angular velocity vector (in rad / s).

  • alpha (array) – Body angular acceleration vector (in rad / s²).

  • pre_alpha (array) – Body previous angular acceleration vector (in rad / s²).