*convertunit
Converts entity values from one unit system to another unit system.
Syntax
*convertunit source_unit_system=<value> target_unit_system=<value> ?entity_type=<entity_type>? ?mark=<mark_id>?
Type
HyperMesh Tcl Modify Command
Description
Converts entity values from the source unit system to the target unit system. If entity_type and mark are specified, only the entities specified on the mark are converted. If only entity_type is specified, all entities of the specified type are converted. If neither are specified, the whole model is converted. The command is currently supported in the Radioss and LS-DYNA solver interface.
The following unit systems are supported for conversion:
- N_m_s_kg
- kN_mm_ms_kg
- N_mm_ms_g
- N_mm_s_T
Inputs
- entity_type
- The type of entity to convert.
- mark=<mark_id>
- The ID of the mark containing the entities to convert.
- source_unit_system=<value>
- The source unit system.
- target_unit_system=<value>
- The target unit system.
Examples
To convert materials 1, 2, 3 on mark 1 from source unit system N_m_s_kg to target unit
system kN_mm_ms_kg:
*createmark mats 1 1 2 3
*convertunit mats mark=1 source_unit_system=N_m_s_kg target_unit_system=kN_mm_ms_kg
To convert all materials from source unit system N_m_s_kg to target unit system
kN_mm_ms_kg:
*convertunit mats source_unit_system=N_m_s_kg target_unit_system=kN_mm_ms_kg
To convert the full model from source unit system N_m_s_kg to target unit system
kN_mm_ms_kg:
*convertunit source_unit_system=N_m_s_kg target_unit_system=kN_mm_ms_kg
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.2