*control_sum_print

Outputs a control sum number to the specified text file.

Syntax

*control_sum_print ?<option1>=<value1> <option2>=<value2> ... <optionN>=<valueN>?

Type

HyperMesh Tcl Modify Command

Description

Outputs a control sum number to the specified text file. The control sum value is computed as a certain average using coordinates of the geometry and mesh present in the model.

The options can be specified in any order.

Inputs

file_name=<value>
The full path and file name to write the result to. This is a mandatory option.
comment=<value>
This specifies an optional comment to be written to the text file prior to the control number.
method=<value>
This optional parameter specifies which points are to be used to compute the sum. Valid values are:
from_surface_geom - The points are taken as all vertices of all surfaces, as well as one point per each surface inside the surface (default)
from_surface_vertices - The points are taken from all surface vertices present in the model
from_elements - The points are taken to be all elements’ centroids in the model
from_nodes - The points are taken to be all nodes in the model
output_format=<value>
This optional parameter specifies the output format for the control sum number. Valid values are:

general - Write the output real number in general format

scientific - Write the output real number in scientific format (default)

shift_to_center=<value>
This optional parameter specifies whether the coordinates of the points are taken in global coordinate system or shifted to the center of the bounding box containing all the points. Valid values are:
0 - Take the coordinates with respect to global coordinate system
1 - Take the origin of the coordinate system to be the center of the bouding box containing all points (default)

Examples

To write the control number to C:/test/test.txt, taking the sum of coordinates of all nodes present in the model with respect to the global coordinate system, and write the output in scientific notation:

*control_sum_print file_name="C:/test/text.txt" comment="My comment" method=from_nodes shift_to_center=0 output_format=scientific

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

2020