Bodies data

This page displays only attributes added at a certain inheritance level. For seeing all attributes of each data type see this variant

Classes

base_body()

class defining a body

base_shape()

shape of a body

base_state()

mechanical state of a body

box()

cuboid

liquid_film()

mechanical + liquid film state

polyhedron()

A generic polyhedron

sphere()

thermal()

mechanical + thermal state

Class Inheritance Diagram

Inheritance diagram of bodies.base_body, bodies.base_shape, bodies.base_state, bodies.box, bodies.liquid_film, bodies.polyhedron, bodies.sphere, bodies.thermal

Detailed content

class bodies.base_state[source]

Bases: object

mechanical state of a body

position: Vector3 = Vector3(0, 0, 0)

[mandatory] position [\(L\)]

velocity: Vector3 = Vector3(0, 0, 0)

[mandatory] translational velocity [\(L T^{-1}\)]

orientation: Quaternion = Quaternion(0, 0, 0, 1)

[mandatory] orientation [\(-\)]

angular_velocity: Vector3 = Vector3(0, 0, 0)

[mandatory] angular velocity [\(T^{-1}\)]

mass: float = None

[mandatory] body’s mass [\(M\)]

inertia: Matrix3 = Matrix3([0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0])

[mandatory] tensor of inertia [\(M L^{2}\)]

volume: float = None

[mandatory] volume [\(L^{3}\)]

class bodies.thermal[source]

Bases: base_state

mechanical + thermal state

temperature: float = None

[optional] temperature [\(\Theta\)]

class bodies.liquid_film[source]

Bases: base_state

mechanical + liquid film state

liquid_film_volume: float = None

[optional] liquid film volume [L^3]

class bodies.base_shape[source]

Bases: object

shape of a body

color: Vector3 = Vector3(1, 1, 1)

[optional] RGB color values [\(-\)]

class bodies.sphere[source]

Bases: base_shape

radius: float = None

[mandatory] radius

class bodies.box[source]

Bases: base_shape

cuboid

dimensions: Vector3 = Vector3(0, 0, 0)

[mandatory] length in each direction of space

class bodies.polyhedron[source]

Bases: base_shape

A generic polyhedron

vertices: list = []

[mandatory] list of positions of the vertices

class bodies.base_body[source]

Bases: object

class defining a body

material_id: int = -1

[mandatory] material id [\(-\)]

clump_id: int = -1

[mandatory] clump id [\(-\)]

body_id: int = None

[mandatory] body id [\(-\)]

body_state: type = <bodies.base_state object>

[mandatory] body state [\(-\)]

body_shape: type = <bodies.base_shape object>

[mandatory] body shape [\(-\)]