*createandadjustmass
Adjusts mass for a selection of source components by creating solvermasses on the target components.
Syntax
*createandadjustmass entitysource=<value> marksource=<value> targetmass=<value> targetcogx=<value> targetcogy=<value> targetcogz=<value> ... ?<optionN>=<valueN>?
Type
HyperMesh Tcl Modify Command
Description
Adjusts mass for a selection of source components by creating solvermasses on the target components.
Inputs
- addnumericalmass=<value>
- 0 - Do not add numerical mass (default)
- entitysource=<value>
- The source entity type. Must be set to comps. This is mandatory.
- entitytarget=<value>
- The target entity type. Valid values are comps and nodes. If not specified, the source entities are updated.
- marksource=<value>
- The ID of the mark of source entities. Valid values are 1 and 2. This is mandatory.
- marktarget=<value>
- The ID of the mark of target entities. Valid values are 1 and 2.
- targetcogx=<value>
- The target x-COG. This is mandatory.
- targetcogy=<value>
- The target y-COG. This is mandatory.
- targetcogz=<value>
- The target z-COG. This is mandatory.
- targetmass=<value>
- The target mass value. This is mandatory.
- tolerance=<value>
- The percentage tolerance on mass to be adjusted.
- usestructuralmass=<value>
- 0 - Use engineering mass (default)
- nodalmass=<value>
- 0 – Mass type as property mass
- iterations=<value>
- Number of iterations.
- optimizetargetflag=<value>
- 0 – Do not use optimize target (default)
Examples
To adjust mass on all the components with specific target mass and COG values:
*createmark comps 1 all
*createandadjustmass marksource=1 entitysource=comps targetmass=0.0245 targetcogx=-277.65 targetcogy=-0.49188 targetcogy=-0.49188 tolerance=10.0 usestructuralmass=1 addnumericalmass=1
*createmark comps 1 all
*createmark comps 2 all
*createandadjustmass entitysource=comps entitytarget=comps marksource=1 marktarget=2 targetmass=16000.000000 targetcogx=24.550000 targetcogy=-16.420000 targetcogz=25.000000 tolerance=10.000000 addnumericalmass=0 nodalmass=0 iterations=20 optimizetargetflag=0
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
2021
2024.1- Added new optional arguments nodalmass, iterations, and optimizetargetflag.