Model.convertunit#

Model.convertunit(source_unit_system, target_unit_system)#

Converts entity values from the source unit system to the target unit system. The whole model is 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:
  • source_unit_system (hwString) – The source unit system.

  • target_unit_system (hwString) – The target unit system.

Example#

Convert the full model 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(source_unit_system="N_m_s_kg", target_unit_system="kN_mm_ms_kg")