decompose#

Variable.decompose()[source]#

Decompose a variable value to a floating with its unit.

Returns:
tuple

The float value of the variable and the units exposed as a string.

Examples

>>> hfss = Hfss()
>>> hfss["v1"] = "3N"
>>> print(hfss.variable_manager["v1"].decompose("v1"))
>>> (3.0, 'N')