Model.hm_getmoi#
- Model.hm_getmoi(collection, location_flag=0, node_entity=Entity(), axes_flag=0, system_id=0, reserved_1=0, reserved_2=0, reserved_3=0, reserved_4=0, lumpedmassflag=0)#
Returns the tensorial moment-of-inertia Ixx, Iyy, Izz, Ixy, Ixz, Iyz values for the selected entities.
- Parameters:
collection (Collection) – The collection containing the entities to query. Currently supported for components, elemements, materials, properties, parts, assemblies, plies, and laminates.
location_flag (int) –
Specifies the location about which the MOI is calculated. Valid values are:
0 - Global (0,0,0). Default.
1 - COG location.
2 - Node specified by
node_entityargument.3 - System specified by
system_idargument.node_entity (Entity) – The object describing the node entity which specifies the node location about which the MOI is calculated if
location_flag=2. Ignored otherwise..axes_flag (int) –
Specifies the axes to report the MOI values relative to. Valid values are:
0 - Global axes. Default.
1 - Principal axes
2 - System specified by
system_idargument.system_id (int) – Specifies the system ID to report the MOI values relative to if
axes_flag=2. Ignored otherwise.reserved_1 (int) – Reserved for future use. Must be set to 0.
reserved_2 (int) – Reserved for future use. Must be set to 0.
reserved_3 (int) – Reserved for future use. Must be set to 0.
reserved_4 (int) – Reserved for future use. Must be set to 0.
lumpedmassflag (int) –
Specifies whether to include lumped mass in the MOI calculations. Valid values are:
0 - Exclude lumped mass.
1 - Include lumped mass.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:moiValues (numpy.ndarray) - The tensorial moments of inertia (Ixx, Iyy, Izz, Ixy, Ixz, Iyz).
Example#
Get the MOI for components with IDs 1 - 5#import hm import hm.entities as ent model = hm.Model() component_collection = hm.Collection(model, ent.Component, list(range(1, 6))) _, result = model.hm_getmoi(collection=component_collection) print("MOI values:", result.moiValues)