hm_getmass

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

Syntax

hm_getmass entity_type mark_id ?mass_type? reservedflag? lumpedmassmassflag?

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
reservedflag
Reserved for future use. Must be set to 0.
lumpedmassflag
If set to 1, lumped mass on non-rigid nodes is added in the solver mass value for each component. Valid only for the LS-DYNA and Radioss solver interface.

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.

2022.3 - Removed the values 7 and 8 from mass_type option.

2023.1 - Added new optional argument lumpedmassflag.