meshmagick.inertia module¶
This module defines a RigidBodyInertia class to handle 3D rotational inertia of rigid bodies
- class meshmagick.inertia.RigidBodyInertia(mass, cog, xx, yy, zz, yz, xz, xy, point=None)[source]¶
Bases:
object
- Parameters
mass (float) – The mass of the body in kg
cog (array_like) – The 3D coordinates of the center of gravity
xx (float) – The principal inertia moment around x axis
yy (float) – The principal inertia moment around y axis
zz (float) – The principal inertia moment around z axis
yz (float) – Inertia product
xz (float) – Inertia product
xy (float) – Inertia product
point (array_like, optional) – The reduction point. If None, it is set to be cog
- property at_cog¶
Returns a new inertia object that is expressed at cog.
It makes a copy of itself.
- Returns
- Return type
ndarray
- property gravity_center¶
The position of the center of gravity
- property inertia_matrix¶
The 3D rotational inertia matrix
- property mass¶
The mass of the body
- property reduction_point¶
The reduction point of the inertia matrix
- Returns
- Return type
ndarray
- set_cog(cog)[source]¶
Set a new center of gravity.
- Parameters
cog (array_like) –
3D coordinates of the center of gravity (The) –
- class meshmagick.inertia.RotationalInertia3D(xx, xy, yy, xz, yz, zz, point)[source]¶
Bases:
numpy.ndarray
- property array¶
- meshmagick.inertia.circular_cone_shell(R, height, density=7850.0, thickness=0.02)[source]¶
Get the inertia of a circular cone shell
- Returns
- Return type
Note
The center of gravity is located at an altitude of z=H/3 over the circular basis center
- meshmagick.inertia.ellipsoid(a, b, c, density=1.0)[source]¶
Get the inertia of an ellipsoid
- Returns
- Return type
Note
a is along z axis (ellipse semi axis)
b is along x axis (ellipse semi axis)
c is along y axis (ellipse semi axis)
- meshmagick.inertia.elliptical_cylinder(a, b, length, density=1.0)[source]¶
Get the inertia of an elliptical cylinder
- Returns
- Return type
Note
The center of gravity is located at an altitude of z=H/2 over the elliptical basis center
a is along x axis (ellipse semi axis)
b is along y axis (ellipse semi axis)
length is along z axis
- meshmagick.inertia.frustrum_of_circular_cone_shell(r, R, height, density=7850.0, thickness=0.02)[source]¶
Get the inertia of a frustrum of circular cone shell
- Returns
- Return type
Note
The center of gravity is located at an altitude of z=(H/3)*(2*r+R)/(r+R)
- meshmagick.inertia.hemisphere(radius, density=1.0)[source]¶
Get the inertia of a hemisphere
- Returns
- Return type
Note
The center of gravity is situated at the altitude of z = 3R/8 over the circular basis center
- meshmagick.inertia.hemispherical_shell(R, density=7850.0, thickness=0.02)[source]¶
Get the inertia of a hemispherical shell
- Returns
- Return type
Note
The center of gravity is located at an altitude of z=R/2 over the circular basis center
- meshmagick.inertia.hollow_right_circular_cylinder(int_radius, ext_radius, length, density=1.0)[source]¶
Get the inertia of a hollow right circular cylinder
- Returns
- Return type
- meshmagick.inertia.hollow_sphere(int_radius, ext_radius, density=1.0)[source]¶
Get the inertia of a hollow sphere
- Returns
- Return type
- meshmagick.inertia.isoceles_wedge(base, height, length, density=1.0)[source]¶
Get the inertia of an isocele wedge
- Returns
- Return type
- meshmagick.inertia.lateral_cylindrical_shell(R, H, density=7850.0, thickness=0.02)[source]¶
Get the inertia of a lateral cylindrical shell
- Returns
- Return type
- meshmagick.inertia.rectangular_prism(a, b, h, density=1.0)[source]¶
Get the inertia of a rectangular prism
- Returns
- Return type
Note
a is along x
b is along y
h is along z
- meshmagick.inertia.right_angle_wedge(base, height, length, density=1.0)[source]¶
Get the inertia of a right angle wedge
- Returns
- Return type
- meshmagick.inertia.right_circular_cone(radius, length, density=1.0)[source]¶
Get the inertia of a right circular cone
- Returns
- Return type
Note
The center of gravity is at an altitude of z = H/4 over the circular basis center
- meshmagick.inertia.right_circular_cylinder(radius, length, density=1.0)[source]¶
Get the inertia of a right circular cylinder
- Returns
- Return type
- meshmagick.inertia.right_rectangular_pyramid(a, b, height, density=1.0)[source]¶
Get the inertia of a right rectangular pyramid
- Returns
- Return type
Note
The center of gravity is located at the altitude z=H/4 over the rectangular basis center
- meshmagick.inertia.sphere(radius, density=1.0)[source]¶
Get the inertia of a sphere
- Returns
- Return type
- meshmagick.inertia.spherical_shell(R, density=7850.0, thickness=0.02)[source]¶
Get the inertia of a spherical shell
- Returns
- Return type
- meshmagick.inertia.torus(chord_radius, tube_radius, density=1.0)[source]¶
Get the inertia of a torus
- Returns
- Return type