Model.convertunit_bytype#
- Model.convertunit_bytype(entity_type, source_unit_system, target_unit_system)#
Converts entity values from the source unit system to the target unit system. All entities of the specified type are converted. The function 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
- Parameters:
Example#
Convert all materials from source unit system “N_m_s_kg” to target unit system “kN_mm_ms_kg”#import hm import hm.entities as ent model = hm.Model() model.convertunit_bytype( entity_type=ent.Material, source_unit_system="N_m_s_kg", target_unit_system="kN_mm_ms_kg", )