hm_getaverageelemsize

Returns the average element size for shell elements.

Syntax

hm_getaverageelemsize mark_id ?panel_sensitive? ?round?

Type

HyperMesh Tcl Query

Description

Returns the average element size for shell elements. This command calculates the average element size using the following formula:
  • quad elements: average size of one element = sqrt(1/2 * (longest diagonal) * (sum of the parallel altitudes))
  • tria elements: average size of one element = sqrt(area)

The total average size is then calculated by summing each average size and dividing by the number of elements considered.

Inputs

mark_id
The ID of the mark containing the shell elements.
panel_sensitive
Can be used when multiple panel levels have been pushed, either using the shortcut function keys, or the hm_pushpanel command. This option determines whether to use the current panel or the previous panel for the operation. This option is relevant only when the mark has been created from a panel entity selector under the above conditions. Valid options are:
0 – Use the previous panel.
1 – Use the current panel (default).
round_to
0 - Round up to 3 significant digits (default).
1 - Do not round.

Example

To get the average element size for elements 1-100:

*createmark elems 1 1-100
hm_getaverageelemsize 1

Errors

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