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: ndarray, v0: ndarray, a0: ndarray, theta0: ndarray, omega0: ndarray, alpha0: ndarray)

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 (np.ndarray) – Body position vector (in m).

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

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

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

  • theta (np.ndarray) – Body rotation vector (in rad).

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

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

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