hm_getmass

Returns the mass, volume and area of the selected elements or components.

Syntax

hm_getmass entity_type mark_id ?mass_type?

Type

HyperMesh Tcl Query Command

Description

This command returns the mass, volume and area of the selected elements or components.

Inputs

entity_type
The type of entities to consider. Valid values are elems, comps, mats, props, parts, assems, plies, and laminates.
mark_id
The ID of the mark. Valid values are 1 and 2.
mass_type
The type of mass to output.
0 - All mass values
2 - structural mass
3 - non-structural mass
4 - rigid mass
5 - lumped mass
6 - transferred mass
7 - engineering mass
8 - distributed mass

Example

To get the mass for elements 1-100:

*createmark elems 1 1-100
set temp [hm_getmass elems 1]
set mass [lindex $temp 0]
set vol [lindex $temp 1]
set area [lindex $temp 2]

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

10.0

2019 - Added new optional mass_type argument.

2021.2 - Added new supported entity types mats, props, parts, assems, plies, and laminates.