Mass management
- class mauspaf.core.mauspaf.MassElement(mass, cg=0, id=None, name=None)
Class to describe objects with mass properties.
Simplified class for longitudinal calculations without taking inertia into account.
- mass
Mass of the element.
- Type:
int or float or uncertain.UncertainValue
- cg
x-Position of the center of gravity of the element. Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- id
unique ID to identify the mass element. Relevant for working with tree structures. If not given, a random 8-digit string is used.
- Type:
string, optional
- name
Name of the mass element.
- Type:
string, optional
- class mauspaf.core.mauspaf.MassElement3D(mass, x=0, y=0, z=0, ixx=0, iyy=0, izz=0, ixy=0, iyz=0, izx=0, id=None, name=None)
Class to describe objects with mass properties.
Full properties in 3D: mass, cg (x, y, z) and inertias (ixx, iyy, izz, ixy, iyz, izx). For the asymmetric inertias, the convention with a negative factor is used:
\[I_{xy} = - \sum{m_{k} \cdot x_{k} \cdot y_{k}}\]The moments and products of inertia are given around a coordinate system parallel to the global coordinate system and located on the center of gravity of the object.
- mass
Mass of the element.
- Type:
int or float or uncertain.UncertainValue
- x
x-Position of the center of gravity of the element. Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- y
y-Position of the center of gravity of the element. Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- z
z-Position of the center of gravity of the element. Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- ixx
Inertia of the object around the x-axis (moment of inertia). Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- iyy
Inertia of the object around the y-axis (moment of inertia). Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- izz
Inertia of the object around the z-axis (moment of inertia). Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- ixy
Inertia of the object around the y-axis when the object is rotated around the x-axis (product of inertia). Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- iyz
Inertia of the object around the z-axis when the object is rotated around the y-axis (product of inertia). Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- izx
Inertia of the object around the x-axis when the object is rotated around the z-axis (product of inertia). Default value is 0.
- Type:
int or float or uncertain.UncertainValue, optional
- id
unique ID to identify the mass element. Relevant for working with tree structures. If not given, a random 8-digit string is used.
- Type:
string, optional
- name
Name of the mass element.
- Type:
string, optional
- cg_vector()
Returns the cg as an array.
- Returns:
[1 x 3] Vector
- Return type:
numpy.ndarray
- describe()
Prints the mass properties of the element.
- inertia_matrix()
Returns the inertial data as a matrix.
- Returns:
[3 x 3] Inertia matrix.
- Return type:
numpy.ndarray
- rotate(axis, angle, point=[0, 0, 0])
Rotates the object around an axis by a given angle.
This function updates the center of gravity, moments and products of inertia. If you want a new instance with the rotated properties, use a copy (deepcopy) of the object.
- Parameters:
axis (list or numpy.ndarray) – Vector [1 x 3] describing the rotation axis in the global coordinate system.
angle (float) – Rotation angle.
point (list or numpy.ndarray or None) – Vector [1 x 3] describing the point the object is rotated around. The default value is the center of gravity of the part.
- class mauspaf.core.mauspaf.MassObject3D(estimated=None, calculated=None, measured=None, active='estimated', id=None, name=None)
Class to describe objects with different types of mass properties.
- estimated
Estimated properties of the object.
- Type:
- calculated
Calculated properties of the object adding the values of all children mass objects.
- Type:
- measured
Measured properties of the object.
- Type:
- id
unique ID to identify the mass object. Relevant for working with tree structures. If not given, a random 8-digit string is used.
- Type:
string, optional
- name
Name of the mass object.
- Type:
string, optional
- active_properties()
Return the currently active properties.
- class mauspaf.core.mauspaf.MassObjectTree(elements_list, parent_dict)
Hierarchy between several mass objects (MassObject3D).
- elements
dictionary with MassElements. Their IDs are used as a key.
- Type:
dict
- parent_dict
dictionary ponting to the ID of the parent of each element. The keys used are the IDs of the elements. The root element is not a key in the dictionary.
- Type:
dict
- update()
Recalculates the mass properties of non-leaf elements.
- class mauspaf.core.mauspaf.MassTree(elements, parent_dict)
Hierarchy between several simple mass elements (MassElements).
- elements
dictionary with MassElements. Their IDs are used as a key.
- Type:
dict
- parent_dict
dictionary ponting to the ID of the parent of each element. The keys used are the IDs of the elements. The root element is not a key in the dictionary.
- Type:
dict